Пример #1
0
        private void Journal_EditProtocol()
        {
            bool found = false;

            for (int i = 2; i < tabControl.TabCount; i++)
            {
                if ((int)tabControl.TabPages[i].Tag == InspectionID)
                {
                    found = true;
                    tabControl.SelectedIndex = i;
                }
            }

            if (!found)
            {
                ProtocolTabPage newTP = new ProtocolTabPage(this, InspectionID);
                tabControl.TabPages.Add(newTP.tabPage);
                tabControl.SelectedTab = newTP.tabPage;
            }
        }
Пример #2
0
        private void MMItem_NewProto_Click(object sender, EventArgs e)
        {
            ProtocolTabPage x = new ProtocolTabPage(this, 0);

            tabControl.TabPages.Add(x.tabPage);
        }