Exemple #1
0
 private void ApplyLayout(LayoutInfo layout)
 {
     this.RemoveAllTabs();
     for (int index = 0; index < layout.Tabs.Length; ++index)
     {
         TabLayoutInfo tabLayoutInfo = layout.Tabs[index];
         this.InsertTab(index, tabLayoutInfo.TabName);
         ((StrategyMonitorControl)this.tabControl.TabPages[index].Tag).SetColumnLayout(tabLayoutInfo.StrategyColumns, tabLayoutInfo.InstrumentColumns);
     }
 }
Exemple #2
0
        private LayoutInfo GetLayout()
        {
            LayoutInfo layoutInfo = new LayoutInfo();

            layoutInfo.Tabs = new TabLayoutInfo[this.tabControl.TabCount];
            for (int index = 0; index < this.tabControl.TabCount; ++index)
            {
                System.Windows.Forms.TabPage tabPage = this.tabControl.TabPages[index];
                TabLayoutInfo tabLayoutInfo          = new TabLayoutInfo();
                tabLayoutInfo.TabName = tabPage.Text;
                StrategyMonitorControl strategyMonitorControl = (StrategyMonitorControl)tabPage.Tag;
                tabLayoutInfo.StrategyColumns   = strategyMonitorControl.GetStrategyColumnLayout();
                tabLayoutInfo.InstrumentColumns = strategyMonitorControl.GetInstrumentColumnLayout();
                layoutInfo.Tabs[index]          = tabLayoutInfo;
            }
            return(layoutInfo);
        }
 private LayoutInfo GetLayout()
 {
   LayoutInfo layoutInfo = new LayoutInfo();
   layoutInfo.Tabs = new TabLayoutInfo[this.tabControl.TabCount];
   for (int index = 0; index < this.tabControl.TabCount; ++index)
   {
     System.Windows.Forms.TabPage tabPage = this.tabControl.TabPages[index];
     TabLayoutInfo tabLayoutInfo = new TabLayoutInfo();
     tabLayoutInfo.TabName = tabPage.Text;
     StrategyMonitorControl strategyMonitorControl = (StrategyMonitorControl) tabPage.Tag;
     tabLayoutInfo.StrategyColumns = strategyMonitorControl.GetStrategyColumnLayout();
     tabLayoutInfo.InstrumentColumns = strategyMonitorControl.GetInstrumentColumnLayout();
     layoutInfo.Tabs[index] = tabLayoutInfo;
   }
   return layoutInfo;
 }