public void WhenIEnterTheQuestionDataAs(string QuestionData) { if (!(FormUtilities.SetQuestionData(QuestionData))) { ScenarioContext.Current["ActResult"] = "Failed"; } }
//------------------------------------------------------------------------------ // Explicit Activation // This entry point is used to activate the application explicitly //------------------------------------------------------------------------------ public static int Main(string[] args) { int retValue = 0; try { theProgram = new Program(); //TODO: Add your application code here Application.EnableVisualStyles(); AssignDlg cAssignDlg = new AssignDlg(); FormUtilities.ReparentForm(cAssignDlg); System.Windows.Forms.Application.Run(cAssignDlg); cAssignDlg.Dispose(); theProgram.Dispose(); } catch (NXOpen.NXException ex) { // ---- Enter your exception handling code here ----- } return(retValue); }
public void WhenIClickOnQuestionDataSaveButtonInTableQuestion() { if (!(FormUtilities.QuestionSaveButtonInTable())) { ScenarioContext.Current["ActResult"] = "Failed"; } }
public void WhenIClickOnFormSaveButton() { if (!(FormUtilities.FormSaveButton())) { ScenarioContext.Current["ActResult"] = "Failed"; } }
public void WhenIEnterTheFormlabelAs(string FormLabel) { if (!(FormUtilities.SetFormlabel(FormLabel))) { ScenarioContext.Current["ActResult"] = "Failed"; } }
private void AddAccountButton_Click(object sender, EventArgs e) { AccountForm af = new AccountForm(AccountForm.Mode.Add, LoggedUser, UpdateAccountsDisplay, DisabledControls); af.Show(); FormUtilities.DisableControls(DisabledControls.ToArray()); }
/// <summary> /// Saves the transformed data corresponding to the checked radio button to a permanent file. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void buttonSave_Click(object sender, EventArgs e) { try { string rbName = FormUtilities.GetCheckedRadioButton(panelOutput).Name; int hingeIndex = int.Parse(rbName.Substring(rbName.Length - 2, 1)); int bearingIndex = int.Parse(rbName.Substring(rbName.Length - 1)); if (rbName.Contains("GPS")) { _transform.SaveData(hingeIndex, bearingIndex, true); _transform.CreateReportTable(hingeIndex, hingeIndex, bearingIndex, true, _viewedTransforms); } else if (rbName.Contains("Compass")) { _transform.SaveData(hingeIndex, bearingIndex, false); _transform.CreateReportTable(hingeIndex, hingeIndex, bearingIndex, false, _viewedTransforms); } if (_transform.GetFullErrorMessage() != null) { ShowError(_transform.GetFullErrorMessage()); } ChampExtension.GetExtension().GetDockableWindow().Show(false); } catch (Exception ex) { ShowError(ex.Message); } }
static void Main(string[] args) { var utility = new FormUtilities(); //var cleanName = utility.CleanInput(" StEPheN WALthEr "); Console.WriteLine(" AlICe".CleanInput()); Console.ReadLine(); }
private void Password_Click(object sender, EventArgs e) { Label password = sender as Label; PinForm pf = new PinForm(LoggedUser, password, DisabledControls, Password_Click); pf.Show(); FormUtilities.DisableControls(DisabledControls.ToArray()); }
private void toolStripMenuItemSystemTrayExit_Click(object sender, EventArgs e) { try { Exit(); } catch (Exception ex) { FormUtilities.ShowError(this, ex); } }
private void toolStripMenuItemSystemTrayOptionsStartWithWindows_Click(object sender, EventArgs e) { try { ToggleOptionStartWithWindows(); } catch (Exception ex) { FormUtilities.ShowError(this, ex); } }
public static bool IsRunOnLocalPath() { string str = Assembly.GetExecutingAssembly().Location; if (str.StartsWith("\\")) { FormUtilities.ShowMessage(@"Application cannot run on network. Take it to local machine (for example c:/)"); return(false); } return(true); }
private void StopSingle_Click(object sender, EventArgs e) { try { ToolStripItem item = (ToolStripItem)sender; ApplicationControl.StopApplication((Application)item.Tag); } catch (Exception ex) { FormUtilities.ShowError(this, ex); } }
private void RestartBySet_Click(object sender, EventArgs e) { try { ToolStripItem item = (ToolStripItem)sender; ApplicationControl.RestartApplicationsBySet((string)item.Tag); } catch (Exception ex) { FormUtilities.ShowError(this, ex); } }