private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { OpenFileDialog openFile = (OpenFileDialog)sender; LogFilePath_exp.Text = openFile.FileName; LogFilePath_exp.Text = StringUtilities.parseFilePathString(LogFilePath_exp.Text);//Cpnsider making all paths relative to the VeriStand Project }
private void openSysDefFileDialog1_FileOk(object sender, CancelEventArgs e) { OpenFileDialog openFile = (OpenFileDialog)sender; sysDefPath = openFile.FileName; sysDefPath = StringUtilities.parseFilePathString(sysDefPath); InitializeListBox(sysDefPath); }
private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { OpenFileDialog openFile = (OpenFileDialog)sender; sequenceFileExp = openFile.FileName; this.FilePath.Text = StringUtilities.parseFilePathString(sequenceFileExp); InitializeTableView(seqContext, sequenceFileExp, parameterValuesArray, parameterTypesArray, true); }
private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { OpenFileDialog openFile = (OpenFileDialog)sender; systemDefinitionPath_exp.Text = openFile.FileName; systemDefinitionPath_exp.Text = StringUtilities.parseFilePathString(systemDefinitionPath_exp.Text); InitializeListBox(systemDefinitionPath_exp.Text); }
private void OK_Click(object sender, EventArgs e) { //Setting Variables this way is necessary for them to persist when TestStand Closes and is Opened again if (!ProcessSequenceParameters()) { stepPropertyObject.SetValNumber("Veristand.Timeout", 0, (double)Timeout.Value); stepPropertyObject.SetValString("Veristand.Target", 0, target); seqContext.SequenceFile.FileGlobalsDefaultValues.SetValIDispatch("Veristand.StimulusProfileReference", 1, null); seqContext.SequenceFile.FileGlobalsDefaultValues.SetFlags("Veristand.StimulusProfileReference", 0, 0x4400000); stepPropertyObject.SetValVariant("Veristand.SequenceFilePath", 0, StringUtilities.parseFilePathString(sequenceFileExp)); stepPropertyObject.SetValVariant("Veristand.ParamNamesArray", 0, StringUtilities.stringArrayToExpressionArray(parameterNamesArray)); stepPropertyObject.SetValVariant("Veristand.ParamValuesArray", 0, StringUtilities.stringArrayToExpressionArray(parameterValuesArray)); stepPropertyObject.SetValVariant("Veristand.ParamTypesArray", 0, StringUtilities.stringArrayToExpressionArray(parameterTypesArray)); if (!stepPropertyObject.Exists("Result.Veristand.Returnval", 0)) { if (returnParamDataType == "Boolean") { stepPropertyObject.NewSubProperty("Result.Veristand.Returnval", PropertyValueTypes.PropValType_Boolean, false, "", 1); stepPropertyObject.SetFlags("Result.Veristand.Returnval", 0, 0x4000000); } else //Number formats: Int32, Int64, UInt32, UInt64, Double { stepPropertyObject.NewSubProperty("Result.Veristand.Returnval", PropertyValueTypes.PropValType_Number, false, "", 1); stepPropertyObject.SetFlags("Result.Veristand.Returnval", 0, 0x4000000); } } else //"Step.Result.Veristand.Returnval" already exists { stepPropertyObject.DeleteSubProperty("Result.Veristand.Returnval", 0); //Remove it so that we can ensure that it will be the correct ValueType. We must do this because there does //not appear to be a way to just use the TestStand API to change Type.ValueType. It is Read-only. if (returnParamDataType == "Boolean") { stepPropertyObject.NewSubProperty("Result.Veristand.Returnval", PropertyValueTypes.PropValType_Boolean, false, "", 1); stepPropertyObject.SetFlags("Result.Veristand.Returnval", 0, 0x4000000); } else //Number formats: Int32, Int64, UInt32, UInt64, Double { stepPropertyObject.NewSubProperty("Result.Veristand.Returnval", PropertyValueTypes.PropValType_Number, false, "", 1); stepPropertyObject.SetFlags("Result.Veristand.Returnval", 0, 0x4000000); } } propObjectFile.IncChangeCount(); //Sets the flag that means the sequence has changes to save (dirty dot*) this.Close(); //Close the form } else { VSDialogs dialogs = new VSDialogs(); dialogs.ShowWarningDialog("Please specify all Parameters."); } }
private void OK_Click(object sender, EventArgs e) { //Setting Variables this way is necessary for them to persist when TestStand Closes and is Opened again if (!ProcessSequenceParameters()) { try { stepPropertyObject.SetValNumber("Veristand.Timeout", 0, (double)Timeout.Value); stepPropertyObject.SetValString("Veristand.Target", 0, target); seqContext.SequenceFile.FileGlobalsDefaultValues.SetValIDispatch("Veristand.StimulusProfileReference", 1, null); seqContext.SequenceFile.FileGlobalsDefaultValues.SetFlags("Veristand.StimulusProfileReference", 0, 0x4400000); stepPropertyObject.SetValVariant("Veristand.SequenceFilePath", 0, StringUtilities.parseFilePathString(sequenceFileExp)); stepPropertyObject.SetValVariant("Veristand.ParamNamesArray", 0, StringUtilities.stringArrayToExpressionArray(parameterNamesArray)); stepPropertyObject.SetValVariant("Veristand.ParamValuesArray", 0, StringUtilities.stringArrayToExpressionArray(parameterValuesArray)); stepPropertyObject.SetValVariant("Veristand.ParamTypesArray", 0, StringUtilities.stringArrayToExpressionArray(parameterTypesArray)); stepPropertyObject.SetValString("Veristand.NumericDataType", 0, StringUtilities.addDoubleQuotesAroundString(returnParamDataType)); propObjectFile.IncChangeCount(); //Sets the flag that means the sequence has changes to save (dirty dot*) } catch (System.NullReferenceException ex) { //do nothing } catch (System.ArgumentNullException ex) { //do nothing } this.Close(); //Close the form } else { VSDialogs dialogs = new VSDialogs(); dialogs.ShowWarningDialog("Please specify all Parameters."); } }
private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { OpenFileDialog openFile = (OpenFileDialog)sender; this.stimulusProfilePath_exp.Text = StringUtilities.parseFilePathString(openFile.FileName); }
private void openFileDialog1_FileOk(object sender, CancelEventArgs e) { OpenFileDialog openFile = (OpenFileDialog)sender; this.parameterfile_exp.Text = StringUtilities.stringArrayToExpressionArray(new string[] { StringUtilities.parseFilePathString(openFile.FileName) }); }