private void ItemClickChangeStatus(object sender, ItemClickEventArgs e)
        {
            HBA hba = e.ClickedItem as HBA;

            hba.toggleInOut();
            //TxtBox_TEST.Text = "当前状态为:" + hba.InOutInt + ";" ;
        }
예제 #2
0
파일: raid0.cs 프로젝트: hutoroff/raidModel
        double arrayCapacity; //amount of disk space for all disks in array

        #endregion Fields

        #region Constructors

        public raid0(disk dType)
        {
            array = new HBA();
            for (int i = 0; i < minHDD; i++)
            {
                array.addDisk(dType);
                arrayCapacity += dType.getSize();
            }
        }
예제 #3
0
파일: raid5.cs 프로젝트: hutoroff/raidModel
        double arrayCapacity; //amount of disk space for all disks in array

        #endregion Fields

        #region Constructors

        public raid5(disk dType)
        {
            array = new HBA();
            for (int i = 0; i < minHDD; i++)
            {
                addDisk(dType);
                arrayCapacity += dType.getSize();
            }
            arrayCapacity = (array.Count - 1) * array.getDisk(0).getSize();
        }
        /// <summary>
        /// Invoked when this page is about to be displayed in a Frame.
        /// </summary>
        /// <param name="e">Event data that describes how this page was reached.
        /// This parameter is typically used to configure the page.</param>
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            Text_SetTmp.Text = "21℃";
            //chart 绑定实时电价
            ObservableCollection <ElectricPrice> collecion = new ObservableCollection <ElectricPrice>();

            double[] prices = Constants.E_PRICES;
            int      index  = 0;

            foreach (double price in prices)
            {
                ElectricPrice tempEPriceObj = new ElectricPrice();
                tempEPriceObj.Number = index;
                index++;
                tempEPriceObj.Price = price;
                collecion.Add(tempEPriceObj);
            }
            chartEprice.DataSource = collecion;

            ObservableCollection <HBA> collecion2 = new ObservableCollection <HBA>();

            for (int i = 0; i < 24; i++)
            {
                HBA tempHBA = new HBA();
                int temphba = ACScheduleAlgorithm.HumanBehavior[i];
                if (temphba == 1)
                {
                    tempHBA.IsInHome = HBA.IN_HOME;
                }
                else
                {
                    tempHBA.IsInHome = HBA.OUT_HOME;
                }
                collecion2.Add(tempHBA);
            }
            listHBAs.ItemsSource = collecion2;
            //foreach (var item in array)
            //{
            //    if (isFirstIn)
            //    {
            //        if (item.D != null)
            //            chart1.CategoryValueMemberPath = "D";
            //        else
            //            chart1.CategoryValueMemberPath = "H";
            //        isFirstIn = false;
            //    }
            //    collecion.Add(item);
            //}

            //chart1.DataSource = collecion;
        }
예제 #5
0
파일: raid5.cs 프로젝트: hutoroff/raidModel
 public raid5()
 {
     array = new HBA();
     arrayCapacity = 0;
 }