Пример #1
0
 public void ShowHideAdvanced(bool setTo)
 {
     if (setTo)
     {
         tsAdvanced.Checked = true;
         advancedModeToolStripMenuItem.Checked = true;
         SuspendLayout();
         if (!tabPanel.Controls.Contains(tbTestCommands))
         {
             TabControls.Add(tbTestCommands);
         }
         if (!tabPanel.Controls.Contains(LogOutput))
         {
             TabControls.Add(LogOutput);
         }
         ResumeLayout();
     }
     else
     {
         tsAdvanced.Checked = false;
         advancedModeToolStripMenuItem.Checked = false;
         SuspendLayout();
         tabPanel.Controls.Remove(tbTestCommands);
         tabPanel.Controls.Remove(LogOutput);
         ResumeLayout();
     }
 }
Пример #2
0
 private void reload_Click(object sender, EventArgs e)
 {
     resetTab_Click(null, EventArgs.Empty);
     TabControls.ResetColumns();
     loadStructBtn_Click(null, EventArgs.Empty);
     readRDB();
 }
Пример #3
0
 private void GUI_ProgressMaxChanged(object sender, ProgressMaxArgs e)
 {
     if (InvokeRequired)
     {
         this.Invoke(new MethodInvoker(delegate { TabControls.SetProgressMaximum(e.Maximum); }));
     }
     else
     {
         TabControls.SetProgressMaximum(e.Maximum);
     }
 }
Пример #4
0
 private void GUI_ProgressValueChanged(object sender, ProgressValueArgs e)
 {
     if (InvokeRequired)
     {
         this.Invoke(new MethodInvoker(delegate { TabControls.SetProgressValue(e.Value); }));
     }
     else
     {
         TabControls.SetProgressValue(e.Value);
     }
 }
Пример #5
0
 private async void loadStructure()
 {
     try
     {
         rCore.Initialize(StructureManager.Path(TabControls.StructureListValue));
         TabControls.SetSearchColumns(await Task <List <string> > .Factory.StartNew(() => getColumns()));
         tabs.TabPages[tabIdx].Text = string.Format("<{0}>", TabControls.StructureListValue);
         TabControls.SetStructBtnText("Loaded");
     }
     catch (SyntaxErrorException ex) { LuaException.Print(ex.DecoratedMessage, TabControls.StructureListValue); }
     catch (Exception ex) { MessageBox.Show(string.Format("An exception has occured!\n\nException Message:\n\n{0}", ex.Message), "Exception", MessageBoxButtons.OK, MessageBoxIcon.Error); }
 }
Пример #6
0
        TabControls InitPage(TabPage page)
        {
            if (page == null)
            {
                return(null);
            }
            ////ListView lv = new ListView();
            ////lv.GridLines = true;
            ////lv.Dock = DockStyle.Fill;
            ////lv.Show();
            ////page.Controls.Add(lv);
            TabControls  tcs = new TabControls();
            PropertyGrid pg  = new PropertyGrid();

            pg.Dock = DockStyle.Fill;
            page.Controls.Add(pg);



            tcs.propGrid = pg;

            return(tcs);
        }
Пример #7
0
        void refreshTab(string roomName, object data)
        {
            try
            {
                ShareLotteryPlanClass slpc = data as ShareLotteryPlanClass;
                TabPage page = null;

                if (tabControl1.TabPages.ContainsKey(roomName))
                {
                    tabControl1.TabPages.Add(roomName);
                }
                page = tabControl1.TabPages[roomName];
                if (!AllTabControls.ContainsKey(roomName))
                {
                    AllTabControls.Add(roomName, InitPage(page));
                }
                TabControls tabs = AllTabControls[roomName];
                tabs.propGrid.SelectedObject = slpc;
            }
            catch (Exception e)
            {
            }
        }
Пример #8
0
 public void UpdateProgressValue(int val)
 {
     this.Invoke(new MethodInvoker(delegate { TabControls.SetProgressValue(val); }));
 }
Пример #9
0
 public void UpdateProgressMaximum(int max)
 {
     this.Invoke(new MethodInvoker(delegate { TabControls.SetProgressMaximum(max); }));
 }
Пример #10
0
 private void resetTab_Click(object sender, EventArgs e)
 {
     TabControls.Reset();
     rCore.ClearData();
 }