/// <summary> /// Selects the button according to default action. /// </summary> /// <param name="action">Default action.</param> private void SetDefaultActionButton(IssueEventArgs e) { switch (e.Reaction) { case FileTransferIssueReaction.Cancel: cancelBtn.Select(); break; case FileTransferIssueReaction.Fail: cancelBtn.Select(); break; case FileTransferIssueReaction.Skip: btnSkip.Select(); break; case FileTransferIssueReaction.Retry: retryBtn.Select(); break; case FileTransferIssueReaction.Rename: btnRename.Select(); break; case FileTransferIssueReaction.FollowLink: btnFollowLink.Select(); break; case FileTransferIssueReaction.Resume: btnResume.Select(); break; case FileTransferIssueReaction.Overwrite: switch (e.OverwriteCondition) { case FileOverwriteCondition.None: btnOverwrite.Select(); break; case FileOverwriteCondition.Older: btnOverwriteOlder.Select(); break; case FileOverwriteCondition.SizeDiffers: btnOverwriteDiffSize.Select(); break; case FileOverwriteCondition.ChecksumDiffers: btnOverwriteDiffChecksum.Select(); break; } break; } }
private void insertRadioButtons() { addControl((y11Rb = new RadioButton()), 2, 1, AnchorStyles.None,2, "Year 11"); addControl((y12Rb = new RadioButton()), 4, 1, AnchorStyles.None,2, "Year 12"); y11Rb.Click += setSelected; y12Rb.Click += setSelected; y11Rb.Select(); clickedRb = y11Rb; }
private void FrmReviseCheckoutStatus_Load(object sender, System.EventArgs e) { string[] paymethods = Enum.GetNames(typeof(BuyerPaymentMethodCodeType)); foreach (string pay in paymethods) { if (pay != "CustomCode") { CboPaymentMethod.Items.Add(pay); } } CboPaymentMethod.SelectedIndex = 0; string[] svcs = Enum.GetNames(typeof(ShippingServiceCodeType)); foreach (string svc in svcs) { if (svc != "CustomCode") { CboShipSvc.Items.Add(svc); } } CboShipSvc.SelectedIndex = 0; string[] statuses = Enum.GetNames(typeof(CompleteStatusCodeType)); foreach (string stat in statuses) { if (stat != "CustomCode") { CboCheckoutStatus.Items.Add(stat); } } CboCheckoutStatus.SelectedIndex = 0; OptItem.Select(); }
private void makeToolButtons(ICollection<ISketchTool> tools) { int i = 0; foreach (ISketchTool tool in tools) { RadioButton button = new RadioButton(); button.Appearance = Appearance.Button; button.Size = new Size(56, 62); button.Location = new Point(5, 10 + i * 62); button.Tag = tool; button.Text = tool.ToString(); button.Image = (Image)resourcemanager.GetObject(tool.ToString()); button.TextAlign = ContentAlignment.TopCenter; button.ImageAlign = ContentAlignment.BottomCenter; button.Click += this.clickToolButton; this.Controls.Add(button); if (i == 0) button.Select(); i++; } }
private void maakToolButtons(ICollection<ISchetsTool> tools) { int t = 0; foreach (ISchetsTool tool in tools) { RadioButton b = new RadioButton(); b.Appearance = Appearance.Button; b.Size = new Size(45, 62); b.Location = new Point(10 + (t%2)*45, 10 + (t/2) * 62); b.Tag = tool; b.Text = tool.ToString(); b.Image = (Image)resourcemanager.GetObject(tool.ToString()); b.TextAlign = ContentAlignment.TopCenter; b.ImageAlign = ContentAlignment.BottomCenter; b.Click += this.klikToolButton; this.Controls.Add(b); if (t == 0) b.Select(); t++; } }
private void DisplayCarDataForm_Load(object sender, System.EventArgs e) { oldShoeAllowanceTextBox.Text = 0.ToString("C"); //create $0.00 standardRadioButton.Select(); // default radio button }
protected void UpdateControls() { switch (tabControl.Appearance) { case Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiDocument: _update = true; radioMultiDocument.Select(); break; case Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiForm: _update = true; radioMultiForm.Select(); break; case Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiBox: _update = true; radioMultiBox.Select(); break; } switch (tabControl.Style) { case VisualStyle.IDE: _update = true; radioIDE.Select(); break; case VisualStyle.Plain: _update = true; radioPlain.Select(); break; } switch (tabControl.HideTabsMode) { case Crownwood.Magic.Controls.TabControl.HideTabsModes.ShowAlways: _update = true; tabShowAlways.Checked = true; break; case Crownwood.Magic.Controls.TabControl.HideTabsModes.HideAlways: _update = true; tabHideAlways.Checked = true; break; case Crownwood.Magic.Controls.TabControl.HideTabsModes.HideUsingLogic: _update = true; tabHideUsingLogic.Checked = true; break; case Crownwood.Magic.Controls.TabControl.HideTabsModes.HideWithoutMouse: _update = true; tabHideWithoutMouse.Checked = true; break; } hotTrack.Checked = tabControl.HotTrack; positionAtTop.Checked = tabControl.PositionTop; shrinkPages.Checked = tabControl.ShrinkPagesToFit; showClose.Checked = tabControl.ShowClose; showArrows.Checked = tabControl.ShowArrows; insetPlain.Checked = tabControl.InsetPlain; idePixelBorder.Checked = tabControl.IDEPixelBorder; idePixelArea.Checked = tabControl.IDEPixelArea; insetPagesOnly.Checked = tabControl.InsetBorderPagesOnly; selectedTextOnly.Checked = tabControl.SelectedTextOnly; hoverSelect.Checked = tabControl.HoverSelect; multiLine.Checked = tabControl.Multiline; multilineFullWidth.Checked = tabControl.MultilineFullWidth; numericUpDown1.Value = tabControl.ControlLeftOffset; numericUpDown2.Value = tabControl.ControlRightOffset; numericUpDown3.Value = tabControl.ControlTopOffset; numericUpDown4.Value = tabControl.ControlBottomOffset; }
private void maakToolButtons(ICollection<ISchetsTool> tools) { int t = 0; foreach (ISchetsTool tool in tools) { RadioButton b = new RadioButton(); b.Appearance = Appearance.Button; b.Size = new Size(50, 50); if (t % 2 == 0) { b.Location = new Point(10, 10 + t / 2 * 50); } else { b.Location = new Point(60, 10 + t / 2 * 50); } b.Tag = tool; b.Image = (Image)resourcemanager.GetObject(tool.ToString()); b.ImageAlign = ContentAlignment.MiddleCenter; b.Click += this.klikToolButton; this.Controls.Add(b); if (t == 0) b.Select(); t++; } }
public void CheckedChangedTest () { Form myForm = new Form (); myForm.ShowInTaskbar = false; RadioButton rButton1 = new RadioButton (); rButton1.Select (); rButton1.Visible = true; myForm.Controls.Add (rButton1); rButton1.Checked = false; eventhandled = false; rButton1.CheckedChanged += new EventHandler (RadioButton_EventHandler); rButton1.Checked = true; Assert.AreEqual (true, eventhandled, "#3"); myForm.Dispose (); }
public void ApperanceChangedTest () { Form myForm = new Form (); myForm.ShowInTaskbar = false; RadioButton rButton1 = new RadioButton (); rButton1.Select (); rButton1.Visible = true; myForm.Controls.Add (rButton1); rButton1.Appearance = Appearance.Normal; eventhandled = false; rButton1.AppearanceChanged += new EventHandler (RadioButton_EventHandler); rButton1.Appearance = Appearance.Button; Assert.AreEqual (true, eventhandled, "#2"); myForm.Dispose (); }
public void PanelClickTest () { Form myForm = new Form (); myForm.ShowInTaskbar = false; RadioButton rButton1 = new RadioButton (); rButton1.Select (); rButton1.Visible = true; myForm.Controls.Add (rButton1); eventhandled = false; rButton1.Click += new EventHandler (RadioButton_EventHandler); myForm.Show (); rButton1.PerformClick (); Assert.AreEqual (true, eventhandled, "#2"); myForm.Dispose (); }
/** * Creates the line ending radio buttons. * * @author Rian Drake. */ void CreateRadioButtons() { m_CR = new RadioButton(); m_LF = new RadioButton(); m_CRLF = new RadioButton(); m_CR.Click += Click_CR; m_LF.Click += Click_LF; m_CRLF.Click += Click_CRLF; int startPos = 129; int width = 40; int Y = 10; m_CR.Location = new Point(startPos, Y); m_LF.Location = new Point(startPos + width, Y); m_CRLF.Location = new Point(startPos + 2 * width, Y); m_CR.Text = "CR"; m_CR.Width = width; m_LF.Text = "LF"; m_LF.Width = width; m_CRLF.Text = "CRLF"; m_CRLF.Width = width + 20; this.Controls.Add(m_CR); this.Controls.Add(m_LF); this.Controls.Add(m_CRLF); string LE = FileCreator.GetGlobalValue("LE"); if (LE == "0") { m_CR.Select(); if (m_CR.Checked == false) { m_CR.Select(); } } else if(LE == "1") { m_LF.Select(); if (m_LF.Checked == false) { m_CR.Select(); } } else { m_CRLF.Select(); if (m_CRLF.Checked == false) { m_CR.Select(); } } }