[JEDI.NET-commits] main/examples/Jedi.Windows.Forms.Graphics/Shape example.Jedi.Windows.Forms.Shape.
Status: Pre-Alpha
Brought to you by:
jedi_mbe
From: Marcel B. <jed...@us...> - 2005-03-14 15:22:11
|
Update of /cvsroot/jedidotnet/main/examples/Jedi.Windows.Forms.Graphics/Shape In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12531/main/examples/Jedi.Windows.Forms.Graphics/Shape Added Files: example.Jedi.Windows.Forms.Shape.MainForm.pas example.Jedi.Windows.Forms.Shape.MainForm.resx example.Jedi.Windows.Forms.Shape.bdsproj example.Jedi.Windows.Forms.Shape.dpr example.Jedi.Windows.Forms.Shape.res Log Message: Moved example of shape control to new directory; adapted in some places. --- NEW FILE: example.Jedi.Windows.Forms.Shape.res --- (This appears to be a binary file; contents omitted.) --- NEW FILE: example.Jedi.Windows.Forms.Shape.MainForm.resx --- (This appears to be a binary file; contents omitted.) --- NEW FILE: example.Jedi.Windows.Forms.Shape.MainForm.pas --- unit example.Jedi.Windows.Forms.Shape.MainForm; interface uses System.Drawing, System.Collections, System.ComponentModel, System.Windows.Forms, System.Data, Jedi.Windows.Forms.Graphics.ShapeControl; type MainForm = class(System.Windows.Forms.Form) {$REGION 'Designer Managed Code'} strict private /// <summary> /// Required designer variable. /// </summary> Components: System.ComponentModel.Container; cbShape: System.Windows.Forms.ComboBox; shape: Jedi.Windows.Forms.Graphics.ShapeControl.Shape; btnClose: System.Windows.Forms.Button; /// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> procedure InitializeComponent; procedure btnClose_Click(sender: System.Object; e: System.EventArgs); procedure cbShape_SelectedIndexChanged(sender: System.Object; e: System.EventArgs); {$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(MainForm))] 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 MainForm.InitializeComponent; type TArrayOfSystem_Object = array of System.Object; begin Self.cbShape := System.Windows.Forms.ComboBox.Create; Self.shape := Jedi.Windows.Forms.Graphics.ShapeControl.Shape.Create; Self.btnClose := System.Windows.Forms.Button.Create; Self.SuspendLayout; // // cbShape // Self.cbShape.Anchor := (System.Windows.Forms.AnchorStyles(((System.Windows.Forms.AnchorStyles.Top or System.Windows.Forms.AnchorStyles.Left) or System.Windows.Forms.AnchorStyles.Right))); Self.cbShape.DropDownStyle := System.Windows.Forms.ComboBoxStyle.DropDownList; Self.cbShape.Items.AddRange(TArrayOfSystem_Object.Create('Circle', 'Ellips' + 'e', 'Rectangle', 'Rounded rectangle', 'Rounded square', 'Square')); Self.cbShape.Location := System.Drawing.Point.Create(8, 8); Self.cbShape.Name := 'cbShape'; Self.cbShape.Size := System.Drawing.Size.Create(202, 21); Self.cbShape.TabIndex := 0; Include(Self.cbShape.SelectedIndexChanged, Self.cbShape_SelectedIndexChanged); // // shape // Self.shape.Anchor := (System.Windows.Forms.AnchorStyles((((System.Windows.Forms.AnchorStyles.Top or System.Windows.Forms.AnchorStyles.Bottom) or System.Windows.Forms.AnchorStyles.Left) or System.Windows.Forms.AnchorStyles.Right))); Self.shape.Location := System.Drawing.Point.Create(10, 40); Self.shape.Name := 'shape'; Self.shape.Shape := Jedi.Windows.Forms.Graphics.ShapeControl.Shape.ShapeType.stRectangle; Self.shape.Size := System.Drawing.Size.Create(200, 100); Self.shape.TabIndex := 1; Self.shape.Text := 'Shape1'; // // btnClose // Self.btnClose.Anchor := (System.Windows.Forms.AnchorStyles((System.Windows.Forms.AnchorStyles.Bottom or System.Windows.Forms.AnchorStyles.Right))); Self.btnClose.Location := System.Drawing.Point.Create(135, 150); Self.btnClose.Name := 'btnClose'; Self.btnClose.Size := System.Drawing.Size.Create(75, 25); Self.btnClose.TabIndex := 2; Self.btnClose.Text := 'Close'; Include(Self.btnClose.Click, Self.btnClose_Click); // // MainForm // Self.AutoScaleBaseSize := System.Drawing.Size.Create(5, 13); Self.ClientSize := System.Drawing.Size.Create(217, 178); Self.Controls.Add(Self.btnClose); Self.Controls.Add(Self.shape); Self.Controls.Add(Self.cbShape); Self.Name := 'MainForm'; Self.Text := 'WinForm'; Self.ResumeLayout(False); end; {$ENDREGION} procedure MainForm.Dispose(Disposing: Boolean); begin if Disposing then begin if Components <> nil then Components.Dispose(); end; inherited Dispose(Disposing); end; constructor MainForm.Create; begin inherited Create; InitializeComponent; shape.Pen := Pen.Create(Color.Red); shape.Brush := Brushes.Yellow; cbShape.SelectedIndex := 0; end; procedure MainForm.cbShape_SelectedIndexChanged(sender: System.Object; e: System.EventArgs); begin case cbShape.SelectedIndex of 0: shape.Shape := stCircle; 1: shape.Shape := stEllipse; 2: shape.Shape := stRectangle; 3: shape.Shape := stRoundRect; 4: shape.Shape := stRoundSquare; 5: shape.Shape := stSquare; end; end; procedure MainForm.btnClose_Click(sender: System.Object; e: System.EventArgs); begin Close; end; end. --- NEW FILE: example.Jedi.Windows.Forms.Shape.dpr --- program example.Jedi.Windows.Forms.Shape; {%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'} {$R 'example.Jedi.Windows.Forms.Shape.MainForm.resources' 'example.Jedi.Windows.Forms.Shape.MainForm.resx'} {%DelphiDotNetAssemblyCompiler '..\..\..\bin\Jedi.Windows.Forms.Graphics.dll'} {%DelphiDotNetAssemblyCompiler 'Borland.Delphi.dll'} {%DelphiDotNetAssemblyCompiler '..\..\..\bin\Jedi.System.dll'} uses System.Reflection, System.Runtime.CompilerServices, System.Windows.Forms, example.Jedi.Windows.Forms.Shape.MainForm in 'example.Jedi.Windows.Forms.Shape.MainForm.pas' {example.Jedi.Windows.Forms.Shape.MainForm.MainForm: System.Windows.Forms.Form}; {$R *.res} {$REGION 'Program/Assembly Information'} [assembly: AssemblyTitle('example.Jedi.Windows.Forms.Shape')] [assembly: AssemblyDescription('Example of the Jedi.Windows.Forms.Graphics.Shape control.')] [assembly: AssemblyConfiguration('')] [assembly: AssemblyCompany('Project JEDI')] [assembly: AssemblyProduct('JEDI.NET library')] [assembly: AssemblyCopyright('Copyright © 2004 - 2005 Project JEDI')] [assembly: AssemblyTrademark('')] [assembly: AssemblyCulture('')] [assembly: AssemblyVersion('1.0.0.0')] [assembly: AssemblyDelaySign(false)] [assembly: AssemblyKeyFile('')] [assembly: AssemblyKeyName('')] {$ENDREGION} [STAThread] begin Application.Run(MainForm.Create); end. --- NEW FILE: example.Jedi.Windows.Forms.Shape.bdsproj --- (This appears to be a binary file; contents omitted.) |