示例#1
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="mainForm"></param>
 public CommandBlock(AnalysisMainForm mainForm)
 {
     this.mainForm = mainForm;
     this.module = (AnalysisWindowsModule) mainForm.Module;
     InitializeComponent();
     Construct();
 }
示例#2
0
 /// <summary>
 /// Constructor for the Relate dialog
 /// </summary>
 /// <param name="frm"></param>
 public RelateDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
     this.EpiInterpreter = frm.EpiInterpreter;
 }
示例#3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="mainForm"></param>
 public CommandBlock(AnalysisMainForm mainForm)
 {
     this.mainForm = mainForm;
     this.module   = (AnalysisWindowsModule)mainForm.Module;
     InitializeComponent();
     Construct();
 }
示例#4
0
 /// <summary>
 /// Constructor for Dialog dialog that passes the project
 /// </summary>
 /// <param name="frm">The main form</param>
 /// <param name="project">The current project</param>
 public DialogDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm, Project project)
     : base(frm)
 {
     InitializeComponent();
     mainForm     = frm;
     this.project = project;
     Construct();
 }
 /// <summary>
 /// Constructor for dialog
 /// </summary>
 /// <param name="frm"></param>
 public RunSavedPGMDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     construct();
     LoadPGMList();
     CheckForInputSufficiency();
 }
 /// <summary>
 /// CoxPHGraphOptionsDialog constructor
 /// </summary>
 /// <param name="frm"></param>
 public CoxPHGraphOptionsDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm, List <string> lstGraphVariables, string txtGraph, bool bolCustGraph)
     : base(frm)
 {
     InitializeComponent();
     lstGraphVars      = lstGraphVariables;
     txtGraphType      = txtGraph;
     bolCustomizeGraph = bolCustGraph;
     Construct();
 }
示例#7
0
 /// <summary>
 /// Constructor for QuitDialog. if showSave is true btnShowSaveOnly is enabled during form load.
 /// </summary>
 /// <param name="frm">The main form</param>
 /// <param name="showSave">Boolean to denote whether to display the Show Only button on the dialog</param>
 public QuitDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm, bool showSave)
     : base(frm)
 {
     InitializeComponent();
     showSaveOnly = showSave;
     if (showSaveOnly)
     {
         this.btnSaveOnly.Click += new System.EventHandler(this.btnSaveOnly_Click);
     }
     Construct();
 }
示例#8
0
 /// <summary>
 /// Oveloaded constructor for DefineVariableDialog which
 /// </summary>
 /// <param name="frm">The main form</param>
 /// <param name="showSave">Boolean to denote whether to show the Save Only button on the dialog</param>
 public DefineVariableDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm, bool showSave)
     : base(frm)
 {
     InitializeComponent();
     if (showSave)
     {
         showSaveOnly            = true;
         this.btnSaveOnly.Click += new System.EventHandler(this.btnSaveOnly_Click);
     }
     Construct();
 }
示例#9
0
        /// <summary>
        /// Constructor for Command Design Dialog
        /// </summary>
        /// <param name="frm">The main form</param>
        public CommandDesignDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
            : base(frm)
        {
            InitializeComponent();
            if (frm != null)
            {
                this.EpiInterpreter = frm.EpiInterpreter;
            }

            //dialogCommandProcessor = Module.GetService(typeof(ICommandProcessor)) as ICommandProcessor;
            //if (dialogCommandProcessor == null)
            //{
            //    throw new GeneralException("Command processor is required but not available.");
            //}
        }
