jedidotnet-commits Mailing List for JEDI.NET (Page 13)
Status: Pre-Alpha
Brought to you by:
jedi_mbe
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(81) |
Jul
(7) |
Aug
(8) |
Sep
(2) |
Oct
|
Nov
(47) |
Dec
(30) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(32) |
Feb
|
Mar
(86) |
Apr
|
May
(1) |
Jun
(24) |
Jul
(4) |
Aug
(5) |
Sep
(4) |
Oct
|
Nov
|
Dec
(9) |
From: Marcel B. <jed...@us...> - 2004-06-16 13:57:51
|
Update of /cvsroot/jedidotnet/main/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29881/bin Log Message: Directory /cvsroot/jedidotnet/main/bin added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-16 13:57:50
|
Update of /cvsroot/jedidotnet/main/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29881/assemblies Log Message: Directory /cvsroot/jedidotnet/main/assemblies added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-16 13:57:32
|
Update of /cvsroot/jedidotnet/tools In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29531/tools Log Message: Directory /cvsroot/jedidotnet/tools added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-16 13:57:31
|
Update of /cvsroot/jedidotnet/main In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29531/main Log Message: Directory /cvsroot/jedidotnet/main added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-16 13:57:15
|
Update of /cvsroot/jedidotnet/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29531/docs Log Message: Directory /cvsroot/jedidotnet/docs added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-16 13:55:44
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28481/dev/jedi_mbe/assemblies Modified Files: HmiTestGroup.bdsgroup Jedi.Core.bdsproj Jedi.Core.dpk Jedi.Drawing.bdsproj Jedi.Drawing.dpk Jedi.Windows.Forms.Hmi.bdsproj Jedi.Windows.Forms.Hmi.dpk Log Message: Style cleaned Index: Jedi.Windows.Forms.Hmi.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/Jedi.Windows.Forms.Hmi.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Windows.Forms.Hmi.bdsproj 12 Jun 2004 18:31:37 -0000 1.1 --- Jedi.Windows.Forms.Hmi.bdsproj 16 Jun 2004 13:55:34 -0000 1.2 *************** *** 120,125 **** <Directories Name="PackageDLLOutputDir" Type="String">..\bin</Directories> <Directories Name="PackageDCPOutputDir" Type="String">..\lib</Directories> ! <Directories Name="SearchPath" Type="String">..\bin;f:\program files\common files\borland shared\bds\shared assemblies\2.0;c:\windows\microsoft.net\framework\v1.1.4322;f:\programming\jedi\j-wfl\bin</Directories> ! <Directories Name="Packages" Type="String">Jedi.Core;Jedi.Drawing;c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Drawing.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.dll;Borland.Delphi</Directories> <Directories Name="Conditionals" Type="String"></Directories> <Directories Name="DebugSourceDirs" Type="String"></Directories> --- 120,125 ---- <Directories Name="PackageDLLOutputDir" Type="String">..\bin</Directories> <Directories Name="PackageDCPOutputDir" Type="String">..\lib</Directories> ! <Directories Name="SearchPath" Type="String">..\bin;f:\program files\common files\borland shared\bds\shared assemblies\2.0;c:\windows\microsoft.net\framework\v1.1.4322;f:\programming\jedi\j-wfl\bin;F:\Programming\JEDI\JediDotNet\dev\jedi_mbe\assemblies\bin</Directories> ! <Directories Name="Packages" Type="String">F:\Programming\JEDI\JediDotNet\dev\jedi_mbe\assemblies\bin\Jedi.Core.dll;F:\Programming\JEDI\JediDotNet\dev\jedi_mbe\assemblies\bin\Jedi.Drawing.dll;c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.Drawing.dll;c:\windows\microsoft.net\framework\v1.1.4322\System.dll;Borland.Delphi</Directories> <Directories Name="Conditionals" Type="String"></Directories> <Directories Name="DebugSourceDirs" Type="String"></Directories> *************** *** 160,163 **** --- 160,164 ---- + <FileList> <File FileName="f:\program files\common files\borland shared\bds\shared assemblies\2.0\Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="7.1.1523.17956" LinkUnits="False"/> *************** *** 166,171 **** <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Windows.Forms" AssemblyName="System.Windows.Forms" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\mscorlib.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="mscorlib" AssemblyName="mscorlib" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="bin\Jedi.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.Drawing" AssemblyName="Jedi.Drawing" Version="1.0.0.0" LinkUnits="False"/> ! <File FileName="bin\Jedi.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.Core" AssemblyName="Jedi.Core" Version="1.0.0.0" LinkUnits="False"/> <File FileName="..\run\Jedi.Windows.Forms.Hmi.Leds.pas" ContainerId="" ModuleName="Jedi.Windows.Forms.Hmi.Leds"/> </FileList> --- 167,172 ---- <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Windows.Forms" AssemblyName="System.Windows.Forms" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\mscorlib.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="mscorlib" AssemblyName="mscorlib" Version="1.0.5000.0" LinkUnits="False"/> ! <File FileName="bin\Jedi.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.Drawing" AssemblyName="Jedi.Drawing" LinkUnits="False"/> ! <File FileName="bin\Jedi.Core.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Jedi.Core" AssemblyName="Jedi.Core" LinkUnits="False"/> <File FileName="..\run\Jedi.Windows.Forms.Hmi.Leds.pas" ContainerId="" ModuleName="Jedi.Windows.Forms.Hmi.Leds"/> </FileList> Index: HmiTestGroup.bdsgroup =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/HmiTestGroup.bdsgroup,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HmiTestGroup.bdsgroup 12 Jun 2004 18:31:37 -0000 1.1 --- HmiTestGroup.bdsgroup 16 Jun 2004 13:55:34 -0000 1.2 *************** *** 9,20 **** </Option> </PersonalityInfo> ! <Default.Personality> ! ! <Projects ActiveProject="Jedi.Core.dll"> ! <Projects Name="Jedi.Drawing.dll" Type="String">Jedi.Drawing.bdsproj</Projects> <Projects Name="Jedi.Core.dll" Type="String">Jedi.Core.bdsproj</Projects> <Projects Name="Jedi.Windows.Forms.Hmi.dll" Type="String">Jedi.Windows.Forms.Hmi.bdsproj</Projects> <Projects Name="examples.hmi.leds.singleled.exe" Type="String">..\examples\hmi\leds\SingleLed\examples.hmi.leds.singleled.bdsproj</Projects> ! <Projects Name="Targets" Type="String">Jedi.Drawing.dll Jedi.Core.dll Jedi.Windows.Forms.Hmi.dll examples.hmi.leds.singleled.exe</Projects> </Projects> <Dependencies> --- 9,18 ---- </Option> </PersonalityInfo> ! <Default.Personality> <Projects ActiveProject="Jedi.Core.dll"> <Projects Name="Jedi.Core.dll" Type="String">Jedi.Core.bdsproj</Projects> + <Projects Name="Jedi.Drawing.dll" Type="String">Jedi.Drawing.bdsproj</Projects> <Projects Name="Jedi.Windows.Forms.Hmi.dll" Type="String">Jedi.Windows.Forms.Hmi.bdsproj</Projects> <Projects Name="examples.hmi.leds.singleled.exe" Type="String">..\examples\hmi\leds\SingleLed\examples.hmi.leds.singleled.bdsproj</Projects> ! <Projects Name="Targets" Type="String">Jedi.Core.dll Jedi.Drawing.dll Jedi.Windows.Forms.Hmi.dll examples.hmi.leds.singleled.exe</Projects> </Projects> <Dependencies> Index: Jedi.Drawing.dpk =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/Jedi.Drawing.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Drawing.dpk 12 Jun 2004 18:31:37 -0000 1.1 --- Jedi.Drawing.dpk 16 Jun 2004 13:55:34 -0000 1.2 *************** *** 34,42 **** [assembly: AssemblyTitle('Jedi.Drawing')] [assembly: AssemblyDescription('.NET drawing classes.')] - //[assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] - //[assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] --- 34,40 ---- Index: Jedi.Core.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/Jedi.Core.bdsproj,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Core.bdsproj 15 Jun 2004 20:14:59 -0000 1.2 --- Jedi.Core.bdsproj 16 Jun 2004 13:55:34 -0000 1.3 *************** *** 159,163 **** </VersionInfo> - <FileList> <File FileName="f:\program files\common files\borland shared\bds\shared assemblies\2.0\Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="7.1.1523.17956" LinkUnits="False"/> --- 159,162 ---- Index: Jedi.Windows.Forms.Hmi.dpk =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/Jedi.Windows.Forms.Hmi.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Windows.Forms.Hmi.dpk 12 Jun 2004 18:31:37 -0000 1.1 --- Jedi.Windows.Forms.Hmi.dpk 16 Jun 2004 13:55:34 -0000 1.2 *************** *** 35,47 **** contains ! Jedi.Windows.Forms.Hmi.Leds in '..\run\Jedi.Windows.Forms.Hmi.Leds.pas' {Jedi.Windows.Forms.Hmi.Leds.LedControl: System.Windows.Forms.Control}; [assembly: AssemblyTitle('Jedi.Windows.Forms.Hmi')] [assembly: AssemblyDescription('.NET WinForms HMI controls.')] - //[assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] - //[assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] --- 35,45 ---- contains ! Jedi.Windows.Forms.Hmi.Leds in '..\run\Jedi.Windows.Forms.Hmi.Leds.pas'; [assembly: AssemblyTitle('Jedi.Windows.Forms.Hmi')] [assembly: AssemblyDescription('.NET WinForms HMI controls.')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] Index: Jedi.Drawing.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/Jedi.Drawing.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Drawing.bdsproj 12 Jun 2004 18:31:37 -0000 1.1 --- Jedi.Drawing.bdsproj 16 Jun 2004 13:55:34 -0000 1.2 *************** *** 159,163 **** </VersionInfo> - <FileList> <File FileName="f:\program files\common files\borland shared\bds\shared assemblies\2.0\Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="borland.delphi" Version="7.1.1523.17956" LinkUnits="False"/> --- 159,162 ---- Index: Jedi.Core.dpk =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/Jedi.Core.dpk,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Core.dpk 15 Jun 2004 20:14:59 -0000 1.2 --- Jedi.Core.dpk 16 Jun 2004 13:55:34 -0000 1.3 *************** *** 37,45 **** [assembly: AssemblyTitle('Jedi.Core')] [assembly: AssemblyDescription('.NET core classes.')] - //[assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] - //[assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] --- 37,43 ---- |
From: Marcel B. <jed...@us...> - 2004-06-16 13:55:44
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28481/dev/jedi_mbe/run Modified Files: Jedi.Collections.pas Jedi.Drawing.pas Jedi.Windows.Forms.Hmi.Leds.pas Log Message: Style cleaned Index: Jedi.Drawing.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/run/Jedi.Drawing.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Drawing.pas 12 Jun 2004 18:31:38 -0000 1.1 --- Jedi.Drawing.pas 16 Jun 2004 13:55:34 -0000 1.2 *************** *** 16,35 **** Contributor(s): ! Last Modified: 2004-05-16 ! ! You may retrieve the latest version of this file at the Project JEDI's JWFL home page, located at ! http://jwfl.sourceforge.net Known Issues: ---------------------------------------------------------------------------------------------------} unit Jedi.Drawing; interface uses System.Drawing; type ! ColorHandling = class sealed (System.Object) public { Blends two colors. The resulting color will be a mix of the two colors. The percentage parameter determines --- 16,37 ---- Contributor(s): ! You may retrieve the latest version of this file at the JEDI.NET home page, located at ! http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} + // $Id$ unit Jedi.Drawing; interface + {$REGION 'interface uses'} uses System.Drawing; + {$ENDREGION} + {$REGION 'Color related'} type ! ColorUtils = class sealed (System.Object) public { Blends two colors. The resulting color will be a mix of the two colors. The percentage parameter determines *************** *** 43,51 **** class function Darken(baseColor: Color; percentage: Integer): Color; static; end; implementation ! {$REGION 'ColorHandling'} ! class function ColorHandling.Blend(firstColor, secondColor: Color; percentage: Integer): Color; begin Result := Color.FromArgb( --- 45,54 ---- class function Darken(baseColor: Color; percentage: Integer): Color; static; end; + {$ENDREGION} implementation ! {$REGION 'ColorUtils'} ! class function ColorUtils.Blend(firstColor, secondColor: Color; percentage: Integer): Color; begin Result := Color.FromArgb( *************** *** 56,67 **** end; ! class function ColorHandling.Brighten(baseColor: Color; percentage: Integer): Color; begin ! Result := ColorHandling.Blend(baseColor, Color.White, percentage); end; ! class function ColorHandling.Darken(baseColor: Color; percentage: Integer): Color; begin ! Result := ColorHandling.Blend(baseColor, Color.Black, percentage); end; {$ENDREGION} --- 59,70 ---- end; ! class function ColorUtils.Brighten(baseColor: Color; percentage: Integer): Color; begin ! Result := ColorUtils.Blend(baseColor, Color.White, percentage); end; ! class function ColorUtils.Darken(baseColor: Color; percentage: Integer): Color; begin ! Result := ColorUtils.Blend(baseColor, Color.Black, percentage); end; {$ENDREGION} Index: Jedi.Windows.Forms.Hmi.Leds.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/run/Jedi.Windows.Forms.Hmi.Leds.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Windows.Forms.Hmi.Leds.pas 15 Jun 2004 19:33:19 -0000 1.2 --- Jedi.Windows.Forms.Hmi.Leds.pas 16 Jun 2004 13:55:34 -0000 1.3 *************** *** 16,21 **** Contributor(s): ! You may retrieve the latest version of this file at the Project JEDI's JWFL home page, located at ! http://jwfl.sourceforge.net Known Issues: --- 16,21 ---- Contributor(s): ! You may retrieve the latest version of this file at the JEDI.NET home page, located at [...2078 lines suppressed...] end; end; --- 1514,1530 ---- i: Integer; begin ! if not ReferenceEquals(FLedStyle, value) then begin ! FLedStyle.Free; ! FLedStyle := value; ! Include(FLedStyle.SettingsChanged, Style_SettingsChanged); ! Include(FLedStyle.SizeChanged, Style_SizeChanged); ! Include(FLedStyle.StateAdded, Style_StateAdded); ! Include(FLedStyle.StateRemoved, Style_StateRemoved); ! for i := 0 to FInitializeCount - 1 do ! FLedStyle.BeginInit; ! if not IsInitializing and (FLedStateIdx >= FLedStyle.States.Count) then ! FLedStateIdx := FLedStyle.States.Count - 1; ! FLedStyle.InvalidateSize; end; end; Index: Jedi.Collections.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/run/Jedi.Collections.pas,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Jedi.Collections.pas 15 Jun 2004 19:32:44 -0000 1.2 --- Jedi.Collections.pas 16 Jun 2004 13:55:34 -0000 1.3 *************** *** 41,60 **** InlineCollectionUtils = class (System.Object) strict private ! class var _collectionValue: string; public { Retrieves the default text of the collection converter. } class function CollectionConverterText: string; static; - { Creates a property descriptor that will function as a 'new item' property. The property will get the specified - name and description. } - class function CreateNewItemProperty(baseDescriptor: PropertyDescriptor; name, - description: string; propertyId: System.Object): PropertyDescriptor; overload; static; [...1253 lines suppressed...] - 'Adds a new item to the collection using the specified key', 0)); - end; - - function InlineDictionaryBase.GetItemProperties: PropertyDescriptorCollection; - var - di: IDictionaryEnumerator; - begin - Result := PropertyDescriptorCollection.Create(nil); - di := GetEnumerator; - while di.MoveNext do - Result.Add(GetItemProperty(di.Key, di.Value)); - end; - - function InlineDictionaryBase.GetService(serviceType: System.Type): System.Object; - begin - Result := nil; - end; {$ENDREGION} --- 1156,1159 ---- |
From: Marcel B. <jed...@us...> - 2004-06-15 20:15:11
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21302/dev/jedi_mbe/assemblies Modified Files: Jedi.Core.bdsproj Jedi.Core.dpk Log Message: Forgot these :( Index: Jedi.Core.dpk =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/Jedi.Core.dpk,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Core.dpk 12 Jun 2004 18:31:37 -0000 1.1 --- Jedi.Core.dpk 15 Jun 2004 20:14:59 -0000 1.2 *************** *** 32,36 **** contains ! Jedi.Collections in '..\run\Jedi.Collections.pas'; [assembly: AssemblyTitle('Jedi.Core')] --- 32,37 ---- contains ! Jedi.Collections in '..\run\Jedi.Collections.pas', ! Jedi.System in '..\run\Jedi.System.pas'; [assembly: AssemblyTitle('Jedi.Core')] Index: Jedi.Core.bdsproj =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/assemblies/Jedi.Core.bdsproj,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Core.bdsproj 12 Jun 2004 18:31:37 -0000 1.1 --- Jedi.Core.bdsproj 15 Jun 2004 20:14:59 -0000 1.2 *************** *** 166,169 **** --- 166,170 ---- <File FileName="$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="System.Drawing" AssemblyName="System.Drawing" Version="1.0.5000.0" LinkUnits="False"/> <File FileName="..\run\Jedi.Collections.pas" ContainerId="" ModuleName="Jedi.Collections"/> + <File FileName="..\run\Jedi.System.pas" ContainerId="" ModuleName="Jedi.System"/> </FileList> </DelphiDotNet.Personality> |
From: Marcel B. <jed...@us...> - 2004-06-15 19:33:42
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19954/dev/jedi_mbe/run Modified Files: Jedi.Windows.Forms.Hmi.Leds.pas Log Message: Updated to changes in inline collection editing Index: Jedi.Windows.Forms.Hmi.Leds.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/run/Jedi.Windows.Forms.Hmi.Leds.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Windows.Forms.Hmi.Leds.pas 12 Jun 2004 18:31:38 -0000 1.1 --- Jedi.Windows.Forms.Hmi.Leds.pas 15 Jun 2004 19:33:19 -0000 1.2 *************** *** 16,21 **** Contributor(s): - Last Modified: 2004-06-09 - You may retrieve the latest version of this file at the Project JEDI's JWFL home page, located at http://jwfl.sourceforge.net --- 16,19 ---- *************** *** 23,27 **** Known Issues: ---------------------------------------------------------------------------------------------------} ! unit Jedi.Windows.Forms.Hmi.Leds; --- 21,25 ---- Known Issues: ---------------------------------------------------------------------------------------------------} ! // $Id$ unit Jedi.Windows.Forms.Hmi.Leds; *************** *** 53,85 **** LedFrameStyle = (None, Flush, Sunken, Raised); - (*LedStateCollectionConverter = class(System.ComponentModel.TypeConverter) - public - type - LedStateItemProperty = class(System.ComponentModel.TypeConverter.SimplePropertyDescriptor) - strict private - mCollection: LedStateCollection; - mItem: LedStateBase; - public - constructor Create(collection: LedStateCollection; ledState: LedStateBase); - function GetValue(component: System.Object): System.Object; override; - procedure SetValue(component, value: System.Object); override; - function GetChildProperties(instance: System.Object; - filter: array of Attribute): PropertyDescriptorCollection; override; - end; - function CanConvertTo(context: ITypeDescriptorContext; destinationType: System.Type): Boolean; override; - function ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; - destinationType: System.Type): System.Object; override; - function GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; override; - function GetProperties(context: ITypeDescriptorContext; value: System.Object; - attributes: array of Attribute): PropertyDescriptorCollection; override; - end; - - LedStateCollectionEditor = class (System.Drawing.Design.UITypeEditor) - function GetEditStyle(context: ITypeDescriptorContext): UITypeEditorEditStyle; override; - function EditValue(context: ITypeDescriptorContext; provider: IServiceProvider; - value: System.Object): System.Object; override; - end;*) - - // [TypeConverter(TypeOf(LedStateCollectionConverter)), Editor(TypeOf(LedStateCollectionEditor), TypeOf(UITypeEditor))] LedStateCollection = class sealed (InlineCollectionBase) strict private --- 51,54 ---- *************** *** 88,91 **** --- 57,62 ---- function GetItem(index: Integer): LedStateBase; procedure SetItem(index: Integer; value: LedStateBase); + procedure OnClear; override; + procedure OnClearComplete; override; procedure OnInsert(index: Integer; value: System.Object); override; procedure OnInsertComplete(index: Integer; value: System.Object); override; *************** *** 95,101 **** procedure OnValidate(value: System.Object); override; procedure AddItem(value: System.Object; addPropertyId: System.Object); override; function GetCollectionValue: string; override; function GetNewItemProperties: PropertyDescriptorCollection; override; - function GetItemDescription(index: integer): string; override; function GetItemEmptyValue(index: Integer): System.Object; override; function GetItemName(index: integer): string; override; --- 66,72 ---- procedure OnValidate(value: System.Object); override; procedure AddItem(value: System.Object; addPropertyId: System.Object); override; + function GetAllowRemove(key: System.Object): Boolean; override; function GetCollectionValue: string; override; function GetNewItemProperties: PropertyDescriptorCollection; override; function GetItemEmptyValue(index: Integer): System.Object; override; function GetItemName(index: integer): string; override; *************** *** 112,118 **** LedStateConverter = class (System.ComponentModel.TypeConverter) public - function CanConvertFrom(context: ITypeDescriptorContext; sourceType: System.Type): Boolean; override; - function ConvertFrom(context: ITypeDescriptorContext; culture: CultureInfo; - value: System.Object): System.Object; override; function CanConvertTo(context: ITypeDescriptorContext; destinationType: System.Type): Boolean; override; function ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; --- 83,86 ---- *************** *** 121,131 **** function GetProperties(context: ITypeDescriptorContext; value: System.Object; attributes: array of Attribute): PropertyDescriptorCollection; override; - function GetStandardValues(context: ITypeDescriptorContext): TypeConverter.StandardValuesCollection; override; - function GetStandardValuesSupported(context: ITypeDescriptorContext): Boolean; override; end; ! [TypeConverter(TypeOf(LedStateConverter)), DefaultProperty('Color') ! // Editor('Jedi.Windows.Forms.Hmi.Leds.Design.LedStateEditor,Jedi.Windows.Forms.Hmi.Design', TypeOf(UITypeEditor)) ! ] LedStateBase = class abstract (System.Object) strict private --- 89,95 ---- function GetProperties(context: ITypeDescriptorContext; value: System.Object; attributes: array of Attribute): PropertyDescriptorCollection; override; end; ! [TypeConverter(TypeOf(LedStateConverter)), DefaultProperty('Color')] LedStateBase = class abstract (System.Object) strict private *************** *** 155,161 **** --- 119,127 ---- { Marks the bitmap as invalid and notifies the owning LedStyle instance. } procedure Invalidate; + [Description('Color for this led state.'), Browsable(False)] property Color: System.Drawing.Color read mColor; property ColorChanged: EventHandler add mColorChanged remove mColorChanged; published + [Description('Name of this led state.'), RefreshProperties(System.ComponentModel.RefreshProperties.All)] property Name: string read mName; end; *************** *** 244,247 **** --- 210,214 ---- procedure EndInit; function IsInitializing: Boolean; + procedure CreateDefaultStates; virtual; { Render the specified state into a new bitmap. The method is usually called by the specified state object (the LedStateBase.GetBitmap method calls it to render itself and stores the resulting bitmap internally for reuse *************** *** 311,319 **** function GetInstDescMemberInfo: MemberInfo; override; function GetInstDescArguments: ArrayList; override; - procedure LedStyleInit; override; function GetOffPercentage: Integer; function GetLitColor: System.Drawing.Color; procedure SetOffPercentage(value: Integer); procedure SetLitColor(value: System.Drawing.Color); public constructor Create; overload; --- 278,287 ---- function GetInstDescMemberInfo: MemberInfo; override; function GetInstDescArguments: ArrayList; override; function GetOffPercentage: Integer; function GetLitColor: System.Drawing.Color; procedure SetOffPercentage(value: Integer); procedure SetLitColor(value: System.Drawing.Color); + protected + procedure CreateDefaultStates; override; public constructor Create; overload; *************** *** 329,333 **** function GetInstDescMemberInfo: MemberInfo; override; function GetInstDescArguments: ArrayList; override; ! procedure LedStyleInit; override; public constructor Create; overload; --- 297,302 ---- function GetInstDescMemberInfo: MemberInfo; override; function GetInstDescArguments: ArrayList; override; ! protected ! procedure CreateDefaultStates; override; public constructor Create; overload; *************** *** 474,478 **** SetName('Off'); end; - {$ENDREGION} --- 443,446 ---- *************** *** 494,497 **** --- 462,477 ---- end; + procedure LedStateCollection.OnClear; + begin + mLedStyle.OnStateRemoved(-1); + inherited OnClear; + end; + + procedure LedStateCollection.OnClearComplete; + begin + inherited OnClearComplete; + mLedStyle.CreateDefaultStates; + end; + procedure LedStateCollection.OnInsert(index: Integer; value: System.Object); begin *************** *** 546,549 **** --- 526,534 ---- end; + function LedStateCollection.GetAllowRemove(key: System.Object): Boolean; + begin + Result := not ((Integer(key) = 0) or (Count = 2)); + end; + function LedStateCollection.GetCollectionValue: string; begin *************** *** 558,566 **** end; - function LedStateCollection.GetItemDescription(index: integer): string; - begin - Result := 'Color for this item state.'; - end; - function LedStateCollection.GetItemEmptyValue(index: Integer): System.Object; begin --- 543,546 ---- *************** *** 607,791 **** {$ENDREGION} - {$REGION 'LedStateCollectionConverter'} - (* - {$REGION 'LedStateCollectionConverter.LedStateItemProperty'} - type - TAttributeArray = array of Attribute; - - constructor LedStateCollectionConverter.LedStateItemProperty.Create(collection: LedStateCollection; - ledState: LedStateBase); - begin - if not Assigned(collection) then - raise ArgumentNullException.Create('collection'); - if Assigned(ledState) and not collection.Contains(ledState) then - raise ArgumentOutOfRangeException.Create('ledState', - 'Specified state does not belong to the specified collection'); - if Assigned(ledState) then - inherited Create(TypeOf(LedStateCollection), ledState.Name, TypeOf(LedStateBase), nil) - else - inherited Create(TypeOf(LedStateCollection), '(new)', TypeOf(Color)); - mCollection := collection; - mItem := ledState; - end; - - function LedStateCollectionConverter.LedStateItemProperty.GetValue(component: System.Object): System.Object; - begin - if Assigned(mItem) then - Result := mItem - else - Result := ''; - end; - - procedure LedStateCollectionConverter.LedStateItemProperty.SetValue(component, value: System.Object); - begin - if (not Assigned(value) or ((value.GetType = TypeOf(string)) and (string(value) = '')) or - ((value.GetType = TypeOf(Color)) and (Color(value) = Color.Empty))) and Assigned(mItem) then - begin - if mCollection.IndexOf(mItem) = 0 then - raise Exception.Create('You can not remove the off state'); - if mCollection.Count = 2 then - raise Exception.Create('At least two states must be present at all times.'); - mCollection.Remove(mItem); - end; - if Assigned(value) and (string(value) <> '') then - begin - if not Assigned(mItem) then - begin - mItem := LedState.Create(Color.FromName(string(value)), string(value)); - mCollection.Add(mItem); - end - else - LedState(mItem).Color := Color.FromName(string(value)); - end; - if Assigned(value) and (value is Color) then - begin - if not Assigned(mItem) then - begin - mItem := LedState.Create(Color(value), Color(value).Name); - mCollection.Add(mItem); - end - else - LedState(mItem).Color := Color(value); - end; - end; - - function LedStateCollectionConverter.LedStateItemProperty.GetChildProperties(instance: System.Object; - filter: array of Attribute): PropertyDescriptorCollection; - var - colorProp: PropertyDescriptor; - begin - raise Exception.Create('Getting properties for state failed.'); - if Assigned(instance) then - begin - Result := TypeDescriptor.GetProperties(instance); - colorProp := Result.Find('Color', True); - if Assigned(colorProp) then - Result.Remove(colorProp); - end - else - Result := PropertyDescriptorCollection.Empty; - end; - {$ENDREGION} - function LedStateCollectionConverter.CanConvertTo(context: ITypeDescriptorContext; - destinationType: System.Type): Boolean; - begin - Result := (destinationType = TypeOf(string)) or inherited CanConvertTo(context, destinationType); - end; - - function LedStateCollectionConverter.ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; - value: System.Object; destinationType: System.Type): System.Object; - begin - if (destinationType = TypeOf(string)) and (value.GetType <> TypeOf(string)) then - Result := '(led states)' - else - Result := inherited ConvertTo(context, culture, value, destinationType); - end; - - function LedStateCollectionConverter.GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; - begin - Result := True; - end; - - type - TStringArray = array of string; - - function LedStateCollectionConverter.GetProperties(context: ITypeDescriptorContext; value: System.Object; - attributes: array of Attribute): PropertyDescriptorCollection; - var - coll: LedStateCollection; - i: Integer; - begin - coll := LedStateCollection(value); - Result := PropertyDescriptorCollection.Create(nil); - Result.Add(LedStateCollectionConverter.LedStateItemProperty.Create(coll, nil)); - for i := 0 to coll.Count - 1 do - Result.Add(LedStateCollectionConverter.LedStateItemProperty.Create(coll, coll[i])); - end;*) - {$ENDREGION} - - {$REGION 'LedStateCollectionEditor'} - (*function LedStateCollectionEditor.GetEditStyle(context: ITypeDescriptorContext): UITypeEditorEditStyle; - begin - Result := UITypeEditorEditStyle.Modal; - end; - - function LedStateCollectionEditor.EditValue(context: ITypeDescriptorContext; provider: IServiceProvider; - value: System.Object): System.Object; - var - ccs: IComponentChangeService; - begin - ccs := provider.GetService(TypeOf(IComponentChangeService)); - if ccs <> nil then - ccs.OnComponentChanging(value, nil); - Result := value; - with LedStateCollection(value) do - while Count > 2 do - RemoveAt(Count - 1); - if ccs <> nil then - ccs.OnComponentChanged(value, nil, nil, nil); - end;*) - {$ENDREGION} - {$REGION 'LedStateConverter'} - function LedStateConverter.CanConvertFrom(context: ITypeDescriptorContext; sourceType: System.Type): Boolean; - begin - Result := (sourceType = TypeOf(string)) or (sourceType = TypeOf(Color)) or - inherited CanConvertFrom(context, sourceType); - end; - - function LedStateConverter.ConvertFrom(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object): System.Object; - var - ls: System.Object; - ccs: IComponentChangeService; - begin - if value.GetType = TypeOf(string) then - value := TypeDescriptor.GetConverter(TypeOf(Color)).ConvertFrom(value); - if value.GetType = TypeOf(Color) then - begin - if Assigned(context) and Assigned(context.Instance) and Assigned(context.PropertyDescriptor) then - begin - ls := context.PropertyDescriptor.GetValue(context.Instance); - ccs := context.GetService(TypeOf(IComponentChangeService)); - if ls is LedState then - begin - if Assigned(ccs) then - ccs.OnComponentChanging(ls, nil); - LedState(ls).Color := Color(value); - if Assigned(ccs) then - ccs.OnComponentChanged(ls, nil, nil, nil); - end; - Result := ls; - end - else - Result := nil; - end - else - Result := inherited ConvertFrom(context, culture, value); - end; - function LedStateConverter.CanConvertTo(context: ITypeDescriptorContext; destinationType: System.Type): Boolean; begin ! Result := (destinationType = TypeOf(InstanceDescriptor)) or (destinationType = TypeOf(string)) or ! inherited CanConvertTo(context, destinationType); end; --- 587,594 ---- {$ENDREGION} {$REGION 'LedStateConverter'} function LedStateConverter.CanConvertTo(context: ITypeDescriptorContext; destinationType: System.Type): Boolean; begin ! Result := (destinationType = TypeOf(InstanceDescriptor)) or inherited CanConvertTo(context, destinationType); end; *************** *** 796,802 **** Result := LedStateBase(value).GetInstanceDescriptor else - if (destinationType = TypeOf(string)) and (value.GetType <> TypeOf(string)) then - Result := TypeDescriptor.GetConverter(TypeOf(Color)).ConvertTo(context, culture, LedStateBase(value).Color, destinationType) - else Result := inherited ConvertTo(context, culture, value, destinationType); end; --- 599,602 ---- *************** *** 817,830 **** Result.Remove(pd); end; - - function LedStateConverter.GetStandardValues(context: ITypeDescriptorContext): TypeConverter.StandardValuesCollection; - begin - Result := TypeDescriptor.GetConverter(TypeOf(Color)).GetStandardValues(context); - end; - - function LedStateConverter.GetStandardValuesSupported(context: ITypeDescriptorContext): Boolean; - begin - Result := True; - end; {$ENDREGION} --- 617,620 ---- *************** *** 855,874 **** if value <> mColor then begin ! if (value = Color.Empty) and Assigned(mLedStyle) then ! begin ! if mLedStyle.States.IndexOf(Self) = 0 then ! raise Exception.Create('You can not remove the off state'); ! if mLedStyle.States.Count = 2 then ! raise Exception.Create('At least two states must be present at all times.'); ! mLedStyle.States.Remove(Self); ! end ! else ! begin ! mColor := value; ! mBitmapValid := False; ! OnColorChanged(EventArgs.Empty); ! if Assigned(mLedStyle) then ! mLedStyle.InvalidateSettings; ! end; end; end; --- 645,653 ---- if value <> mColor then begin ! mColor := value; ! mBitmapValid := False; ! OnColorChanged(EventArgs.Empty); ! if Assigned(mLedStyle) then ! mLedStyle.InvalidateSettings; end; end; *************** *** 1049,1053 **** Styles.Remove(value); end; - {$ENDREGION} --- 828,831 ---- *************** *** 1080,1083 **** --- 858,862 ---- begin mStates := LedStateCollection.Create(Self); + CreateDefaultStates end; *************** *** 1159,1162 **** --- 938,945 ---- end; + procedure LedStyleBase.CreateDefaultStates; + begin + end; + procedure LedStyleBase.InvalidateState(index: Integer); begin *************** *** 1253,1259 **** ColorHandling.Darken(BackColor, 20), ColorHandling.Brighten(BackColor, 80), LinearGradientMode.ForwardDiagonal); TmpPen := Pen.Create(TmpBr, 2); ! TmpGr.DrawEllipse(TmpPen, 1, 1, mDiameter - 2, mDiameter - 2); ! TmpGr.DrawEllipse(TmpPen, 2, 2, mDiameter - 2, mDiameter - 2); ! TmpPth.AddEllipse(3, 3, mDiameter - 4, mDiameter - 4); TmpPen.Free; TmpBr.Free; --- 1036,1042 ---- ColorHandling.Darken(BackColor, 20), ColorHandling.Brighten(BackColor, 80), LinearGradientMode.ForwardDiagonal); TmpPen := Pen.Create(TmpBr, 2); ! TmpGr.DrawEllipse(TmpPen, 1, 1, mDiameter - 3, mDiameter - 3); ! TmpGr.DrawEllipse(TmpPen, 2, 2, mDiameter - 3, mDiameter - 3); ! TmpPth.AddEllipse(3, 3, mDiameter - 5, mDiameter - 5); TmpPen.Free; TmpBr.Free; *************** *** 1264,1270 **** ColorHandling.Brighten(BackColor, 80), ColorHandling.Darken(BackColor, 20), LinearGradientMode.ForwardDiagonal); TmpPen := Pen.Create(TmpBr, 2); ! TmpGr.DrawEllipse(TmpPen, 0, 0, mDiameter - 2, mDiameter - 2); ! TmpGr.DrawEllipse(TmpPen, 1, 1, mDiameter - 2, mDiameter - 2); ! TmpPth.AddEllipse(1, 1, mDiameter - 4, mDiameter - 4); TmpPen.Free; TmpBr.Free; --- 1047,1053 ---- ColorHandling.Brighten(BackColor, 80), ColorHandling.Darken(BackColor, 20), LinearGradientMode.ForwardDiagonal); TmpPen := Pen.Create(TmpBr, 2); ! TmpGr.DrawEllipse(TmpPen, 0, 0, mDiameter - 3, mDiameter - 3); ! TmpGr.DrawEllipse(TmpPen, 1, 1, mDiameter - 3, mDiameter - 3); ! TmpPth.AddEllipse(1, 1, mDiameter - 5, mDiameter - 5); TmpPen.Free; TmpBr.Free; *************** *** 1275,1280 **** ColorHandling.Darken(BackColor, 20), ColorHandling.Brighten(BackColor, 80), LinearGradientMode.ForwardDiagonal); TmpPen := Pen.Create(TmpBr, 2); ! TmpGr.DrawEllipse(TmpPen, 1, 1, mDiameter - 2, mDiameter - 2); ! TmpPth.AddEllipse(2, 2, mDiameter - 4, mDiameter - 4); TmpPen.Free; TmpBr.Free; --- 1058,1063 ---- ColorHandling.Darken(BackColor, 20), ColorHandling.Brighten(BackColor, 80), LinearGradientMode.ForwardDiagonal); TmpPen := Pen.Create(TmpBr, 2); ! TmpGr.DrawEllipse(TmpPen, 1, 1, mDiameter - 3, mDiameter - 3); ! TmpPth.AddEllipse(2, 2, mDiameter - 5, mDiameter - 5); TmpPen.Free; TmpBr.Free; *************** *** 1362,1366 **** if Assigned(FrameClipRegion) then TmpGr.SetClip(FrameClipRegion, CombineMode.Intersect); ! TmpGr.FillEllipse(TmpBrush, 2 + Offset, 2 + Offset, LedSize - 4, LedSize - 4); TmpGr.Free; TmpBrush.Free; --- 1145,1149 ---- if Assigned(FrameClipRegion) then TmpGr.SetClip(FrameClipRegion, CombineMode.Intersect); ! TmpGr.FillEllipse(TmpBrush, 2 + Offset, 2 + Offset, LedSize - 3, LedSize - 3); TmpGr.Free; TmpBrush.Free; *************** *** 1372,1376 **** inherited Create; end; - {$ENDREGION} --- 1155,1158 ---- *************** *** 1389,1403 **** end; - procedure SingleColorNormalLedStyle.LedStyleInit; - begin - inherited LedStyleInit; - States.Add(PercentageOffLedState.Create); - States.Add(LedState.Create); - LedState(States[1]).Name := 'On'; - Include(States[1].ColorChanged, PercentageOffLedState(States[0]).LitColor_Changed); - OffPercentage := 25; - LitColor := System.Drawing.Color.Lime; - end; - function SingleColorNormalLedStyle.GetOffPercentage: Integer; begin --- 1171,1174 ---- *************** *** 1420,1423 **** --- 1191,1204 ---- end; + procedure SingleColorNormalLedStyle.CreateDefaultStates; + begin + States.Add(PercentageOffLedState.Create); + States.Add(LedState.Create); + LedState(States[1]).Name := 'On'; + Include(States[1].ColorChanged, PercentageOffLedState(States[0]).LitColor_Changed); + OffPercentage := 25; + LitColor := System.Drawing.Color.Lime; + end; + constructor SingleColorNormalLedStyle.Create; begin *************** *** 1460,1466 **** end; ! procedure MultiColorNormalLedStyle.LedStyleInit; begin - inherited LedStyleInit; States.Add(LedState.Create(Color.Black, 'Off')); States.Add(LedState.Create(Color.Lime, 'Lime')); --- 1241,1246 ---- end; ! procedure MultiColorNormalLedStyle.CreateDefaultStates; begin States.Add(LedState.Create(Color.Black, 'Off')); States.Add(LedState.Create(Color.Lime, 'Lime')); *************** *** 1656,1663 **** procedure SingleLed.Style_StateRemoved(sender: System.Object; e: StateChangedEventArgs); begin ! if e.Index < mLedStateIdx then Dec(mLedStateIdx) else ! if e.Index = mLedStateIdx then mLedStateIdx := 0; Invalidate; --- 1436,1443 ---- procedure SingleLed.Style_StateRemoved(sender: System.Object; e: StateChangedEventArgs); begin ! if (e.Index > -1) and (e.Index < mLedStateIdx) then Dec(mLedStateIdx) else ! if (e.Index = mLedStateIdx) or (e.Index = -1) then mLedStateIdx := 0; Invalidate; |
From: Marcel B. <jed...@us...> - 2004-06-15 19:32:54
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19231/dev/jedi_mbe/run Modified Files: Jedi.Collections.pas Jedi.System.pas Log Message: Inline collection editing is now working: Add, modify or delete collection items from within the Object Inspector Index: Jedi.System.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/run/Jedi.System.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.System.pas 12 Jun 2004 18:31:38 -0000 1.1 --- Jedi.System.pas 15 Jun 2004 19:32:44 -0000 1.2 *************** *** 8,12 **** limitations under the License. ! The Original Code is: Jedi.System.pas, released on 2004-05-20. The Initial Developer of the Original Code is Marcel Bestebroer --- 8,12 ---- limitations under the License. ! The Original Code is: Jedi.System.pas, released on 2004-06-13. The Initial Developer of the Original Code is Marcel Bestebroer *************** *** 16,26 **** Contributor(s): ! Last Modified: 2004-05-20 ! ! You may retrieve the latest version of this file at the Project JEDI's JWFL home page, located at ! http://jwfl.sourceforge.net Known Issues: ---------------------------------------------------------------------------------------------------} unit Jedi.System; --- 16,25 ---- Contributor(s): ! You may retrieve the latest version of this file at the JEDI.NET home page, located at ! http://sf.net/projects/jedidotnet Known Issues: ---------------------------------------------------------------------------------------------------} + // $Id$ unit Jedi.System; *************** *** 28,76 **** {$REGION 'interface uses'} {$ENDREGION} ! {$REGION 'Inline collection editing attributes'} type ! { Provides info for collections that can be edited inline in a property grid. Requires the InlineCollectionEditor ! and InlineCollectionConverter (both located in Jedi.Windows.Forms.Design) to work. } ! [AttributeUsage(AttributeTargets.Class)] ! InlineCollectionAttribute = class abstract (Attribute) ! strict private ! _canAddItems: Boolean; ! _displayValue: string; ! _newItemName: string; ! public ! constructor Create; ! { Flag to indicate if items can be added. Defaults to True, but will be ignored for collection types that do ! not allow adding/deleting of items. } ! property CanAddItems: Boolean read _canAddItems write _canAddItems; ! { Name to display as the collection's value. If not specified, defaults to standard value for CollectionBase. } ! property DisplayValue: string read _displayValue write _displayValue; ! { Name to use for the 'new' item. When not specified, defaults to 'New'. Ignored if CanAddItems is False or the ! collection type does not allow items to be added. } ! property NewItemName: string read _newItemName write _newItemName; ! end; ! { Provides info for collections that can be edited inline in a property grid. Requires the InlineCollectionEditor ! and InlineCollectionConverter (both located in Jedi.Windows.Forms.Design) to work. } ! InlineListAttribute = class (InlineCollectionAttribute) ! strict private ! _itemType: System.Type; ! _nameMember: string; ! _scanForDefaultProperty: Boolean; ! _valueProperty: string; public ! constructor Create; ! { Item type to use for the 'new' item in the editor. If not specified, the collection type is scanned for an Item ! or Items property and use it's type instead. } ! property ItemType: System.Type read _itemType write _itemType; ! (* Name of the member that will provide the item's display name. If not specified, item names will be formatted as ! 'Item {0}'. *) ! property NameMember: string read _nameMember write _nameMember; ! { When set to True, specifies that each item type is scanned for the DefaultProperty attribute. } ! property ScanForDefaultProperty: Boolean read _scanForDefaultProperty write _scanForDefaultProperty; ! { Name of the primary property of an item. If ScanForDefaultProperty is set to True this property can be an empty ! string. } ! property ValueProperty: string read _valueProperty write _valueProperty; end; {$ENDREGION} --- 27,50 ---- {$REGION 'interface uses'} + uses + System.Collections, + System.ComponentModel; {$ENDREGION} ! {$REGION 'Attributes'} type ! AttributeArray = array of Attribute; ! type ! AttributeUtils = class (System.Object) ! strict protected ! class function IndexOf(attrList: ArrayList; attr: System.Object): Integer; static; ! class function OverrideAttrList(attrList, overrideList: ArrayList; mustExist: Boolean): ArrayList; static; public ! class function OverrideAttributes(attributes, overrides, replacements: AttributeArray): AttributeArray; ! overload; static; ! class function OverrideAttributes(attributes: AttributeCollection; overrides, ! replacements: AttributeArray): AttributeCollection; ! overload; static; end; {$ENDREGION} *************** *** 78,111 **** implementation ! {$REGION 'implementation uses'} ! uses ! System.Resources; ! {$ENDREGION} ! {$REGION 'InlineCollectionAttribute'} ! constructor InlineCollectionAttribute.Create; var ! rm: ResourceManager; begin ! inherited Create; ! rm := ResourceManager.Create('System', TypeOf(Uri).Module.Assembly); ! try ! _displayValue := rm.GetString('CollectionConverterText'); ! finally ! rm.Free; end; - _canAddItems := True; - _newItemName := '(new)'; end; - {$ENDREGION} ! {$REGION 'InlineListAttribute'} ! constructor InlineListAttribute.Create; begin ! inherited Create; ! _itemType := nil; ! _nameMember := ''; ! _scanForDefaultProperty := True; ! _valueProperty := ''; end; {$ENDREGION} --- 52,123 ---- implementation ! {$REGION 'AttributeUtils'} ! class function AttributeUtils.IndexOf(attrList: ArrayList; attr: System.Object): Integer; ! var ! attrType: System.Type; ! begin ! if attr is System.Type then ! attrType := System.Type(attr) ! else ! attrType := attr.GetType; ! Result := attrList.Count - 1; ! while (Result >= 0) and not attrType.IsAssignableFrom(attrList[Result].GetType) do ! Dec(Result); ! end; ! class function AttributeUtils.OverrideAttrList(attrList, overrideList: ArrayList; mustExist: Boolean): ArrayList; var ! i: Integer; ! attrIndex: Integer; begin ! Result := attrList; ! for i := 0 to overrideList.Count - 1 do ! begin ! attrIndex := AttributeUtils.IndexOf(Result, overrideList[i]); ! if attrIndex > -1 then ! Result[attrIndex] := overrideList[i] ! else ! if not mustExist then ! Result.Add(overrideList[i]); end; end; ! class function AttributeUtils.OverrideAttributes(attributes, overrides, replacements: AttributeArray): AttributeArray; ! var ! attrList: ArrayList; ! overrideList: ArrayList; ! replaceList: ArrayList; begin ! attrList := ArrayList.Create(System.Array(attributes)); ! if Assigned(overrides) then ! overrideList := ArrayList.Create(System.Array(overrides)) ! else ! overrideList := ArrayList.Create; ! if Assigned(replacements) then ! replaceList := ArrayList.Create(System.Array(replacements)) ! else ! replaceList := ArrayList.Create; ! Result := AttributeArray(OverrideAttrList(OverrideAttrList(attrList, replaceList, True), overrideList, ! False).ToArray(TypeOf(Attribute))); ! end; ! ! class function AttributeUtils.OverrideAttributes(attributes: AttributeCollection; overrides, ! replacements: AttributeArray): AttributeCollection; ! var ! attrList: ArrayList; ! overrideList: ArrayList; ! replaceList: ArrayList; ! begin ! attrList := ArrayList.Create(attributes); ! if Assigned(overrides) then ! overrideList := ArrayList.Create(System.Array(overrides)) ! else ! overrideList := ArrayList.Create; ! if Assigned(replacements) then ! replaceList := ArrayList.Create(System.Array(replacements)) ! else ! replaceList := ArrayList.Create; ! Result := AttributeCollection.Create(AttributeArray(OverrideAttrList(OverrideAttrList(attrList, replaceList, True), ! overrideList, False).ToArray(TypeOf(Attribute)))); end; {$ENDREGION} Index: Jedi.Collections.pas =================================================================== RCS file: /cvsroot/jedidotnet/dev/jedi_mbe/run/Jedi.Collections.pas,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Jedi.Collections.pas 12 Jun 2004 18:31:38 -0000 1.1 --- Jedi.Collections.pas 15 Jun 2004 19:32:44 -0000 1.2 *************** *** 8,12 **** limitations under the License. ! The Original Code is: Jedi.Collections.pas, released on 2004-06-12. The Initial Developer of the Original Code is Marcel Bestebroer --- 8,12 ---- limitations under the License. ! The Original Code is: Jedi.Collections.pas, released on 2004-06-13. The Initial Developer of the Original Code is Marcel Bestebroer *************** *** 16,21 **** Contributor(s): ! You may retrieve the latest version of this file at the Project JEDI's JWFL home page, located at ! http://jwfl.sourceforge.net Known Issues: --- 16,21 ---- Contributor(s): ! You may retrieve the latest version of this file at the JEDI.NET home page, located at ! http://sf.net/projects/jedidotnet Known Issues: *************** *** 28,31 **** --- 28,32 ---- {$REGION 'interface uses'} uses + Jedi.System, System.Collections, System.Collections.Specialized, *************** *** 36,42 **** {$ENDREGION} - type - AttributeArray = array of Attribute; - {$REGION 'Inline collection editing'} type --- 37,40 ---- *************** *** 71,74 **** --- 69,74 ---- IInlineCollection = interface + { determine if the specified key can be removed } + function GetAllowRemove(key: System.Object): Boolean; { string to show in the property grid for the collection itself. } function GetCollectionValue: string; *************** *** 113,116 **** --- 113,117 ---- {$REGION 'IInlineCollection methods'} procedure AddItem(value: System.Object; addPropertyId: System.Object); virtual; + function GetAllowRemove(key: System.Object): Boolean; virtual; function GetCollectionValue: string; virtual; function GetNewItemProperties: PropertyDescriptorCollection; virtual; *************** *** 132,135 **** --- 133,137 ---- {$REGION 'IInlineCollection methods'} procedure AddItem(value: System.Object; addPropertyId: System.Object); virtual; + function GetAllowRemove(key: System.Object): Boolean; virtual; function GetCollectionValue: string; virtual; function GetNewItemProperties: PropertyDescriptorCollection; virtual; *************** *** 170,187 **** constructor SimplePropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray); - var - i: Integer; begin ! i := High(attributes); ! while (i >= 0) and not TypeOf(RefreshPropertiesAttribute).IsAssignableFrom(attributes[i].GetType) do ! Dec(i); ! if i >= 0 then ! attributes[i] := RefreshPropertiesAttribute.All ! else ! begin ! SetLength(attributes, Length(attributes) + 1); ! attributes[High(attributes)] := RefreshPropertiesAttribute.All; ! end; ! inherited Create(name, attributes); _componentType := componentType; _propertyType := propertyType; --- 172,178 ---- constructor SimplePropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray); begin ! inherited Create(name, AttributeUtils.OverrideAttributes(attributes, ! Jedi.System.AttributeArray.Create(RefreshPropertiesAttribute.All), nil)); _componentType := componentType; _propertyType := propertyType; *************** *** 263,269 **** _emptyValue: System.Object; _index: System.Object; strict protected property EmptyValue: System.Object read _emptyValue; ! property Index: System.Object read _index; public constructor Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; --- 254,262 ---- _emptyValue: System.Object; _index: System.Object; + _savedInstance: System.Object; strict protected property EmptyValue: System.Object read _emptyValue; ! property Index: System.Object read _index write _index; ! property SavedInstance: System.Object read _savedInstance write _savedInstance; public constructor Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; *************** *** 272,292 **** procedure SetValue(component, value: System.Object); override; function ItemInstance(component: System.Object): System.Object; end; - function ItemPropertyDescriptor.ItemInstance(component: System.Object): System.Object; - begin - if component is IList then - Result := IList(component).Item[Integer(_index)] - else - if component is IDictionary then - Result := IDictionary(component).Item[_index] - else - Result := nil; - end; - constructor ItemPropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; emptyValue: System.Object; index: System.Object); begin ! inherited Create(componentType, name, propertyType, attributes); _emptyValue := emptyValue; _index := index; --- 265,276 ---- procedure SetValue(component, value: System.Object); override; function ItemInstance(component: System.Object): System.Object; + function get_Attributes: AttributeCollection; override; end; constructor ItemPropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; emptyValue: System.Object; index: System.Object); begin ! inherited Create(componentType, name, propertyType, AttributeUtils.OverrideAttributes(attributes, ! Jedi.System.AttributeArray.Create(RefreshPropertiesAttribute.All), nil)); _emptyValue := emptyValue; _index := index; *************** *** 306,315 **** if value = _emptyValue then begin ! ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); ! if Assigned(ccs) then ! ccs.OnComponentChanging(component, nil); ! IList(component).RemoveAt(Integer(_index)); ! if Assigned(ccs) then ! ccs.OnComponentChanged(component, nil, nil, nil); end else --- 290,304 ---- if value = _emptyValue then begin ! if IInlineCollection(component).GetAllowRemove(_index) then ! begin ! ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); ! if Assigned(ccs) then ! ccs.OnComponentChanging(component, nil); ! _savedInstance := ItemInstance(component); ! IList(component).RemoveAt(Integer(_index)); ! _index := -1; ! if Assigned(ccs) then ! ccs.OnComponentChanged(component, nil, nil, nil); ! end; end else *************** *** 321,330 **** if value = _emptyValue then begin ! ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); ! if Assigned(ccs) then ! ccs.OnComponentChanging(component, nil); ! IDictionary(component).Remove(_index); ! if Assigned(ccs) then ! ccs.OnComponentChanged(component, nil, nil, nil); end else --- 310,324 ---- if value = _emptyValue then begin ! if IInlineCollection(component).GetAllowRemove(_index) then ! begin ! ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); ! if Assigned(ccs) then ! ccs.OnComponentChanging(component, nil); ! _savedInstance := ItemInstance(component); ! IDictionary(component).Remove(_index); ! _index := nil; ! if Assigned(ccs) then ! ccs.OnComponentChanged(component, nil, nil, nil); ! end; end else *************** *** 332,335 **** --- 326,358 ---- end; end; + + function ItemPropertyDescriptor.ItemInstance(component: System.Object): System.Object; + begin + if (component is IList) then + begin + if not Assigned(SavedInstance) then + Result := IList(component).Item[Integer(_index)] + else + Result := SavedInstance; + end + else + if (component is IDictionary) then + begin + if Assigned(_index) then + Result := IDictionary(component).Item[_index] + else + Result := SavedInstance; + end + else + Result := SavedInstance; + end; + + function ItemPropertyDescriptor.get_Attributes: AttributeCollection; + begin + Result := inherited get_Attributes; + if Assigned(SavedInstance) then + Result := AttributeUtils.OverrideAttributes(Result, + Jedi.System.AttributeArray.Create(RefreshPropertiesAttribute.All), nil); + end; {$ENDREGION} *************** *** 352,357 **** end; {$REGION 'SubPropertyTypeConverter'} ! (*type SubPropertyTypeConverter = class (TypeConverter) strict private --- 375,480 ---- end; + {$REGION 'SubPropertyContext'} + type + SubPropertyContext = class (System.Object, ITypeDescriptorContext) + strict private + _container: IContainer; + _instance: System.Object; + _propertyDescriptor: PropertyDescriptor; + _serviceProvider: IServiceProvider; + public + constructor Create(container: IContainer; instance: System.Object; propertyDescriptor: PropertyDescriptor; + serviceProvider: IServiceProvider); overload; + constructor Create(context: ITypeDescriptorContext); overload; + constructor Create(context: ITypeDescriptorContext; provider: IServiceProvider); overload; + procedure OnComponentChanged; + function OnComponentChanging: Boolean; + function get_Container: IContainer; + function get_Instance: System.Object; + function get_PropertyDescriptor: PropertyDescriptor; + function GetService(serviceType: System.Type): System.Object; + end; + + constructor SubPropertyContext.Create(container: IContainer; instance: System.Object; + propertyDescriptor: PropertyDescriptor; serviceProvider: IServiceProvider); + begin + inherited Create; + _container := container; + _instance := instance; + _propertyDescriptor := propertyDescriptor; + _serviceProvider := serviceProvider; + end; + + constructor SubPropertyContext.Create(context: ITypeDescriptorContext); + begin + if Assigned(context) and Assigned(ItemSubPropertyDescriptor(context.PropertyDescriptor)) then + Create( + context.Container, + ItemSubPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance), + ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor, + IServiceProvider(context) + ) + else + Create(nil, nil, nil, nil); + end; + + constructor SubPropertyContext.Create(context: ITypeDescriptorContext; provider: IServiceProvider); + begin + if Assigned(context) and Assigned(ItemSubPropertyDescriptor(context.PropertyDescriptor)) then + Create( + context.Container, + ItemSubPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance), + ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor, + provider + ) + else + Create(nil, nil, nil, nil); + end; + + procedure SubPropertyContext.OnComponentChanged; + var + ccs: IComponentChangeService; + begin + ccs := GetService(TypeOf(IComponentChangeService)); + if Assigned(ccs) then + ccs.OnComponentChanged(_instance, nil, nil, nil); + end; + + function SubPropertyContext.OnComponentChanging: Boolean; + var + ccs: IComponentChangeService; + begin + Result := True; + ccs := GetService(TypeOf(IComponentChangeService)); + if Assigned(ccs) then + ccs.OnComponentChanging(_instance, nil); + end; + + function SubPropertyContext.get_Container: IContainer; + begin + Result := _container; + end; + + function SubPropertyContext.get_Instance: System.Object; + begin + Result := _instance; + end; + + function SubPropertyContext.get_PropertyDescriptor: PropertyDescriptor; + begin + Result := _propertyDescriptor; + end; + + function SubPropertyContext.GetService(serviceType: System.Type): System.Object; + begin + if Assigned(_serviceProvider) then + Result := _serviceProvider.GetService(serviceType) + else + Result := nil; + end; + {$ENDREGION} + {$REGION 'SubPropertyTypeConverter'} ! type SubPropertyTypeConverter = class (TypeConverter) strict private *************** *** 378,382 **** function SubPropertyTypeConverter.PropertyConverter(context: ITypeDescriptorContext): TypeConverter; begin ! if not Assigned(_propertyConverter) and Assigned(context) and Assigned(context.PropertyDescriptor) then _propertyConverter := ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor.Converter; Result := _propertyConverter; --- 501,506 ---- function SubPropertyTypeConverter.PropertyConverter(context: ITypeDescriptorContext): TypeConverter; begin ! if not Assigned(_propertyConverter) and Assigned(context) and ! Assigned(ItemSubPropertyDescriptor(context.PropertyDescriptor)) then _propertyConverter := ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor.Converter; Result := _propertyConverter; *************** *** 385,389 **** function SubPropertyTypeConverter.InstanceConverter(context: ITypeDescriptorContext): TypeConverter; begin ! if not Assigned(_instanceConverter) and Assigned(context) and Assigned(context.PropertyDescriptor) then _instanceConverter := TypeDescriptor.GetConverter(ItemSubPropertyDescriptor( context.PropertyDescriptor).ItemInstance(context.Instance)); --- 509,514 ---- function SubPropertyTypeConverter.InstanceConverter(context: ITypeDescriptorContext): TypeConverter; begin ! if not Assigned(_instanceConverter) and Assigned(context) and ! Assigned(ItemSubPropertyDescriptor(context.PropertyDescriptor)) then _instanceConverter := TypeDescriptor.GetConverter(ItemSubPropertyDescriptor( context.PropertyDescriptor).ItemInstance(context.Instance)); *************** *** 394,398 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.CanConvertFrom(context, sourceType) else Result := inherited CanConvertFrom(context, sourceType); --- 519,523 ---- begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.CanConvertFrom(SubPropertyContext.Create(context), sourceType) else Result := inherited CanConvertFrom(context, sourceType); *************** *** 402,406 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.CanConvertTo(context, destinationType) else Result := inherited CanConvertTo(context, destinationType); --- 527,531 ---- begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.CanConvertTo(SubPropertyContext.Create(context), destinationType) else Result := inherited CanConvertTo(context, destinationType); *************** *** 411,415 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.ConvertFrom(context, culture, value) else Result := inherited ConvertFrom(context, culture, value); --- 536,543 ---- begin if Assigned(PropertyConverter(context)) then ! begin ! Result := ItemSubPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance); ! Result := _propertyConverter.ConvertFrom(SubPropertyContext.Create(context), culture, value); ! end else Result := inherited ConvertFrom(context, culture, value); *************** *** 418,424 **** function SubPropertyTypeConverter.ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; destinationType: System.Type): System.Object; begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.ConvertTo(context, culture, value, destinationType) else Result := inherited ConvertTo(context, culture, value, destinationType); --- 546,559 ---- function SubPropertyTypeConverter.ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; destinationType: System.Type): System.Object; + var + pd: PropertyDescriptor; + propValue: System.Object; begin if Assigned(PropertyConverter(context)) then ! begin ! pd := ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor; ! propValue := pd.GetValue(ItemSubPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance)); ! Result := _propertyConverter.ConvertTo(SubPropertyContext.Create(context), culture, propValue, destinationType); ! end else Result := inherited ConvertTo(context, culture, value, destinationType); *************** *** 429,433 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.CreateInstance(context, propertyValues) else Result := inherited CreateInstance(context, propertyValues); --- 564,568 ---- begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.CreateInstance(SubPropertyContext.Create(context), propertyValues) else Result := inherited CreateInstance(context, propertyValues); *************** *** 437,441 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.GetCreateInstanceSupported(context) else Result := inherited GetCreateInstanceSupported(context); --- 572,576 ---- begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.GetCreateInstanceSupported(SubPropertyContext.Create(context)) else Result := inherited GetCreateInstanceSupported(context); *************** *** 445,482 **** attributes: AttributeArray): PropertyDescriptorCollection; var - propPropColl: PropertyDescriptorCollection; itemInst: System.Object; - instPropColl: PropertyDescriptorCollection; begin - if Assigned(value) then - propPropColl := TypeDescriptor.GetProperties(value, attributes) - else - if Assigned(context) and Assigned(context.PropertyDescriptor) then - propPropColl := TypeDescriptor.GetProperties(context.PropertyDescriptor.PropertyType, attributes) - else - propPropColl := PropertyDescriptorCollection.Empty; - if Assigned(context) and Assigned(context.PropertyDescriptor) and Assigned(context.Instance) then begin itemInst := ItemPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance); if Assigned(itemInst) then ! instPropColl := TypeDescriptor.GetProperties(itemInst, attributes) else ! instPropColl := PropertyDescriptorCollection.Empty; end else begin itemInst := nil; ! instPropColl := PropertyDescriptorCollection.Empty; end; - - if Assigned(context) and Assigned(ItemSubPropertyDescriptor(context.PropertyDescriptor)) then - instPropColl.Remove(ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor); end; function SubPropertyTypeConverter.GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; begin ! Result := (Assigned(PropertyConverter(context)) and _propertyConverter.GetPropertiesSupported(context)) or ! ((Assigned(InstanceConverter(context)) and _instanceConverter.GetPropertiesSupported(context))); end; --- 580,603 ---- attributes: AttributeArray): PropertyDescriptorCollection; var itemInst: System.Object; begin if Assigned(context) and Assigned(context.PropertyDescriptor) and Assigned(context.Instance) then begin itemInst := ItemPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance); if Assigned(itemInst) then ! Result := TypeDescriptor.GetProperties(itemInst, attributes) else ! Result := PropertyDescriptorCollection.Empty; end else begin itemInst := nil; ! Result := PropertyDescriptorCollection.Empty; end; end; function SubPropertyTypeConverter.GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; begin ! Result := Assigned(InstanceConverter(context)) and _instanceConverter.GetPropertiesSupported(context); end; *************** *** 485,489 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.GetStandardValues(context) else Result := inherited GetStandardValues(context); --- 606,610 ---- begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.GetStandardValues(SubPropertyContext.Create(context)) else Result := inherited GetStandardValues(context); *************** *** 493,499 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.GetStandardValuesExclusive(context) else ! Result := inherited GetStandardValuesExclusive(context); end; --- 614,620 ---- begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.GetStandardValuesExclusive(SubPropertyContext.Create(context)) else ! Result := inherited GetStandardValuesExclusive(SubPropertyContext(context)); end; *************** *** 501,505 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.GetStandardValuesSupported(context) else Result := inherited GetStandardValuesSupported(context); --- 622,626 ---- begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.GetStandardValuesSupported(SubPropertyContext.Create(context)) else Result := inherited GetStandardValuesSupported(context); *************** *** 509,516 **** begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.IsValid(context, value) else Result := inherited IsValid(context, value); ! end;*) {$ENDREGION} --- 630,708 ---- begin if Assigned(PropertyConverter(context)) then ! Result := _propertyConverter.IsValid(SubPropertyContext.Create(context), value) else Result := inherited IsValid(context, value); ! end; ! {$ENDREGION} ! ! {$REGION 'SubPropertyUITypeEditor'} ! type ! SubPropertyUITypeEditor = class (UITypeEditor) ! strict protected ! function GetEditor(context: ITypeDescriptorContext): UITypeEditor; ! public ! function EditValue(context: ITypeDescriptorContext; provider: IServiceProvider; value: System.Object): System.Object; override; ! function GetEditStyle(context: ITypeDescriptorContext): UITypeEditorEditStyle; override; ! function GetPaintValueSupported(context: ITypeDescriptorContext): Boolean; override; ! procedure PaintValue(e: PaintValueEventArgs); override; ! end; ! ! function SubPropertyUITypeEditor.GetEditor(context: ITypeDescriptorContext): UITypeEditor; ! begin ! if Assigned(context) and Assigned(context.PropertyDescriptor) then ! Result := UITypeEditor(context.PropertyDescriptor.GetEditor(TypeOf(UITypeEditor))) ! else ! Result := nil; ! end; ! ! function SubPropertyUITypeEditor.EditValue(context: ITypeDescriptorContext; provider: IServiceProvider; ! value: System.Object): System.Object; ! var ! realContext: ITypeDescriptorContext; ! begin ! realContext := SubPropertyContext.Create(context, provider); ! if Assigned(realContext.Instance) and Assigned(GetEditor(realContext)) then ! begin ! GetEditor(realContext).EditValue(realContext, provider, ! realContext.PropertyDescriptor.GetValue(realContext.instance)); ! Result := value; ! end ! else ! Result := inherited EditValue(context, provider, value); ! end; ! ! function SubPropertyUITypeEditor.GetEditStyle(context: ITypeDescriptorContext): UITypeEditorEditStyle; ! var ! realContext: ITypeDescriptorContext; ! begin ! realContext := SubPropertyContext.Create(context); ! if Assigned(realContext.Instance) and Assigned(GetEditor(realContext)) then ! Result := GetEditor(realContext).GetEditStyle(realContext) ! else ! Result := inherited GetEditStyle(context); ! end; ! ! function SubPropertyUITypeEditor.GetPaintValueSupported(context: ITypeDescriptorContext): Boolean; ! var ! realContext: ITypeDescriptorContext; ! begin ! realContext := SubPropertyContext.Create(context); ! if Assigned(realContext.Instance) and Assigned(GetEditor(realContext)) then ! Result := GetEditor(realContext).GetPaintValueSupported(realContext) ! else ! Result := inherited GetPaintValueSupported(context); ! end; ! ! procedure SubPropertyUITypeEditor.PaintValue(e: PaintValueEventArgs); ! var ! realContext: ITypeDescriptorContext; ! begin ! realContext := SubPropertyContext.Create(e.Context); ! if Assigned(realContext.Instance) and Assigned(GetEditor(realContext)) then ! GetEditor(realContext).PaintValue(PaintValueEventArgs.Create(realContext, ! realContext.PropertyDescriptor.GetValue(realContext.instance), e.Graphics, e.Bounds)) ! else ! inherited PaintValue(e); ! end; {$ENDREGION} *************** *** 518,538 **** &property: PropertyDescriptor; itemType: System.Type; emptyValue, index: System.Object); var ! attrs: ArrayList; ! i: Integer; begin if not Assigned(&property) then raise ArgumentNullException.Create('property'); - attrs := ArrayList.Create(&property.Attributes); if description <> '' then ! begin ! i := attrs.Count - 1; ! while (i >= 0) and (attrs.Item[i].GetType <> TypeOf(DescriptionAttribute)) do ! Dec(i); ! if i >= 0 then ! attrs.RemoveAt(i); ! attrs.Add(DescriptionAttribute.Create(description)); ! end; inherited Create(componentType, name, itemType, ! Jedi.Collections.AttributeArray(attrs.ToArray(TypeOf(Attribute))), emptyValue, index); _realDescriptor := &property; end; --- 710,738 ---- &property: PropertyDescriptor; itemType: System.Type; emptyValue, index: System.Object); var ! attrs: AttributeCollection; begin if not Assigned(&property) then raise ArgumentNullException.Create('property'); if description <> '' then ! attrs := AttributeUtils.OverrideAttributes(&property.Attributes, ! Jedi.System.AttributeArray.Create( ! DescriptionAttribute.Create(description), ! TypeConverterAttribute.Create(TypeOf(SubPropertyTypeConverter)) ! ), ! Jedi.System.AttributeArray.Create( ! EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ! ) ! ) ! else ! attrs := AttributeUtils.OverrideAttributes(&property.Attributes, ! Jedi.System.AttributeArray.Create( ! TypeConverterAttribute.Create(TypeOf(SubPropertyTypeConverter)) ! ), ! Jedi.System.AttributeArray.Create( ! EditorAttribute.Create(TypeOf(SubPropertyUITypeEditor), TypeOf(UITypeEditor)) ! ) ! ); inherited Create(componentType, name, itemType, ! Jedi.System.AttributeArray(ArrayList.Create(attrs).ToArray(TypeOf(Attribute))), emptyValue, index); _realDescriptor := &property; end; *************** *** 550,561 **** function ItemSubPropertyDescriptor.GetValue(component: System.Object): System.Object; - (*var - item: System.Object;*) begin Result := ItemInstance(component); - (*if Assigned(item) then - Result := RealDescriptor.GetValue(item) - else - Result := nil;*) end; --- 750,755 ---- *************** *** 580,604 **** var ccs: IComponentChangeService; - item: System.Object; begin ! ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); ! if Assigned(ccs) then ! ccs.OnComponentChanging(component, nil); ! if RealDescriptor.GetValue(Value) = EmptyValue then begin if component is IList then ! IList(component).RemoveAt(Integer(Index)) else if component is IDictionary then IDictionary(component).Remove(Index); ! end; ! (* else begin ! item := ItemInstance(component); ! if Assigned(item) then ! RealDescriptor.SetValue(item, value); ! end;*) ! if Assigned(ccs) then ! ccs.OnComponentChanged(component, nil, nil, nil); end; --- 774,814 ---- var ccs: IComponentChangeService; begin ! if (value = EmptyValue) and IInlineCollection(component).GetAllowRemove(Index) then begin if component is IList then ! begin ! ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); ! if Assigned(ccs) then ! ccs.OnComponentChanging(component, nil); ! SavedInstance := ItemInstance(component); ! IList(component).RemoveAt(Integer(Index)); ! Index := -1; ! if Assigned(ccs) then ! ccs.OnComponentChanged(component, nil, nil, nil); ! end else if component is IDictionary then + begin + ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); + if Assigned(ccs) then + ccs.OnComponentChanging(component, nil); + SavedInstance := ItemInstance(component); IDictionary(component).Remove(Index); ! Index := nil; ! if Assigned(ccs) then ! ccs.OnComponentChanged(component, nil, nil, nil); ! end; ! end ! else ! if (value <> EmptyValue) and (RealDescriptor.GetValue(ItemInstance(component)) <> value) then begin ! ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); ! if Assigned(ccs) then ! ccs.OnComponentChanging(component, nil); ! RealDescriptor.SetValue(ItemInstance(component), value); ! if Assigned(ccs) then ! ccs.OnComponentChanged(component, nil, nil, nil); ! end; end; *************** *** 676,693 **** class function InlineCollectionUtils.CreateNewItemProperty(componentType, propertyType: System.Type; attributes: AttributeArray; name, description: string; propertyId: System.Object): PropertyDescriptor; - var - attrs: ArrayList; - i: Integer; begin - attrs := ArrayList.Create; - for i := 0 to High(attributes) do - begin - if (description = '') or (attributes[i].GetType <> TypeOf(DescriptionAttribute)) then - attrs.Add(attributes[i]); - end; if description <> '' then ! attrs.Add(DescriptionAttribute.Create(description)); ! Result := NewItemPropertyDescriptor.Create(componentType, name, propertyType, ! AttributeArray(attrs.ToArray(TypeOf(Attribute))), propertyId); end; --- 886,894 ---- class function InlineCollectionUtils.CreateNewItemProperty(componentType, propertyType: System.Type; attributes: AttributeArray; name, description: string; propertyId: System.Object): PropertyDescriptor; begin if description <> '' then ! attributes := AttributeUtils.OverrideAttributes(attributes, ! AttributeArray.Create(DescriptionAttribute.Create(description)), nil); ! Result := NewItemPropertyDescriptor.Create(componentType, name, propertyType, attributes, propertyId); end; *************** *** 720,723 **** --- 921,931 ---- defaultProperty := TypeDescriptor.GetDefaultProperty(info.PropertyType); end + end + else + begin + if Assigned(itemInstance) then + itemType := itemInstance.GetType + else + itemType := info.PropertyType; end; *************** *** 731,738 **** for i := 0 to High(mattrs) do begin ! if mattrs[i].GetType <> TypeOf(DescriptionAttribute) then attrs.Add(mattrs[i]); end; ! attrs.Add(DescriptionAttribute.Create(description)); Result := ItemPropertyDescriptor.Create(info.DeclaringType, name, itemInstance.GetType, --- 939,947 ---- for i := 0 to High(mattrs) do begin ! if (description = '') or (mattrs[i].GetType <> TypeOf(DescriptionAttribute)) then attrs.Add(mattrs[i]); end; ! if description <> '' then ! attrs.Add(DescriptionAttribute.Create(description)); Result := ItemPropertyDescriptor.Create(info.DeclaringType, name, itemInstance.GetType, *************** *** 743,749 **** class function InlineCollectionUtils.CreateItemProperty(propertyType: System.Type; attributes: AttributeArray; component: System.Object; name, description: string; index, emptyValue: System.Object): PropertyDescriptor; - var - attrs: ArrayList; - i: Integer; begin if not Assigned(propertyType) then --- 952,955 ---- *************** *** 751,764 **** if not Assigned(component) then raise ArgumentNullException.Create('component'); - attrs := ArrayList.Create; - for i := 0 to High(attributes) do - begin - if (description = '') or (attributes[i].GetType <> TypeOf(DescriptionAttribute)) then - attrs.Add(attributes[i]); - end; if description <> '' then ! attrs.Add(DescriptionAttribute.Create(description)); ! Result := ItemPropertyDescriptor.Create(component.GetType, name, propertyType, ! AttributeArray(attrs.ToArray(TypeOf(Attribute))), emptyValue, index); end; {$ENDREGION} --- 957,964 ---- if not Assigned(component) then raise ArgumentNullException.Create('component'); if description <> '' then ! attributes := AttributeUtils.OverrideAttributes(attributes, ! AttributeArray.Create(DescriptionAttribute.Create(description)), nil); ! Result := ItemPropertyDescriptor.Create(component.GetType, name, propertyType, attributes, emptyValue, index); end; {$ENDREGION} *************** *** 876,879 **** --- 1076,1084 ---- end; + function InlineCollectionBase.GetAllowRemove(key: System.Object): Boolean; + begin + Result := True; + end; + function InlineCollectionBase.GetCollectionValue: string; begin *************** *** 924,927 **** --- 1129,1137 ---- end; + function InlineDictionaryBase.GetAllowRemove(key: System.Object): Boolean; + begin + Result := True; + end; + function InlineDictionaryBase.GetCollectionValue: string; begin |
From: Marcel B. <jed...@us...> - 2004-06-12 18:31:48
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/run In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/run Added Files: Jedi.Collections.pas Jedi.Drawing.pas Jedi.System.pas Jedi.Windows.Forms.Hmi.Leds.pas Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: Jedi.System.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.System.pas, released on 2004-05-20. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): Last Modified: 2004-05-20 You may retrieve the latest version of this file at the Project JEDI's JWFL home page, located at http://jwfl.sourceforge.net Known Issues: ---------------------------------------------------------------------------------------------------} unit Jedi.System; interface {$REGION 'interface uses'} {$ENDREGION} {$REGION 'Inline collection editing attributes'} type { Provides info for collections that can be edited inline in a property grid. Requires the InlineCollectionEditor and InlineCollectionConverter (both located in Jedi.Windows.Forms.Design) to work. } [AttributeUsage(AttributeTargets.Class)] InlineCollectionAttribute = class abstract (Attribute) strict private _canAddItems: Boolean; _displayValue: string; _newItemName: string; public constructor Create; { Flag to indicate if items can be added. Defaults to True, but will be ignored for collection types that do not allow adding/deleting of items. } property CanAddItems: Boolean read _canAddItems write _canAddItems; { Name to display as the collection's value. If not specified, defaults to standard value for CollectionBase. } property DisplayValue: string read _displayValue write _displayValue; { Name to use for the 'new' item. When not specified, defaults to 'New'. Ignored if CanAddItems is False or the collection type does not allow items to be added. } property NewItemName: string read _newItemName write _newItemName; end; { Provides info for collections that can be edited inline in a property grid. Requires the InlineCollectionEditor and InlineCollectionConverter (both located in Jedi.Windows.Forms.Design) to work. } InlineListAttribute = class (InlineCollectionAttribute) strict private _itemType: System.Type; _nameMember: string; _scanForDefaultProperty: Boolean; _valueProperty: string; public constructor Create; { Item type to use for the 'new' item in the editor. If not specified, the collection type is scanned for an Item or Items property and use it's type instead. } property ItemType: System.Type read _itemType write _itemType; (* Name of the member that will provide the item's display name. If not specified, item names will be formatted as 'Item {0}'. *) property NameMember: string read _nameMember write _nameMember; { When set to True, specifies that each item type is scanned for the DefaultProperty attribute. } property ScanForDefaultProperty: Boolean read _scanForDefaultProperty write _scanForDefaultProperty; { Name of the primary property of an item. If ScanForDefaultProperty is set to True this property can be an empty string. } property ValueProperty: string read _valueProperty write _valueProperty; end; {$ENDREGION} implementation {$REGION 'implementation uses'} uses System.Resources; {$ENDREGION} {$REGION 'InlineCollectionAttribute'} constructor InlineCollectionAttribute.Create; var rm: ResourceManager; begin inherited Create; rm := ResourceManager.Create('System', TypeOf(Uri).Module.Assembly); try _displayValue := rm.GetString('CollectionConverterText'); finally rm.Free; end; _canAddItems := True; _newItemName := '(new)'; end; {$ENDREGION} {$REGION 'InlineListAttribute'} constructor InlineListAttribute.Create; begin inherited Create; _itemType := nil; _nameMember := ''; _scanForDefaultProperty := True; _valueProperty := ''; end; {$ENDREGION} end. --- NEW FILE: Jedi.Drawing.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.Drawing.pas, released on 2004-05-16. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): Last Modified: 2004-05-16 You may retrieve the latest version of this file at the Project JEDI's JWFL home page, located at http://jwfl.sourceforge.net Known Issues: ---------------------------------------------------------------------------------------------------} unit Jedi.Drawing; interface uses System.Drawing; type ColorHandling = class sealed (System.Object) public { Blends two colors. The resulting color will be a mix of the two colors. The percentage parameter determines how much of the second color will be present. } class function Blend(firstColor, secondColor: Color; percentage: Integer): Color; static; { Brightens a color. The resulting color will be a mix of the base color and pure white. The percentage parameter determines how much white will be present. } class function Brighten(baseColor: Color; percentage: Integer): Color; static; { Darkens a color. The resulting color will be a mix of the base color and pure black. The percentage parameter determines how much black will be present. } class function Darken(baseColor: Color; percentage: Integer): Color; static; end; implementation {$REGION 'ColorHandling'} class function ColorHandling.Blend(firstColor, secondColor: Color; percentage: Integer): Color; begin Result := Color.FromArgb( firstColor.R + (secondColor.R - firstColor.R) * percentage div 100, firstColor.G + (secondColor.G - firstColor.G) * percentage div 100, firstColor.B + (secondColor.B - firstColor.B) * percentage div 100 ); end; class function ColorHandling.Brighten(baseColor: Color; percentage: Integer): Color; begin Result := ColorHandling.Blend(baseColor, Color.White, percentage); end; class function ColorHandling.Darken(baseColor: Color; percentage: Integer): Color; begin Result := ColorHandling.Blend(baseColor, Color.Black, percentage); end; {$ENDREGION} end. --- NEW FILE: Jedi.Windows.Forms.Hmi.Leds.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.Windows.Forms.Hmi.Leds.pas, released on 2004-05-16. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): Last Modified: 2004-06-09 [...1719 lines suppressed...] i: Integer; begin if not ReferenceEquals(mLedStyle, value) then begin mLedStyle.Free; mLedStyle := value; Include(mLedStyle.SettingsChanged, Style_SettingsChanged); Include(mLedStyle.SizeChanged, Style_SizeChanged); Include(mLedStyle.StateAdded, Style_StateAdded); Include(mLedStyle.StateRemoved, Style_StateRemoved); for i := 0 to mInitializeCount - 1 do mLedStyle.BeginInit; if not IsInitializing and (mLedStateIdx >= mLedStyle.States.Count) then mLedStateIdx := mLedStyle.States.Count - 1; mLedStyle.InvalidateSize; end; end; {$ENDREGION} end. --- NEW FILE: Jedi.Collections.pas --- {--------------------------------------------------------------------------------------------------- The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Software distributed under the License is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either expressed or implied. See the License for the specific language governing rights and limitations under the License. The Original Code is: Jedi.Collections.pas, released on 2004-06-12. The Initial Developer of the Original Code is Marcel Bestebroer Portions created by Marcel Bestebroer are Copyright (C) 2004 Marcel Bestebroer All Rights Reserved. Contributor(s): You may retrieve the latest version of this file at the Project JEDI's JWFL home page, located at http://jwfl.sourceforge.net Known Issues: ---------------------------------------------------------------------------------------------------} // $Id: Jedi.Collections.pas,v 1.1 2004/06/12 18:31:38 jedi_mbe Exp $ unit Jedi.Collections; interface {$REGION 'interface uses'} uses System.Collections, System.Collections.Specialized, System.ComponentModel, System.Drawing.Design, System.Globalization, System.Reflection; {$ENDREGION} type AttributeArray = array of Attribute; {$REGION 'Inline collection editing'} type InlineCollectionUtils = class (System.Object) strict private class var _collectionValue: string; public { Retrieves the default text of the collection converter. } class function CollectionConverterText: string; static; { Creates a property descriptor that will function as a 'new item' property. The property will get the specified name and description. } class function CreateNewItemProperty(baseDescriptor: PropertyDescriptor; name, description: string; propertyId: System.Object): PropertyDescriptor; overload; static; { Creates a property descriptor that will function as a 'new item' property. The property will get the specified name and description. } class function CreateNewItemProperty(info: PropertyInfo; name, description: string; propertyId: System.Object): PropertyDescriptor; overload; static; { Creates a property descriptor that will function as a 'new item' property. The property will get the specified name and description. } class function CreateNewItemProperty(componentType, propertyType: System.Type; attributes: AttributeArray; name, description: string; propertyId: System.Object): PropertyDescriptor; overload; static; { Creates a property descriptor for an item in the specified collection. The property will get the specified name and description. Depending on the ignoreDefaultProperty parameter, the resulting property will be either the instance in the collection, or it's DefaultProperty (if it has one). } class function CreateItemProperty(info: PropertyInfo; component: System.Object; name, description: string; index, emptyValue: System.Object; ignoreDefaultProperty: Boolean = False): PropertyDescriptor; overload; static; class function CreateItemProperty(propertyType: System.Type; attributes: AttributeArray; component: System.Object; name, description: string; index, emptyValue: System.Object): PropertyDescriptor; overload; static; end; IInlineCollection = interface { string to show in the property grid for the collection itself. } function GetCollectionValue: string; { retrieve a list of semi properties that allow to add items to the collection. Because a list is used, you have the ability to add different kinds of items. } function GetNewItemProperties: PropertyDescriptorCollection; { retrieve a collection of semi properties representing the items in the collection. } function GetItemProperties: PropertyDescriptorCollection; { add an item to the collection. This method is used by the 'new item' semi property when a new value should be added. This value need not be the actual object added to the collection. } procedure AddItem(value: System.Object; addPropertyId: System.Object); { Retrieve the specified service } function GetService(serviceType: System.Type): System.Object; end; InlineCollectionConverter = class (System.ComponentModel.CollectionConverter) { when converting to a string uses IInlineCollection.GetCollectionValue. } function ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; destinationType: System.Type): System.Object; override; { returns True if the instance supports IInlineCollection. } function GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; override; { returns the union of IInlineCollection.GetNewItemProperties and IInlineCollection.GetItemProperties or an empty PropertyDescriptorCollection if the instance does not support IInlineCollectionConverter. } function GetProperties(context: ITypeDescriptorContext; value: System.Object; attributes: AttributeArray): PropertyDescriptorCollection; override; end; InlineCollectionEditor = class (UITypeEditor) function GetEditStyle(context: ITypeDescriptorContext): UITypeEditorEditStyle; override; function EditValue(context: ITypeDescriptorContext; provider: IServiceProvider; value: System.Object): System.Object; override; end; {$ENDREGION} {$REGION 'Inline collection base classes'} type [TypeConverter(TypeOf(InlineCollectionConverter)), Editor(TypeOf(InlineCollectionEditor), TypeOf(UITypeEditor))] InlineCollectionBase = class abstract (CollectionBase, IInlineCollection) strict private _indexerInfo: PropertyInfo; strict protected {$REGION 'IInlineCollection methods'} procedure AddItem(value: System.Object; addPropertyId: System.Object); virtual; function GetCollectionValue: string; virtual; function GetNewItemProperties: PropertyDescriptorCollection; virtual; function GetItemProperties: PropertyDescriptorCollection; virtual; function GetService(serviceType: System.Type): System.Object; virtual; {$ENDREGION} function GetItemDescription(index: integer): string; virtual; function GetItemEmptyValue(index: Integer): System.Object; virtual; function GetItemIgnoreDefaultProperty(index: Integer): Boolean; virtual; function GetItemName(index: integer): string; virtual; function GetItemProperty(index: Integer): PropertyDescriptor; virtual; function IndexerInfo: PropertyInfo; end; type [TypeConverter(TypeOf(InlineCollectionConverter)), Editor(TypeOf(InlineCollectionEditor), TypeOf(UITypeEditor))] InlineDictionaryBase = class abstract (DictionaryBase, IInlineCollection) strict protected {$REGION 'IInlineCollection methods'} procedure AddItem(value: System.Object; addPropertyId: System.Object); virtual; function GetCollectionValue: string; virtual; function GetNewItemProperties: PropertyDescriptorCollection; virtual; function GetItemProperties: PropertyDescriptorCollection; virtual; function GetService(serviceType: System.Type): System.Object; virtual; {$ENDREGION} function GetItemDescription(key: System.Object): string; virtual; function GetItemEmptyValue(key: System.Object): System.Object; virtual; function GetItemProperty(key, value: System.Object): PropertyDescriptor; virtual; end; {$ENDREGION} implementation {$AUTOBOX ON} {$REGION 'implementation uses'} uses System.ComponentModel.Design, System.Resources; {$ENDREGION} {$REGION 'SimplePropertyDescriptor'} type SimplePropertyDescriptor = class (PropertyDescriptor) strict private _componentType: System.Type; _propertyType: System.Type; public constructor Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray); function CanResetValue(component: System.Object): Boolean; override; procedure ResetValue(component: System.Object); override; function ShouldSerializeValue(component: System.Object): Boolean; override; function get_ComponentType: System.Type; override; function get_PropertyType: System.Type; override; function get_IsReadOnly: Boolean; override; end; constructor SimplePropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray); var i: Integer; begin i := High(attributes); while (i >= 0) and not TypeOf(RefreshPropertiesAttribute).IsAssignableFrom(attributes[i].GetType) do Dec(i); if i >= 0 then attributes[i] := RefreshPropertiesAttribute.All else begin SetLength(attributes, Length(attributes) + 1); attributes[High(attributes)] := RefreshPropertiesAttribute.All; end; inherited Create(name, attributes); _componentType := componentType; _propertyType := propertyType; end; function SimplePropertyDescriptor.CanResetValue(component: System.Object): Boolean; begin Result := False; end; procedure SimplePropertyDescriptor.ResetValue(component: System.Object); begin end; function SimplePropertyDescriptor.ShouldSerializeValue(component: System.Object): Boolean; begin Result := False; end; function SimplePropertyDescriptor.get_ComponentType: System.Type; begin Result := _componentType; end; function SimplePropertyDescriptor.get_PropertyType: System.Type; begin Result := _propertyType; end; function SimplePropertyDescriptor.get_IsReadOnly: Boolean; begin Result := Attributes.Contains(ReadOnlyAttribute.Yes); end; {$ENDREGION} {$REGION 'NewItemPropertyDescriptor'} type NewItemPropertyDescriptor = class (SimplePropertyDescriptor) strict private _propertyId: System.Object; strict protected property PropertyId: System.Object read _propertyId; public constructor Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; propertyId: System.Object); function GetValue(component: System.Object): System.Object; override; procedure SetValue(component, value: System.Object); override; end; constructor NewItemPropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; propertyId: System.Object); begin inherited Create(componentType, name, propertyType, attributes); _propertyId := propertyId; end; function NewItemPropertyDescriptor.GetValue(component: System.Object): System.Object; begin Result := ''; end; procedure NewItemPropertyDescriptor.SetValue(component, value: System.Object); var ccs: IComponentChangeService; begin ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); if Assigned(ccs) then ccs.OnComponentChanging(component, nil); IInlineCollection(component).AddItem(value, _propertyId); if Assigned(ccs) then ccs.OnComponentChanged(component, nil, nil, nil); end; {$ENDREGION} {$REGION 'ItemPropertyDescriptor'} type ItemPropertyDescriptor = class (SimplePropertyDescriptor) strict private _emptyValue: System.Object; _index: System.Object; strict protected property EmptyValue: System.Object read _emptyValue; property Index: System.Object read _index; public constructor Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; emptyValue: System.Object; index: System.Object); function GetValue(component: System.Object): System.Object; override; procedure SetValue(component, value: System.Object); override; function ItemInstance(component: System.Object): System.Object; end; function ItemPropertyDescriptor.ItemInstance(component: System.Object): System.Object; begin if component is IList then Result := IList(component).Item[Integer(_index)] else if component is IDictionary then Result := IDictionary(component).Item[_index] else Result := nil; end; constructor ItemPropertyDescriptor.Create(componentType: System.Type; name: string; propertyType: System.Type; attributes: AttributeArray; emptyValue: System.Object; index: System.Object); begin inherited Create(componentType, name, propertyType, attributes); _emptyValue := emptyValue; _index := index; end; function ItemPropertyDescriptor.GetValue(component: System.Object): System.Object; begin Result := ItemInstance(component); end; procedure ItemPropertyDescriptor.SetValue(component, value: System.Object); var ccs: IComponentChangeService; begin if component is IList then begin if value = _emptyValue then begin ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); if Assigned(ccs) then ccs.OnComponentChanging(component, nil); IList(component).RemoveAt(Integer(_index)); if Assigned(ccs) then ccs.OnComponentChanged(component, nil, nil, nil); end else IList(component).Item[Integer(_index)] := value; end else if component is IDictionary then begin if value = _emptyValue then begin ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); if Assigned(ccs) then ccs.OnComponentChanging(component, nil); IDictionary(component).Remove(_index); if Assigned(ccs) then ccs.OnComponentChanged(component, nil, nil, nil); end else IDictionary(component).Item[_index] := value; end; end; {$ENDREGION} {$REGION 'ItemSubPropertyDescriptor'} type ItemSubPropertyDescriptor = class (ItemPropertyDescriptor) strict private _realDescriptor: PropertyDescriptor; public constructor Create(componentType: System.Type; name, description: string; &property: PropertyDescriptor; itemType: System.Type; emptyValue, index: System.Object); function CanResetValue(component: System.Object): Boolean; override; function GetValue(component: System.Object): System.Object; override; procedure ResetValue(component: System.Object); override; procedure SetValue(component, value: System.Object); override; function ShouldSerializeValue(component: System.Object): Boolean; override; function get_PropertyType: System.Type; override; function get_IsReadOnly: Boolean; override; property RealDescriptor: PropertyDescriptor read _realDescriptor; end; {$REGION 'SubPropertyTypeConverter'} (*type SubPropertyTypeConverter = class (TypeConverter) strict private _propertyConverter: TypeConverter; _instanceConverter: TypeConverter; strict protected function PropertyConverter(context: ITypeDescriptorContext): TypeConverter; function InstanceConverter(context: ITypeDescriptorContext): TypeConverter; public function CanConvertFrom(context: ITypeDescriptorContext; sourceType: System.Type): Boolean; override; function CanConvertTo(context: ITypeDescriptorContext; destinationType: System.Type): Boolean; override; function ConvertFrom(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object): System.Object; override; function ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; destinationType: System.Type): System.Object; override; function CreateInstance(context: ITypeDescriptorContext; propertyValues: IDictionary): System.Object; override; function GetCreateInstanceSupported(context: ITypeDescriptorContext): Boolean; override; function GetProperties(context: ITypeDescriptorContext; value: System.Object; attributes: AttributeArray): PropertyDescriptorCollection; override; function GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; override; function GetStandardValues(context: ITypeDescriptorContext): TypeConverter.StandardValuesCollection; override; function GetStandardValuesExclusive(context: ITypeDescriptorContext): Boolean; override; function GetStandardValuesSupported(context: ITypeDescriptorContext): Boolean; override; function IsValid(context: ITypeDescriptorContext; value: System.Object): Boolean; override; end; function SubPropertyTypeConverter.PropertyConverter(context: ITypeDescriptorContext): TypeConverter; begin if not Assigned(_propertyConverter) and Assigned(context) and Assigned(context.PropertyDescriptor) then _propertyConverter := ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor.Converter; Result := _propertyConverter; end; function SubPropertyTypeConverter.InstanceConverter(context: ITypeDescriptorContext): TypeConverter; begin if not Assigned(_instanceConverter) and Assigned(context) and Assigned(context.PropertyDescriptor) then _instanceConverter := TypeDescriptor.GetConverter(ItemSubPropertyDescriptor( context.PropertyDescriptor).ItemInstance(context.Instance)); Result := _instanceConverter; end; function SubPropertyTypeConverter.CanConvertFrom(context: ITypeDescriptorContext; sourceType: System.Type): Boolean; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.CanConvertFrom(context, sourceType) else Result := inherited CanConvertFrom(context, sourceType); end; function SubPropertyTypeConverter.CanConvertTo(context: ITypeDescriptorContext; destinationType: System.Type): Boolean; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.CanConvertTo(context, destinationType) else Result := inherited CanConvertTo(context, destinationType); end; function SubPropertyTypeConverter.ConvertFrom(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object): System.Object; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.ConvertFrom(context, culture, value) else Result := inherited ConvertFrom(context, culture, value); end; function SubPropertyTypeConverter.ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; destinationType: System.Type): System.Object; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.ConvertTo(context, culture, value, destinationType) else Result := inherited ConvertTo(context, culture, value, destinationType); end; function SubPropertyTypeConverter.CreateInstance(context: ITypeDescriptorContext; propertyValues: IDictionary): System.Object; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.CreateInstance(context, propertyValues) else Result := inherited CreateInstance(context, propertyValues); end; function SubPropertyTypeConverter.GetCreateInstanceSupported(context: ITypeDescriptorContext): Boolean; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.GetCreateInstanceSupported(context) else Result := inherited GetCreateInstanceSupported(context); end; function SubPropertyTypeConverter.GetProperties(context: ITypeDescriptorContext; value: System.Object; attributes: AttributeArray): PropertyDescriptorCollection; var propPropColl: PropertyDescriptorCollection; itemInst: System.Object; instPropColl: PropertyDescriptorCollection; begin if Assigned(value) then propPropColl := TypeDescriptor.GetProperties(value, attributes) else if Assigned(context) and Assigned(context.PropertyDescriptor) then propPropColl := TypeDescriptor.GetProperties(context.PropertyDescriptor.PropertyType, attributes) else propPropColl := PropertyDescriptorCollection.Empty; if Assigned(context) and Assigned(context.PropertyDescriptor) and Assigned(context.Instance) then begin itemInst := ItemPropertyDescriptor(context.PropertyDescriptor).ItemInstance(context.Instance); if Assigned(itemInst) then instPropColl := TypeDescriptor.GetProperties(itemInst, attributes) else instPropColl := PropertyDescriptorCollection.Empty; end else begin itemInst := nil; instPropColl := PropertyDescriptorCollection.Empty; end; if Assigned(context) and Assigned(ItemSubPropertyDescriptor(context.PropertyDescriptor)) then instPropColl.Remove(ItemSubPropertyDescriptor(context.PropertyDescriptor).RealDescriptor); end; function SubPropertyTypeConverter.GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; begin Result := (Assigned(PropertyConverter(context)) and _propertyConverter.GetPropertiesSupported(context)) or ((Assigned(InstanceConverter(context)) and _instanceConverter.GetPropertiesSupported(context))); end; function SubPropertyTypeConverter.GetStandardValues( context: ITypeDescriptorContext): TypeConverter.StandardValuesCollection; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.GetStandardValues(context) else Result := inherited GetStandardValues(context); end; function SubPropertyTypeConverter.GetStandardValuesExclusive(context: ITypeDescriptorContext): Boolean; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.GetStandardValuesExclusive(context) else Result := inherited GetStandardValuesExclusive(context); end; function SubPropertyTypeConverter.GetStandardValuesSupported(context: ITypeDescriptorContext): Boolean; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.GetStandardValuesSupported(context) else Result := inherited GetStandardValuesSupported(context); end; function SubPropertyTypeConverter.IsValid(context: ITypeDescriptorContext; value: System.Object): Boolean; begin if Assigned(PropertyConverter(context)) then Result := _propertyConverter.IsValid(context, value) else Result := inherited IsValid(context, value); end;*) {$ENDREGION} constructor ItemSubPropertyDescriptor.Create(componentType: System.Type; name, description: string; &property: PropertyDescriptor; itemType: System.Type; emptyValue, index: System.Object); var attrs: ArrayList; i: Integer; begin if not Assigned(&property) then raise ArgumentNullException.Create('property'); attrs := ArrayList.Create(&property.Attributes); if description <> '' then begin i := attrs.Count - 1; while (i >= 0) and (attrs.Item[i].GetType <> TypeOf(DescriptionAttribute)) do Dec(i); if i >= 0 then attrs.RemoveAt(i); attrs.Add(DescriptionAttribute.Create(description)); end; inherited Create(componentType, name, itemType, Jedi.Collections.AttributeArray(attrs.ToArray(TypeOf(Attribute))), emptyValue, index); _realDescriptor := &property; end; function ItemSubPropertyDescriptor.CanResetValue(component: System.Object): Boolean; var item: System.Object; begin item := ItemInstance(component); if Assigned(item) then Result := RealDescriptor.CanResetValue(item) else Result := False; end; function ItemSubPropertyDescriptor.GetValue(component: System.Object): System.Object; (*var item: System.Object;*) begin Result := ItemInstance(component); (*if Assigned(item) then Result := RealDescriptor.GetValue(item) else Result := nil;*) end; procedure ItemSubPropertyDescriptor.ResetValue(component: System.Object); var item: System.Object; ccs: IComponentChangeService; begin item := ItemInstance(component); if Assigned(item) then begin ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); if Assigned(ccs) then ccs.OnComponentChanging(component, nil); RealDescriptor.ResetValue(item); if Assigned(ccs) then ccs.OnComponentChanged(component, nil, nil, nil); end end; procedure ItemSubPropertyDescriptor.SetValue(component, value: System.Object); var ccs: IComponentChangeService; item: System.Object; begin ccs := IComponentChangeService(IInlineCollection(component).GetService(TypeOf(IComponentChangeService))); if Assigned(ccs) then ccs.OnComponentChanging(component, nil); if RealDescriptor.GetValue(Value) = EmptyValue then begin if component is IList then IList(component).RemoveAt(Integer(Index)) else if component is IDictionary then IDictionary(component).Remove(Index); end; (* else begin item := ItemInstance(component); if Assigned(item) then RealDescriptor.SetValue(item, value); end;*) if Assigned(ccs) then ccs.OnComponentChanged(component, nil, nil, nil); end; function ItemSubPropertyDescriptor.ShouldSerializeValue(component: System.Object): Boolean; var item: System.Object; begin item := ItemInstance(component); if Assigned(item) then Result := RealDescriptor.CanResetValue(item) else Result := False; end; function ItemSubPropertyDescriptor.get_PropertyType: System.Type; begin Result := RealDescriptor.PropertyType; end; function ItemSubPropertyDescriptor.get_IsReadOnly: Boolean; begin Result := RealDescriptor.IsReadOnly; end; {$ENDREGION} {$REGION 'InlineCollectionUtils'} class function InlineCollectionUtils.CollectionConverterText: string; var rm: ResourceManager; begin if _collectionValue = System.String.Empty then begin rm := ResourceManager.Create('System', TypeOf(Uri).Module.Assembly); try _collectionValue := rm.GetString('CollectionConverterText'); finally rm.Free; end; end; Result := _collectionValue; end; class function InlineCollectionUtils.CreateNewItemProperty(baseDescriptor: PropertyDescriptor; name, description: string; propertyId: System.Object): PropertyDescriptor; var attrs: ArrayList; begin if not Assigned(baseDescriptor) then raise ArgumentNullException.Create('baseDescriptor'); if not Assigned(name) or (name = '') then name := baseDescriptor.Name; attrs := ArrayList.Create(baseDescriptor.Attributes); Result := NewItemPropertyDescriptor.Create(baseDescriptor.ComponentType, name, baseDescriptor.PropertyType, AttributeArray(attrs.ToArray(TypeOf(Attribute))), propertyId); end; class function InlineCollectionUtils.CreateNewItemProperty(info: PropertyInfo; name, description: string; propertyId: System.Object): PropertyDescriptor; var mattrs: array of System.Object; attrs: AttributeArray; begin if not Assigned(info) then raise ArgumentNullException.Create('info'); if not Assigned(name) or (name = '') then name := info.Name; mattrs := info.GetCustomAttributes(True); attrs := new(AttributeArray, Length(mattrs)); System.Array.Copy(mattrs, attrs, Length(mattrs)); Result := InlineCollectionUtils.CreateNewItemProperty(info.DeclaringType, info.PropertyType, attrs, name, description, propertyId); end; class function InlineCollectionUtils.CreateNewItemProperty(componentType, propertyType: System.Type; attributes: AttributeArray; name, description: string; propertyId: System.Object): PropertyDescriptor; var attrs: ArrayList; i: Integer; begin attrs := ArrayList.Create; for i := 0 to High(attributes) do begin if (description = '') or (attributes[i].GetType <> TypeOf(DescriptionAttribute)) then attrs.Add(attributes[i]); end; if description <> '' then attrs.Add(DescriptionAttribute.Create(description)); Result := NewItemPropertyDescriptor.Create(componentType, name, propertyType, AttributeArray(attrs.ToArray(TypeOf(Attribute))), propertyId); end; class function InlineCollectionUtils.CreateItemProperty(info: PropertyInfo; component: System.Object; name, description: string; index, emptyValue: System.Object; ignoreDefaultProperty: Boolean): PropertyDescriptor; var itemInstance: System.Object; itemType: System.Type; defaultProperty: PropertyDescriptor; mattrs: array of System.Object; attrs: ArrayList; i: Integer; begin if not Assigned(info) then raise ArgumentNullException.Create('info'); if not Assigned(component) then raise ArgumentNullException.Create('component'); itemInstance := info.GetValue(component, [index]); defaultProperty := nil; if not ignoreDefaultProperty then begin if Assigned(itemInstance) then begin itemType := itemInstance.GetType; defaultProperty := TypeDescriptor.GetDefaultProperty(itemInstance); end else begin itemType := info.PropertyType; defaultProperty := TypeDescriptor.GetDefaultProperty(info.PropertyType); end end; if Assigned(defaultProperty) then Result := ItemSubPropertyDescriptor.Create(info.DeclaringType, name, description, defaultProperty, itemType, emptyValue, index) else begin mattrs := info.GetCustomAttributes(True); attrs := ArrayList.Create; for i := 0 to High(mattrs) do begin if mattrs[i].GetType <> TypeOf(DescriptionAttribute) then attrs.Add(mattrs[i]); end; attrs.Add(DescriptionAttribute.Create(description)); Result := ItemPropertyDescriptor.Create(info.DeclaringType, name, itemInstance.GetType, AttributeArray(attrs.ToArray(TypeOf(Attribute))), emptyValue, index); end; end; class function InlineCollectionUtils.CreateItemProperty(propertyType: System.Type; attributes: AttributeArray; component: System.Object; name, description: string; index, emptyValue: System.Object): PropertyDescriptor; var attrs: ArrayList; i: Integer; begin if not Assigned(propertyType) then raise ArgumentNullException.Create('propertyType'); if not Assigned(component) then raise ArgumentNullException.Create('component'); attrs := ArrayList.Create; for i := 0 to High(attributes) do begin if (description = '') or (attributes[i].GetType <> TypeOf(DescriptionAttribute)) then attrs.Add(attributes[i]); end; if description <> '' then attrs.Add(DescriptionAttribute.Create(description)); Result := ItemPropertyDescriptor.Create(component.GetType, name, propertyType, AttributeArray(attrs.ToArray(TypeOf(Attribute))), emptyValue, index); end; {$ENDREGION} {$REGION 'InlineCollectionConverter'} function InlineCollectionConverter.ConvertTo(context: ITypeDescriptorContext; culture: CultureInfo; value: System.Object; destinationType: System.Type): System.Object; begin if (destinationType = TypeOf(string)) and (value.GetType <> TypeOf(string)) and (value is IInlineCollection) then Result := IInlineCollection(value).GetCollectionValue else Result := inherited ConvertTo(context, culture, value, destinationType); end; function InlineCollectionConverter.GetPropertiesSupported(context: ITypeDescriptorContext): Boolean; begin Result := Assigned(context) and Assigned(context.PropertyDescriptor) and Assigned(context.Instance) and (context.PropertyDescriptor.GetValue(context.Instance) is IInlineCollection); end; function InlineCollectionConverter.GetProperties(context: ITypeDescriptorContext; value: System.Object; attributes: AttributeArray): PropertyDescriptorCollection; var pdc: PropertyDescriptorCollection; i: Integer; begin if value is IInlineCollection then begin Result := IInlineCollection(value).GetNewItemProperties; if not Assigned(Result) then Result := IInlineCollection(value).GetItemProperties else begin pdc := IInlineCollection(value).GetItemProperties; for i := 0 to pdc.Count - 1 do Result.Add(pdc.Item[i]); end; end else Result := PropertyDescriptorCollection.Create(nil); end; {$ENDREGION} {$REGION 'InlineCollectionEditor'} function InlineCollectionEditor.GetEditStyle(context: ITypeDescriptorContext): UITypeEditorEditStyle; begin Result := UITypeEditorEditStyle.Modal; end; function InlineCollectionEditor.EditValue(context: ITypeDescriptorContext; provider: IServiceProvider; value: System.Object): System.Object; var ccs: IComponentChangeService; begin Result := value; if value is IInlineCollection then begin ccs := provider.GetService(TypeOf(IComponentChangeService)); if ccs <> nil then ccs.OnComponentChanging(value, nil); if value is IList then IList(value).Clear else if value is IDictionary then IDictionary(value).Clear; if ccs <> nil then ccs.OnComponentChanged(value, nil, nil, nil); end; end; {$ENDREGION} {$REGION 'InlineCollectionBase'} function InlineCollectionBase.GetItemDescription(index: integer): string; begin Result := ''; end; function InlineCollectionBase.GetItemEmptyValue(index: Integer): System.Object; begin Result := nil; end; function InlineCollectionBase.GetItemIgnoreDefaultProperty(index: Integer): Boolean; begin Result := False; end; function InlineCollectionBase.GetItemName(index: integer): string; begin Result := System.String.Format('[{0}]', index); end; function InlineCollectionBase.GetItemProperty(index: Integer): PropertyDescriptor; begin Result := InlineCollectionUtils.CreateItemProperty(IndexerInfo, Self, GetItemName(index), GetItemDescription(index), index, GetItemEmptyValue(index), GetItemIgnoreDefaultProperty(index)); end; function InlineCollectionBase.IndexerInfo: PropertyInfo; begin if not Assigned(_indexerInfo) then begin _indexerInfo := GetType.GetProperty('Item', [TypeOf(Integer)]); if not Assigned(_indexerInfo) then _indexerInfo := GetType.GetProperty('Items', [TypeOf(Integer)]); if not Assigned(_indexerInfo) then raise MissingMemberException.Create('The collection does not have an indexer called Item or Items'); end; Result := _indexerInfo; end; procedure InlineCollectionBase.AddItem(value: System.Object; addPropertyId: System.Object); begin List.Add(value); end; function InlineCollectionBase.GetCollectionValue: string; begin Result := InlineCollectionUtils.CollectionConverterText; end; function InlineCollectionBase.GetNewItemProperties: PropertyDescriptorCollection; begin Result := PropertyDescriptorCollection.Create(nil); Result.Add(InlineCollectionUtils.CreateNewItemProperty(IndexerInfo, '(new)', 'Adds a new item to the collection', 0)); end; function InlineCollectionBase.GetItemProperties: PropertyDescriptorCollection; var i: Integer; begin Result := PropertyDescriptorCollection.Create(nil); for i := 0 to IList(Self).Count - 1 do Result.Add(GetItemProperty(i)); end; function InlineCollectionBase.GetService(serviceType: System.Type): System.Object; begin Result := nil; end; {$ENDREGION} {$REGION 'InlineDictionaryBase'} function InlineDictionaryBase.GetItemDescription(key: System.Object): string; begin Result := ''; end; function InlineDictionaryBase.GetItemEmptyValue(key: System.Object): System.Object; begin Result := nil; end; function InlineDictionaryBase.GetItemProperty(key, value: System.Object): PropertyDescriptor; begin Result := InlineCollectionUtils.CreateItemProperty(value.GetType, AttributeArray.Create(), Self, key.ToString, GetItemDescription(key), key, GetItemEmptyValue(key)); end; procedure InlineDictionaryBase.AddItem(value: System.Object; addPropertyId: System.Object); begin Dictionary.Add(value, nil); end; function InlineDictionaryBase.GetCollectionValue: string; begin Result := InlineCollectionUtils.CollectionConverterText; end; function InlineDictionaryBase.GetNewItemProperties: PropertyDescriptorCollection; begin Result := PropertyDescriptorCollection.Create(nil); Result.Add(InlineCollectionUtils.CreateNewItemProperty(TypeOf(Self), TypeOf(string), AttributeArray.Create(), '(new)', 'Adds a new item to the collection using the specified key', 0)); end; function InlineDictionaryBase.GetItemProperties: PropertyDescriptorCollection; var di: IDictionaryEnumerator; begin Result := PropertyDescriptorCollection.Create(nil); di := GetEnumerator; while di.MoveNext do Result.Add(GetItemProperty(di.Key, di.Value)); end; function InlineDictionaryBase.GetService(serviceType: System.Type): System.Object; begin Result := nil; end; {$ENDREGION} end. |
From: Marcel B. <jed...@us...> - 2004-06-12 18:31:48
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/resources In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/resources Added Files: Jedi.Windows.Forms.Hmi.Leds.SingleLed.bmp Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: Jedi.Windows.Forms.Hmi.Leds.SingleLed.bmp --- (This appears to be a binary file; contents omitted.) |
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples/hmi/leds/SingleLed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/examples/hmi/leds/SingleLed Added Files: examples.hmi.leds.singleled.bdsproj examples.hmi.leds.singleled.dpr examples.hmi.leds.singleled.mainform.pas examples.hmi.leds.singleled.mainform.resx Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: examples.hmi.leds.singleled.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: examples.hmi.leds.singleled.dpr --- program examples.hmi.leds.singleled; {%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.dll'} {%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Data.dll'} {%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Drawing.dll'} {%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.Windows.Forms.dll'} {%DelphiDotNetAssemblyCompiler '$(SystemRoot)\microsoft.net\framework\v1.1.4322\System.XML.dll'} {%DelphiDotNetAssemblyCompiler '..\..\..\..\bin\Jedi.Windows.Forms.Hmi.dll'} {%DelphiDotNetAssemblyCompiler 'f:\program files\common files\borland shared\bds\shared assemblies\2.0\Borland.Delphi.dll'} {$R 'examples.hmi.leds.singleled.mainform.TWinForm.resources' 'examples.hmi.leds.singleled.mainform.resx'} {%DelphiDotNetAssemblyCompiler '..\..\..\..\bin\Jedi.Drawing.dll'} {%DelphiDotNetAssemblyCompiler '..\..\..\..\bin\Jedi.Core.dll'} uses System.Reflection, System.Runtime.CompilerServices, System.Windows.Forms, examples.hmi.leds.singleled.mainform in 'examples.hmi.leds.singleled.mainform.pas' {examples.hmi.leds.singleled.mainform.TWinForm: System.Windows.Forms.Form}; {$R *.res} {$REGION 'Program/Assembly Information'} // // General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. // [assembly: AssemblyDescription('')] [assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('')] [assembly: AssemblyProduct('')] [assembly: AssemblyCopyright('')] [assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] // The Delphi compiler controls the AssemblyTitleAttribute via the ExeDescription. // You can set this in the IDE via the Project Options. // Manually setting the AssemblyTitle attribute below will override the IDE // setting. // [assembly: AssemblyTitle('')] // // Version information for an assembly consists of the following four values: // // Major Version // Minor Version // Build Number // Revision // // You can specify all the values or you can default the Revision and Build Numbers // by using the '*' as shown below: [assembly: AssemblyVersion('1.0.0.0')] // // In order to sign your assembly you must specify a key to use. Refer to the // Microsoft .NET Framework documentation for more information on assembly signing. // // Use the attributes below to control which key is used for signing. // // Notes: // (*) If no key is specified, the assembly is not signed. // (*) KeyName refers to a key that has been installed in the Crypto Service // Provider (CSP) on your machine. KeyFile refers to a file which contains // a key. // (*) If the KeyFile and the KeyName values are both specified, the // following processing occurs: // (1) If the KeyName can be found in the CSP, that key is used. // (2) If the KeyName does not exist and the KeyFile does exist, the key // in the KeyFile is installed into the CSP and used. // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. // When specifying the KeyFile, the location of the KeyFile should be // relative to the project output directory. For example, if your KeyFile is // located in the project directory, you would specify the AssemblyKeyFile // attribute as [assembly: AssemblyKeyFile('mykey.snk')], provided your output // directory is the project directory (the default). // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework // documentation for more information on this. // [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] {$ENDREGION} [STAThread] begin Application.Run(TWinForm.Create); end. --- NEW FILE: examples.hmi.leds.singleled.mainform.resx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: examples.hmi.leds.singleled.mainform.pas --- unit examples.hmi.leds.singleled.mainform; interface uses System.Drawing, System.Collections, System.ComponentModel, System.Windows.Forms, System.Data, Jedi.Windows.Forms.Hmi.Leds; type TWinForm = class(System.Windows.Forms.Form) {$REGION 'Designer Managed Code'} strict private /// <summary> /// Required designer variable. /// </summary> Components: System.ComponentModel.Container; SingleLed1: Jedi.Windows.Forms.Hmi.Leds.SingleLed; SingleLed2: Jedi.Windows.Forms.Hmi.Leds.SingleLed; PropertyGrid1: System.Windows.Forms.PropertyGrid; /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> procedure InitializeComponent; {$ENDREGION} strict protected /// <summary> /// Clean up any resources being used. /// </summary> procedure Dispose(Disposing: Boolean); override; private { Private Declarations } public constructor Create; end; [assembly: RuntimeRequiredAttribute(TypeOf(TWinForm))] implementation {$AUTOBOX ON} {$REGION 'Windows Form Designer generated code'} /// <summary> /// Required method for Designer support -- do not modify /// the contents of this method with the code editor. /// </summary> procedure TWinForm.InitializeComponent; type TArrayOfJedi_Windows_Forms_Hmi_Leds_LedStateBase = array of Jedi.Windows.Forms.Hmi.Leds.LedStateBase; begin Self.SingleLed1 := Jedi.Windows.Forms.Hmi.Leds.SingleLed.Create; Self.SingleLed2 := Jedi.Windows.Forms.Hmi.Leds.SingleLed.Create; Self.PropertyGrid1 := System.Windows.Forms.PropertyGrid.Create; (System.ComponentModel.ISupportInitialize(Self.SingleLed1)).BeginInit; (System.ComponentModel.ISupportInitialize(Self.SingleLed2)).BeginInit; Self.SuspendLayout; // // SingleLed1 // Self.SingleLed1.BlinkInterval := 0; Self.SingleLed1.LedState := 1; Self.SingleLed1.LedStyle := Jedi.Windows.Forms.Hmi.Leds.SingleColorNormalLedStyle.Create(64, 65, Jedi.Windows.Forms.Hmi.Leds.LedFrameStyle.Sunken, 75, System.Drawing.Color.Blue); Self.SingleLed1.Location := System.Drawing.Point.Create(20, 25); Self.SingleLed1.Name := 'SingleLed1'; Self.SingleLed1.Size := System.Drawing.Size.Create(64, 64); Self.SingleLed1.TabIndex := 0; // // SingleLed2 // Self.SingleLed2.BlinkInterval := 0; Self.SingleLed2.LedState := 0; Self.SingleLed2.LedStyle := Jedi.Windows.Forms.Hmi.Leds.MultiColorNormalLedStyle.Create(16, 65, Jedi.Windows.Forms.Hmi.Leds.LedFrameStyle.Sunken, TArrayOfJedi_Windows_Forms_Hmi_Leds_LedStateBase.Create(Jedi.Windows.Forms.Hmi.Leds.LedState.Create(System.Drawing.Color.Black, 'Off'), Jedi.Windows.Forms.Hmi.Leds.LedState.Create(System.Drawing.Color.Blue, 'Blue'), Jedi.Windows.Forms.Hmi.Leds.LedState.Create(System.Drawing.Color.Orange, 'Orange'), Jedi.Windows.Forms.Hmi.Leds.LedState.Create(System.Drawing.Color.YellowGreen, 'Green'), Jedi.Windows.Forms.Hmi.Leds.LedState.Create(System.Drawing.Color.Red, 'Red'))); Self.SingleLed2.Location := System.Drawing.Point.Create(40, 130); Self.SingleLed2.Name := 'SingleLed2'; Self.SingleLed2.Size := System.Drawing.Size.Create(16, 16); Self.SingleLed2.TabIndex := 1; // // PropertyGrid1 // Self.PropertyGrid1.CommandsBackColor := System.Drawing.Color.Gray; Self.PropertyGrid1.CommandsVisibleIfAvailable := True; Self.PropertyGrid1.LargeButtons := False; Self.PropertyGrid1.LineColor := System.Drawing.SystemColors.ScrollBar; Self.PropertyGrid1.Location := System.Drawing.Point.Create(175, 10); Self.PropertyGrid1.Name := 'PropertyGrid1'; Self.PropertyGrid1.SelectedObject := Self.SingleLed2; Self.PropertyGrid1.Size := System.Drawing.Size.Create(490, 475); Self.PropertyGrid1.TabIndex := 2; Self.PropertyGrid1.Text := 'PropertyGrid1'; Self.PropertyGrid1.ViewBackColor := System.Drawing.SystemColors.Window; Self.PropertyGrid1.ViewForeColor := System.Drawing.SystemColors.WindowText; // // TWinForm // Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13); Self.BackColor := System.Drawing.Color.Gray; Self.ClientSize := System.Drawing.Size.Create(707, 503); Self.Controls.Add(Self.PropertyGrid1); Self.Controls.Add(Self.SingleLed2); Self.Controls.Add(Self.SingleLed1); Self.Name := 'TWinForm'; Self.Text := 'WinForm'; (System.ComponentModel.ISupportInitialize(Self.SingleLed1)).EndInit; (System.ComponentModel.ISupportInitialize(Self.SingleLed2)).EndInit; Self.ResumeLayout(False); end; {$ENDREGION} procedure TWinForm.Dispose(Disposing: Boolean); begin if Disposing then begin if Components <> nil then Components.Dispose(); end; inherited Dispose(Disposing); end; constructor TWinForm.Create; begin inherited Create; // // Required for Windows Form Designer support // InitializeComponent; // // TODO: Add any constructor code after InitializeComponent call // end; end. |
From: Marcel B. <jed...@us...> - 2004-06-12 18:31:47
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/examples/bin Added Files: bin.txt Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: bin.txt --- |
From: Marcel B. <jed...@us...> - 2004-06-12 18:31:47
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/lib Added Files: lib.txt Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: lib.txt --- |
From: Marcel B. <jed...@us...> - 2004-06-12 18:31:47
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/examples/lib Added Files: lib.txt Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: lib.txt --- |
From: Marcel B. <jed...@us...> - 2004-06-12 18:31:46
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/design In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/design Added Files: design.txt Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: design.txt --- |
From: Marcel B. <jed...@us...> - 2004-06-12 18:31:46
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/bin Added Files: bin.txt Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: bin.txt --- |
From: Marcel B. <jed...@us...> - 2004-06-12 18:31:45
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/assemblies In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22719/dev/jedi_mbe/assemblies Added Files: HmiTestGroup.bdsgroup Jedi.Core.bdsproj Jedi.Core.dpk Jedi.Drawing.bdsproj Jedi.Drawing.dpk Jedi.Windows.Forms.Hmi.bdsproj Jedi.Windows.Forms.Hmi.dpk Log Message: not working yet (need more changes in Jedi.Collections). --- NEW FILE: Jedi.Windows.Forms.Hmi.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: HmiTestGroup.bdsgroup --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Jedi.Drawing.dpk --- package Jedi.Drawing; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, System.Drawing; contains Jedi.Drawing in '..\run\Jedi.Drawing.pas'; [assembly: AssemblyTitle('Jedi.Drawing')] [assembly: AssemblyDescription('.NET drawing classes.')] //[assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] //[assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. --- NEW FILE: Jedi.Core.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Jedi.Windows.Forms.Hmi.dpk --- package Jedi.Windows.Forms.Hmi; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO OFF} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, System, System.Drawing, System.Windows.Forms, mscorlib, Jedi.Drawing, Jedi.Core; contains Jedi.Windows.Forms.Hmi.Leds in '..\run\Jedi.Windows.Forms.Hmi.Leds.pas' {Jedi.Windows.Forms.Hmi.Leds.LedControl: System.Windows.Forms.Control}; [assembly: AssemblyTitle('Jedi.Windows.Forms.Hmi')] [assembly: AssemblyDescription('.NET WinForms HMI controls.')] //[assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] //[assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. --- NEW FILE: Jedi.Drawing.bdsproj --- (This appears to be a binary file; contents omitted.) --- NEW FILE: Jedi.Core.dpk --- package Jedi.Core; {$ALIGN 0} {$ASSERTIONS ON} {$BOOLEVAL OFF} {$DEBUGINFO ON} {$EXTENDEDSYNTAX ON} {$IMPORTEDDATA ON} {$IOCHECKS ON} {$LOCALSYMBOLS ON} {$LONGSTRINGS ON} {$OPENSTRINGS ON} {$OPTIMIZATION ON} {$OVERFLOWCHECKS OFF} {$RANGECHECKS OFF} {$REFERENCEINFO ON} {$SAFEDIVIDE OFF} {$STACKFRAMES OFF} {$TYPEDADDRESS OFF} {$VARSTRINGCHECKS ON} {$WRITEABLECONST OFF} {$MINENUMSIZE 1} {$IMAGEBASE $400000} {$IMPLICITBUILD OFF} requires Borland.Delphi, mscorlib, System, System.Drawing; contains Jedi.Collections in '..\run\Jedi.Collections.pas'; [assembly: AssemblyTitle('Jedi.Core')] [assembly: AssemblyDescription('.NET core classes.')] //[assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET Framework Class Library')] [assembly: AssemblyCopyright('Copyright © 2004 Project JEDI.')] //[assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] end. |
From: Marcel B. <jed...@us...> - 2004-06-12 18:30:00
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples/hmi/leds/SingleLed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20997/SingleLed Log Message: Directory /cvsroot/jedidotnet/dev/jedi_mbe/examples/hmi/leds/SingleLed added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-12 18:29:49
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples/hmi/leds In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20780/leds Log Message: Directory /cvsroot/jedidotnet/dev/jedi_mbe/examples/hmi/leds added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-12 18:29:33
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples/lib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20371/lib Log Message: Directory /cvsroot/jedidotnet/dev/jedi_mbe/examples/lib added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-12 18:29:33
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples/hmi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20371/hmi Log Message: Directory /cvsroot/jedidotnet/dev/jedi_mbe/examples/hmi added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-12 18:29:32
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples/bin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20371/bin Log Message: Directory /cvsroot/jedidotnet/dev/jedi_mbe/examples/bin added to the repository |
From: Marcel B. <jed...@us...> - 2004-06-12 18:29:03
|
Update of /cvsroot/jedidotnet/dev/jedi_mbe/examples In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19513/examples Log Message: Directory /cvsroot/jedidotnet/dev/jedi_mbe/examples added to the repository |