Exemplo n.º 1
0
        public static void Compile_Flowchart(System.Windows.Forms.TabControl.TabPageCollection tabpages)
        {
            _tpc = tabpages;
            Oval start = mainSubchart(tabpages).Start;

            foreach (Subchart sbchrt in allSubcharts(tabpages))
            {
                sbchrt.am_compiling = false;
            }
            mainSubchart(tabpages).am_compiling = true;
            Generate_IL gil = new Generate_IL("MyAssembly");

            try
            {
                Do_Compilation(start, gil, tabpages);
            }
            catch
            {
                foreach (Subchart sbchrt in allSubcharts(tabpages))
                {
                    sbchrt.am_compiling = false;
                }
                throw;
            }
            mainSubchart(tabpages).am_compiling = false;
        }
 /// <summary>
 /// TabControlに格納されているTabPagesを使用してこのクラスの新しいインスタンスを初期化します
 /// </summary>
 /// <param name="tabPageCollection">格納されていたTabPageCollection</param>
 public ThreadListViewData(System.Windows.Forms.TabControl.TabPageCollection tabPageCollection)
 {
     tabPages = new List <TabPage>();
     foreach (TabPage item in tabPageCollection)
     {
         tabPages.Add(item);
     }
     this.IsReadOnly = false;
 }
Exemplo n.º 3
0
 public static IEnumerable <ClassTabPage> allClasses(System.Windows.Forms.TabControl.TabPageCollection tabpages)
 {
     foreach (TabPage tp in tabpages)
     {
         if (tp is ClassTabPage)
         {
             yield return(tp as ClassTabPage);
         }
     }
 }
Exemplo n.º 4
0
 public static Subchart mainSubchart(System.Windows.Forms.TabControl.TabPageCollection tabpages)
 {
     if (Component.Current_Mode == Mode.Expert)
     {
         return((Subchart)tabpages[1]);
     }
     else
     {
         return((Subchart)tabpages[0]);
     }
 }
Exemplo n.º 5
0
 public static IEnumerable <Subchart> allSubcharts(System.Windows.Forms.TabControl.TabPageCollection tabpages)
 {
     foreach (TabPage tp in tabpages)
     {
         if (tp is Subchart)
         {
             yield return(tp as Subchart);
         }
         else if (tp is ClassTabPage)
         {
             ClassTabPage ctp = tp as ClassTabPage;
             for (int j = 0; j < ctp.tabControl1.TabPages.Count; j++)
             {
                 yield return(ctp.tabControl1.TabPages[j] as Subchart);
             }
         }
     }
 }
Exemplo n.º 6
0
        public override void PaintTabControl(PaintEventArgs pevent, TabControl tabControl)
        {
            Rectangle Bounds = tabControl.Bounds;
            int       Width  = tabControl.Width;
            int       Height = tabControl.Height;

            System.Windows.Forms.TabControl.TabPageCollection TabPages = tabControl.TabPages;
            Font Font = tabControl.Font;

            Pen outlinePen = new Pen(new SolidBrush(Color.FromArgb(255, 221, 221, 221)), 1);
            int tabHeight  = tabControl.ItemSize.Height;

            pevent.Graphics.FillRectangle(new SolidBrush(Color.White), new Rectangle(1, tabHeight + 1, Bounds.Width - 2, Bounds.Height - tabHeight - 2));
            pevent.Graphics.FillRectangle(new SolidBrush(Color.FromArgb(255, 241, 241, 241)), new Rectangle(0, 0, Bounds.Width, tabHeight));
            pevent.Graphics.DrawLine(outlinePen, new Point(1, tabHeight), new Point(Bounds.Width - 2, tabHeight));
            pevent.Graphics.DrawLine(outlinePen, new Point(1, Height - 1), new Point(Bounds.Width - 2, Height - 1));
            pevent.Graphics.DrawLine(outlinePen, new Point(0, tabHeight + 1), new Point(0, Height - 2));
            pevent.Graphics.DrawLine(outlinePen, new Point(Width - 1, tabHeight + 1), new Point(Width - 1, Height - 2));

            for (int index = 0; index < TabPages.Count; index++)
            {
                TabPage   tabPage = TabPages[index];
                Rectangle bounds  = tabControl.GetTabRect(index);

                if (tabControl.SelectedTab == tabPage)
                {
                    pevent.Graphics.FillRectangle(new SolidBrush(Color.White), new Rectangle(bounds.X, bounds.Y + 1, bounds.Width + 1, bounds.Height - 1));

                    pevent.Graphics.DrawLine(outlinePen, new Point(bounds.X, bounds.Top + 1), new Point(bounds.X, tabHeight - 1));
                    pevent.Graphics.DrawLine(outlinePen, new Point(bounds.Right, bounds.Top + 1), new Point(bounds.Right, tabHeight - 1));
                    pevent.Graphics.DrawLine(outlinePen, new Point(bounds.Left + 1, bounds.Top), new Point(bounds.Right - 1, bounds.Top));

                    string title = tabPage.Text;
                    SizeF  size  = pevent.Graphics.MeasureString(title, Font);
                    pevent.Graphics.DrawString(title, Font, new SolidBrush(Color.Black), bounds.X + bounds.Width / 2 - size.Width / 2, bounds.Y + bounds.Height / 2 - size.Height / 2);
                }
                else
                {
                    string title = tabPage.Text;
                    SizeF  size  = pevent.Graphics.MeasureString(title, Font);
                    pevent.Graphics.DrawString(title, Font, new SolidBrush(ThemeColor), bounds.X + bounds.Width / 2 - size.Width / 2, bounds.Y + bounds.Height / 2 - size.Height / 2);
                }
            }
        }
Exemplo n.º 7
0
 /// <summary>
 /// 去处空的tabpage
 /// </summary>
 private void InitTab()
 {
     System.Windows.Forms.TabControl.TabPageCollection TPCollection = this.neuTabControl1.TabPages;
     if (TPCollection == null || TPCollection.Count == 0)
     {
         return;
     }
     {
         for (int i = 0; i < TPCollection.Count; i++)
         {
             System.Windows.Forms.Control.ControlCollection CC = this.neuTabControl1.TabPages[i].Controls;
             {
                 if (CC == null || CC.Count == 0)
                 {
                     this.neuTabControl1.TabPages.RemoveAt(i);
                 }
             }
         }
     }
 }
Exemplo n.º 8
0
 public Info(Map map_l)
 {
     pages = ((System.Windows.Forms.TabControl)wizard.Controls["_oMainTabControl"]).TabPages;
     wizard.PageEnding += new EventHandler(Info_PageEnding);
     wizard.Controls["_oFinishBtn"].Click += new EventHandler(Info_Click);
     map = map_l;
 }