mirror of https://github.com/dahall/Vanara.git
Added ExplorerBrowser implementation (not currently visible or functional)
parent
2da25331d2
commit
15e758c9ee
|
@ -0,0 +1,29 @@
|
|||
using NUnit.Framework;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Vanara.Windows.Forms.Tests
|
||||
{
|
||||
[TestFixture()]
|
||||
public class ExplorerBrowserTests
|
||||
{
|
||||
[OneTimeSetUp]
|
||||
public void SetupFixture() => Application.EnableVisualStyles();
|
||||
|
||||
[Test()]
|
||||
public void ExplorerBrowserTest()
|
||||
{
|
||||
var frm = MakeTestForm(out var eb);
|
||||
eb.ContentFlags = ExplorerBrowserContentSectionOptions.NoSubfolders | ExplorerBrowserContentSectionOptions.NoWebView | ExplorerBrowserContentSectionOptions.HideFileNames
|
||||
| ExplorerBrowserContentSectionOptions.NoColumnHeader | ExplorerBrowserContentSectionOptions.UseSearchFolder;
|
||||
eb.ViewMode = ExplorerBrowserViewMode.Icon;
|
||||
frm.ShowDialog();
|
||||
}
|
||||
|
||||
private static Form MakeTestForm(out ExplorerBrowser eb)
|
||||
{
|
||||
var frm = new Form { Size = new System.Drawing.Size(300, 300) };
|
||||
frm.Controls.Add(eb = new ExplorerBrowser { Name = "eb", Dock = DockStyle.Fill });
|
||||
return frm;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -43,6 +43,7 @@
|
|||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.Composition" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.DirectoryServices" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.IO.Compression.FileSystem" />
|
||||
|
@ -134,6 +135,7 @@
|
|||
<Compile Include="UI\Dialogs\AccessControlEditorTests.cs" />
|
||||
<Compile Include="UI\Dialogs\TaskDialogTests.cs" />
|
||||
<Compile Include="UI\Dialogs\NetworkConnectionDialogTests.cs" />
|
||||
<Compile Include="UI\ExplorerBrowserTests.cs" />
|
||||
<Compile Include="UI\VisualThemeTests.cs" />
|
||||
<Compile Include="UI\Extensions\ImageListTests.cs" />
|
||||
<Compile Include="UI\Dialogs\CredentialsDialogTests.cs" />
|
||||
|
@ -264,7 +266,6 @@
|
|||
<Name>Vanara.Windows.Shell</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 822 B |
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,30 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Drawing.Design;
|
||||
using System.Windows.Forms.Design;
|
||||
|
||||
namespace Vanara.Windows.Forms.Design
|
||||
{
|
||||
[global::System.Security.Permissions.PermissionSet(global::System.Security.Permissions.SecurityAction.Demand, Name = "FullTrust")]
|
||||
[EditorBrowsable(EditorBrowsableState.Never)]
|
||||
internal class ExplorerBrowserDesigner : AttributedControlDesigner<ExplorerBrowser>, IToolboxUser
|
||||
{
|
||||
public ExplorerBrowserDesigner() { }
|
||||
|
||||
public override SelectionRules SelectionRules => (SelectionRules.Visible | SelectionRules.AllSizeable | SelectionRules.Moveable);
|
||||
|
||||
protected override IEnumerable<string> PropertiesToRemove { get; } = new string[] { "AutoEllipsis", "BackColor",
|
||||
"BackgroundImage", "BackgroundImageLayout", "CausesValidation", "ContextMenuStrip", "Cursor", "Font",
|
||||
"ForeColor", "IMEMode", "Padding", "Text" };
|
||||
|
||||
public override void Initialize(IComponent component)
|
||||
{
|
||||
base.Initialize(component);
|
||||
AutoResizeHandles = true;
|
||||
}
|
||||
|
||||
bool IToolboxUser.GetToolSupported(ToolboxItem tool) => true;
|
||||
|
||||
void IToolboxUser.ToolPicked(ToolboxItem tool) { }
|
||||
}
|
||||
}
|
|
@ -43,6 +43,12 @@ BitmapProperty, BoolProperty, CloakingSource, CollapsiblePanelBorderCondition, C
|
|||
<ItemGroup>
|
||||
<Compile Remove="_InProgress_\**\*" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Remove="Controls\ExplorerBrowser.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Controls\ExplorerBrowser.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System.Design" />
|
||||
<Reference Include="System.Drawing" />
|
||||
|
@ -51,8 +57,12 @@ BitmapProperty, BoolProperty, CloakingSource, CollapsiblePanelBorderCondition, C
|
|||
<Reference Include="System" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="Controls\ExplorerBrowser.bmp" />
|
||||
<EmbeddedResource Include="Extenders\GlassExtenderProvider.bmp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="Controls\ExplorerBrowser.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\Core\Vanara.Core.csproj" />
|
||||
<ProjectReference Include="..\PInvoke\AclUI\Vanara.PInvoke.AclUI.csproj" />
|
||||
|
@ -66,6 +76,7 @@ BitmapProperty, BoolProperty, CloakingSource, CollapsiblePanelBorderCondition, C
|
|||
<ProjectReference Include="..\PInvoke\User32\Vanara.PInvoke.User32.csproj" />
|
||||
<ProjectReference Include="..\PInvoke\UxTheme\Vanara.PInvoke.UxTheme.csproj" />
|
||||
<ProjectReference Include="..\Security\Vanara.Security.csproj" />
|
||||
<ProjectReference Include="..\Windows.Shell\Vanara.Windows.Shell.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Controls\CollapsiblePanel.cs">
|
||||
|
@ -98,9 +109,6 @@ BitmapProperty, BoolProperty, CloakingSource, CollapsiblePanelBorderCondition, C
|
|||
<Compile Update="Controls\IPAddressBox.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Controls\IPAddressBox.Designer.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
<Compile Update="Controls\SplitButton.cs">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
|
|
Loading…
Reference in New Issue