Ejemplo n.º 1
0
        private void btnDeSelect_Click(object sender, EventArgs e)
        {
            UITabPage selectedTab = this.xTabControl1.SelectedTab;
            TreeView  treeView    = this.FindTreeView(selectedTab);

            if (treeView != null)
            {
                foreach (XTreeNode treeNode in treeView.Nodes)
                {
                    treeNode.Checked = !treeNode.Checked;
                }
            }
        }
Ejemplo n.º 2
0
        private TreeView FindTreeView(UITabPage selectedTab)
        {
            if (selectedTab != null)
            {
                if (selectedTab.Controls.Count > 0)
                {
                    TreeView treeView = selectedTab.Controls[0] as TreeView;
                    if (treeView != null)
                    {
                        return(treeView);
                    }
                }
            }

            return(null);
        }
Ejemplo n.º 3
0
        private void CodeEditorAdded(NuGenCodeEditorForm displayer)
        {
            UITabPage newPage = new UITabPage();

            newPage.Name = displayer.CodeObject.HeaderText;
            newPage.Text = displayer.CodeObject.HeaderText;
            newPage.Controls.Add(displayer);
            displayer.Dock = DockStyle.Fill;
            uiTab1.TabPages.Add(newPage);
            uiTab1.SelectedTab = newPage;

            if (SwitchTabs != null)
            {
                SwitchTabs();
            }
            //UITabPage test = new UITabPage("Test");
            //uiTab1.TabPages.Add(test);
        }
Ejemplo n.º 4
0
        public ScriptDocument NewDocument()
        {
            UITabPage        page   = new UITabPage("untitled.boo*");
            ScintillaControl editor = new ScintillaControl();

            editor.SmartIndentingEnabled = true;
            editor.Configuration         = config;
            editor.ConfigurationLanguage = "cpp";
            editor.Dock = DockStyle.Fill;

            ScriptDocument doc = new ScriptDocument(editor);

            openScripts.Add(doc);

            page.Controls.Add(editor);
            uiTab1.TabPages.Add(page);

            return(doc);
        }
Ejemplo n.º 5
0
        private void OpenChild(EventLog log)
        {
            this.Enabled = false;

            EventLogViewer viewer = FindChildForLog(log);

            if (viewer != null)
            {
                viewer.BringToFront();
                viewer.Focus();
            }
            else
            {
                EventLogViewer form = null;

                try
                {
                    form = new EventLogViewer(log);

                    if (!form.IsDisposed)
                    {
                        UITabPage tab = new UITabPage(log.LogDisplayName);
                        tab.Controls.Add(form);
                        form.Dock = DockStyle.Fill;
                        this.uiTab1.TabPages.Add(tab);
                        form.Show();

                        form.BringToFront();
                        form.Focus();
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show("Failed to open Event Log : " + ex.Message, "Smoothy", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }

            this.Enabled = true;
        }
Ejemplo n.º 6
0
        private void PerformAction(action vAction)
        {
            try
            {
                UITabPage selectedTab = tabGeneralList.SelectedTab;
                switch (selectedTab.Name)
                {
                case "tabTestType":
                    LoadFormTestTypeAU(vAction);
                    break;

                case "tabManufacturer":
                    ActionManufacturer(vAction);
                    break;

                case "tabDevice":
                    ActionDevice(vAction);
                    break;

                case "tabObject":
                    ActionObject(vAction);
                    break;

                case "tabDepartment":
                    ActionDepartment(vAction);
                    break;

                case "tabDoctor":
                    ActionDoctor(vAction);
                    break;
                }
            }
            catch (Exception ex)
            {
                Utility.ShowMsg(ex.Message);
            }
        }
Ejemplo n.º 7
0
        private void AddTabbedForm(String name, Form form)
        {
            int nPages = 0;

            foreach (UITabPage pg in uiTab2.TabPages)
            {
                if (pg.Text.StartsWith(name))
                {
                    nPages++;
                }
            }

            if (nPages > 0)
            {
                name = name + " View - " + (nPages + 1).ToString();
            }

            if (tabToFormMap.ContainsKey(name))
            {
                tabToFormMap[name].Dispose();
                tabToFormMap.Remove(name);
            }

            tabToFormMap[name] = form;

            //form.Show();
            UITabPage page = new UITabPage(name);

            Control[] ctrls = new Control[tabToFormMap[name].Controls.Count];
            tabToFormMap[name].Controls.CopyTo(ctrls, 0);

            page.Controls.AddRange(ctrls);

            uiTab2.TabPages.Add(page);
            uiTab2.SelectedTab = page;
        }
        private void AddTabbedForm(String name, Form form)
        {
            int nPages = 0;

            foreach (UITabPage pg in uiTab2.TabPages)
            {
                if (pg.Text.StartsWith(name))
                {
                    nPages++;
                }
            }

            if (nPages > 0)
            {
                name = name +" View - " + (nPages + 1).ToString();
            }

            if (tabToFormMap.ContainsKey(name))
            {
                tabToFormMap[name].Dispose();
                tabToFormMap.Remove(name);
            }

            tabToFormMap[name] = form;

            //form.Show();
            UITabPage page = new UITabPage(name);            
            Control[] ctrls = new Control[tabToFormMap[name].Controls.Count];
            tabToFormMap[name].Controls.CopyTo(ctrls, 0);

            page.Controls.AddRange(ctrls);

            uiTab2.TabPages.Add(page);
            uiTab2.SelectedTab = page;
        }
		private void OpenChild(EventLog log)
		{
			this.Enabled = false;

			EventLogViewer viewer = FindChildForLog(log);

			if (viewer != null)
			{
				viewer.BringToFront();
				viewer.Focus();
			}
			else
			{
				EventLogViewer form = null;

				try
				{
					form = new EventLogViewer(log);

					if (!form.IsDisposed)
					{
                        UITabPage tab = new UITabPage(log.LogDisplayName);
                        tab.Controls.Add(form);
                        form.Dock = DockStyle.Fill;
                        this.uiTab1.TabPages.Add(tab);						
						form.Show();

						form.BringToFront();
						form.Focus();
					}
				}
				catch (Exception ex)
				{
					MessageBox.Show("Failed to open Event Log : " + ex.Message, "Smoothy", MessageBoxButtons.OK, MessageBoxIcon.Error);
				}
			}

			this.Enabled = true;
		}