Bugzilla – Attachment 262582 Details for
Bug 428845
ColorDialog: Begin implementation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
IDP Log In
|
Forgot Password
[patch]
Patch Uploaded.
color.patch (text/plain), 6.44 KB, created by
Neville Gao
on 2008-12-29 03:26:38 UTC
(
hide
)
Description:
Patch Uploaded.
Filename:
MIME Type:
Creator:
Neville Gao
Created:
2008-12-29 03:26:38 UTC
Size:
6.44 KB
patch
obsolete
>Index: Mono.UIAutomation.Winforms.mdp >=================================================================== >--- Mono.UIAutomation.Winforms.mdp (revision 122175) >+++ Mono.UIAutomation.Winforms.mdp (working copy) >@@ -1,4 +1,4 @@ >-<Project name="Mono.UIAutomation.Winforms" fileversion="2.0" DefaultNamespace="Mono.UIAutomation.Winforms" language="C#" clr-version="Net_2_0" UseParentDirectoryAsNamespace="True" targetFramework="2.0" ctype="DotNetProject"> >+<Project name="Mono.UIAutomation.Winforms" fileversion="2.0" language="C#" UseParentDirectoryAsNamespace="True" DefaultNamespace="Mono.UIAutomation.Winforms" clr-version="Net_2_0" targetFramework="2.0" ctype="DotNetProject"> > <Configurations active="Debug"> > <Configuration name="Debug" ctype="DotNetProjectConfiguration"> > <Output directory="bin/Debug" signAssembly="True" assemblyKeyFile="../../mono-uia.snk" assembly="UIAutomationWinforms" /> >@@ -356,6 +356,7 @@ > <File name="Mono.UIAutomation.Winforms.Events/PrintPreviewControl/ScrollPatternVerticallyScrollableEvent.cs" subtype="Code" buildaction="Compile" /> > <File name="Mono.UIAutomation.Winforms.Events/PrintPreviewControl/ScrollPatternVerticalScrollPercent.cs" subtype="Code" buildaction="Compile" /> > <File name="Mono.UIAutomation.Winforms.Events/PrintPreviewControl/ScrollPatternVerticalViewSizeEvent.cs" subtype="Code" buildaction="Compile" /> >+ <File name="Mono.UIAutomation.Winforms/BaseColorControlProvider.cs" subtype="Code" buildaction="Compile" /> > </Contents> > <References> > <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> >Index: Mono.UIAutomation.Winforms/BaseColorControlProvider.cs >=================================================================== >--- Mono.UIAutomation.Winforms/BaseColorControlProvider.cs (revision 0) >+++ Mono.UIAutomation.Winforms/BaseColorControlProvider.cs (revision 0) >@@ -0,0 +1,89 @@ >+// Permission is hereby granted, free of charge, to any person obtaining >+// a copy of this software and associated documentation files (the >+// "Software"), to deal in the Software without restriction, including >+// without limitation the rights to use, copy, modify, merge, publish, >+// distribute, sublicense, and/or sell copies of the Software, and to >+// permit persons to whom the Software is furnished to do so, subject to >+// the following conditions: >+// >+// The above copyright notice and this permission notice shall be >+// included in all copies or substantial portions of the Software. >+// >+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, >+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF >+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND >+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE >+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION >+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION >+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. >+// >+// Copyright (c) 2008 Novell, Inc. (http://www.novell.com) >+// >+// Authors: >+// Neville Gao <nevillegao@gmail.com> >+// >+ >+using System; >+using System.Windows.Forms; >+using System.Windows.Automation; >+using System.Windows.Automation.Provider; >+using Mono.UIAutomation.Winforms.Behaviors; >+ >+namespace Mono.UIAutomation.Winforms >+{ >+ internal class BaseColorControlProvider : FragmentRootControlProvider >+ { >+ #region Constructor >+ >+ public BaseColorControlProvider (ColorDialog.BaseColorControl baseColorControl) >+ : base (baseColorControl) >+ { >+ } >+ >+ #endregion >+ >+ #region SimpleControlProvider: Specializations >+ >+ protected override object GetProviderPropertyValue (int propertyId) >+ { >+ if (propertyId == AutomationElementIdentifiers.ControlTypeProperty.Id) >+ return ControlType.Text.Id; >+ else if (propertyId == AutomationElementIdentifiers.LocalizedControlTypeProperty.Id) >+ return "text"; >+ else >+ return base.GetProviderPropertyValue (propertyId); >+ } >+ >+ #endregion >+ >+ #region Internal Class: SmallColorControl Provider >+ >+ internal class SmallColorControlProvider : FragmentControlProvider >+ { >+ #region Constructor >+ >+ public SmallColorControlProvider (ColorDialog.BaseColorControl.SmallColorControl smallColorControl) >+ : base (smallColorControl) >+ { >+ } >+ >+ #endregion >+ >+ #region SimpleControlProvider: Specializations >+ >+ protected override object GetProviderPropertyValue (int propertyId) >+ { >+ if (propertyId == AutomationElementIdentifiers.ControlTypeProperty.Id) >+ return ControlType.Text.Id; >+ else if (propertyId == AutomationElementIdentifiers.LocalizedControlTypeProperty.Id) >+ return "text"; >+ else >+ return base.GetProviderPropertyValue (propertyId); >+ } >+ >+ #endregion >+ } >+ >+ #endregion >+ } >+} >Index: Mono.UIAutomation.Winforms/ProviderFactory.cs >=================================================================== >--- Mono.UIAutomation.Winforms/ProviderFactory.cs (revision 122175) >+++ Mono.UIAutomation.Winforms/ProviderFactory.cs (working copy) >@@ -114,6 +114,8 @@ > SWF.ToolBar tb; > SWF.TreeView tv; > SWF.PrintPreviewControl ppc; >+ SWF.ColorDialog.BaseColorControl bcc; >+ SWF.ColorDialog.BaseColorControl.SmallColorControl scc; > > SWF.StatusStrip ss; > SWF.MenuStrip ms; >@@ -238,6 +240,10 @@ > provider = new TreeViewProvider (tv); > else if ((ppc = component as SWF.PrintPreviewControl) != null) > provider = new PrintPreviewControlProvider (ppc); >+ else if ((bcc = component as SWF.ColorDialog.BaseColorControl) != null) >+ provider = new BaseColorControlProvider (bcc); >+ else if ((scc = component as SWF.ColorDialog.BaseColorControl.SmallColorControl) != null) >+ provider = new BaseColorControlProvider.SmallColorControlProvider (scc); > else { > //TODO: We have to solve the problem when there's a Custom control > // Ideally the first thing we do is send a wndproc message to >Index: Makefile.am >=================================================================== >--- Makefile.am (revision 122175) >+++ Makefile.am (working copy) >@@ -313,6 +313,7 @@ > Mono.UIAutomation.Winforms.Navigation/ParentNavigation.cs \ > Mono.UIAutomation.Winforms.Navigation/SimpleNavigation.cs \ > Mono.UIAutomation.Winforms/AssemblyInfo.cs \ >+ Mono.UIAutomation.Winforms/BaseColorControlProvider.cs \ > Mono.UIAutomation.Winforms/ButtonProvider.cs \ > Mono.UIAutomation.Winforms/CheckBoxProvider.cs \ > Mono.UIAutomation.Winforms/CheckedListBoxProvider.cs \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 428845
:
262582
|
263105
|
263526
|
272206