コード例 #1
0
        public bool ShowPlotInfo(IPlotDataService dataService, Plot 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(dataService))
                {
#if !NetCF
                    view.Owner         = this.TopLevelControl as Form;
                    view.StartPosition = FormStartPosition.CenterParent;
#endif
                    return(view.ShowDialog(plot, stratum, isNewPlot) == DialogResult.OK);
                }
            }
            else
            {
                using (var view = new FormPlotInfo())
                {
#if !NetCF
                    view.Owner         = this.TopLevelControl as Form;
                    view.StartPosition = FormStartPosition.CenterParent;
#endif
                    return(view.ShowDialog(plot, stratum, isNewPlot) == DialogResult.OK);
                }
            }
        }
コード例 #2
0
        //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);
                }
            }
        }