/// <summary> /// Выполнить инициализацию панели /// </summary> /// <param name="_panel">Цифровая панель</param> /// <param name="_manager">Управляющий графическим компонентом</param> public void init(NumericTable.Panel _panel, GraphicManager _manager) { if (Interlocked.Read(ref initialized) == 0) { panel = _panel; manager = _manager; InitializeGraphicPanel(); InitializeNumericPanelItems(); manager.Update(); manager.UpdatePeriod = 1000; manager.Mode = GraphicComponent.DrawMode.Activ; Interlocked.Exchange(ref initialized, 1); } }
/// <summary> /// Выполнить инициализацию панели /// </summary> /// <param name="_panel">Цифровая панель</param> /// <param name="_manager">Управляющий графическим компонентом</param> public void init(NumericTable.Panel _panel, GraphicManager _manager_1, GraphicManager _manager_2, GraphicManager _manager_3) { if (Interlocked.Read(ref initialized) == 0) { n_panel = _panel; g_panel_1.GManager = _manager_1; g_panel_2.GManager = _manager_2; g_panel_3.GManager = _manager_3; DateTime now = DateTime.Now; g_panel_1.GManager.StartTime = now; g_panel_2.GManager.StartTime = now; g_panel_3.GManager.StartTime = now; g_panel_1.GManager.Orientation = Orientation.Vertical; g_panel_2.GManager.Orientation = Orientation.Vertical; g_panel_3.GManager.Orientation = Orientation.Vertical; InitializeGraphicPanel(); InitializeNumericPanelItems(); g_panel_1.GManager.OnDataNeed += new EventHandler(manager_OnDataNeed_1); g_panel_2.GManager.OnDataNeed += new EventHandler(manager_OnDataNeed_2); g_panel_3.GManager.OnDataNeed += new EventHandler(manager_OnDataNeed_3); g_panel_1.GManager.Update(); g_panel_2.GManager.Update(); g_panel_3.GManager.Update(); g_panel_1.GManager.UpdatePeriod = 1000; g_panel_1.GManager.Mode = DrawMode.Activ; g_panel_2.GManager.UpdatePeriod = 1000; g_panel_2.GManager.Mode = DrawMode.Activ; g_panel_3.GManager.UpdatePeriod = 1000; g_panel_3.GManager.Mode = DrawMode.Activ; Interlocked.Exchange(ref initialized, 1); } }