Initialize() 공개 메소드

public Initialize ( ) : void
리턴 void
예제 #1
0
        public void AddTab(Control Panel, string tabTitle, bool SwitchTo = false)
        {
            if (Panel != null)
            {
                if (!Panel.Initialized)
                {
                    Panel.Initialize();
                }
                Panel.Parent = this;
                _pagelist.Add(Panel);
            }
            var bar = new TabBar(fnt, fntNoShadow)
            {
                Parent = this,
                Top    = 0,
                Left   = _tablist.Count * 120,
                Right  = _tablist.Count * 120,
                Margin = TabMargin,
            };

            bar.Initialize();
            bar.Parent = this;
            bar.TabID  = _tablist.Count;
            bar.Title  = tabTitle;
            bar.Click += SwitchTab;
            foreach (TabBar t in _tablist)
            {
                t.Selected = false;
            }
            _tablist.Add(bar);
            SwitchTab(_tablist.Count - 1);
        }
예제 #2
0
 public void AddTab(Control Panel, string tabTitle, bool SwitchTo = false)
 {
     if(Panel !=null)
     {
         if (!Panel.Initialized)
             Panel.Initialize();
         Panel.Parent = this;
         _pagelist.Add(Panel);
     }
     var bar = new TabBar(fnt,fntNoShadow)
     {
         Parent=this,
         Top=0,
         Left = _tablist.Count * 120,
         Right= _tablist.Count * 120,
         Margin = TabMargin,
     };
     bar.Initialize();
     bar.Parent = this;
     bar.TabID = _tablist.Count;
     bar.Title = tabTitle;
     bar.Click += SwitchTab;
     foreach (TabBar t in _tablist)
     {
         t.Selected = false;
     }
     _tablist.Add(bar);
     SwitchTab(_tablist.Count - 1);
 }