Exemplo n.º 1
0
        /// <summary>
        /// 添加事件点击事件
        /// -- by lxl
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            if (myAddCustomEventForm == null || myAddCustomEventForm.IsDisposed)
            {
                myAddCustomEventForm = new addCustomEventForm(this.myPlaybackForm);
            }

            //置状态为添加事件
            myAddCustomEventForm.IsAddEvent();

            //添加自定义事件的form弹出,并且为关闭前不允许操作该form
            myAddCustomEventForm.ShowDialog();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 编辑按钮点击事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnEdit_Click(object sender, EventArgs e)
        {
            //判定是否有选择一个事件
            if (this.eventList.SelectedItems.Count <= 0)
            {
                MessageBox.Show("请选择一个事件进行编辑");
                return;
            }

            if (myAddCustomEventForm == null || myAddCustomEventForm.IsDisposed)
            {
                myAddCustomEventForm = new addCustomEventForm(this.myPlaybackForm, eventList.SelectedIndices[0]);
            }

            //置状态为编辑事件
            myAddCustomEventForm.IsEditEvent(int.Parse(this.eventList.SelectedItems[0].SubItems[3].Name), this.eventList.SelectedItems[0].SubItems[0].Text);

            //添加自定义事件的form弹出,并且为关闭前不允许操作该form
            myAddCustomEventForm.ShowDialog();
        }