Пример #1
0
            //public override void ClearStates()
            //{
            //    base.ClearStates();
            //}

            private void addPanels()
            {
                try
                {
                    m_ar_panels = new PanelSourceData.PanelGetDate[INDEX_SOURCE_GETDATE.Length];

                    for (int i = 0; i < INDEX_SOURCE_GETDATE.Length; i++)
                    {
                        m_ar_panels[i] = new PanelSourceData.PanelGetDate();
                    }

                    m_ar_panels[0].DelegateEtalonGetDate = new HClassLibrary.DelegateDateFunc(recievedEtalonDate);
                    //Для панелей с любыми серверами БД
                    for (int i = 0; i < m_ar_panels.Length; i++)
                    {
                        EvtGetDate    += new HClassLibrary.DelegateObjectFunc(m_ar_panels[i].OnEvtGetDate);
                        EvtEtalonDate += new HClassLibrary.DelegateDateFunc(m_ar_panels[i].OnEvtEtalonDate);
                    }

                    ((PanelSourceData)m_panel).Invoke(((PanelSourceData)m_panel).m_delAddPan, new object[] { m_ar_panels });
                }
                catch (Exception e)
                {
                }
            }
Пример #2
0
        /// <summary>
        /// Функция создания новых панелей
        /// </summary>
        /// <param name="num"></param>
        private void Create_arPanel(object num)
        {
            m_arPanels[(int)num] = new PanelGetDate();

            EvtGetDate += new HClassLibrary.DelegateObjectFunc(m_arPanels[(int)num].OnEvtGetDate);
            //EvtEtalonDate += new HClassLibrary.DelegateDateFunc(m_arPanels[(int)num].OnEvtEtalonDate);
        }
Пример #3
0
        //PanelGetDate[] m_arPanels;

        /// <summary>
        /// Обязательный метод для поддержки конструктора - не изменяйте;;
        /// содержимое данного метода при помощи редактора кода.
        /// </summary>
        private void InitializeComponent()
        {
            components = new System.ComponentModel.Container();

            int i = -1;

            m_arPanels = new PanelGetDate[INDEX_SOURCE_GETDATE.Length];
            for (i = 0; i < m_arPanels.Length; i++)
            {
                m_arPanels [i] = new PanelGetDate();
            }

            // m_arPanels = new PanelGetDate[INDEX_SOURCE_GETDATE.Length];
            //Create_Panel();

            //Только для панели с эталонным серверои БД
            m_arPanels[0].DelegateEtalonGetDate = new HClassLibrary.DelegateDateFunc(recievedEtalonDate);
            //Для панелей с любыми серверами БД
            for (i = 0; i < m_arPanels.Length; i++)
            {
                EvtGetDate    += new HClassLibrary.DelegateObjectFunc(m_arPanels[i].OnEvtGetDate);
                EvtEtalonDate += new HClassLibrary.DelegateDateFunc(m_arPanels[i].OnEvtEtalonDate);
            }

            this.SuspendLayout();

            this.Dock = DockStyle.Fill;
            initializeLayoutStyle(3, 7);

            //this.Invoke(new Action(() => this.Controls.Add(m_arPanels[0], 0, 0)));

            this.Controls.Add(m_arPanels[0], 0, 0);

            int indx = -1
            , col    = -1
            , row    = -1;

            for (i = 1; i < m_arPanels.Length; i++)
            {
                indx = i;
                //if (! (indx < this.RowCount))
                indx += (int)(indx / this.RowCount);
                //else ;

                col = (int)(indx / this.RowCount);
                row = indx % (this.RowCount - 0);
                if (row == 0)
                {
                    row = 1;
                }
                else
                {
                    ;
                }
                this.Controls.Add(m_arPanels[i], col, row);
            }

            this.ResumeLayout();
        }