Exemplo n.º 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;
            }
        }
Exemplo n.º 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
            { }
        }
Exemplo n.º 3
0
        //车间质量/产量趋势图设定
        private void SetFacTChartControlValue(TChartControl tChart, bool isFristLoad)
        {
            //Modified By Nettie Chen 2009/09/23
            //object[] finishedRateLineDataSource = _WatchPanelFacade.QueryRateByGourpConditin(_BigLineList, ItemType.ITEMTYPE_FINISHEDPRODUCT, _GourpBy, _CuerrtDay);
            //object[] semimanuRateLineDataSource = _WatchPanelFacade.QueryRateByGourpConditin(_BigLineList, ItemType.ITEMTYPE_SEMIMANUFACTURE, _GourpBy, _CuerrtDay);
            //object[] finishedProductDateLineDataSource = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, ItemType.ITEMTYPE_FINISHEDPRODUCT, _GourpBy, false, _CuerrtDay);
            //object[] semimanuProductDateLineDataSource = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, ItemType.ITEMTYPE_SEMIMANUFACTURE, _GourpBy, false, _CuerrtDay);
            //object[] finishedBarDataSource = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, ItemType.ITEMTYPE_FINISHEDPRODUCT, _GourpBy, true, _CuerrtDay);
            //object[] semimanuBarDataSource = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, ItemType.ITEMTYPE_SEMIMANUFACTURE, _GourpBy, true, _CuerrtDay);
            //object[] TPCodeList = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, string.Empty, _GourpBy, false, _CuerrtDay);
            //tChart.SetDataChartValue(finishedRateLineDataSource, semimanuRateLineDataSource,
            //                         finishedProductDateLineDataSource, semimanuProductDateLineDataSource,
            //                         finishedBarDataSource, semimanuBarDataSource, isFristLoad, TPCodeList);
            object[] finishedRateLineDataSource        = null;
            object[] finishedProductDateLineDataSource = null;
            object[] finishedBarDataSource             = null;
            object[] semimanuRateLineDataSource        = null;
            object[] semimanuProductDateLineDataSource = null;
            object[] semimanuBarDataSource             = null;

            if (_IsShowFinishedProduct == true)
            {
                finishedRateLineDataSource        = _WatchPanelFacade.QueryRateByGourpConditin(_BigLineList, ItemType.ITEMTYPE_FINISHEDPRODUCT, _GourpBy, _CuerrtDay);
                finishedProductDateLineDataSource = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, ItemType.ITEMTYPE_FINISHEDPRODUCT, _GourpBy, false, _CuerrtDay);
                finishedBarDataSource             = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, ItemType.ITEMTYPE_FINISHEDPRODUCT, _GourpBy, true, _CuerrtDay);
            }
            if (_IsShowSemimanuProduct == true)
            {
                semimanuRateLineDataSource        = _WatchPanelFacade.QueryRateByGourpConditin(_BigLineList, ItemType.ITEMTYPE_SEMIMANUFACTURE, _GourpBy, _CuerrtDay);
                semimanuProductDateLineDataSource = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, ItemType.ITEMTYPE_SEMIMANUFACTURE, _GourpBy, false, _CuerrtDay);
                semimanuBarDataSource             = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, ItemType.ITEMTYPE_SEMIMANUFACTURE, _GourpBy, true, _CuerrtDay);
            }
            object[] TPCodeList = _WatchPanelFacade.QueryOutPutQtyByGourpConditin(_BigLineList, string.Empty, _GourpBy, false, _CuerrtDay);

            tChart.SetDataChartValue(finishedRateLineDataSource, semimanuRateLineDataSource,
                                     finishedProductDateLineDataSource, semimanuProductDateLineDataSource,
                                     finishedBarDataSource, semimanuBarDataSource, isFristLoad, TPCodeList, _IsShowFinishedProduct, _IsShowSemimanuProduct);
            //End Modified
        }
Exemplo n.º 4
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
            { }
        }