Ejemplo n.º 1
0
        private void Filter(int index, Matcher m)
        {
            PromptBox prompt = new PromptBox();

            if (prompt.ShowDialog() == DialogResult.OK)
            {
                this.Cursor = Cursors.WaitCursor;

                ResultsWindow rw = Program.GetResultsWindow(_pid, new Program.ResultsWindowInvokeAction(delegate(ResultsWindow f)
                {
                    f.ResultsList.VirtualListSize = 0;

                    foreach (string[] s in Results)
                    {
                        if (m(s[index], prompt.Value))
                        {
                            f.Results.Add(s);
                            f.ResultsList.VirtualListSize++;
                        }
                    }

                    f.Label = "Filter: " + f.Results.Count + " results.";

                    f.Show();
                }));

                this.Cursor = Cursors.Default;
            }
        }
Ejemplo n.º 2
0
        private void Filter(int index, Matcher m)
        {
            PromptBox prompt = new PromptBox();

            if (prompt.ShowDialog() == DialogResult.OK)
            {
                this.Cursor = Cursors.WaitCursor;

                ResultsWindow rw = Program.GetResultsWindow(_pid, new Program.ResultsWindowInvokeAction(delegate(ResultsWindow f)
                {
                    f.ResultsList.VirtualListSize = 0;

                    foreach (string[] s in Results)
                    {                
                        if (m(s[index], prompt.Value))    
                        {
                            f.Results.Add(s);
                            f.ResultsList.VirtualListSize++;
                        }
                    }

                    f.Label = "Filter: " + f.Results.Count + " results.";
                           
                    f.Show();
                }));

                this.Cursor = Cursors.Default;   
            }
        }
Ejemplo n.º 3
0
        private void runAsAdministratorMenuItem_Click(object sender, EventArgs e)
        {
            PromptBox box = new PromptBox();

            box.Text = "Enter the command to start";
            box.TextBox.AutoCompleteSource = AutoCompleteSource.AllSystemSources;
            box.TextBox.AutoCompleteMode = AutoCompleteMode.SuggestAppend;

            if (box.ShowDialog() == DialogResult.OK)
            {
                Program.StartProgramAdmin(box.Value, "", null, ShowWindowType.Show, this.Handle);
            }
        }