Exemple #1
0
        //	new argument button click event handler
        private void btnNewArgument_Click(object sender, EventArgs e)
        {
            StringEditForm form = new StringEditForm();

            form.StringName = "Command Line Argument";
            if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.StringValue.Length > 0)
                {
                    listArguments.Items.Add(form.StringValue);
                }
            }
        }
Exemple #2
0
        //	new init string button click event handler
        private void btnNewInitString_Click(object sender, EventArgs e)
        {
            StringEditForm form = new StringEditForm();

            form.StringName = "Initialization String";
            if (form.ShowDialog() == DialogResult.OK)
            {
                if (form.StringValue.Length > 0)
                {
                    engine.AddInitString(form.StringValue);
                    listInitStrings.Items.Add(form.StringValue);
                }
            }
        }
Exemple #3
0
        //	edit argument button click event handler
        private void btnEditArgument_Click(object sender, EventArgs e)
        {
            string argument = (string)listArguments.SelectedItem;

            if (argument != null)
            {
                StringEditForm form = new StringEditForm();
                form.StringName  = "Command Line Argument";
                form.StringValue = argument;
                if (form.ShowDialog() == DialogResult.OK)
                {
                    int index = listArguments.SelectedIndex;
                    listArguments.Items.Remove(argument);
                    if (form.StringValue.Length > 0)
                    {
                        listArguments.Items.Insert(index, form.StringValue);
                    }
                }
            }
        }
Exemple #4
0
        //	edit init string button click event handler
        private void btnEditInitString_Click(object sender, EventArgs e)
        {
            string initString = (string)listArguments.SelectedItem;

            if (initString != null)
            {
                StringEditForm form = new StringEditForm();
                form.StringName  = "Initialization String";
                form.StringValue = initString;
                if (form.ShowDialog() == DialogResult.OK)
                {
                    engine.RemoveInitString(initString);
                    int index = listInitStrings.SelectedIndex;
                    listInitStrings.Items.Remove(initString);
                    if (form.StringValue.Length > 0)
                    {
                        engine.AddInitString(form.StringValue);
                        listInitStrings.Items.Insert(index, form.StringValue);
                    }
                }
            }
        }