コード例 #1
0
ファイル: Index.cs プロジェクト: bogy159/TaskManager
        private void findUserToolStripMenuItem_Click(object sender, EventArgs e)
        {
            label4.Hide();
            ListTimes newMDIChild = new ListTimes();

            newMDIChild.MdiParent = this;
            newMDIChild.Show();
        }
コード例 #2
0
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            TimeSpent item    = new TimeSpent();
            NewTime   newTime = new NewTime(item);

            if (newTime.ShowDialog() == DialogResult.OK)
            {
                ListTimes create = new ListTimes();
                create.NewTime(item);
                SetTimeSources();
            }
        }
コード例 #3
0
        private void toolStripButton2_Click(object sender, EventArgs e)
        {
            Int32 selectedRowCount = dataGridView2.Rows.GetRowCount(DataGridViewElementStates.Selected);

            if (selectedRowCount > 0)
            {
                DialogResult result = MessageBox.Show("Are you sure you want to delete this item", "Delete item", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (result == DialogResult.Yes)
                {
                    TimeSpent time = (TimeSpent)timeBindingSource.Current;
                    ListTimes del  = new ListTimes();
                    del.DeleteTime(time);
                    SetTimeSources();
                }
            }
        }