public override void OnInitializeEditElement(DataColumnBase dataColumn, DoubleTextBox uiElement, object dataContext) { base.OnInitializeEditElement(dataColumn, uiElement, dataContext); uiElement.ValueChanging += UiElement_ValueChanging; this.RowColumnIndex.ColumnIndex = dataColumn.ColumnIndex; this.RowColumnIndex.RowIndex = dataColumn.RowIndex; }
public CustomState(MainWindow mainWindow, StateMachine stateMachine) : base(mainWindow, stateMachine) { _Power = new DoubleTextBox { Margin = new System.Windows.Thickness(_standartMargine), Height = _standartHeight, TextAlignment = System.Windows.TextAlignment.Center, Text = "1" }; _powerLabel = new Label() { Height = _standartHeight, Content = "Power", FontSize = _standartFontSize, HorizontalAlignment = System.Windows.HorizontalAlignment.Center, }; _logBase = new DoubleTextBox { Margin = new System.Windows.Thickness(_standartMargine), Height = _standartHeight, TextAlignment = System.Windows.TextAlignment.Center, Text = "2" }; _logBaseLabel = new Label() { Height = _standartHeight, Content = "Logarithm base", FontSize = _standartFontSize, HorizontalAlignment = System.Windows.HorizontalAlignment.Center, }; }
private void ClearButton_Click(object sender, EventArgs e) { FirstNumberTextBox.Clear(); SecondNumberTextBox.Clear(); DoubleTextBox.Clear(); DecimalTextBox.Clear(); }
public void ValueChanged(object param) { if (Value != null) { if (param is DoubleTextBox) { DoubleTextBox doubleTextBox = param as DoubleTextBox; if (Value.Value > MaximumValue && !doubleTextBox.IsFocused && doubleTextBox.MaxValidation != MaxValidation.OnLostFocus) { AddLog("Value Changed: " + MaximumValue.ToString()); } else if (Value.Value < MinimumValue && !doubleTextBox.IsFocused && doubleTextBox.MinValidation != MinValidation.OnLostFocus) { AddLog("Value Changed: " + MinimumValue.ToString()); } else { AddLog("Value Changed: " + Value.ToString()); } } else { AddLog("Value Changed: " + Value.ToString()); } } else { AddLog("Value Changed: NULL"); } }
public LogState(MainWindow mainWindow, StateMachine stateMachine) : base(mainWindow, stateMachine) { _additionToMax = new DoubleTextBox { Margin = new System.Windows.Thickness(_standartMargine), Height = _standartHeight, TextAlignment = System.Windows.TextAlignment.Center, Text = "1" }; _additionToMaxlabel = new Label() { Height = _standartHeight, Content = "Addition to max", FontSize = _standartFontSize, HorizontalAlignment = System.Windows.HorizontalAlignment.Center, }; _logBase = new DoubleTextBox { Margin = new System.Windows.Thickness(_standartMargine), Height = _standartHeight, TextAlignment = System.Windows.TextAlignment.Center, Text = "2" }; _logBaseLabel = new Label() { Height = _standartHeight, Content = "Logarithm base", FontSize = _standartFontSize, HorizontalAlignment = System.Windows.HorizontalAlignment.Center, }; }
private double CheckValue(double value, UI.MultiBarTrack multiBar, DoubleTextBox text) { if (value > multiBar.MaxEndPointValue) { value = multiBar.MaxEndPointValue; text.Text = value.ToString(); } else if (value < multiBar.MinEndPointValue) { value = multiBar.MinEndPointValue; text.Text = value.ToString(); } return(value); }
public object Create(PropertyInfo PropertyInfo) { doubletext = new DoubleTextBox() { BorderThickness = new Thickness(0), ApplyZeroColor = false }; if (PropertyInfo.Name == "FontSize") { doubletext.MinValue = 0; doubletext.MaxValue = 35790; } return(doubletext); }
private double CheckValue(UI.MultiBarTrack multiBar, DoubleTextBox textBox) { double value; if (double.TryParse(textBox.Text, out value)) { if (value > multiBar.MaxEndPointValue) { value = multiBar.MaxEndPointValue; textBox.Text = value.ToString(); } else if (value < multiBar.MinEndPointValue) { value = multiBar.MinEndPointValue; textBox.Text = value.ToString(); } return(value); } return(double.NaN); }
/// <summary> /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// </summary> private void InitializeComponent() { this.components = new System.ComponentModel.Container(); this.trackBar1 = new System.Windows.Forms.TrackBar(); this.comboBox1 = new Syncfusion.Windows.Forms.Tools.ComboBoxAdv(); this.checkBox1 = new Syncfusion.Windows.Forms.Tools.CheckBoxAdv(); this.gridGroupingControl1 = new Syncfusion.Windows.Forms.Grid.Grouping.GridGroupingControl(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.zoomFactorText = new DoubleTextBox(); this.label2 = new System.Windows.Forms.Label(); this.colorPickerButton1 = new Syncfusion.Windows.Forms.ColorPickerButton(); this.borderThickness = new Syncfusion.Windows.Forms.Tools.IntegerTextBox(); this.label1 = new System.Windows.Forms.Label(); this.zoomDisplaySize = new System.Windows.Forms.Label(); this.trackBar2 = new System.Windows.Forms.TrackBar(); this.zoomSize = new System.Windows.Forms.Label(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.label4 = new System.Windows.Forms.Label(); this.label3 = new System.Windows.Forms.Label(); this.panel2 = new System.Windows.Forms.Panel(); this.tipDesc = new System.Windows.Forms.ToolTip(this.components); this.radioButton1 = new System.Windows.Forms.RadioButton(); this.radioButton2 = new System.Windows.Forms.RadioButton(); ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.comboBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).BeginInit(); this.groupBox1.SuspendLayout(); this.groupBox3.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.zoomFactorText)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.borderThickness)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).BeginInit(); this.groupBox2.SuspendLayout(); this.panel2.SuspendLayout(); this.SuspendLayout(); // // trackBar1 // this.trackBar1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.trackBar1.AutoSize = false; this.trackBar1.BackColor = System.Drawing.Color.White; this.trackBar1.Location = new System.Drawing.Point(22, 112); this.trackBar1.Maximum = 400; this.trackBar1.Minimum = 50; this.trackBar1.Name = "trackBar1"; this.trackBar1.RightToLeft = System.Windows.Forms.RightToLeft.No; this.trackBar1.Size = new System.Drawing.Size(195, 28); this.trackBar1.TabIndex = 2; this.trackBar1.TickStyle = System.Windows.Forms.TickStyle.None; this.trackBar1.Value = 100; this.trackBar1.ValueChanged += new System.EventHandler(this.trackBar1_ValueChanged); // // comboBox1 // this.comboBox1.BackColor = System.Drawing.Color.White; this.comboBox1.BeforeTouchSize = new System.Drawing.Size(104, 21); this.comboBox1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.comboBox1.Items.AddRange(new object[] { "50", "75", "100", "150", "200", "300", "400" }); this.comboBox1.ItemsImageIndexes.Add(new Syncfusion.Windows.Forms.Tools.ComboBoxAdv.ImageIndexItem(this.comboBox1, "50")); this.comboBox1.ItemsImageIndexes.Add(new Syncfusion.Windows.Forms.Tools.ComboBoxAdv.ImageIndexItem(this.comboBox1, "75")); this.comboBox1.ItemsImageIndexes.Add(new Syncfusion.Windows.Forms.Tools.ComboBoxAdv.ImageIndexItem(this.comboBox1, "100")); this.comboBox1.ItemsImageIndexes.Add(new Syncfusion.Windows.Forms.Tools.ComboBoxAdv.ImageIndexItem(this.comboBox1, "125")); this.comboBox1.Location = new System.Drawing.Point(113, 40); this.comboBox1.Name = "comboBox1"; this.comboBox1.Size = new System.Drawing.Size(104, 21); this.comboBox1.SelectedValue = "100"; this.comboBox1.Text = "100"; this.comboBox1.Style = Syncfusion.Windows.Forms.VisualStyle.Metro; this.comboBox1.TabIndex = 1; this.comboBox1.SelectedIndexChanged += new System.EventHandler(this.comboBox1_SelectedIndexChanged); // // checkBox1 // this.checkBox1.BeforeTouchSize = new System.Drawing.Size(115, 24); this.checkBox1.Checked = true; this.checkBox1.CheckState = System.Windows.Forms.CheckState.Checked; this.checkBox1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.checkBox1.ForeColor = System.Drawing.Color.Black; this.checkBox1.Location = new System.Drawing.Point(27, 28); this.checkBox1.MetroColor = System.Drawing.Color.FromArgb(((int)(((byte)(27)))), ((int)(((byte)(161)))), ((int)(((byte)(226))))); this.checkBox1.Name = "checkBox1"; this.checkBox1.Size = new System.Drawing.Size(115, 24); this.checkBox1.Style = Syncfusion.Windows.Forms.Tools.CheckBoxAdvStyle.Metro; this.checkBox1.DrawFocusRectangle = true; this.checkBox1.TabIndex = 4; this.checkBox1.Text = "Zoom Cell"; this.checkBox1.ThemesEnabled = false; this.checkBox1.CheckStateChanged += new System.EventHandler(this.checkBox1_CheckedChanged); // // gridGroupingControl1 // this.gridGroupingControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) | System.Windows.Forms.AnchorStyles.Left) | System.Windows.Forms.AnchorStyles.Right))); this.gridGroupingControl1.BackColor = System.Drawing.SystemColors.Window; this.gridGroupingControl1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.gridGroupingControl1.FreezeCaption = false; this.gridGroupingControl1.GridOfficeScrollBars = Syncfusion.Windows.Forms.OfficeScrollBars.Office2010; this.gridGroupingControl1.Location = new System.Drawing.Point(20, 20); this.gridGroupingControl1.Name = "gridGroupingControl1"; this.gridGroupingControl1.Size = new System.Drawing.Size(710, 616); this.gridGroupingControl1.TabIndex = 0; this.gridGroupingControl1.Text = "gridGroupingControl1"; this.gridGroupingControl1.ThemesEnabled = false; this.gridGroupingControl1.TopLevelGroupOptions.ShowCaption = false; this.gridGroupingControl1.VersionInfo = "10.104.0.44"; // // groupBox1 // this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); this.groupBox1.Controls.Add(this.groupBox3); this.groupBox1.Controls.Add(this.groupBox2); this.groupBox1.Font = new System.Drawing.Font("Segoe UI", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.groupBox1.Location = new System.Drawing.Point(752, 20); this.groupBox1.Name = "groupBox1"; this.groupBox1.Size = new System.Drawing.Size(243, 570); this.groupBox1.TabIndex = 17; this.groupBox1.TabStop = false; this.groupBox1.Text = "Zooming Options"; // // groupBox3 // this.groupBox3.Controls.Add(this.radioButton2); this.groupBox3.Controls.Add(this.radioButton1); this.groupBox3.Controls.Add(this.zoomFactorText); this.groupBox3.Controls.Add(this.label2); this.groupBox3.Controls.Add(this.colorPickerButton1); this.groupBox3.Controls.Add(this.borderThickness); this.groupBox3.Controls.Add(this.label1); this.groupBox3.Controls.Add(this.zoomDisplaySize); this.groupBox3.Controls.Add(this.trackBar2); this.groupBox3.Controls.Add(this.zoomSize); this.groupBox3.Controls.Add(this.checkBox1); this.groupBox3.Location = new System.Drawing.Point(9, 193); this.groupBox3.Name = "groupBox3"; this.groupBox3.Size = new System.Drawing.Size(223, 371); this.groupBox3.TabIndex = 3; this.groupBox3.TabStop = false; this.groupBox3.Text = "Cell Level"; // // zoomFactorText // this.zoomFactorText.Location = new System.Drawing.Point(158, 243); this.zoomFactorText.Name = "zoomFactorText"; this.zoomFactorText.NumberDecimalDigits = 1; this.zoomFactorText.Size = new System.Drawing.Size(53, 29); this.zoomFactorText.TabIndex = 8; this.zoomFactorText.DoubleValue = 1.5D; this.zoomFactorText.TextChanged += new System.EventHandler(this.zoomFactorText_TextChanged); // // label2 // this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(23, 246); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(101, 21); this.label2.TabIndex = 22; this.label2.Text = "Zoom Factor:"; // // colorPickerButton1 // this.colorPickerButton1.Appearance = Syncfusion.Windows.Forms.ButtonAppearance.Metro; this.colorPickerButton1.BeforeTouchSize = new System.Drawing.Size(119, 24); this.colorPickerButton1.ColorUISize = new System.Drawing.Size(208, 230); this.colorPickerButton1.FlatAppearance.BorderColor = System.Drawing.Color.Black; this.colorPickerButton1.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.colorPickerButton1.Font = new System.Drawing.Font("Segoe UI", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); this.colorPickerButton1.ForeColor = System.Drawing.Color.Black; this.colorPickerButton1.IsBackStageButton = false; this.colorPickerButton1.Location = new System.Drawing.Point(46, 331); this.colorPickerButton1.Name = "colorPickerButton1"; this.colorPickerButton1.SelectedAsBackcolor = true; this.colorPickerButton1.Size = new System.Drawing.Size(119, 24); this.colorPickerButton1.TabIndex = 10; this.colorPickerButton1.Text = "Border Color"; this.colorPickerButton1.UseVisualStyleBackColor = false; this.colorPickerButton1.ColorSelected += new System.EventHandler(this.colorPickerButton1_ColorSelected); // // borderThickness // this.borderThickness.Location = new System.Drawing.Point(158, 283); this.borderThickness.Name = "borderThickness"; this.borderThickness.Size = new System.Drawing.Size(53, 29); this.borderThickness.TabIndex = 9; this.borderThickness.Text = "15"; this.borderThickness.TextChanged += new System.EventHandler(this.borderThickness_TextChanged); // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(23, 286); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(131, 21); this.label1.TabIndex = 20; this.label1.Text = "Border Thickness:"; // // zoomDisplaySize // this.zoomDisplaySize.AutoSize = true; this.zoomDisplaySize.Location = new System.Drawing.Point(66, 205); this.zoomDisplaySize.Name = "zoomDisplaySize"; this.zoomDisplaySize.Size = new System.Drawing.Size(85, 21); this.zoomDisplaySize.TabIndex = 19; this.zoomDisplaySize.Text = "( 150,150 )"; // // trackBar2 // this.trackBar2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right))); this.trackBar2.AutoSize = false; this.trackBar2.BackColor = System.Drawing.Color.White; this.trackBar2.LargeChange = 50; this.trackBar2.Location = new System.Drawing.Point(16, 170); this.trackBar2.Maximum = 400; this.trackBar2.Minimum = 100; this.trackBar2.Name = "trackBar2"; this.trackBar2.RightToLeft = System.Windows.Forms.RightToLeft.No; this.trackBar2.Size = new System.Drawing.Size(195, 28); this.trackBar2.SmallChange = 50; this.trackBar2.TabIndex = 7; this.trackBar2.TickStyle = System.Windows.Forms.TickStyle.None; this.trackBar2.Value = 150; this.trackBar2.ValueChanged += new System.EventHandler(this.trackBar2_ValueChanged); // // zoomSize // this.zoomSize.AutoSize = true; this.zoomSize.Location = new System.Drawing.Point(12, 135); this.zoomSize.Name = "zoomSize"; this.zoomSize.Size = new System.Drawing.Size(86, 21); this.zoomSize.TabIndex = 17; this.zoomSize.Text = "Zoom Size:"; // // groupBox2 // this.groupBox2.Controls.Add(this.label4); this.groupBox2.Controls.Add(this.label3); this.groupBox2.Controls.Add(this.comboBox1); this.groupBox2.Controls.Add(this.trackBar1); this.groupBox2.Location = new System.Drawing.Point(9, 39); this.groupBox2.Name = "groupBox2"; this.groupBox2.Size = new System.Drawing.Size(226, 148); this.groupBox2.TabIndex = 1; this.groupBox2.TabStop = false; this.groupBox2.Text = "Grid Level"; // // label4 // this.label4.AutoSize = true; this.label4.Location = new System.Drawing.Point(12, 76); this.label4.Name = "label4"; this.label4.Size = new System.Drawing.Size(130, 21); this.label4.TabIndex = 16; this.label4.Text = "Zoom Frequency:"; // // label3 // this.label3.AutoSize = true; this.label3.Location = new System.Drawing.Point(12, 40); this.label3.Name = "label3"; this.label3.Size = new System.Drawing.Size(91, 21); this.label3.TabIndex = 15; this.label3.Text = "Zoom Level"; // // panel2 // this.panel2.BackColor = System.Drawing.Color.White; this.panel2.Controls.Add(this.groupBox1); this.panel2.Controls.Add(this.gridGroupingControl1); this.panel2.Dock = System.Windows.Forms.DockStyle.Fill; this.panel2.Location = new System.Drawing.Point(0, 0); this.panel2.Margin = new System.Windows.Forms.Padding(0); this.panel2.Name = "panel2"; this.panel2.Size = new System.Drawing.Size(1012, 654); this.panel2.TabIndex = 19; // // tipDesc // this.tipDesc.BackColor = System.Drawing.Color.White; this.tipDesc.IsBalloon = true; this.tipDesc.OwnerDraw = true; this.tipDesc.ShowAlways = true; this.tipDesc.StripAmpersands = true; this.tipDesc.UseFading = false; // // radioButton1 // this.radioButton1.AutoSize = true; this.radioButton1.Checked = true; this.radioButton1.Location = new System.Drawing.Point(46, 59); this.radioButton1.Name = "radioButton1"; this.radioButton1.Size = new System.Drawing.Size(116, 25); this.radioButton1.TabIndex = 6; this.radioButton1.TabStop = true; this.radioButton1.Text = "Ellipse Mode"; this.radioButton1.UseVisualStyleBackColor = true; this.radioButton1.CheckedChanged += new System.EventHandler(this.mode_Changed); // // radioButton2 // this.radioButton2.AutoSize = true; this.radioButton2.Location = new System.Drawing.Point(46, 90); this.radioButton2.Name = "radioButton2"; this.radioButton2.Size = new System.Drawing.Size(140, 25); this.radioButton2.TabIndex = 5; this.radioButton2.Text = "Rectangle Mode"; this.radioButton2.UseVisualStyleBackColor = true; this.radioButton2.CheckedChanged += new System.EventHandler(this.mode_Changed); // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.ClientSize = new System.Drawing.Size(1012, 654); this.Controls.Add(this.panel2); this.MinimumSize = new System.Drawing.Size(800, 500); this.Name = "Form1"; this.Text = "Zooming Grid"; ((System.ComponentModel.ISupportInitialize)(this.trackBar1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.comboBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.checkBox1)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.gridGroupingControl1)).EndInit(); this.groupBox1.ResumeLayout(false); this.groupBox3.ResumeLayout(false); this.groupBox3.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.zoomFactorText)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.borderThickness)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBar2)).EndInit(); this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); this.panel2.ResumeLayout(false); this.ResumeLayout(false); }
public BandInfo(DoubleTextBox min, DoubleTextBox max, ComboBoxAdv combo) { Min = min; Max = max; Combo = combo; }
protected override void OnWireEditUIElement(DoubleTextBox uiElement) { uiElement.ValueChanged -= OnValueChanged; }