protected override void OnLoad(EventArgs e) { base.OnLoad(e); Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup rbg = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(this, "Sample radio group"); rbg.TextColor = Color.White; rbg.SetPosition(10, 10); rbg.AddOption("Option 1"); rbg.AddOption("Option 2"); rbg.AddOption("Option 3"); rbg.AddOption("\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631"); //rbg.SizeToContents(); // it's auto rbg.SelectionChanged += OnChange; LabeledRadioButton rb1 = new LabeledRadioButton(this); rb1.Text = "Option 1"; rb1.SetPosition(300, 10); LabeledRadioButton rb2 = new LabeledRadioButton(this); rb2.Text = "Option 2222222222222222222222222222222222"; rb2.SetPosition(300, 30); LabeledRadioButton rb3 = new LabeledRadioButton(this); rb3.Text = "\u0627\u0644\u0622\u0646 \u0644\u062D\u0636\u0648\u0631"; rb3.SetPosition(300, 50); //this.DrawDebugOutlines = true; }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); // Top Label Alt.GUI.Temporary.Gwen.Control.Label m_TopLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this); m_TopLabel.AutoSizeToContents = true; m_TopLabel.Text = "Contour Tool (GeometryContour) & Polygon Orientation"; m_TopLabel.TextColor = Color.Yellow; m_TopLabel.Dock = Pos.Top; m_TopLabel.Margin = new Margin(0, 3, 0, 5); // Width m_WidthSlider = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(this); m_WidthSlider.Dock = Pos.Bottom; m_WidthSlider.SetSize(150, 20); m_WidthSlider.SetRange(-100, 100); m_WidthSlider.NotchCount = (int)(m_WidthSlider.Max - m_WidthSlider.Min); m_WidthSlider.SnapToNotches = true; m_WidthSlider.ValueChanged += WidthSlider_ValueChanged; m_WidthSliderLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this); m_WidthSliderLabel.AutoSizeToContents = true; m_WidthSliderLabel.Dock = Pos.Bottom; m_WidthSliderLabel.Margin = new Margin(0, 10, 0, 0); m_WidthSlider.Value = 0; // AutoDetect m_AutoDetectCheckBox = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(this); m_AutoDetectCheckBox.Text = "Autodetect orientation if not defined"; m_AutoDetectCheckBox.Dock = Pos.Bottom; m_AutoDetectCheckBox.IsChecked = true; m_AutoDetectCheckBox.Margin = new Margin(0, 10, 0, 0); // PolyCloseType m_PolyCloseTypeGroupBox = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(this, string.Empty); m_PolyCloseTypeGroupBox.Text = "Polygon Close Type:"; m_PolyCloseTypeGroupBox.Margin = new Margin(0, 0, 0, 0); m_PolyCloseTypeGroupBox.Dock = Pos.Bottom; m_PolyCloseTypeGroupBox.AutoSizeToContents = true; rbClose = m_PolyCloseTypeGroupBox.AddOption("Close"); rbClose.Margin = new Margin(0, 5, 0, 0); rbCloseCW = m_PolyCloseTypeGroupBox.AddOption("Close CW"); rbCloseCCW = m_PolyCloseTypeGroupBox.AddOption("Close CCW"); rbClose.Select(); // m_FillBrush = new SolidColorBrush(Color.LimeGreen * 1.2); m_ContourPen = new Pen(new ColorR(0.8, 0.2, 0.2), 2); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); { m_DockControl = new Alt.GUI.Temporary.Gwen.Control.TabControl(this); m_DockControl.SetBounds(10, 10, 200, 200); { Alt.GUI.Temporary.Gwen.Control.TabButton button = m_DockControl.AddPage("Controls"); Alt.GUI.Temporary.Gwen.Control.Base page = button.Page; { Color rbColor = Color.Gray * 0.5; Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup radio = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(page, "Tab position"); radio.TextColor = rbColor; radio.UseCurrentColorAsNormal = true; radio.SetPosition(10, 10); Alt.GUI.Temporary.Gwen.Control.LabeledRadioButton rb; rb = radio.AddOption("Top"); rb.Select(); rb.NormalTextColor = rbColor; rb = radio.AddOption("Bottom"); rb.NormalTextColor = rbColor; rb = radio.AddOption("Left"); rb.NormalTextColor = rbColor; rb = radio.AddOption("Right"); rb.NormalTextColor = rbColor; radio.SelectionChanged += OnDockChange; } } m_DockControl.AddPage("Red"); m_DockControl.AddPage("Green"); m_DockControl.AddPage("Blue"); } { Alt.GUI.Temporary.Gwen.Control.TabControl dragMe = new Alt.GUI.Temporary.Gwen.Control.TabControl(this); dragMe.SetBounds(220, 10, 200, 200); dragMe.AddPage("You"); dragMe.AddPage("Can"); dragMe.AddPage("Reorder").SetImage("AltData/Gwen/test16.png"); dragMe.AddPage("These"); dragMe.AddPage("Tabs"); dragMe.AllowReorder = true; } }
Base CreateControls(Base subject, int dock_idx, String name, int x, int y) { Alt.GUI.Temporary.Gwen.Control.GroupBox gb = new Alt.GUI.Temporary.Gwen.Control.GroupBox(this); gb.TextColor = labelColor; gb.SetBounds(x, y, 200, 150); gb.Text = name; Alt.GUI.Temporary.Gwen.Control.Label l_width = new Alt.GUI.Temporary.Gwen.Control.Label(gb); l_width.TextColor = labelColor; l_width.SetSize(35, 15); l_width.Text = "Width:"; Alt.GUI.Temporary.Gwen.Control.HorizontalSlider width = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(gb); width.Name = "Width"; width.UserData = subject; width.Min = 50; width.Max = 350; width.Value = 100; width.SetSize(55, 15); width.ValueChanged += WidthChanged; Alt.GUI.Temporary.Gwen.Align.PlaceRightBottom(width, l_width); Alt.GUI.Temporary.Gwen.Control.Label l_height = new Alt.GUI.Temporary.Gwen.Control.Label(gb); l_height.TextColor = labelColor; l_height.SetSize(35, 15); l_height.Text = "Height:"; Alt.GUI.Temporary.Gwen.Align.PlaceRightBottom(l_height, width, 10); Alt.GUI.Temporary.Gwen.Control.HorizontalSlider height = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(gb); height.Name = "Height"; height.UserData = subject; height.Min = 50; height.Max = 350; height.Value = 100; height.SetSize(55, 15); height.ValueChanged += HeightChanged; Alt.GUI.Temporary.Gwen.Align.PlaceRightBottom(height, l_height); Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup dock = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(gb, "Dock"); dock.TextColor = labelColor; dock.UserData = subject; // store control that we are controlling dock.AddOption("Left"); dock.AddOption("Top"); dock.AddOption("Right"); dock.AddOption("Bottom"); dock.AddOption("Fill"); dock.SetSelection(dock_idx); Alt.GUI.Temporary.Gwen.Align.PlaceDownLeft(dock, l_width, 5); //dock.DrawDebugOutlines = true; dock.Invalidate(); Alt.GUI.Temporary.Gwen.Control.Label l_margin = new Alt.GUI.Temporary.Gwen.Control.Label(gb); l_margin.TextColor = labelColor; l_margin.Text = "Margin:"; l_margin.SetBounds(75, 20, 35, 15); //Align.PlaceRightBottom(l_margin, dock); // can't use Align to anchor with 'dock' because radio group is resized only after layout ~_~ // this is become really cumbersome //l_margin.DrawDebugOutlines = true; Alt.GUI.Temporary.Gwen.Control.HorizontalSlider margin = new Alt.GUI.Temporary.Gwen.Control.HorizontalSlider(gb); margin.Name = "Margin"; margin.UserData = subject; margin.Min = 0; margin.Max = 50; margin.Value = 10; margin.SetSize(55, 15); margin.ValueChanged += MarginChanged; Alt.GUI.Temporary.Gwen.Align.PlaceRightBottom(margin, l_margin); dock.SelectionChanged += DockChanged; return(gb); }
public Example_Clipper(Base parent) : base(parent) { this.Margin = new Margin(0); // Top Label m_TopLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this); m_TopLabel.AutoSizeToContents = true; m_TopLabel.Text = "Clipper Demo. Use the mouse-wheel (or +, -, 0) to adjust the offset of the solution polygons."; m_TopLabel.TextColor = Color.Yellow; m_TopLabel.Dock = Pos.Top; m_TopLabel.Margin = new Margin(0, 5, 0, 5); m_Splitter = new VerticalSplitter(this); m_Splitter.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; // UI Panel m_RightPanel = new Base(m_Splitter); m_RightPanel.Dock = Pos.Fill; // Geometry groupBox_Geometry = new RadioButtonGroup(m_RightPanel, string.Empty); groupBox_Geometry.Text = "Geometry:"; groupBox_Geometry.Dock = Pos.Top; groupBox_Geometry.Margin = new Margin(0, #if WINDOWS_PHONE_7 || WINDOWS_PHONE_71 5, #else GUI.Config.Logo.PixelHeight, #endif 5, 0); rbGeometry1 = groupBox_Geometry.AddOption("Triangles"); rbGeometry1.Margin = new Margin(0, 5, 0, 0); rbGeometry2 = groupBox_Geometry.AddOption("Geo - Circles"); rbGeometry2.Select(); groupBox_Geometry.SelectionChanged += new GwenEventHandler(groupBox_Geometry_SelectionChanged); // Boolean Op groupBox_BooleanOperation = new RadioButtonGroup(m_RightPanel, string.Empty); groupBox_BooleanOperation.Text = "Boolean Operation:"; groupBox_BooleanOperation.Dock = Pos.Top; groupBox_BooleanOperation.Margin = new Margin(0, 15, 5, 0); rbIntersect = groupBox_BooleanOperation.AddOption("Intersect"); rbIntersect.Margin = new Margin(0, 5, 0, 0); rbUnion = groupBox_BooleanOperation.AddOption("Union"); rbDifference = groupBox_BooleanOperation.AddOption("Difference"); //NoNeed rbXor = groupBox_BooleanOperation.AddOption("XOR"); rbNone = groupBox_BooleanOperation.AddOption("None"); rbNone.Margin = new Margin(0, 0, 0, 7); rbIntersect.Select(); groupBox_BooleanOperation.SelectionChanged += new GwenEventHandler(RefreshWORecreating); // Options groupBox_Options = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(m_RightPanel, string.Empty); groupBox_Options.Text = "Options:"; groupBox_Options.Dock = Pos.Top; groupBox_Options.AutoSizeToContents = true; groupBox_Options.Margin = new Margin(0, 15, 5, 0); rbEvenOdd = groupBox_Options.AddOption("EvenOdd"); rbEvenOdd.Margin = new Margin(0, 5, 0, 0); rbNonZero = groupBox_Options.AddOption("NonZero"); rbNonZero.Select(); groupBox_Options.SelectionChanged += new GwenEventHandler(RefreshWORecreating); // Vertex Count lblCount = new Alt.GUI.Temporary.Gwen.Control.Label(m_RightPanel); //groupBox_Options); lblCount.AutoSizeToContents = true; lblCount.Text = "Vertex Count:"; lblCount.Dock = Pos.Top; lblCount.Margin = new Margin(0, 17, 5, 7); //groupBox_Options.AddChild(lblCount); nudCount = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_RightPanel); //groupBox_Options); nudCount.Dock = Pos.Top; nudCount.Minimum = 3; nudCount.Maximum = 100; nudCount.Value = 50; nudCount.Margin = new Margin(0, 0, 5, 7); //groupBox_Options.AddChild(nudCount); nudCount.ValueChanged += new GwenEventHandler(nudCount_ValueChanged); // Offset Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(m_RightPanel); //groupBox_Options); label.AutoSizeToContents = true; label.Text = "Offset:"; label.Dock = Pos.Top; label.Margin = new Margin(0, 0, 5, 7); //groupBox_Options.AddChild(label); nudOffset = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_RightPanel);//groupBox_Options); nudOffset.Dock = Pos.Top; nudOffset.Minimum = -10; nudOffset.Maximum = 10; nudOffset.Value = 0; nudOffset.DecimalPlaces = #if WINDOWS_PHONE_7 || WINDOWS_PHONE_71 0; #else 1; #endif nudOffset.Margin = new Margin(0, 0, 5, 7); //groupBox_Options.AddChild(nudOffset); nudOffset.ValueChanged += new GwenEventHandler(RefreshWORecreating); }
public Example_CombinedGeometry(Base parent) : base(parent) { this.Margin = new Margin(0); // Top Label m_TopLabel = new Alt.GUI.Temporary.Gwen.Control.Label(this); m_TopLabel.AutoSizeToContents = true; m_TopLabel.Text = "Geometry Boolean Operations using CombinedGeometry (press the left mouse button to move the geometry)"; m_TopLabel.TextColor = Color.Yellow; m_TopLabel.Dock = Pos.Top; m_TopLabel.Margin = new Margin(0, 5, 0, 5); Alt.GUI.Temporary.Gwen.Control.VerticalSplitter splitter = new Alt.GUI.Temporary.Gwen.Control.VerticalSplitter(this); splitter.Dock = Alt.GUI.Temporary.Gwen.Pos.Fill; // UI Panel m_UIPanel = new Base(splitter); m_UIPanel.Dock = Pos.Fill; // Geometry groupBox_Geometry = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(m_UIPanel, string.Empty); groupBox_Geometry.Text = "Geometry:"; //groupBox_Geometry.Margin = new Margin(0, 5, 0, 0); groupBox_Geometry.Margin = new Margin(0, #if WINDOWS_PHONE_7 || WINDOWS_PHONE_71 5, #else GUI.Config.Logo.PixelHeight, #endif 5, 0); groupBox_Geometry.Dock = Pos.Top; groupBox_Geometry.AutoSizeToContents = true; rbGeometry1 = groupBox_Geometry.AddOption("Spiral and Text"); rbGeometry1.Margin = new Margin(0, 3, 0, 0); rbGeometry2 = groupBox_Geometry.AddOption("Great Britain and Spiral"); rbGeometry3 = groupBox_Geometry.AddOption("Great Britain and Arrows"); rbGeometry4 = groupBox_Geometry.AddOption("Closed Stroke"); rbGeometry5 = groupBox_Geometry.AddOption("Two Simple Paths"); rbGeometry5.Margin = new Margin(0, 0, 0, #if SILVERLIGHT 22 #else 13 #endif ); // Boolean Op groupBox_BooleanOperation = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(m_UIPanel, string.Empty); groupBox_BooleanOperation.Text = "Boolean Operation:"; groupBox_BooleanOperation.Margin = new Margin(0, 15, 5, 0); groupBox_BooleanOperation.Dock = Pos.Top; groupBox_BooleanOperation.AutoSizeToContents = true; rbBminusA = groupBox_BooleanOperation.AddOption("B-A"); rbBminusA.Margin = new Margin(0, 3, 0, 0); rbAminusB = groupBox_BooleanOperation.AddOption("A-B"); rbXor = groupBox_BooleanOperation.AddOption("XOR"); rbAnd = groupBox_BooleanOperation.AddOption("AND"); rbOr = groupBox_BooleanOperation.AddOption("OR"); rbNone = groupBox_BooleanOperation.AddOption("None"); rbNone.Margin = new Margin(0, 0, 0, #if SILVERLIGHT 27 #else 15 #endif ); // Drawing Panel m_DrawingPanel = new Base(splitter); m_DrawingPanel.Dock = Pos.Fill; m_DrawingPanel.Margin = new Margin(-1); //m_DrawingPanel.ClientBackColor = Color.White; //m_DrawingPanel.DrawBorder = true; //m_DrawingPanel.BorderColor = Color.DodgerBlue; m_DrawingPanel.Paint += new GUI.PaintEventHandler(panel2_Paint); m_DrawingPanel.MouseDown += new Alt.GUI.MouseEventHandler(panel2_MouseDown); m_DrawingPanel.MouseMove += new Alt.GUI.MouseEventHandler(panel2_MouseMove); // splitter.SetPanel(1, m_UIPanel); splitter.SetPanel(0, m_DrawingPanel); splitter.SetHValue(0.78f); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); m_panelDrawing = new PieChartControl(this); //m_panelDrawing.DoubleBuffered = false; m_panelDrawing.Dock = Pos.Fill; m_panelDrawing.ClientBackColor = Color.FromArgb(0, 128, 128, 128);// Color.Transparent;// WhiteSmoke; m_panelDrawing.TextColor = Color.Black; //m_panelDrawing.DrawBorder = true; //m_panelDrawing.BorderColor = Color.DodgerBlue; m_panelDrawing.Margin = new Margin(8, 8, 8, 8); m_panelDrawing.ToolTips = null; groupBox6 = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_ControlsPanel); groupBox6.Location = new PointI(8, 8); groupBox6.Size = new SizeI(320, 248); groupBox6.Text = "Pie slices"; int inGroupBoxOffset = -12; int numericUpDownWidth = 45; Alt.GUI.Temporary.Gwen.Control.Label label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6); label.Location = new PointI(32, 20 + inGroupBoxOffset); label.Text = "Value"; label.TextAlign = ContentAlignment.MiddleLeft; label.AutoSizeToContents = true; label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6); label.Location = new PointI(80, 20 + inGroupBoxOffset); label.Text = "Offset"; label.TextAlign = ContentAlignment.MiddleLeft; label.AutoSizeToContents = true; label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6); label.Location = new PointI(128, 20 + inGroupBoxOffset); label.Text = "Color"; label.TextAlign = ContentAlignment.MiddleCenter; label.AutoSizeToContents = true; label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6); label.Location = new PointI(168, 20 + inGroupBoxOffset); label.Text = "Text"; label.TextAlign = ContentAlignment.MiddleLeft; label.AutoSizeToContents = true; label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox6); label.Location = new PointI(248, 20 + inGroupBoxOffset); label.Text = "ToolTip"; label.TextAlign = ContentAlignment.MiddleLeft; label.AutoSizeToContents = true; int checkBoxOffset = 4; checkBox1 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6); checkBox1.IsChecked = true; checkBox1.Location = new PointI(8, 38 + inGroupBoxOffset + checkBoxOffset); checkBox1.CheckedChanged += new System.EventHandler(checkBox1_CheckedChanged); checkBox2 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6); checkBox2.IsChecked = true; checkBox2.Location = new PointI(8, 73 + inGroupBoxOffset + checkBoxOffset); checkBox2.CheckedChanged += new System.EventHandler(checkBox2_CheckedChanged); checkBox3 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6); checkBox3.IsChecked = true; checkBox3.Location = new PointI(8, 108 + inGroupBoxOffset + checkBoxOffset); checkBox3.CheckedChanged += new System.EventHandler(checkBox3_CheckedChanged); checkBox4 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6); checkBox4.IsChecked = true; checkBox4.Location = new PointI(8, 143 + inGroupBoxOffset + checkBoxOffset); checkBox4.CheckedChanged += new System.EventHandler(checkBox4_CheckedChanged); checkBox5 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6); checkBox5.IsChecked = true; checkBox5.Location = new PointI(8, 178 + inGroupBoxOffset + checkBoxOffset); checkBox5.CheckedChanged += new System.EventHandler(checkBox5_CheckedChanged); checkBox6 = new Alt.GUI.Temporary.Gwen.Control.CheckBox(groupBox6); checkBox6.IsChecked = true; checkBox6.Location = new PointI(8, 213 + inGroupBoxOffset + checkBoxOffset); checkBox6.CheckedChanged += new System.EventHandler(checkBox6_CheckedChanged); numericUpDownValue1 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownValue1.Width = numericUpDownWidth; numericUpDownValue1.Location = new PointI(32, 40 + inGroupBoxOffset); numericUpDownValue1.Value = 10; numericUpDownValue1.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged); numericUpDownValue2 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownValue2.Width = numericUpDownWidth; numericUpDownValue2.Location = new PointI(32, 75 + inGroupBoxOffset); numericUpDownValue2.Value = 15; numericUpDownValue2.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged); numericUpDownValue3 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownValue3.Width = numericUpDownWidth; numericUpDownValue3.Location = new PointI(32, 110 + inGroupBoxOffset); numericUpDownValue3.Value = 20; numericUpDownValue3.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged); numericUpDownValue4 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownValue4.Width = numericUpDownWidth; numericUpDownValue4.Location = new PointI(32, 145 + inGroupBoxOffset); numericUpDownValue4.Value = 60; numericUpDownValue4.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged); numericUpDownValue5 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownValue5.Width = numericUpDownWidth; numericUpDownValue5.Location = new PointI(32, 180 + inGroupBoxOffset); numericUpDownValue5.Value = 25; numericUpDownValue5.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged); numericUpDownValue6 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownValue6.Width = numericUpDownWidth; numericUpDownValue6.Location = new PointI(32, 215 + inGroupBoxOffset); numericUpDownValue6.Value = 25; numericUpDownValue6.ValueChanged += new GwenEventHandler(numericUpDownValue_ValueChanged); numericUpDownDisplacement1 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownDisplacement1.Width = numericUpDownWidth; numericUpDownDisplacement1.DecimalPlaces = 2; numericUpDownDisplacement1.Increment = 0.05f; numericUpDownDisplacement1.Location = new PointI(80, 40 + inGroupBoxOffset); numericUpDownDisplacement1.Maximum = 1; numericUpDownDisplacement1.Minimum = 0; numericUpDownDisplacement1.Value = 0.2f; numericUpDownDisplacement1.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged); numericUpDownDisplacement2 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownDisplacement2.Width = numericUpDownWidth; numericUpDownDisplacement2.DecimalPlaces = 2; numericUpDownDisplacement2.Increment = 0.05f; numericUpDownDisplacement2.Location = new PointI(80, 75 + inGroupBoxOffset); numericUpDownDisplacement2.Maximum = 1; numericUpDownDisplacement2.Minimum = 0; numericUpDownDisplacement2.Value = 0.05f; numericUpDownDisplacement2.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged); numericUpDownDisplacement3 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownDisplacement3.Width = numericUpDownWidth; numericUpDownDisplacement3.DecimalPlaces = 2; numericUpDownDisplacement3.Increment = 0.05f; numericUpDownDisplacement3.Location = new PointI(80, 110 + inGroupBoxOffset); numericUpDownDisplacement3.Maximum = 1; numericUpDownDisplacement3.Minimum = 0; numericUpDownDisplacement3.Value = 0.05f; numericUpDownDisplacement3.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged); numericUpDownDisplacement4 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownDisplacement4.Width = numericUpDownWidth; numericUpDownDisplacement4.DecimalPlaces = 2; numericUpDownDisplacement4.Increment = 0.05f; numericUpDownDisplacement4.Location = new PointI(80, 145 + inGroupBoxOffset); numericUpDownDisplacement4.Maximum = 1; numericUpDownDisplacement4.Minimum = 0; numericUpDownDisplacement4.Value = 0.05f; numericUpDownDisplacement4.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged); numericUpDownDisplacement5 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownDisplacement5.Width = numericUpDownWidth; numericUpDownDisplacement5.DecimalPlaces = 2; numericUpDownDisplacement5.Increment = 0.05f; numericUpDownDisplacement5.Location = new PointI(80, 180 + inGroupBoxOffset); numericUpDownDisplacement5.Maximum = 1; numericUpDownDisplacement5.Minimum = 0; numericUpDownDisplacement5.Value = 0.05f; numericUpDownDisplacement5.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged); numericUpDownDisplacement6 = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox6); numericUpDownDisplacement6.Width = numericUpDownWidth; numericUpDownDisplacement6.DecimalPlaces = 2; numericUpDownDisplacement6.Increment = 0.05f; numericUpDownDisplacement6.Location = new PointI(80, 215 + inGroupBoxOffset); numericUpDownDisplacement6.Maximum = 1; numericUpDownDisplacement6.Minimum = 0; numericUpDownDisplacement6.Value = 0.05f; numericUpDownDisplacement6.ValueChanged += new GwenEventHandler(numericUpDownDisplacement_ValueChanged); buttonColor1 = new ColorButton(groupBox6); buttonColor1.Color = Color.Red; buttonColor1.Location = new PointI(136, 40 + inGroupBoxOffset); buttonColor1.Size = new SizeI(20, 20); buttonColor1.Click += new System.EventHandler(buttonColor1_Click); buttonColor2 = new ColorButton(groupBox6); buttonColor2.Color = Color.LimeGreen; buttonColor2.Location = new PointI(136, 75 + inGroupBoxOffset); buttonColor2.Size = new SizeI(20, 20); buttonColor2.Click += new System.EventHandler(buttonColor2_Click); buttonColor3 = new ColorButton(groupBox6); buttonColor3.Color = Color.Blue; buttonColor3.Location = new PointI(136, 110 + inGroupBoxOffset); buttonColor3.Size = new SizeI(20, 20); buttonColor3.Click += new System.EventHandler(buttonColor3_Click); buttonColor4 = new ColorButton(groupBox6); buttonColor4.Color = Color.Yellow; buttonColor4.Location = new PointI(136, 145 + inGroupBoxOffset); buttonColor4.Size = new SizeI(20, 20); buttonColor4.Click += new System.EventHandler(buttonColor4_Click); buttonColor5 = new ColorButton(groupBox6); buttonColor5.Color = Color.Firebrick; buttonColor5.Location = new PointI(136, 180 + inGroupBoxOffset); buttonColor5.Size = new SizeI(20, 20); buttonColor5.Click += new System.EventHandler(buttonColor5_Click); buttonColor6 = new ColorButton(groupBox6); buttonColor6.Color = Color.DeepSkyBlue; buttonColor6.Location = new PointI(136, 215 + inGroupBoxOffset); buttonColor6.Size = new SizeI(20, 20); buttonColor6.Click += new System.EventHandler(buttonColor6_Click); textBoxText1 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxText1.Location = new PointI(168, 40 + inGroupBoxOffset); textBoxText1.Size = new SizeI(72, 20); textBoxText1.Text = "red"; textBoxText1.TextChanged += new GwenEventHandler(textBoxText_TextChanged); textBoxText2 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxText2.Location = new PointI(168, 75 + inGroupBoxOffset); textBoxText2.Size = new SizeI(72, 20); textBoxText2.Text = "green"; textBoxText2.TextChanged += new GwenEventHandler(textBoxText_TextChanged); textBoxText3 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxText3.Location = new PointI(168, 110 + inGroupBoxOffset); textBoxText3.Size = new SizeI(72, 20); textBoxText3.Text = "blue"; textBoxText3.TextChanged += new GwenEventHandler(textBoxText_TextChanged); textBoxText4 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxText4.Location = new PointI(168, 145 + inGroupBoxOffset); textBoxText4.Size = new SizeI(72, 20); textBoxText4.Text = "yellow"; textBoxText4.TextChanged += new GwenEventHandler(textBoxText_TextChanged); textBoxText5 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxText5.Location = new PointI(168, 180 + inGroupBoxOffset); textBoxText5.Size = new SizeI(72, 20); textBoxText5.Text = "brown"; textBoxText5.TextChanged += new GwenEventHandler(textBoxText_TextChanged); textBoxText6 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxText6.Location = new PointI(168, 215 + inGroupBoxOffset); textBoxText6.Size = new SizeI(72, 20); textBoxText6.Text = "cyan"; textBoxText6.TextChanged += new GwenEventHandler(textBoxText_TextChanged); textBoxToolTip1 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxToolTip1.Location = new PointI(248, 40 + inGroupBoxOffset); textBoxToolTip1.Size = new SizeI(64, 20); textBoxToolTip1.Text = ""; textBoxToolTip1.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged); textBoxToolTip2 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxToolTip2.Location = new PointI(248, 75 + inGroupBoxOffset); textBoxToolTip2.Size = new SizeI(64, 20); textBoxToolTip2.Text = ""; textBoxToolTip2.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged); textBoxToolTip3 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxToolTip3.Location = new PointI(248, 110 + inGroupBoxOffset); textBoxToolTip3.Size = new SizeI(64, 20); textBoxToolTip3.Text = ""; textBoxToolTip3.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged); textBoxToolTip4 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxToolTip4.Location = new PointI(248, 145 + inGroupBoxOffset); textBoxToolTip4.Size = new SizeI(64, 20); textBoxToolTip4.Text = ""; textBoxToolTip4.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged); textBoxToolTip5 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxToolTip5.Location = new PointI(248, 180 + inGroupBoxOffset); textBoxToolTip5.Size = new SizeI(64, 20); textBoxToolTip5.Text = ""; textBoxToolTip5.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged); textBoxToolTip6 = new Alt.GUI.Temporary.Gwen.Control.TextBox(groupBox6); textBoxToolTip6.Location = new PointI(248, 215 + inGroupBoxOffset); textBoxToolTip6.Size = new SizeI(64, 20); textBoxToolTip6.Text = ""; textBoxToolTip6.TextChanged += new GwenEventHandler(textBoxToolTip_TextChanged); groupBox4 = new Alt.GUI.Temporary.Gwen.Control.GroupBox(m_ControlsPanel); groupBox4.Location = new PointI(336, 8); groupBox4.Size = new SizeI(248, 72); groupBox4.Text = "Margins"; inGroupBoxOffset = -15; label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox4); label.Location = new PointI(12, 22 + inGroupBoxOffset); label.Size = new SizeI(40, 16); label.Text = "Left:"; label.AutoSizeToContents = true; label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox4); label.Location = new PointI(12, 46 + inGroupBoxOffset); label.Size = new SizeI(40, 16); label.Text = "Right:"; label.AutoSizeToContents = true; label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox4); label.Location = new PointI(132, 22 + inGroupBoxOffset); label.Size = new SizeI(40, 16); label.Text = "Top:"; label.AutoSizeToContents = true; label = new Alt.GUI.Temporary.Gwen.Control.Label(groupBox4); label.Location = new PointI(132, 46 + inGroupBoxOffset); label.Size = new SizeI(44, 16); label.Text = "Bottom:"; label.AutoSizeToContents = true; numericUpDownLeftMargin = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox4); numericUpDownLeftMargin.Location = new PointI(64, 20 + inGroupBoxOffset); numericUpDownLeftMargin.Maximum = 20; numericUpDownLeftMargin.Size = new SizeI(48, 20); numericUpDownLeftMargin.Value = 10; numericUpDownLeftMargin.ValueChanged += new GwenEventHandler(numericUpDownLeftMargin_ValueChanged); numericUpDownRightMargin = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox4); numericUpDownRightMargin.Location = new PointI(64, 44 + inGroupBoxOffset); numericUpDownRightMargin.Maximum = 20; numericUpDownRightMargin.Size = new SizeI(48, 20); numericUpDownRightMargin.Value = 10; numericUpDownRightMargin.ValueChanged += new GwenEventHandler(numericUpDownRightMargin_ValueChanged); numericUpDownTopMargin = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox4); numericUpDownTopMargin.Location = new PointI(188, 20 + inGroupBoxOffset); numericUpDownTopMargin.Maximum = 20; numericUpDownTopMargin.Size = new SizeI(48, 20); numericUpDownTopMargin.Value = 10; numericUpDownTopMargin.ValueChanged += new GwenEventHandler(numericUpDownTopMargin_ValueChanged); numericUpDownBottomMargin = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(groupBox4); numericUpDownBottomMargin.Location = new PointI(188, 44 + inGroupBoxOffset); numericUpDownBottomMargin.Maximum = 20; numericUpDownBottomMargin.Size = new SizeI(48, 20); numericUpDownBottomMargin.Value = 10; numericUpDownBottomMargin.ValueChanged += new GwenEventHandler(numericUpDownBottomMargin_ValueChanged); checkBoxFitChart = new Alt.GUI.Temporary.Gwen.Control.LabeledCheckBox(m_ControlsPanel); checkBoxFitChart.Location = new PointI(336, 88); checkBoxFitChart.Text = "Fit chart to panel"; checkBoxFitChart.CheckedChanged += new System.EventHandler(checkBoxFitChart_CheckedChanged); groupBox1 = new Alt.GUI.Temporary.Gwen.Control.RadioButtonGroup(m_ControlsPanel, "Shadow style"); groupBox1.Location = new PointI(485, 95); //84); groupBox1.Size = new SizeI(104, 62); //82); radioButtonShadowStyleNone = groupBox1.AddOption("None"); radioButtonShadowStyleNone.Tag = ""; radioButtonShadowStyleNone.CheckedChanged += new System.EventHandler(radioButtonShadowStyle_Changed); radioButtonShadowStyleUniform = groupBox1.AddOption("Uniform"); radioButtonShadowStyleUniform.Select(); radioButtonShadowStyleUniform.Tag = ""; radioButtonShadowStyleUniform.CheckedChanged += new System.EventHandler(radioButtonShadowStyle_Changed); /*TEMP * radioButtonShadowStyleGradual = groupBox1.AddOption("Gradual"); * //radioButtonShadowStyleGradual.Select(); * radioButtonShadowStyleGradual.Tag = ""; * radioButtonShadowStyleGradual.CheckedChanged += new System.EventHandler(radioButtonShadowStyle_Changed);*/ numericUpDownPieHeight = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_ControlsPanel); numericUpDownPieHeight.DecimalPlaces = 2; numericUpDownPieHeight.Increment = 0.05f; numericUpDownPieHeight.Location = new PointI(408, 114); numericUpDownPieHeight.Maximum = 0.5f; numericUpDownPieHeight.Size = new SizeI(48, 20); numericUpDownPieHeight.Value = 0.25f; numericUpDownPieHeight.ValueChanged += new GwenEventHandler(numericUpDownPieHeight_ValueChanged); label = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel); label.Location = new PointI(336, 116); label.Size = new SizeI(72, 16); label.Text = "Pie Height:"; label.TextAlign = ContentAlignment.MiddleLeft; label.AutoSizeToContents = true; numericUpDownAngle = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_ControlsPanel); numericUpDownAngle.Increment = 10; numericUpDownAngle.Location = new PointI(408, 144); numericUpDownAngle.Maximum = 400; numericUpDownAngle.Minimum = -360; numericUpDownAngle.Size = new SizeI(48, 20); numericUpDownAngle.Value = -30; numericUpDownAngle.ValueChanged += new GwenEventHandler(numericUpDownAngle_ValueChanged); label = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel); label.Location = new PointI(336, 146); label.Size = new SizeI(72, 16); label.Text = "Initial angle:"; label.AutoSizeToContents = true; comboBoxEdgeType = new Alt.GUI.Temporary.Gwen.Control.ComboBox(m_ControlsPanel); comboBoxEdgeType.Location = new PointI(408, 178); comboBoxEdgeType.Size = new SizeI(176, 21); comboBoxEdgeType.ItemSelected += new GwenEventHandler(comboBoxEdgeType_SelectedIndexChanged); label = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel); label.Location = new PointI(336, 180); label.Size = new SizeI(72, 16); label.Text = "Edge color:"; label.AutoSizeToContents = true; label = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel); label.Location = new PointI(336, 208); label.Size = new SizeI(72, 16); label.Text = "Edge width:"; label.AutoSizeToContents = true; numericUpDownEdgeLineWidth = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_ControlsPanel); numericUpDownEdgeLineWidth.DecimalPlaces = 1; numericUpDownEdgeLineWidth.Increment = 0.5f; numericUpDownEdgeLineWidth.Location = new PointI(408, 206); numericUpDownEdgeLineWidth.Maximum = 5; numericUpDownEdgeLineWidth.Size = new SizeI(48, 20); numericUpDownEdgeLineWidth.Value = 3; numericUpDownEdgeLineWidth.ValueChanged += new GwenEventHandler(numericUpDownEdgeLineWidth_ValueChanged); label = new Alt.GUI.Temporary.Gwen.Control.Label(m_ControlsPanel); label.Location = new PointI(336, 236); label.Size = new SizeI(48, 16); label.Text = "Alpha:"; label.AutoSizeToContents = true; m_numericUpDownAlpha = new Alt.GUI.Temporary.Gwen.Control.NumericUpDown(m_ControlsPanel); m_numericUpDownAlpha.Increment = 5; m_numericUpDownAlpha.Location = new PointI(408, 234); m_numericUpDownAlpha.Maximum = 255; m_numericUpDownAlpha.Size = new SizeI(48, 20); m_numericUpDownAlpha.Value = 130; m_numericUpDownAlpha.ValueChanged += new GwenEventHandler(m_numericUpDownAlpha_ValueChanged); FillEdgeColorTypeListBox(); InitializeChart(); }