コード例 #1
0
 private void SetUpSelectionProcessing()
 {
     selectionDisplay.Hidden += delegate {
         IRefactorTask selectedFix = selectionDisplay.Selected;
         if (selectedFix != null)
         {
             selectedFix.Run(Options);
         }
     };
 }
コード例 #2
0
ファイル: QuickFixesSelection.cs プロジェクト: nieve/Stereo
        public void GetSelectedFix(IEnumerable <MonoDevelop.Stereo.Refactoring.QuickFixes.IRefactorTask> tasks)
        {
            if (Children.Contains(vTaskBox))
            {
                this.Remove(vTaskBox);
            }
            global::Stetic.Gui.Initialize(this);

            // Container child MonoDevelop.Stereo.Gui.QuickFixesSelection.Gtk.Container+ContainerChild
            this.vTaskBox         = new global::Gtk.VBox();
            this.vTaskBox.Name    = "vTaskBox";
            this.vTaskBox.Spacing = 0;

            tasksCache.Clear();
            foreach (IRefactorTask task in tasks)
            {
                tasksCache.Add(task.Title, task);
                var btn = new Button();
                btn.CanFocus     = true;
                btn.UseUnderline = true;
                btn.Label        = task.Title;
                btn.SetAlignment(0.00f, 0.50f);
                this.vTaskBox.Add(btn);
                btn.Clicked += (sender, e) => {
                    Selected = tasksCache[((Button)sender).Label];
                    Hide();
                };
                global::Gtk.Box.BoxChild w = ((global::Gtk.Box.BoxChild)(this.vTaskBox [btn]));
                w.Position = 0;
                w.Expand   = false;
                w.Fill     = false;
            }

            this.Add(this.vTaskBox);
            if ((this.Child != null))
            {
                this.Child.ShowAll();
            }
            Selected = null;

            this.Show();
        }
コード例 #3
0
 public void SetSelected(IRefactorTask task)
 {
     selected = task;
 }
コード例 #4
0
ファイル: QuickFixesSelection.cs プロジェクト: nieve/Stereo
        public void GetSelectedFix(IEnumerable<MonoDevelop.Stereo.Refactoring.QuickFixes.IRefactorTask> tasks)
        {
            if (Children.Contains(vTaskBox))
                this.Remove(vTaskBox);
            global::Stetic.Gui.Initialize (this);

            // Container child MonoDevelop.Stereo.Gui.QuickFixesSelection.Gtk.Container+ContainerChild
            this.vTaskBox = new global::Gtk.VBox ();
            this.vTaskBox.Name = "vTaskBox";
            this.vTaskBox.Spacing = 0;

            tasksCache.Clear();
            foreach (IRefactorTask task in tasks) {
                tasksCache.Add(task.Title, task);
                var btn = new Button ();
                btn.CanFocus = true;
                btn.UseUnderline = true;
                btn.Label = task.Title;
                btn.SetAlignment(0.00f, 0.50f);
                this.vTaskBox.Add (btn);
                btn.Clicked += (sender, e) => {
                    Selected = tasksCache[((Button)sender).Label];
                    Hide (); };
                global::Gtk.Box.BoxChild w = ((global::Gtk.Box.BoxChild)(this.vTaskBox [btn]));
                w.Position = 0;
                w.Expand = false;
                w.Fill = false;
            }

            this.Add (this.vTaskBox);
            if ((this.Child != null)) {
                this.Child.ShowAll ();
            }
            Selected = null;

            this.Show();
        }
コード例 #5
0
 public void SetSelected(IRefactorTask task)
 {
     selected = task;
 }