Browse Source

comdlg rename

pull/189/head
Nikita Tsukanov 11 years ago
parent
commit
9e16d0f163
  1. 2
      src/Gtk/Perspex.Gtk/GtkPlatform.cs
  2. 2
      src/Gtk/Perspex.Gtk/Perspex.Gtk.csproj
  3. 2
      src/Gtk/Perspex.Gtk/SystemDialogImpl.cs
  4. 4
      src/Perspex.Controls/Perspex.Controls.csproj
  5. 2
      src/Perspex.Controls/Platform/ISystemDialogImpl.cs
  6. 8
      src/Perspex.Controls/SystemDialog.cs
  7. 2
      src/Windows/Perspex.Win32/Perspex.Win32.csproj
  8. 2
      src/Windows/Perspex.Win32/SystemDialogImpl.cs
  9. 2
      src/Windows/Perspex.Win32/Win32Platform.cs

2
src/Gtk/Perspex.Gtk/GtkPlatform.cs

@ -37,7 +37,7 @@ namespace Perspex.Gtk
locator.Register(() => GtkKeyboardDevice.Instance, typeof(IKeyboardDevice));
locator.Register(() => s_instance, typeof(IPlatformSettings));
locator.Register(() => s_instance, typeof(IPlatformThreadingInterface));
locator.Register(() => new CommonDialogImpl(), typeof (ICommonDialogImpl));
locator.Register(() => new SystemDialogImpl(), typeof (ISystemDialogImpl));
SharedPlatform.Register();
}

2
src/Gtk/Perspex.Gtk/Perspex.Gtk.csproj

@ -50,7 +50,7 @@
</ItemGroup>
<ItemGroup>
<Compile Include="ClipboardImpl.cs" />
<Compile Include="CommonDialogImpl.cs" />
<Compile Include="SystemDialogImpl.cs" />
<Compile Include="CursorFactory.cs" />
<Compile Include="GtkExtensions.cs" />
<Compile Include="PopupImpl.cs" />

2
src/Gtk/Perspex.Gtk/CommonDialogImpl.cs → src/Gtk/Perspex.Gtk/SystemDialogImpl.cs

@ -10,7 +10,7 @@ using Perspex.Platform;
namespace Perspex.Gtk
{
using global::Gtk;
class CommonDialogImpl : ICommonDialogImpl
class SystemDialogImpl : ISystemDialogImpl
{
public Task<string[]> ShowFileDialogAsync(FileDialog dialog, IWindowImpl parent)
{

4
src/Perspex.Controls/Perspex.Controls.csproj

@ -41,7 +41,7 @@
<Compile Include="..\Shared\SharedAssemblyInfo.cs">
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="CommonDialog.cs" />
<Compile Include="SystemDialog.cs" />
<Compile Include="DockPanel\Aligner.cs" />
<Compile Include="DockPanel\Alignment.cs" />
<Compile Include="DockPanel\Alignments.cs" />
@ -65,7 +65,7 @@
<Compile Include="Margins.cs" />
<Compile Include="MenuItemAccessKeyHandler.cs" />
<Compile Include="Mixins\SelectableMixin.cs" />
<Compile Include="Platform\ICommonDialogImpl.cs" />
<Compile Include="Platform\ISystemDialogImpl.cs" />
<Compile Include="Presenters\IContentPresenter.cs" />
<Compile Include="Primitives\AccessText.cs" />
<Compile Include="Border.cs" />

2
src/Perspex.Controls/Platform/ICommonDialogImpl.cs → src/Perspex.Controls/Platform/ISystemDialogImpl.cs

@ -7,7 +7,7 @@ using Perspex.Platform;
namespace Perspex.Controls.Platform
{
public interface ICommonDialogImpl
public interface ISystemDialogImpl
{
Task<string[]> ShowFileDialogAsync(FileDialog dialog, IWindowImpl parent);
}

8
src/Perspex.Controls/CommonDialog.cs → src/Perspex.Controls/SystemDialog.cs

@ -6,7 +6,7 @@ using Splat;
namespace Perspex.Controls
{
public abstract class FileDialog : CommonDialog
public abstract class FileDialog : SystemDialog
{
public List<FileDialogFilter> Filters { get; set; } = new List<FileDialogFilter>();
public string InitialFileName { get; set; }
@ -20,7 +20,7 @@ namespace Perspex.Controls
public async Task<string> ShowAsync(Window window = null)
=>
((await Locator.Current.GetService<ICommonDialogImpl>().ShowFileDialogAsync(this, window?.PlatformImpl)) ??
((await Locator.Current.GetService<ISystemDialogImpl>().ShowFileDialogAsync(this, window?.PlatformImpl)) ??
new string[0]).FirstOrDefault();
}
@ -29,10 +29,10 @@ namespace Perspex.Controls
public bool AllowMultiple { get; set; }
public Task<string[]> ShowAsync(Window window = null)
=> Locator.Current.GetService<ICommonDialogImpl>().ShowFileDialogAsync(this, window?.PlatformImpl);
=> Locator.Current.GetService<ISystemDialogImpl>().ShowFileDialogAsync(this, window?.PlatformImpl);
}
public abstract class CommonDialog
public abstract class SystemDialog
{
public string Title { get; set; }
}

2
src/Windows/Perspex.Win32/Perspex.Win32.csproj

@ -67,7 +67,7 @@
<Link>Properties\SharedAssemblyInfo.cs</Link>
</Compile>
<Compile Include="ClipboardImpl.cs" />
<Compile Include="CommonDialogImpl.cs" />
<Compile Include="SystemDialogImpl.cs" />
<Compile Include="CursorFactory.cs" />
<Compile Include="Input\KeyInterop.cs" />
<Compile Include="Input\WindowsKeyboardDevice.cs" />

2
src/Windows/Perspex.Win32/CommonDialogImpl.cs → src/Windows/Perspex.Win32/SystemDialogImpl.cs

@ -13,7 +13,7 @@ using Perspex.Win32.Interop;
namespace Perspex.Win32
{
class CommonDialogImpl : ICommonDialogImpl
class SystemDialogImpl : ISystemDialogImpl
{
public unsafe Task<string[]> ShowFileDialogAsync(FileDialog dialog, IWindowImpl parent)
{

2
src/Windows/Perspex.Win32/Win32Platform.cs

@ -42,7 +42,7 @@ namespace Perspex.Win32
private static void InitializeInternal()
{
var locator = Locator.CurrentMutable;
locator.Register(() => new CommonDialogImpl(), typeof (ICommonDialogImpl));
locator.Register(() => new SystemDialogImpl(), typeof (ISystemDialogImpl));
locator.Register(() => new PopupImpl(), typeof(IPopupImpl));
locator.Register(() => new ClipboardImpl(), typeof(IClipboard));
locator.Register(() => WindowsKeyboardDevice.Instance, typeof(IKeyboardDevice));

Loading…
Cancel
Save