示例#1
0
        public Controller(int FanNum, TimeSpan updateSpan)
        {
            Update_Interval = (int)updateSpan.TotalMilliseconds;
            for (int i = 1; i <= FanNum; i++)
            {
                tables.AddLast(FanTable.getFanTable(i));
            }
            ShouldUpdate        = SingleInstanceManager.Instance.cfg.FanMode == 4 ? true : false;
            Control_Thread      = new Thread(new ThreadStart(update));
            Control_Thread.Name = "Control_Thread";
            Control_Thread.Start();

            SingleInstanceManager.Instance.ec.RaiseCustomEvent += onEC_Event;
        }
示例#2
0
        public static FanTable getFanTable(int FanNum)
        {
            FanTable table;

            lock (tables)
            {
                tables.TryGetValue(FanNum, out table);
                if (table == null)
                {
                    table = new FanTable(FanNum);
                    tables.Add(FanNum, table);
                }
            }
            return(table);
        }
示例#3
0
 public FanTableUI(ChartBase chartBase, int FanNum)
 {
     chart    = chartBase;
     fanTable = FanTable.getFanTable(FanNum);
     InitFanTable();
 }