예제 #1
0
 public RUSAPage()
 {
     InitializeComponent();
     context = new RUSADomainContext();
     cntrlRUSA.init(context);
     chartWindow = new ChartWindow();
 }
예제 #2
0
        public void init(RUSADomainContext context)
        {
            this.context = context;
            CurrentData = new RUSAData();
            CurrentData.GaAvail = new List<GAParams>();
            for (int ga=1; ga <= 10; ga++) {
                GAParams p=new GAParams();
                p.GaNumber = ga;
                p.Avail = true;
                CurrentData.GaAvail.Add(p);
            }
            CurrentData.Power = 300;
            CurrentData.Napor = 21;

            items=new Dictionary<int, TabItem>();
            gridControls=new Dictionary<int, RUSAGridControl>();

            items.Add(1, tab1);
            items.Add(2, tab2);
            items.Add(3, tab3);
            items.Add(4, tab4);
            items.Add(5, tab5);
            items.Add(6, tab6);
            items.Add(7, tab7);
            items.Add(8, tab8);
            items.Add(9, tab9);
            items.Add(10, tab10);

            gridControls.Add(1, grid1);
            gridControls.Add(2, grid2);
            gridControls.Add(3, grid3);
            gridControls.Add(4, grid4);
            gridControls.Add(5, grid5);
            gridControls.Add(6, grid6);
            gridControls.Add(7, grid7);
            gridControls.Add(8, grid8);
            gridControls.Add(9, grid9);
            gridControls.Add(10, grid10);
        }