Пример #1
0
        /// <summary>
        /// Create new activity
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btNewAct_Click(object sender, EventArgs e)
        {
            Activiteit pAct;

            pAct         = new Activiteit();
            pAct.sGUID   = Guid.NewGuid().ToString();
            pAct.m_sDesc = "Nieuwe activiteit";
            pAct.SetTimespent(0L);

            TabPage tpNew = new TabPage(pAct.m_sDesc);

            tpNew.ToolTipText = pAct.m_sDesc;
            tcActLijst.TabPages.Add(tpNew);

            tpNew.Tag = pAct;
            // tpNew.ContextMenuStrip = cmActiviteit;
            // tcActLijst.ContextMenuStrip = cmActiviteit;

            TreeView tvNew = new TreeView();

            tpNew.Controls.Add(tvNew);

            resizeInner();
            btPausestart.Enabled = true;

            tvNew.CheckBoxes      = true;
            tvNew.LabelEdit       = true;
            tvNew.AfterLabelEdit += new System.Windows.Forms.NodeLabelEditEventHandler(this.tvTaskLijst_RenameAct);
            tvNew.MouseDown      += new System.Windows.Forms.MouseEventHandler(this.tvActLijst_MouseDown);

            TreeNode tnNew = new TreeNode("*");

            tvNew.Nodes.Add(tnNew);

            tnNew.BeginEdit();
        }
Пример #2
0
 private void button1_Click(object sender, EventArgs e)
 {
     m_actCurr.SetTimespent(dateTimePicker1.Value, getTicks());
     m_actCurr.totalAvailable = getTicksAvail();
     button1.Enabled          = false;
 }