예제 #1
0
        private void OnClick(object sender, MouseEventArgs e)
        {
            if (e.Button == MouseButtons.Left && !this.tabControl1.Enabled)
            {
                if (e.X > tabControl1.Location.X && e.X < tabControl1.Location.X + tabControl1.Width &&
                    e.Y > tabControl1.Location.Y && e.Y < tabControl1.Location.Y + tabControl1.Height)
                {
                    PQdsAddCustom subForm = new PQdsAddCustom((int)this.m_channel.AssetID, this.m_evt.ID);
                    subForm.ShowDialog();

                    this.UpdateCustomFields();
                    return;
                }
            }
        }
예제 #2
0
        private void CreateNewTab(object sender, EventArgs e)
        {
            if (tabControl1.SelectedTab == null)
            {
                return;
            }

            string activeTab = tabControl1.SelectedTab.Text;

            if (activeTab != "Add New")
            {
                return;
            }

            PQdsAddCustom subForm = new PQdsAddCustom((int)this.m_channel.AssetID, this.m_evt.ID);

            subForm.ShowDialog();

            this.UpdateCustomFields();
        }