Example #1
0
File: Panel.cs Project: slawer/sgt
        protected NumericTable _table = null; // графический элемент на котором осуществляется

        #endregion Fields

        #region Constructors

        /// <summary>
        /// Инициализирует новый экземпляр класса
        /// </summary>
        /// <param name="table"></param>
        public Panel(NumericTable table)
        {
            if (table != null)
            {
                _table = table;

                _table.Resize += new EventHandler(_table_Resize);
                _table.Paint += new System.Windows.Forms.PaintEventHandler(_table_Paint);

                items = new List<PanelItem>();
                i_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

                rect = new BoundingRectangle();

                d_mutex = new Mutex();
                drawter = new GraphicDrawter(_table.CreateGraphics(), _table.ClientRectangle);
            }
        }
Example #2
0
        protected BoundingRectangle rect;               // область в которую отрисовывать параметры

        /// <summary>
        /// Инициализирует новый экземпляр класса
        /// </summary>
        /// <param name="table"></param>
        public Panel(NumericTable table)
        {
            if (table != null)
            {
                _table = table;

                _table.Resize += new EventHandler(_table_Resize);
                _table.Paint  += new System.Windows.Forms.PaintEventHandler(_table_Paint);

                items  = new List <PanelItem>();
                i_slim = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion);

                rect = new BoundingRectangle();

                d_mutex = new Mutex();
                drawter = new GraphicDrawter(_table.CreateGraphics(), _table.ClientRectangle);
            }
        }
Example #3
0
        public OptionsNumericForm(NumericTable nTable)
        {
            InitializeComponent();

            n_table = nTable;
        }
Example #4
0
        /// <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);
            }
        }
Example #5
0
        /// <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);
            }
        }
Example #6
0
        public OptionsNumericForm(NumericTable nTable)
        {
            InitializeComponent();

            n_table = nTable;
        }