private void _plotInfo_BTN_Click(object sender, EventArgs e) { using (var ds = new DAL()) { var stratum = new PlotStratum() { DAL = ds, Code = "1", Method = "something" }; var unit = new CuttingUnit() { DAL = ds, Code = "1" }; ds.Insert(unit, OnConflictOption.Default); ds.Insert(stratum, OnConflictOption.Default); stratum.PopulatePlots(unit.CuttingUnit_CN.Value); var plot = new Plot() { Stratum = stratum }; using (var view = new FormPlotInfo()) { view.ShowDialog(plot, stratum, false); } } }
//public int? ShowNumericValueInput(int? min, int? max, int? initialValue, bool acceptNullInput) //{ // this.NumPadDialog.ShowDialog(min, max, initialValue, acceptNullInput); // return this.NumPadDialog.UserEnteredValue; //} public DialogResult ShowPlotInfo(PlotVM plot, PlotStratum stratum, bool isNewPlot) { System.Diagnostics.Debug.Assert(plot != null); System.Diagnostics.Debug.Assert(stratum != null); if (stratum.Is3PPNT && isNewPlot) { using (var view = new Form3PPNTPlotInfo(this)) { #if !NetCF view.Owner = this._dataEntryView; view.StartPosition = FormStartPosition.CenterParent; #endif return view.ShowDialog(plot, stratum, isNewPlot); } } else { using (var view = new FormPlotInfo()) { #if !NetCF view.Owner = this._dataEntryView; view.StartPosition = FormStartPosition.CenterParent; #endif return view.ShowDialog(plot, stratum, isNewPlot); } } }
private void _plotInfo_BTN_Click(object sender, EventArgs e) { var stratum = new PlotStratum(); var plot = new PlotVM() { Stratum = stratum }; using (var view = new FormPlotInfo()) { view.ShowDialog(plot, stratum, false); } }