diff options
author | Larry Ewing <lewing@gmail.com> | 2018-05-16 23:10:33 +0300 |
---|---|---|
committer | Larry Ewing <lewing@microsoft.com> | 2018-07-16 22:05:49 +0300 |
commit | f1493a820084403b92e417f517a7be7009f3e879 (patch) | |
tree | 7f95cc1823db532ce4221a7d5334be5cc312f3c4 | |
parent | be3e495b986db4eb09ecd206718a7455d581a765 (diff) |
Rename notifying listner adaptor users
15 files changed, 38 insertions, 53 deletions
diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs index b9835de..73785e2 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/BrushTabViewController.cs @@ -8,7 +8,7 @@ using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac { - class BrushTabViewController : PropertyTabViewController<BrushPropertyViewModel> + class BrushTabViewController : NotifyingTabViewController<BrushPropertyViewModel> { public BrushTabViewController () { @@ -90,7 +90,7 @@ namespace Xamarin.PropertyEditing.Mac public override void WillSelect (NSTabView tabView, NSTabViewItem item) { - var brushController = item.ViewController as PropertyViewController<BrushPropertyViewModel>; + var brushController = item.ViewController as NotifyingViewController<BrushPropertyViewModel>; if (brushController != null) brushController.ViewModel = ViewModel; diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentTabVewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentTabVewController.cs index 70fae75..84aaefa 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentTabVewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentTabVewController.cs @@ -5,7 +5,7 @@ using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac { - class ColorComponentTabViewController : PropertyTabViewController<SolidBrushViewModel> + class ColorComponentTabViewController : NotifyingTabViewController<SolidBrushViewModel> { public ColorComponentTabViewController () { diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentViewController.cs index 03e7241..c5173de 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ColorComponentViewController.cs @@ -6,7 +6,7 @@ using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac { - class ColorComponentViewController : PropertyViewController<SolidBrushViewModel> + class ColorComponentViewController : NotifyingViewController<SolidBrushViewModel> { ColorComponentEditor editor; diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/EmptyBrushEditorViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/EmptyBrushEditorViewController.cs index bf68e53..bbb3ad5 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/EmptyBrushEditorViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/EmptyBrushEditorViewController.cs @@ -5,7 +5,7 @@ using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac { - class EmptyBrushEditorViewController : PropertyViewController<BrushPropertyViewModel> + class EmptyBrushEditorViewController : NotifyingViewController<BrushPropertyViewModel> { public EmptyBrushEditorViewController () { diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/EmptyClass.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/EmptyClass.cs deleted file mode 100644 index b4af093..0000000 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/EmptyClass.cs +++ /dev/null @@ -1,10 +0,0 @@ -using System; -namespace Xamarin.PropertyEditing.Mac.Controls.Custom -{ - public class EmptyClass - { - public EmptyClass () - { - } - } -} diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs index f27fe42..725c8a4 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/HistoryLayer.cs @@ -22,9 +22,9 @@ namespace Xamarin.PropertyEditing.Mac { } - readonly CALayer previous = new CALayerQuick (); - readonly CALayer current = new CALayerQuick (); - readonly CALayer last = new CALayerQuick (); + readonly CALayer previous = new UnanimatedLayer (); + readonly CALayer current = new UnanimatedLayer (); + readonly CALayer last = new UnanimatedLayer (); readonly CALayer lastClip = new CALayer { BorderWidth = 1, diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs index 7a1560e..f161c13 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/HueLayer.cs @@ -42,7 +42,7 @@ namespace Xamarin.PropertyEditing.Mac CornerRadius = BorderRadius, }; - readonly CALayer grip = new CALayerQuick { + readonly CALayer grip = new UnanimatedLayer { BorderColor = NSColor.Text.CGColor, BorderWidth = 2, CornerRadius = GripRadius, diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialBrushEditorViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialBrushEditorViewController.cs index aeb6aaa..1542588 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialBrushEditorViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/MaterialBrushEditorViewController.cs @@ -7,7 +7,7 @@ using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac { - class MaterialBrushEditorViewController : PropertyViewController<BrushPropertyViewModel> + class MaterialBrushEditorViewController : NotifyingViewController<BrushPropertyViewModel> { public MaterialBrushEditorViewController () { diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/PropertyTabViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingTabViewController.cs index f975dda..ede808c 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/PropertyTabViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingTabViewController.cs @@ -5,9 +5,9 @@ using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac { - class PropertyTabViewController<T> : NSTabViewController, INotifyingListner<T> where T : NotifyingObject + class NotifyingTabViewController<T> : NSTabViewController, INotifyingListner<T> where T : NotifyingObject { - public PropertyTabViewController () : base () + public NotifyingTabViewController () : base () { adaptor = new NotifyingViewAdaptor<T> (this); } diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/PropertyViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingViewController.cs index ddb9531..86c58d4 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/PropertyViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/NotifyingViewController.cs @@ -10,14 +10,14 @@ using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac { - class PropertyViewController<T> : NSViewController, INotifyingListner<T> where T : NotifyingObject + class NotifyingViewController<T> : NSViewController, INotifyingListner<T> where T : NotifyingObject { internal T ViewModel { get => adaptor.ViewModel; set => adaptor.ViewModel = value; } - public PropertyViewController () + public NotifyingViewController () { adaptor = new NotifyingViewAdaptor<T> (this); } diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ResourceBrushViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ResourceBrushViewController.cs index 7b32594..b0d6c65 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/ResourceBrushViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ResourceBrushViewController.cs @@ -155,7 +155,7 @@ namespace Xamarin.PropertyEditing.Mac } } - class ResourceBrushViewController :PropertyViewController<BrushPropertyViewModel> + class ResourceBrushViewController : NotifyingViewController<BrushPropertyViewModel> { ResourceOutlineView resourceSelector; ResourceBrushPropertyViewDelegate viewDelegate; diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs index de510a0..0f44458 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/ShadeLayer.cs @@ -38,13 +38,13 @@ namespace Xamarin.PropertyEditing.Mac { } - readonly CALayer grip = new CALayerQuick { + readonly CALayer grip = new UnanimatedLayer { BorderColor = new CGColor (1, 1, 1), BorderWidth = 1, CornerRadius = GripRadius, }; - readonly CAGradientLayer brightnessLayer = new CAGradientLayerQuick { + readonly CAGradientLayer brightnessLayer = new UnanimatedGradientLayer { Colors = new [] { new CGColor (0f, 0f, 0f, 1f), new CGColor (0f, 0f, 0f, 0f) @@ -52,7 +52,7 @@ namespace Xamarin.PropertyEditing.Mac CornerRadius = BorderRadius, }; - readonly CAGradientLayer saturationLayer = new CAGradientLayerQuick { + readonly CAGradientLayer saturationLayer = new UnanimatedGradientLayer { Colors = new [] { new CGColor (1f, 1f, 1f), new CGColor (1f, .3f, 0f) diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/SolidColorBrushEditor.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/SolidColorBrushEditor.cs index 67b1896..6574552 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/SolidColorBrushEditor.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/SolidColorBrushEditor.cs @@ -44,12 +44,6 @@ namespace Xamarin.PropertyEditing.Mac Initialize (); } - [Export ("initWithCoder:")] - public SolidColorBrushEditor (NSCoder coder) : base (coder) - { - Initialize (); - } - public SolidColorBrushEditor (CGRect frame) : base (frame) { Initialize (); diff --git a/Xamarin.PropertyEditing.Mac/Controls/Custom/SolidColorBrushEditorViewController.cs b/Xamarin.PropertyEditing.Mac/Controls/Custom/SolidColorBrushEditorViewController.cs index 99d2677..3182876 100644 --- a/Xamarin.PropertyEditing.Mac/Controls/Custom/SolidColorBrushEditorViewController.cs +++ b/Xamarin.PropertyEditing.Mac/Controls/Custom/SolidColorBrushEditorViewController.cs @@ -5,7 +5,7 @@ using Xamarin.PropertyEditing.ViewModels; namespace Xamarin.PropertyEditing.Mac { - class SolidColorBrushEditorViewController : PropertyViewController<BrushPropertyViewModel> + class SolidColorBrushEditorViewController : NotifyingViewController<BrushPropertyViewModel> { SolidColorBrushEditor brushEditor; diff --git a/Xamarin.PropertyEditing.Mac/Xamarin.PropertyEditing.Mac.csproj b/Xamarin.PropertyEditing.Mac/Xamarin.PropertyEditing.Mac.csproj index 0c7645e..cb9fa69 100644 --- a/Xamarin.PropertyEditing.Mac/Xamarin.PropertyEditing.Mac.csproj +++ b/Xamarin.PropertyEditing.Mac/Xamarin.PropertyEditing.Mac.csproj @@ -1,4 +1,4 @@ -<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
@@ -25,14 +25,18 @@ <EnablePackageSigning>false</EnablePackageSigning>
<IncludeMonoRuntime>false</IncludeMonoRuntime>
<UseSGen>false</UseSGen>
- <HttpClientHandler></HttpClientHandler>
- <LinkMode></LinkMode>
- <XamMacArch></XamMacArch>
+ <HttpClientHandler>
+ </HttpClientHandler>
+ <LinkMode>
+ </LinkMode>
+ <XamMacArch>
+ </XamMacArch>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
- <DefineConstants></DefineConstants>
+ <DefineConstants>
+ </DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<EnableCodeSigning>false</EnableCodeSigning>
@@ -40,9 +44,12 @@ <EnablePackageSigning>false</EnablePackageSigning>
<IncludeMonoRuntime>false</IncludeMonoRuntime>
<UseSGen>false</UseSGen>
- <HttpClientHandler></HttpClientHandler>
- <LinkMode></LinkMode>
- <XamMacArch></XamMacArch>
+ <HttpClientHandler>
+ </HttpClientHandler>
+ <LinkMode>
+ </LinkMode>
+ <XamMacArch>
+ </XamMacArch>
</PropertyGroup>
<!-- Build with strong naming if built as part of some Xamarin VSIX, normally referencing this project as a git submodule under external\Xamarin.PropertyEditing -->
<PropertyGroup Condition="Exists('../../../xamarin.snk')">
@@ -95,8 +102,8 @@ <Compile Include="Controls\BrushEditorControl.cs" />
<Compile Include="Controls\Custom\SolidColorBrushEditor.cs" />
<Compile Include="Controls\Custom\BrushTabViewController.cs" />
- <Compile Include="Controls\Custom\PropertyTabViewController.cs" />
- <Compile Include="Controls\Custom\PropertyViewController.cs" />
+ <Compile Include="Controls\Custom\NotifyingTabViewController.cs" />
+ <Compile Include="Controls\Custom\NotifyingViewController.cs" />
<Compile Include="Controls\Custom\SolidColorBrushEditorViewController.cs" />
<Compile Include="Controls\Custom\DrawingExtensions.cs" />
<Compile Include="Controls\Custom\ResourceBrushViewController.cs" />
@@ -121,17 +128,11 @@ <Compile Include="Controls\Custom\ComponentSpinEditor.cs" />
</ItemGroup>
<ItemGroup>
- <Folder Include="Controls\" />
- <Folder Include="Controls\Custom\" />
- <Folder Include="Resources\" />
<Compile Include="Themes\MacThemeManager.cs" />
<Compile Include="Controls\BaseEditorControl.cs" />
<Compile Include="Controls\ErrorMessageView.cs" />
</ItemGroup>
- <ItemGroup>
- <Folder Include="Controls\" />
- <Folder Include="Themes\" />
- </ItemGroup>
+ <ItemGroup />
<ItemGroup>
<ProjectReference Include="..\Xamarin.PropertyEditing\Xamarin.PropertyEditing.csproj">
<Project>{A0B6FE73-D046-4E1C-BA9D-F20683889C5A}</Project>
@@ -207,4 +208,4 @@ <BundleResource Include="Resources\custom-expression-32~dark%402x.png" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Mac\Xamarin.Mac.CSharp.targets" />
-</Project>
+</Project>
\ No newline at end of file |