示例#10
0
        /// <summary>
        /// Constructor Initializes the dialog and sets the link to main form.
        /// </summary>
        /// <param name="frm">The main form</param>          
        public DialogBase(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
        {
            #region Input Validation
            if (frm == null)
            {
                //throw new ArgumentNullException("frm");
            }
            #endregion Input Validation

            InitializeComponent();
            errorMessages = new List<string>();
            if (frm != null)
            {
                //TODO: FieldDefinitionDialogFactory does not send MainForms to this constructor
                this.mainForm = frm;
                mainForm.WireUpEventHandlers(this);
            }
        }
示例#11
0
        /// <summary>
        /// Constructor Initializes the dialog and sets the link to main form.
        /// </summary>
        /// <param name="frm">The main form</param>
        public DialogBase(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
        {
            #region Input Validation
            if (frm == null)
            {
                //throw new ArgumentNullException("frm");
            }
            #endregion Input Validation

            InitializeComponent();
            errorMessages = new List <string>();
            if (frm != null)
            {
                //TODO: FieldDefinitionDialogFactory does not send MainForms to this constructor
                this.mainForm = frm;
                mainForm.WireUpEventHandlers(this);
            }
        }
示例#12
0
        /// <summary>
        /// Constructor for the Printout dialog
        /// </summary>
        /// <param name="frm"></param>
        public ReportDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
            : base(frm)
        {
            InitializeComponent();
            Construct();
            radioButtonDisplay.Checked = true;
            textBoxFileSavePath.Text   = System.IO.Path.Combine(System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location), "Reports");

            foreach (String printer in System.Drawing.Printing.PrinterSettings.InstalledPrinters)
            {
                comboBoxSelectPrinter.Items.Add(printer.ToString());
            }

            System.Drawing.Printing.PrintDocument prtdoc = new System.Drawing.Printing.PrintDocument();
            string defaultPrinter = prtdoc.PrinterSettings.PrinterName;

            comboBoxSelectPrinter.Text = defaultPrinter;
            GenerateCommand();
        }
示例#13
0
        /// <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>
 /// KaplanMeierSurvivalDialog constructor
 /// </summary>
 /// <param name="frm"></param>
 public KaplanMeierSurvivalDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
 }
 /// <summary>
 /// CoxProportionalHazardsDialog constructor
 /// </summary>
 /// <param name="frm"></param>
 public CoxProportionalHazardsDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
 }
示例#16
0
 /// <summary>
 /// Constructor for the UndefineVariable dialog
 /// </summary>
 /// <param name="frm"></param>
 public UndefineVariableDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
 }
示例#17
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="frm">Main Form</param>
 public StoringOutputDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
 }
示例#18
0
 /// <summary>
 /// Copnstructor for the Cancel Sort dialog
 /// </summary>
 /// <param name="frm"></param>
 public CancelSort(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
 }
示例#19
0
        static void Main(string[] args)
        {
            System.Windows.Forms.Application.EnableVisualStyles();

            if (LoadConfiguration(args))
            {
                Configuration.Environment = ExecutionEnvironment.WindowsApplication;

                try
                {
                    //string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
                    //string executablePath = System.IO.Path.Combine(path, "EpiInfo.exe");
                    //string commandLine = "/l:Analysis " + string.Join(" ", args);
                    ICommandLine commandLine = new CommandLine(args);

                    Epi.Windows.Analysis.Forms.AnalysisMainForm M = new Epi.Windows.Analysis.Forms.AnalysisMainForm();
                    string programPath = string.Empty;
                    for (int i = 0; i < commandLine.ArgumentStrings.Length; i++)
                    {
                        if (commandLine.ArgumentStrings[i].IndexOf(".pgm7", StringComparison.CurrentCultureIgnoreCase) >= 0)
                        {
                            programPath = commandLine.ArgumentStrings[i].Trim();
                            break;
                        }
                    }
                    if (!string.IsNullOrEmpty(programPath))
                    {
                        if (File.Exists(programPath))
                        {
                            M.LoadProgramFromCommandLine(programPath);
                        }
                    }


                    System.Windows.Forms.Application.Run(M);
                    M = null;

                    /*
                     *
                     *
                     *
                     * string titleArgument = commandLine.GetArgument("title");
                     * string projectPath = commandLine.GetArgument("project");
                     * string viewName = commandLine.GetArgument("view");
                     *
                     * try
                     * {
                     *  Epi.Windows.Enter.EnterMainForm M = new Epi.Windows.Enter.EnterMainForm();
                     *
                     *  if (!string.IsNullOrEmpty(titleArgument))
                     *  {
                     *      M.Text = titleArgument;
                     *  }
                     *
                     *  if (!string.IsNullOrEmpty(projectPath))
                     *  {
                     *      Project p = new Project(projectPath);
                     *      M.FireOpenViewEvent(p.Views[viewName]);
                     *  }
                     *  else
                     *  {
                     *      if (!M.IsDisposed)
                     *      {
                     *          M.Show();
                     *          if (M.WindowState == FormWindowState.Minimized)
                     *          {
                     *              M.WindowState = FormWindowState.Normal;
                     *          }
                     *          M.Activate();
                     *      }
                     *  }
                     *
                     *
                     *  M = null;*/
                }
                catch (Exception ex)
                {
                    //MsgBox.ShowError(SharedStrings.WARNING_APPLICATION_RUNNING);
                    MsgBox.ShowError(string.Format("Error: \n {0}", ex.ToString()));
                }
                finally
                {
                }
            }
        }
