示例#1
0
        private void aplEdit3_Click(object sender, EventArgs e)
        {
            int i = 0;
            int j = 0;

            for (i = 0; i < treeView1.Nodes.Count; i++)
            {
                if (treeView1.Nodes[i].Text == treeView1.SelectedNode.Text)
                {
                    InboxClass inboxClass = new InboxClass(treeView1.Nodes[i].Text);
                    inboxClass.nameItem         = editFld3.Text;
                    treeView1.SelectedNode.Text = inboxClass.nameItem;
                    editFld3.Clear();
                }
                else
                {
                    for (j = 0; j < treeView1.Nodes[i].Nodes.Count; j++)
                    {
                        if (treeView1.Nodes[i].Nodes[j].Text == treeView1.SelectedNode.Text)
                        {
                            InboxClass inboxClass = new InboxClass(treeView1.Nodes[i].Nodes[j].Text);
                            inboxClass.nameItem         = editFld3.Text;
                            treeView1.SelectedNode.Text = inboxClass.nameItem;
                            editFld3.Clear();
                        }
                    }
                }
            }
        }
示例#2
0
        private void EditApplBtn_Click(object sender, EventArgs e)
        {
            int ind = 0;

            for (int i = 0; i < dataGridView1.RowCount; i++)
            {
                if (dataGridView1.Rows[i].Cells[0].Value.ToString() == dataGridView1.CurrentRow.ToString())
                {
                    ind = i;
                }
            }

            InboxClass inboxClass = new InboxClass(dataGridView1.CurrentRow.Cells[0].Value.ToString());

            inboxClass.nameItem = editBox.Text;
            dataGridView1.CurrentRow.Cells[0].Value = inboxClass.nameItem;
            editBox.Clear();
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (comboBox1.Text == "Task")
            {
                InboxClass inboxClass = new InboxClass(InputField.Text);
                AddInfoInboxGrid(InputField.Text);
                ReadyInbox.Add(item: inboxClass);
            }

            if (comboBox1.Text == "Today")
            {
                EventClass eventClass = new EventClass(InputField.Text, DateTime.Now.ToShortDateString(), "--");
                AddInfoTodayGrid(InputField.Text, DateTime.Now.ToShortDateString(), "--");
                ReadyEvent.Add(item: eventClass);
            }

            if (comboBox1.Text == "Event")
            {
                dateBx.Mask = "99-99-9999";
                EventClass eventClass = new EventClass(InputField.Text, "--", "--");
                AddInfoTodayGrid(InputField.Text, dateBx.Text.ToString(), timeBx.Text.ToString());
                ReadyEvent.Add(item: eventClass);
            }

            if (comboBox1.Text == "Project")
            {
                TaskCL taskCL = new TaskCL("none", "--", "--", "--");
                ProjCl projCl = new ProjCl(InputField.Text, 0, taskCL);
                AddInfoProject(InputField.Text);
                ReadyProject.Add(item: projCl);
            }
            if (comboBox1.Text == "Sub Task")
            {
                InboxClass inboxClass = new InboxClass(InputField.Text);
                SubProj    subProj    = new SubProj(projBox.Text, inboxClass);
                ReadySub.Add(item: subProj);
                AddSubTask(InputField.Text);
            }
            InputField.Clear();
            projBox.Items.Clear();
        }
示例#4
0
 public SubProj(string prname, InboxClass subtask)
 {
     this.prname  = prname;
     this.subtask = subtask;
 }