/// <summary> /// Constructor /// theContent will be empty for Attach /// </summary> public PgmDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm theParentForm, string name, string theContent, PgmDialogMode mode) : base(theParentForm) { // // Required for Windows Form Designer support // InitializeComponent(); this.content = theContent; this.pgmDialogMode = mode; this.EpiInterpreter = theParentForm.EpiInterpreter; Project project = this.EpiInterpreter.Context.CurrentProject; if (project != null) { this.currentProject = project; } if (mode == PgmDialogMode.SaveProgram) { cmbPrograms.DropDownStyle = ComboBoxStyle.DropDown; this.Text = "Save Program"; // form title } else if (mode == PgmDialogMode.SaveProgramAs) { cmbPrograms.DropDownStyle = ComboBoxStyle.DropDown; this.Text = "Save Program As"; // form title } else { cmbPrograms.DropDownStyle = ComboBoxStyle.DropDownList; this.Text = "Open Program"; // form title } programName = name; this.isProjectBased = true; }
/// <summary> /// Constructor /// theContent will be empty for Attach /// </summary> public PgmDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm theParentForm, string name, string theContent, PgmDialogMode mode) : base(theParentForm) { // // Required for Windows Form Designer support // InitializeComponent(); this.content = theContent; this.pgmDialogMode = mode; this.EpiInterpreter = theParentForm.EpiInterpreter; Project project = this.EpiInterpreter.Context.CurrentProject; if (project != null) { this.currentProject = project; } if (mode == PgmDialogMode.SaveProgram) { cmbPrograms.DropDownStyle = ComboBoxStyle.DropDown; this.Text = "Save Program"; // form title } else if (mode == PgmDialogMode.SaveProgramAs) { cmbPrograms.DropDownStyle = ComboBoxStyle.DropDown; this.Text = "Save Program As"; // form title } else { cmbPrograms.DropDownStyle = ComboBoxStyle.DropDownList; this.Text = "Open Program"; // form title } programName = name; this.isProjectBased = true; }