Ejemplo n.º 1
0
 public void Dispose()
 {
     TFSVersionControlService.Instance.OnServersChange -= onServersChanged;
     _treeView.Dispose();
     _treeStore.Dispose();
     _content.Dispose();
 }
Ejemplo n.º 2
0
        public void ShowTextDialog(string title, string text, Action <string> onOk)
        {
            if (textDialogVisible)
            {
                return;
            }

            var display = this.Frontend.CurrentDisplay;

            var textDialog = new TextOkCancelBox {
                Text = text, Title = title
            };
            var textDialogBackend = textDialog.Backend as TextOkCancelBoxBackend;

            textDialogBackend.Widget.HorizontalPlacement = WidgetPlacement.Fill;
            textDialogBackend.Widget.VerticalPlacement   = WidgetPlacement.Start;

            var panel = PanelOf(this.Frontend.CurrentDisplay);
            var c     = panel.Content;
            var box   = new VBox {
                HorizontalPlacement = WidgetPlacement.Fill,
                VerticalPlacement   = WidgetPlacement.Fill,
                Spacing             = 2
            };

            panel.Content = box;

            box.PackStart(textDialogBackend.Widget);
            box.PackEnd(c, true);

            box.SetFocus();
            textDialogBackend.SetFocus();

            textDialogVisible = true;

            textDialogBackend.Finish = (e) => {
                if (e == DialogResult.Ok)
                {
                    onOk(textDialog.Text);
                }

                box.Remove(c);
                box.Remove(textDialogBackend.Widget);

                panel.Content = c;

                box.Dispose();
                textDialog.Dispose();

                textDialogVisible = false;
                // hide is changing the CurrentDisplay (whyever)
                // Frontend.DisplayGotFocus (display);
            };
        }
Ejemplo n.º 3
0
        public override void Dispose()
        {
            Clear();

            if (box != null)
            {
                box.Dispose();
                box.Destroy();
            }

            base.Dispose();
        }
Ejemplo n.º 4
0
        protected virtual void Dispose(bool disposing)
        {
            if (disposed)
            {
                return;
            }
            disposed = true;

            if (disposing)
            {
                Preferences.SettingChanged -= OnPreferencesChanged;
                // free managed resources
                if (rating != null)
                {
                    rating.Dispose();
                    rating = null;
                }
                if (description_entry != null)
                {
                    description_entry.Dispose();
                    description_entry = null;
                }
                if (tag_view != null)
                {
                    tag_view.Dispose();
                    tag_view = null;
                }
                if (photo_view_scrolled != null)
                {
                    photo_view_scrolled.Dispose();
                    photo_view_scrolled = null;
                }
                if (filmstrip != null)
                {
                    filmstrip.Dispose();
                    filmstrip = null;
                }
                if (inner_vbox != null)
                {
                    inner_vbox.Dispose();
                    inner_vbox = null;
                }
                if (inner_hbox != null)
                {
                    inner_hbox.Dispose();
                    inner_hbox = null;
                }
            }
            // free unmanaged resources
        }
Ejemplo n.º 5
0
 /// <summary>Main widget destroyed handler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MainWidgetDestroyed(object sender, EventArgs e)
 {
     try
     {
         btnJumpToSimLog.Clicked -= OnJumpToSimulationLog;
         captureRules.Dispose();
         VerbosityDropDown.Dispose();
         MessagesFilter.Dispose();
         simulationFilter.Dispose();
         SimulationDropDown.Dispose();
         mainControl.Dispose();
         ((ViewBase)SummaryDisplay).Dispose();
         mainWidget.Destroyed -= MainWidgetDestroyed;
         owner = null;
     }
     catch (Exception err)
     {
         ShowError(err);
     }
 }
Ejemplo n.º 6
0
 /// <summary>Main widget destroyed handler</summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void MainWidgetDestroyed(object sender, EventArgs e)
 {
     try
     {
         btnJumpToSimLog.Clicked -= OnJumpToSimulationLog;
         topBox.Dispose();
         SummaryCheckBox.MainWidget.Dispose();
         WarningCheckBox.MainWidget.Dispose();
         ErrorCheckBox.MainWidget.Dispose();
         middleBox.Dispose();
         SimulationDropDown.MainWidget.Dispose();
         mainControl.Dispose();
         ((ViewBase)SummaryDisplay).MainWidget.Dispose();
         mainWidget.Destroyed -= MainWidgetDestroyed;
         owner = null;
     }
     catch (Exception err)
     {
         ShowError(err);
     }
 }
Ejemplo n.º 7
0
        private void GenerateTabs()

        {
            VBox tab = new VBox();

            Image img = new Image();

            img.Pixbuf = Images.GetPixbuf("options-general.png");

            tab.PackStart(img, false, false, 2);

            tab.PackEnd(new Label("General"), false, false, 0);

            tab.SetSizeRequest(60, 50);

            tab.ShowAll();

            optionTabs.AppendPage(GenerateGeneral(), tab);



            tab = new VBox();

            img = new Image();

            img.Pixbuf = Images.GetPixbuf("options-text-editors.png");

            tab.PackStart(img, false, false, 2);

            tab.PackEnd(new Label("Text Editors"), false, false, 0);

            tab.SetSizeRequest(60, 50);

            tab.ShowAll();

            optionTabs.AppendPage(GenerateTextEditors(), tab);



            tab = new VBox();

            img = new Image();

            img.Pixbuf = Images.GetPixbuf("options-results.png");

            tab.PackStart(img, false, false, 2);

            tab.PackEnd(new Label("Results"), false, false, 0);

            tab.SetSizeRequest(60, 50);

            tab.ShowAll();

            optionTabs.AppendPage(GenerateResults(), tab);



            tab = new VBox();

            img = new Image();

            img.Pixbuf = Images.GetPixbuf("options-plugins.png");

            tab.PackStart(img, false, false, 2);

            tab.PackEnd(new Label("Plugins"), false, false, 0);

            tab.SetSizeRequest(60, 50);

            tab.ShowAll();

            optionTabs.AppendPage(GeneratePlugins(), tab);



            tab.Dispose();

            img.Dispose();



            optionTabs.SwitchPage += new SwitchPageHandler(optionTabs_SwitchPage);
        }