Esempio n. 1
0
        private void saveAsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var dlg    = new Dialogs.String("Save Profile", "Name:");
            var result = dlg.ShowDialog();

            while (true)
            {
                //If user pressed OK button
                if (result == DialogResult.OK)
                {
                    //If profile was saved successfully
                    if (profileManager.AddProfile(new Profile(dlg.inputText.Text, filterList)))
                    {
                        break;
                    }
                }

                //If user pressed Cancel button
                if (result == DialogResult.Cancel)
                {
                    break;
                }

                result = dlg.ShowDialog();
            }


            //if (dlg.ShowDialog() == DialogResult.OK)
            //    profileManager.AddProfile(new Profile(dlg.inputText.Text, filterList));
        }
Esempio n. 2
0
        //Evaluate dialog for Filters with 1 string argument (the purple rows on the excel file)
        public void EvalDialog_Str(string title, string prompt, FilterType filterType)
        {
            using (var dlg = new Dialogs.String(title, prompt, this))
            {
                dlg.inputText.TextChanged += (o, args) => PreviewFilter(filterType, dlg.inputText.Text);

                if (dlg.ShowDialog() == DialogResult.OK)
                {
                    AddFilter(new Filter(filterType, dlg.inputText.Text));
                }

                ApplyFiltersAndUpdate();
            }
        }
Esempio n. 3
0
        private void renameToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (dropDownProfile.SelectedIndex == -1)
            {
                return;
            }

            var dlg = new Dialogs.String("Rename Profile", "Name:");

            if (dlg.ShowDialog() == DialogResult.OK)
            {
                if (dlg.inputText.Text == "")
                {
                    return;
                }

                profileManager.DeleteSelected();
                profileManager.AddProfile(new Profile(dlg.inputText.Text, filterList));
            }
        }