コード例 #1
0
ファイル: AddLap.cs プロジェクト: x-line/xline.stopwatch
        public static DialogResult AddLapModal(Timer t, System.Windows.Forms.IWin32Window owner)
        {
            if (t == null)
            {
                return(DialogResult.Cancel);
            }
            AddLap a = new AddLap();

            a.timer = t;
            a.cboTask.Items.Clear();
            a.cboTask.Items.AddRange(t.GetTaskList().ToArray());
            return(a.ShowDialog(owner));
        }
コード例 #2
0
ファイル: Stopwatch.cs プロジェクト: x-line/xline.stopwatch
        private void btnAddLap_Click(object sender, System.EventArgs e)
        {
            Timer t = this.GetSelectedTimer();

            if (t == null)
            {
                return;
            }
            DialogResult dr = AddLap.AddLapModal(t, this);

            if (dr != DialogResult.OK)
            {
                return;
            }
            timers.Save();
        }