Beispiel #1
0
        //初始化看板显示
        private void InitShowWatch()
        {
            _WatchPanelFacade = new WatchPanelFacade(this.DataProvider);

            if (_IsShowFacSurvey)
            {
                FacMessageControl user = new FacMessageControl();
                user.RTF = FacConfigMessage.CommonInfo;
                RefreshTableLayout();
                this.mainLayout.Controls.Add(user, 0, 0);
                user.Dock      = DockStyle.Fill;
                _UserControlID = 1;
                return;
            }

            if (_IsShowFacWatchPanel)
            {
                FacProductMessageControl FacProductMessageControl = new FacProductMessageControl();
                SetFacProductMessageControlValue(FacProductMessageControl);
                RefreshTableLayout();
                this.mainLayout.Controls.Add(FacProductMessageControl, 0, 0);
                FacProductMessageControl.Dock = DockStyle.Fill;
                _UserControlID = 2;
                return;
            }

            if (_IsShowFacQtyAndRate)
            {
                TChartControl tChart = new TChartControl();
                SetFacTChartControlValue(tChart, true);
                RefreshTableLayout();
                this.mainLayout.Controls.Add(tChart, 0, 0);
                tChart.Dock    = DockStyle.Fill;
                _UserControlID = 3;
                return;
            }

            if (_IsShowLineSurvey)
            {
                string[] bigLineList = _BigLineList.Split(',');
                SSCodeProductMessageControl ssCodeProductMessageControl = new SSCodeProductMessageControl();

                if (bigLineList.Length > 0)
                {
                    SetSSCodeProductMessageControlValue(ssCodeProductMessageControl, bigLineList[0].ToString());
                }
                RefreshTableLayout();
                this.mainLayout.Controls.Add(ssCodeProductMessageControl, 0, 0);//Added By Nettie Chen 2009/09/23
                ssCodeProductMessageControl.Dock = DockStyle.Fill;
                _UserControlID = 4;
                return;
            }
        }
Beispiel #2
0
        //数据的Load
        private void AutoTimer_Tick(object sender, EventArgs e)
        {
            try
            {
                _WatchPanelFacade = new WatchPanelFacade(this.DataProvider);
                if (_IsShowFacSurvey && _UserControlID == 1)
                {
                    this.GetFacSurevyFromXML();
                    FacMessageControl control = (FacMessageControl)this.mainLayout.GetControlFromPosition(0, 0);
                    control.RTF = FacConfigMessage.CommonInfo;
                    control.ValueRefresh();
                }

                if (_IsShowFacWatchPanel && _UserControlID == 2)
                {
                    FacProductMessageControl FacProductMessageControl = (FacProductMessageControl)this.mainLayout.GetControlFromPosition(0, 0);
                    SetFacProductMessageControlValue(FacProductMessageControl);
                    FacProductMessageControl.Dock = DockStyle.Fill;
                }

                if (_IsShowFacQtyAndRate && _UserControlID == 3)
                {
                    TChartControl tChartControl = (TChartControl)mainLayout.GetControlFromPosition(0, 0);
                    SetFacTChartControlValue(tChartControl, false);
                    tChartControl.Refresh();
                }

                if (_IsShowLineSurvey && _UserControlID == 4)
                {
                    string[] bigsscode = _BigLineList.Split(',');

                    SSCodeProductMessageControl tChartControl = (SSCodeProductMessageControl)mainLayout.GetControlFromPosition(0, 0);

                    if (_LineWatchPaneControlID == bigsscode.Length)
                    {
                        SetSSCodeProductMessageControlValue(tChartControl, bigsscode[_LineWatchPaneControlID - 1].ToString());
                    }
                }

                this.mainLayout.Refresh();
            }
            catch
            { }
        }
