示例#1
0
        private void btnRun_Click(object sender, EventArgs e)
        {
            if (!ProjectHasBeenCompiled)
            {
                MessageBox.Show(this, "Project compilation has not yet finished successfully. Please wait unitl the message at the bottom of the screen disappears, then try again.", "Busy Compiling", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            for (int i = 0; i < ValuesThatHaveBeenSet.Length; i++)
            {
                if (!ValuesThatHaveBeenSet[i])
                {
                    MessageBox.Show(this, "Some values haven't been set.", "Missing Data", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }
            if (string.IsNullOrEmpty(Settings.Default.DebugCSPDatabasePath) || !File.Exists(Settings.Default.DebugCSPDatabasePath))
            {
                MessageBox.Show(this, "Please select the ArchAngel project file (.aaproj) you want to read settings from on the Tools -> Options menu. \n\nThis will now be opened for you.", "Missing Data", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                frmOptions formOpt = new frmOptions();
                formOpt.ShowDialog(this);

                if (string.IsNullOrEmpty(Settings.Default.DebugCSPDatabasePath) || !File.Exists(Settings.Default.DebugCSPDatabasePath))
                {
                    return;
                }
            }
            Run();
        }
示例#2
0
        void btnBrowseArchAngelObject_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Settings.Default.DebugCSPDatabasePath) ||
                !File.Exists(Settings.Default.DebugCSPDatabasePath))
            {
                MessageBox.Show(this, "Please select the ArchAngel project file (.aaproj) you want to read settings from on the Tools -> Options menu. \n\nThis will now be opened for you.", "Missing Data", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                frmOptions formOpt = new frmOptions();
                formOpt.ShowDialog(this);
                //this.Close();
                if (string.IsNullOrEmpty(Settings.Default.DebugCSPDatabasePath) ||
                    !File.Exists(Settings.Default.DebugCSPDatabasePath))
                {
                    return;
                }
            }

            Cursor = Cursors.WaitCursor;
            Button button = (Button)sender;

            Type  dataType = null;
            Label textBox  = (Label)button.Tag;

            if (textBox.Tag.GetType() == typeof(Project.ParamInfo))
            {
                Project.ParamInfo p = (Project.ParamInfo)textBox.Tag;
                dataType = p.DataType;
            }
            else
            {
                dataType = textBox.Tag.GetType();
            }
            frmSelectModelObject form = frmSelectModelObject.Instance;

            //frmSelectModelObject form = new frmSelectModelObject();
            //form.Show();
            form.ShowObject(this, dataType);

            if (form.SelectedObject != null)
            {
                int index = int.Parse(button.Name.Substring(button.Name.LastIndexOf("_") + 1));
                ParametersToPass[index] = form.SelectedObject;

                if (textBox.Tag != form.SelectedObject)
                {
                    // One of the parameters have now changed, so clear any previously generated text
                    syntaxEditor1.Text         = "";
                    syntaxEditorFormatted.Text = "";
                }
                textBox.Tag = form.SelectedObject;

                if (form.SelectedObject != null)
                {
                    textBox.Text = ArchAngel.Interfaces.ProjectHelper.GetDisplayName(form.SelectedObject);
                    ValuesThatHaveBeenSet[index] = true;
                }
            }
            Cursor = Cursors.Default;
        }
示例#3
0
        private void btnRun_Click(object sender, EventArgs e)
        {
            if (!ProjectHasBeenCompiled)
            {
                MessageBox.Show(this, "Project compilation has not yet finished successfully. Please wait unitl the message at the bottom of the screen disappears, then try again.", "Busy Compiling", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                return;
            }
            for (int i = 0; i < ValuesThatHaveBeenSet.Length; i++)
            {
                if (!ValuesThatHaveBeenSet[i])
                {
                    MessageBox.Show(this, "Some values haven't been set.", "Missing Data", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                    return;
                }
            }
            if (string.IsNullOrEmpty(Settings.Default.DebugCSPDatabasePath) || !File.Exists(Settings.Default.DebugCSPDatabasePath))
            {
                MessageBox.Show(this, "Please select the ArchAngel project file (.aaproj) you want to read settings from on the Tools -> Options menu. \n\nThis will now be opened for you.", "Missing Data", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                frmOptions formOpt = new frmOptions();
                formOpt.ShowDialog(this);

                if (string.IsNullOrEmpty(Settings.Default.DebugCSPDatabasePath) || !File.Exists(Settings.Default.DebugCSPDatabasePath))
                {
                    return;
                }
            }
            Run();
        }
示例#4
0
        void btnBrowseArchAngelObject_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(Settings.Default.DebugCSPDatabasePath) ||
            !File.Exists(Settings.Default.DebugCSPDatabasePath))
            {
                MessageBox.Show(this, "Please select the ArchAngel project file (.aaproj) you want to read settings from on the Tools -> Options menu. \n\nThis will now be opened for you.", "Missing Data", MessageBoxButtons.OK, MessageBoxIcon.Warning);
                frmOptions formOpt = new frmOptions();
                formOpt.ShowDialog(this);
                //this.Close();
                if (string.IsNullOrEmpty(Settings.Default.DebugCSPDatabasePath) ||
            !File.Exists(Settings.Default.DebugCSPDatabasePath))
                {
                    return;
                }
            }

            Cursor = Cursors.WaitCursor;
            Button button = (Button)sender;

            Type dataType = null;
            Label textBox = (Label)button.Tag;

            if (textBox.Tag.GetType() == typeof(Project.ParamInfo))
            {
                Project.ParamInfo p = (Project.ParamInfo)textBox.Tag;
                dataType = p.DataType;
            }
            else
            {
                dataType = textBox.Tag.GetType();
            }
            frmSelectModelObject form = frmSelectModelObject.Instance;
            //frmSelectModelObject form = new frmSelectModelObject();
            //form.Show();
            form.ShowObject(this, dataType);

            if (form.SelectedObject != null)
            {
                int index = int.Parse(button.Name.Substring(button.Name.LastIndexOf("_") + 1));
                ParametersToPass[index] = form.SelectedObject;

                if (textBox.Tag != form.SelectedObject)
                {
                    // One of the parameters have now changed, so clear any previously generated text
                    syntaxEditor1.Text = "";
                    syntaxEditorFormatted.Text = "";
                }
                textBox.Tag = form.SelectedObject;

                if (form.SelectedObject != null)
                {
                    textBox.Text = ArchAngel.Interfaces.ProjectHelper.GetDisplayName(form.SelectedObject);
                    ValuesThatHaveBeenSet[index] = true;
                }
            }
            Cursor = Cursors.Default;
        }