Beispiel #1
0
        public PointAllShowControl()
        {
            InitializeComponent();
            for (int i = 0; i < tag_page_Count; i++)
            {
                PointValueControl pvale = new PointValueControl(null, null, 0, null);
                pvale.Location = new Point(0, 20 + i * pvale.Height + i * 2);
                tag_PointValueControlList.Add(pvale);
                pvale.Visible = false;
                plpointMessage.Controls.Add(pvale);
            }
            for (int i = 0; i < 100; i++)
            {
                Button pvale = new Button();
                pvale.Size     = new Size(40, 20);
                pvale.Text     = i.ToString();
                pvale.Location = new Point(i * pvale.Width + i * 5, this.Size.Height - 60);
                pvale.Visible  = false;
                pvale.Click   += new System.EventHandler(this.Button_Page_Click);

                tag_ButtonPageList.Add(pvale);
                CBpointMessage.Controls.Add(pvale);
            }
            for (int i = 0; i < 40; i++)
            {
                Label pvale = new Label();
                pvale.Size     = new Size(40, 20);
                pvale.Location = new Point(245 + i * pvale.Width + i * 5, 0);
                pvale.Visible  = false;
                tag_LabelAxisTitleList.Add(pvale);
                plpointMessage.Controls.Add(pvale);
            }
        }
Beispiel #2
0
        public void Show()
        {
            int m = 0;
            int n = 0;
            PointValueControl pvale = null;

            if (tag_StationModule == null)
            {
                return;
            }

            plpointMessage.AutoScrollPosition = new Point(0, 0);
            for (int i = 0; i < tag_StationModule.arrAxis.Count; i++)
            {
                tag_LabelAxisTitleList[i].Text    = tag_StationModule.arrAxis[i].AxisName;
                tag_LabelAxisTitleList[i].Visible = true;;
                m = i;
            }
            m++;
            while (m < tag_LabelAxisTitleList.Count)
            {
                tag_LabelAxisTitleList[m].Visible = false;;
                m++;
            }
            getPageTotal();
            m = 0;
            int count = 0;

            for (int i = 0; i < tag_StationModule.arrPoint.Count; i++)
            {
                if (tag_statioOpen == true && tag_StationModule.arrPoint[i].tag_BeginPointAggregateList != null && tag_StationModule.arrPoint[i].tag_BeginPointAggregateList.Count > 0)
                {
                    for (n = 0; n < tag_StationModule.arrPoint[i].tag_BeginPointAggregateList.Count; n++)
                    {
                        if (m < (tag_page_index + 1) * tag_page_Count && m >= (tag_page_index) * tag_page_Count)
                        {
                            pvale = tag_PointValueControlList[m % tag_page_Count];
                            pvale.tag_stationM  = tag_StationModule;
                            pvale.tag_stepName  = m;
                            pvale.PointSet      = (PointAggregate)tag_StationModule.arrPoint[i].tag_BeginPointAggregateList[n];
                            pvale._Worker       = tag_Work;
                            pvale.tag_DelFun    = this.Delete_Click;
                            pvale.tag_InsterFun = this.AddClick;
                            pvale.tag_EnterFun  = this.EnterFun_Click;

                            pvale.Visible = true;

                            count++;
                        }
                        m++;
                    }
                }

                if (m < (tag_page_index + 1) * tag_page_Count && m >= (tag_page_index) * tag_page_Count)
                {
                    {
                        pvale              = tag_PointValueControlList[m % tag_page_Count];
                        pvale._Worker      = tag_Work;
                        pvale.tag_stationM = tag_StationModule;
                        pvale.tag_stepName = m;
                        pvale.PointSet     = (PointAggregate)(PointAggregate)tag_StationModule.arrPoint[i];
                    }

                    pvale.tag_stationM = tag_StationModule;

                    pvale.tag_DelFun    = this.Delete_Click;
                    pvale.tag_InsterFun = this.AddClick;
                    pvale.tag_EnterFun  = this.EnterFun_Click;
                    pvale.Visible       = true;
                    count++;
                }

                m++;


                if (tag_statioOpen == true && tag_StationModule.arrPoint[i].tag_EndPointAggregateList != null && tag_StationModule.arrPoint[i].tag_EndPointAggregateList.Count > 0)
                {
                    for (n = 0; n < tag_StationModule.arrPoint[i].tag_EndPointAggregateList.Count; n++)
                    {
                        if (m < (tag_page_index + 1) * tag_page_Count && m >= (tag_page_index) * tag_page_Count)
                        {
                            {
                                pvale = tag_PointValueControlList[m % tag_page_Count];
                                pvale.tag_stationM = tag_StationModule;
                                pvale.tag_stepName = m;
                                pvale.PointSet     = (PointAggregate)tag_StationModule.arrPoint[i].tag_EndPointAggregateList[n];
                            }


                            pvale._Worker       = tag_Work;
                            pvale.tag_DelFun    = this.Delete_Click;
                            pvale.tag_InsterFun = this.AddClick;
                            pvale.tag_EnterFun  = this.EnterFun_Click;
                            pvale.Visible       = true;
                            count++;
                        }
                        m++;
                    }
                }
            }
            while (count < tag_PointValueControlList.Count)
            {
                tag_PointValueControlList[count % tag_page_Count].Visible = false;
                count++;
            }

            for (int i = 0; i < tag_ButtonPageList.Count; i++)
            {
                if (i < tag_pageTotal)
                {
                    tag_ButtonPageList[i].Visible = true;
                }
                else
                {
                    tag_ButtonPageList[i].Visible = false;
                }
            }
        }