protected void InitializePlotTabs() { foreach (PlotStratum st in DataService.PlotStrata) { if (st.Method == "3PPNT") { if (st.KZ3PPNT <= 0) { MessageBox.Show("error 3PPNT missing KZ value, please return to Cruise System Manger and fix"); continue; } st.SampleSelecter = new ThreePSelecter((int)st.KZ3PPNT, 0); } LayoutPlot view = new LayoutPlot(DataService, SampleSelectorRepository, AppSettings, SoundService.Instance, Controller.ViewController, st); view.UserCanAddTrees = true; #if NetCF view.Sip = SIP; #endif AddLayout(view); this.LogicController.RegisterStratumHotKey(st.Hotkey, view); } }
public LayoutPlotLogic(PlotStratum stratum, LayoutPlot view , FormDataEntryLogic dataEntryController , IViewController viewController) { this.Stratum = stratum; this.View = view; this.DataEntryController = dataEntryController; this.ViewController = viewController; this._BS_Plots = new BindingSource(); this._BS_Trees = new BindingSource(); ((System.ComponentModel.ISupportInitialize)(this._BS_Plots)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this._BS_Trees)).BeginInit(); this._BS_Plots.DataSource = typeof(PlotVM); this._BS_Plots.CurrentChanged += new System.EventHandler(this._BS_Plots_CurrentChanged); this._BS_Trees.DataSource = typeof(TreeVM); this._BS_Trees.CurrentChanged += new System.EventHandler(this._BS_Trees_CurrentChanged); ((System.ComponentModel.ISupportInitialize)(this._BS_Plots)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this._BS_Trees)).EndInit(); _BS_Plots.DataSource = this.Stratum.Plots; }
protected void LimitingDistance_Click(object sender, EventArgs e) { LayoutPlot view = FocusedLayout as LayoutPlot; if (view == null) { return; } view.ShowLimitingDistanceDialog(); }
private void HandleSplitterMoved(object sender, SplitterEventArgs e) { if (this.ViewLoading || suppressSplitterEvents) { return; } if (LayoutPlot.SplitterMoved != null) { LayoutPlot.SplitterMoved(this, splitContainer1.SplitterDistance); } }
protected void InitializePlotTabs() { foreach (PlotStratum st in Unit.PlotStrata) { if (st.Method == "3PPNT") { if (st.KZ3PPNT <= 0) { MessageBox.Show("error 3PPNT missing KZ value, please return to Cruise System Manger and fix"); continue; } st.SampleSelecter = new ThreePSelecter((int)st.KZ3PPNT, 1000000, 0); } st.PopulatePlots(Unit.CuttingUnit_CN.GetValueOrDefault()); TabPage page = new TabPage(); page.Text = String.Format("{0}-{1}[{2}]", st.Code, st.Method, st.Hotkey); PageContainer.TabPages.Add(page); #if NetCF LayoutPlot view = new LayoutPlot(this.LogicController, page, st, this.SIP); #else LayoutPlot view = new LayoutPlot(this.LogicController, page, st); #endif view.UserCanAddTrees = true; _layouts.Add(view); int pageIndex = PageContainer.TabPages.IndexOf(page); this.LogicController.AddStratumHotKey(st.Hotkey, pageIndex); } }