コード例 #1
0
 private void listView1_DoubleClick(object sender, EventArgs e)
 {
     ListView.SelectedListViewItemCollection items = listView1.SelectedItems;
     if (items.Count > 0)
     {
         InsertTask dlg = new InsertTask(sm, (int)items[0].Tag);
         if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
         {
             LoadTasks();
         }
     }
 }
コード例 #2
0
        private void изменитьToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ListView.SelectedListViewItemCollection items = listView1.SelectedItems;
            bool UpdateAfterEdit = false;
            foreach (ListViewItem item in items)
            {
                InsertTask dlg = new InsertTask(sm, (int)item.Tag);
                if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
                {
                    UpdateAfterEdit = true;
                }
            }

            if (UpdateAfterEdit) LoadTasks();
        }
コード例 #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     InsertTask dlg = new InsertTask(sm);
     if (dlg.ShowDialog(this) == System.Windows.Forms.DialogResult.OK)
     {
         LoadTasks();
     }
 }