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; }
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); }
public FanTableUI(ChartBase chartBase, int FanNum) { chart = chartBase; fanTable = FanTable.getFanTable(FanNum); InitFanTable(); }