示例#20
0
 /// <summary>
 /// Constructor for the Frequency dialog
 /// </summary>
 /// <param name="frm"></param>
 public ComplexSampleFrequencyDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
 }
示例#21
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="mainForm">The main form</param>
 public ProgramEditor(AnalysisMainForm mainForm)
 {
     this.mainForm = mainForm;
     InitializeComponent();
 }
 /// <summary>
 /// Constructor for DeleteFileTableDialog
 /// </summary>
 /// <param name="frm"></param>
 public DeleteFileTableDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     construct();
 }
 /// <summary>
 /// CreateNewDSNDialog constructor
 /// </summary>
 /// <param name="frm"></param>
 public CreateNewDSNDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
 }
示例#24
0
        static void Main(string[] args)
        {
            System.Windows.Forms.Application.EnableVisualStyles();

            if (LoadConfiguration(args))
            {
                Configuration.Environment = ExecutionEnvironment.WindowsApplication;

                try
                {
                    //string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location);
                    //string executablePath = System.IO.Path.Combine(path, "EpiInfo.exe");
                    //string commandLine = "/l:Analysis " + string.Join(" ", args);
                    ICommandLine commandLine = new CommandLine(args);

                    Epi.Windows.Analysis.Forms.AnalysisMainForm M = new Epi.Windows.Analysis.Forms.AnalysisMainForm();
                    string programPath = string.Empty;
                    for (int i = 0; i < commandLine.ArgumentStrings.Length; i++)
                    {
                        if (commandLine.ArgumentStrings[i].IndexOf(".pgm7", StringComparison.CurrentCultureIgnoreCase) >= 0)
                        {
                            programPath = commandLine.ArgumentStrings[i].Trim();
                            break;
                        }
                    }
                    if (!string.IsNullOrEmpty(programPath))
                    {
                        if (File.Exists(programPath))
                        {
                            M.LoadProgramFromCommandLine(programPath);
                        }
                    }

                    System.Windows.Forms.Application.Run(M);
                    M = null;

                    /*

                    string titleArgument = commandLine.GetArgument("title");
                    string projectPath = commandLine.GetArgument("project");
                    string viewName = commandLine.GetArgument("view");

                    try
                    {
                        Epi.Windows.Enter.EnterMainForm M = new Epi.Windows.Enter.EnterMainForm();

                        if (!string.IsNullOrEmpty(titleArgument))
                        {
                            M.Text = titleArgument;
                        }

                        if (!string.IsNullOrEmpty(projectPath))
                        {
                            Project p = new Project(projectPath);
                            M.FireOpenViewEvent(p.Views[viewName]);
                        }
                        else
                        {
                            if (!M.IsDisposed)
                            {
                                M.Show();
                                if (M.WindowState == FormWindowState.Minimized)
                                {
                                    M.WindowState = FormWindowState.Normal;
                                }
                                M.Activate();
                            }
                        }

                        M = null;*/
                }
                catch (Exception ex)
                {
                    //MsgBox.ShowError(SharedStrings.WARNING_APPLICATION_RUNNING);
                    MsgBox.ShowError(string.Format("Error: \n {0}", ex.ToString()));
                }
                finally
                {
                }
            }
        }
示例#25
0
 /// <summary>
 /// LinearRegressionDialog constructor
 /// </summary>
 /// <param name="frm"></param>
 public LogisticRegressionDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
 }
示例#26
0
 /// <summary>
 /// Constructor for the Merge Dialog
 /// </summary>
 /// <param name="frm"></param>
 public MergeDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
 }
示例#27
0
        /// <summary>
        /// Default constructor - NOT TO BE USED FOR INSTANTIATION
        /// </summary>

        /// <summary>
        /// Constructor for the List dialog
        /// </summary>
        /// <param name="frm"></param>
        public GraphDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
            : base(frm)
        {
            InitializeComponent();
            Construct();
        }
 /// <summary>
 /// Constructor for the Delete Records dialog
 /// </summary>
 /// <param name="frm"></param>
 public DeleteRecordsDialog(Epi.Windows.Analysis.Forms.AnalysisMainForm frm)
     : base(frm)
 {
     InitializeComponent();
     Construct();
 }