private void _mainWidget_Destroyed(object sender, System.EventArgs e) { VariableEditor.MainWidget.Destroy(); VariableEditor = null; FrequencyEditor.MainWidget.Destroy(); FrequencyEditor = null; dataStoreView1.MainWidget.Destroy(); dataStoreView1 = null; _mainWidget.Destroyed -= _mainWidget_Destroyed; _owner = null; }
private void _mainWidget_Destroyed(object sender, System.EventArgs e) { variableEditor.StyleChanged -= OnStyleChanged; frequencyEditor.StyleChanged -= OnStyleChanged; variableEditor.MainWidget.Destroy(); variableEditor = null; frequencyEditor.MainWidget.Destroy(); frequencyEditor = null; dataStoreView1.MainWidget.Destroy(); dataStoreView1 = null; mainWidget.Destroyed -= _mainWidget_Destroyed; owner = null; }
/// <summary>Constructor</summary> public ReportView(ViewBase owner) : base(owner) { Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.ReportView.glade", "notebook1"); gxml.Autoconnect(this); _mainWidget = notebook1; VariableEditor = new EditorView(this); vbox1.PackStart(VariableEditor.MainWidget, true, true, 0); FrequencyEditor = new EditorView(this); vbox2.PackStart(FrequencyEditor.MainWidget, true, true, 0); dataStoreView1 = new DataStoreView(this); alignment1.Add(dataStoreView1.MainWidget); }
/// <summary>Constructor</summary> public ReportActivityLedgerView(ViewBase owner) : base(owner) { Builder builder = BuilderFromResource("ApsimNG.Resources.Glade.ReportActivityLedgerView.glade"); notebook1 = (Notebook)builder.GetObject("notebook1"); alignment1 = (Alignment)builder.GetObject("alignment1"); alignment2 = (Alignment)builder.GetObject("alignment2"); mainWidget = notebook1; dataStoreView1 = new DataStoreView(this); alignment1.Add(dataStoreView1.MainWidget); displayView1 = new ActivityLedgerGridView(this); alignment2.Add(displayView1.MainWidget); mainWidget.Destroyed += _mainWidget_Destroyed; }
/// <summary>Constructor</summary> public ReportView(ViewBase owner) : base(owner) { Builder builder = new Builder("ApsimNG.Resources.Glade.ReportView.glade"); notebook1 = (Notebook)builder.GetObject("notebook1"); vbox1 = (VBox)builder.GetObject("vbox1"); vbox2 = (VBox)builder.GetObject("vbox2"); alignment1 = (Alignment)builder.GetObject("alignment1"); _mainWidget = notebook1; VariableEditor = new EditorView(this); vbox1.PackStart(VariableEditor.MainWidget, true, true, 0); FrequencyEditor = new EditorView(this); vbox2.PackStart(FrequencyEditor.MainWidget, true, true, 0); dataStoreView1 = new DataStoreView(this); alignment1.Add(dataStoreView1.MainWidget); }
private void _mainWidget_Destroyed(object sender, System.EventArgs e) { try { variableEditor.StyleChanged -= OnStyleChanged; frequencyEditor.StyleChanged -= OnStyleChanged; variableEditor.MainWidget.Destroy(); variableEditor = null; frequencyEditor.MainWidget.Destroy(); frequencyEditor = null; dataStoreView1.MainWidget.Destroy(); dataStoreView1 = null; mainWidget.Destroyed -= _mainWidget_Destroyed; owner = null; } catch (Exception err) { ShowError(err); } }
/// <summary>Constructor</summary> public ReportView(ViewBase owner) : base(owner) { Builder builder = BuilderFromResource("ApsimNG.Resources.Glade.ReportView.glade"); notebook1 = (Notebook)builder.GetObject("notebook1"); vbox1 = (VBox)builder.GetObject("vbox1"); vbox2 = (VBox)builder.GetObject("vbox2"); alignment1 = (Alignment)builder.GetObject("alignment1"); mainWidget = notebook1; variableEditor = new EditorView(this); variableEditor.StyleChanged += OnStyleChanged; vbox1.PackStart(variableEditor.MainWidget, true, true, 0); frequencyEditor = new EditorView(this); frequencyEditor.StyleChanged += OnStyleChanged; vbox2.PackStart(frequencyEditor.MainWidget, true, true, 0); dataStoreView1 = new DataStoreView(this); alignment1.Add(dataStoreView1.MainWidget); mainWidget.Destroyed += _mainWidget_Destroyed; }
private void _mainWidget_Destroyed(object sender, System.EventArgs e) { dataStoreView1 = null; mainWidget.Destroyed -= _mainWidget_Destroyed; owner = null; }