Beispiel #3
0
        //画面的切换
        private void WatchTimer_Tick(object sender, EventArgs e)
        {
            try
            {
                #region 显示车间概况时,切换界面

                if (_UserControlID == 1)
                {
                    if (_IsShowFacWatchPanel)
                    {
                        FacProductMessageControl FacProductMessageControl = new FacProductMessageControl();
                        SetFacProductMessageControlValue(FacProductMessageControl);
                        RefreshTableLayout();
                        this.mainLayout.Controls.Add(FacProductMessageControl, 0, 0);
                        FacProductMessageControl.Dock = DockStyle.Fill;
                        _UserControlID = 2;
                        return;
                    }

                    if (_IsShowFacQtyAndRate)
                    {
                        TChartControl tChart = new TChartControl();
                        SetFacTChartControlValue(tChart, true);
                        RefreshTableLayout();
                        this.mainLayout.Controls.Add(tChart, 0, 0);
                        tChart.Dock    = DockStyle.Fill;
                        _UserControlID = 3;
                        return;
                    }

                    if (_IsShowLineSurvey)
                    {
                        string[] bigline = _BigLineList.Split(',');

                        if (_BigLineList.Length > 0)
                        {
                            SSCodeProductMessageControl tChart = new SSCodeProductMessageControl();
                            SetSSCodeProductMessageControlValue(tChart, bigline[_LineWatchPaneControlID].ToString());
                            RefreshTableLayout();
                            mainLayout.Controls.Add(tChart, 0, 0);
                            tChart.Dock              = DockStyle.Fill;
                            _LineWatchPaneControlID += 1;
                            _UserControlID           = 4;
                            return;
                        }
                    }
                }

                #endregion

                #region 显示车间产量及直通率走势图时,切换界面
                if (_UserControlID == 2)
                {
                    if (_IsShowFacQtyAndRate)
                    {
                        TChartControl tChart = new TChartControl();
                        SetFacTChartControlValue(tChart, true);
                        RefreshTableLayout();
                        this.mainLayout.Controls.Add(tChart, 0, 0);
                        tChart.Dock    = DockStyle.Fill;
                        _UserControlID = 3;
                        return;
                    }

                    if (_IsShowLineSurvey)
                    {
                        string[] bigline = _BigLineList.Split(',');

                        if (_BigLineList.Length > 0)
                        {
                            SSCodeProductMessageControl tChart = new SSCodeProductMessageControl();
                            SetSSCodeProductMessageControlValue(tChart, bigline[_LineWatchPaneControlID].ToString());
                            RefreshTableLayout();
                            mainLayout.Controls.Add(tChart, 0, 0);
                            tChart.Dock              = DockStyle.Fill;
                            _LineWatchPaneControlID += 1;
                            _UserControlID           = 4;
                            return;
                        }
                    }

                    if (_IsShowFacSurvey)
                    {
                        FacMessageControl facMessageControl = new FacMessageControl();
                        this.GetFacSurevyFromXML();
                        facMessageControl.RTF = FacConfigMessage.CommonInfo;
                        RefreshTableLayout();
                        mainLayout.Controls.Add(facMessageControl, 0, 0);
                        facMessageControl.Dock = DockStyle.Fill;
                        _UserControlID         = 1;
                        return;
                    }
                }

                #endregion

                #region 显示产线产量及直通率走势图时,切换界面
                if (_UserControlID == 3)
                {
                    if (_IsShowLineSurvey)
                    {
                        string[] bigline = _BigLineList.Split(',');

                        if (_BigLineList.Length > 0)
                        {
                            SSCodeProductMessageControl tChart = new SSCodeProductMessageControl();
                            SetSSCodeProductMessageControlValue(tChart, bigline[_LineWatchPaneControlID].ToString());
                            RefreshTableLayout();
                            mainLayout.Controls.Add(tChart, 0, 0);
                            tChart.Dock              = DockStyle.Fill;
                            _LineWatchPaneControlID += 1;
                            _UserControlID           = 4;
                            return;
                        }
                    }

                    if (_IsShowFacSurvey)
                    {
                        FacMessageControl facMessageControl = new FacMessageControl();
                        this.GetFacSurevyFromXML();
                        facMessageControl.RTF = FacConfigMessage.CommonInfo;
                        RefreshTableLayout();
                        mainLayout.Controls.Add(facMessageControl, 0, 0);
                        facMessageControl.Dock = DockStyle.Fill;
                        _UserControlID         = 1;
                        return;
                    }

                    if (_IsShowFacWatchPanel)
                    {
                        FacProductMessageControl FacProductMessageControl = new FacProductMessageControl();
                        SetFacProductMessageControlValue(FacProductMessageControl);
                        RefreshTableLayout();
                        this.mainLayout.Controls.Add(FacProductMessageControl, 0, 0);
                        FacProductMessageControl.Dock = DockStyle.Fill;
                        _UserControlID = 2;
                        return;
                    }
                }
                #endregion

                #region 显示产线产量及直通率走势图时,切换界面
                if (_UserControlID == 4)
                {
                    //车间显示产线信息时的翻页动作
                    if (_LineWatchPaneNunmer > _LineWatchPaneControlID)
                    {
                        string[] bigline = _BigLineList.Split(',');
                        SSCodeProductMessageControl tChartControl = new SSCodeProductMessageControl();
                        SetSSCodeProductMessageControlValue(tChartControl, bigline[_LineWatchPaneControlID].ToString());
                        RefreshTableLayout();
                        mainLayout.Controls.Add(tChartControl, 0, 0);
                        tChartControl.Dock       = DockStyle.Fill;
                        _LineWatchPaneControlID += 1;
                        return;
                    }
                    //end

                    _LineWatchPaneControlID = 0;

                    if (_IsShowFacSurvey)
                    {
                        FacMessageControl facMessageControl = new FacMessageControl();
                        this.GetFacSurevyFromXML();
                        facMessageControl.RTF = FacConfigMessage.CommonInfo;
                        RefreshTableLayout();
                        mainLayout.Controls.Add(facMessageControl, 0, 0);
                        facMessageControl.Dock = DockStyle.Fill;
                        _UserControlID         = 1;
                        return;
                    }

                    if (_IsShowFacWatchPanel)
                    {
                        FacProductMessageControl FacProductMessageControl = new FacProductMessageControl();
                        SetFacProductMessageControlValue(FacProductMessageControl);
                        RefreshTableLayout();
                        this.mainLayout.Controls.Add(FacProductMessageControl, 0, 0);
                        FacProductMessageControl.Dock = DockStyle.Fill;
                        _UserControlID = 2;
                        return;
                    }

                    if (_IsShowFacQtyAndRate)
                    {
                        TChartControl tChart = new TChartControl();
                        SetFacTChartControlValue(tChart, true);
                        RefreshTableLayout();
                        this.mainLayout.Controls.Add(tChart, 0, 0);
                        tChart.Dock    = DockStyle.Fill;
                        _UserControlID = 3;
                        return;
                    }
                }

                #endregion
            }
            catch
            { }
        }