Beispiel #1
0
        /// <summary>
        /// 模块加载
        /// </summary>
        private void ModuleAttach()
        {
            
            logView = new LogView("日志");
            nodeMonitorView = new NodeMonitorView("产线监控");
            nodeMonitorView.SetParent(this);
            nodeMonitorView.RegisterMenus(this.menuBar, "产线监控");

            logView.SetParent(this);
            logView.RegisterMenus(this.menuBar, "日志查询");
            logView.SetLogDispInterface(this);

            recordView = new RecordView();
            recordView.SetParent(this);
            recordView.RegisterMenus(this.menuBar, "记录查询与管理");
            recordView.SetLoginterface(logView.GetLogrecorder());
           

           // if(this.roleID <3 && this.roleID>0)
            {
                configView = new ConfiManageView();
                configView.SetParent(this);
                configView.RegisterMenus(this.menuBar, "配置管理");
                configView.SetLoginterface(logView.GetLogrecorder());
                
            }
            
            nodeMonitorView.SetLoginterface(logView.GetLogrecorder());
            nodeMonitorView.Init();
           
            logView.SetNodeNames(nodeMonitorView.GetNodeNames());
            logView.SetDebugMode(nodeMonitorView.IsDebugMode());
            AttachModuleView(nodeMonitorView);
        }
Beispiel #2
0
        /// <summary>
        /// 模块加载
        /// </summary>
        private void ModuleAttach()
        {
            logView = new LogView("日志");


            logView.SetParent(this);
            logView.RegisterMenus(this.menuStrip1, "日志查询");
            logView.SetLogDispInterface(this);
            string[]      nodeNames = new string[] { "产品上线", "气密检查1", "气密检查2", "气密检查3", "气密检查4" };
            List <string> nodeList  = new List <string>(nodeNames);

            logView.SetNodeNames(nodeList);

            recordView = new RecordView();
            recordView.SetParent(this);
            recordView.RegisterMenus(this.menuStrip1, "记录查询与管理");
            recordView.SetLoginterface(logView.GetLogrecorder());


            if (this.roleID < 3 && this.roleID > 0)
            {
                configView = new ConfiManageView();
                configView.SetParent(this);
                configView.RegisterMenus(this.menuStrip1, "配置管理");
                configView.SetLoginterface(logView.GetLogrecorder());
            }
        }
Beispiel #3
0
        private bool LoadModules()
        {
            string reStr = "";

            //扩展view
            asrsCheckoutModifyView = new ExtentViews.AsrsCheckoutModifyView("非正常出库调整");

            logView = new LogView("日志");
            childViews.Add(logView);
            logView.SetParent(this);
            logView.RegisterMenus(this.menuStrip1, "日志查询");
            logView.SetLogDispInterface(this);
            presenter.logRecorder = logView.GetLogrecorder();


            configView = new ConfiManageView();
            childViews.Add(configView);
            configView.SetParent(this);
            configView.RegisterMenus(this.menuStrip1, "配置管理");
            configView.SetLoginterface(logView.GetLogrecorder());

            palletTraceView = new ProduceTraceView("托盘追溯");
            childViews.Add(palletTraceView);
            palletTraceView.SetParent(this);
            palletTraceView.RegisterMenus(this.menuStrip1, "托盘追溯");
            palletTraceView.SetLoginterface(logView.GetLogrecorder());

            asrsCtlView = new AsrsCtlView("立库控制");
            childViews.Add(asrsCtlView);

            if (!asrsCtlView.RegistExtView(asrsCheckoutModifyView, ref reStr))
            {
                Console.WriteLine(reStr);
                return(false);
            }
            asrsCtlView.SetParent(this);
            asrsCtlView.RegisterMenus(this.menuStrip1, "立库控制");
            asrsCtlView.SetLoginterface(logView.GetLogrecorder());
            asrsCtlView.SetAsrsPresenter(presenter.AsrsPresenter);
            asrsCtlView.Init();

            nodeMonitorView = new CtlNodeMonitorView("流程监控");
            childViews.Add(nodeMonitorView);
            nodeMonitorView.SetParent(this);
            nodeMonitorView.RegisterMenus(this.menuStrip1, "流程监控");
            nodeMonitorView.SetLoginterface(logView.GetLogrecorder());

            storageView = new StorageMainView();
            childViews.Add(storageView);
            storageView.SetParent(this);
            storageView.RegisterMenus(this.menuStrip1, "库存管理");
            storageView.SetLoginterface(logView.GetLogrecorder());
            nodeMonitorView.SetAsrsBatchSetCtl(storageView.BatchSetControl);
            nodeMonitorView.SetAsrsMonitors(asrsCtlView.AsrsMonitors);



            AsrsInterface.IAsrsManageToCtl asrsResManage = null;
            AsrsInterface.IAsrsCtlToManage asrsCtl       = presenter.GetAsrsCtlInterfaceObj();

            if (!storageView.Init(asrsCtl, ref asrsResManage, ref reStr))
            {
                // logView.GetLogrecorder().AddLog(new LogModel("主模块", "立库管理层模块初始化错误," + reStr, EnumLoglevel.错误));
                Console.WriteLine("立库管理层模块初始化错误," + reStr);
                return(false);
            }
            asrsCtlView.SetAsrsResManage(asrsResManage);
            asrsCheckoutModifyView.SetAsrsResManage(asrsResManage);
            asrsCheckoutModifyView.AsrsPresenter = presenter.AsrsPresenter;
            AttachModuleView(nodeMonitorView);
            foreach (BaseChildView childView in childViews)
            {
                childView.ChangeRoleID(this.roleID);
            }
            presenter.SetAsrsResManage(asrsResManage);

            string[] nodeEnableCfgIDS = new string[] { "1001", "1002", "1003", "1004", "1005", "1006" };
            List <FlowCtlBaseModel.CtlNodeBaseModel> nodeEnableCfgs = new List <FlowCtlBaseModel.CtlNodeBaseModel>();

            foreach (string nodeID in nodeEnableCfgIDS)
            {
                nodeEnableCfgs.Add(presenter.CtlNodeManager.GetNodeByID(nodeID));
            }
            configView.SetCfgNodes(nodeEnableCfgs);

            return(true);
        }
Beispiel #4
0
        private bool LoadModules()
        {
            logView = new LogView("日志");
            childViews.Add(logView);
            logView.SetParent(this);
            logView.RegisterMenus(this.menuStrip1, "日志查询");
            logView.SetLogDispInterface(this);
            presenter.logRecorder = logView.GetLogrecorder();


            configView = new ConfiManageView();
            childViews.Add(configView);
            configView.SetParent(this);
            configView.RegisterMenus(this.menuStrip1, "配置管理");
            configView.SetLoginterface(logView.GetLogrecorder());

            palletTraceView = new ProduceTraceView("托盘追溯");
            childViews.Add(palletTraceView);
            palletTraceView.SetParent(this);
            palletTraceView.RegisterMenus(this.menuStrip1, "托盘追溯");
            palletTraceView.SetLoginterface(logView.GetLogrecorder());

            asrsCtlView = new AsrsCtlView("立库控制");
            childViews.Add(asrsCtlView);
            asrsCtlView.SetParent(this);
            asrsCtlView.RegisterMenus(this.menuStrip1, "立库控制");
            asrsCtlView.SetLoginterface(logView.GetLogrecorder());
            asrsCtlView.SetAsrsPresenter(presenter.AsrsPresenter);
            asrsCtlView.Init();

            nodeMonitorView = new CtlNodeMonitorView("流程监控");
            childViews.Add(nodeMonitorView);
            nodeMonitorView.SetParent(this);
            nodeMonitorView.RegisterMenus(this.menuStrip1, "流程监控");
            nodeMonitorView.SetLoginterface(logView.GetLogrecorder());
            nodeMonitorView.SetAsrsMonitors(asrsCtlView.AsrsMonitors);
            this.nodeMonitorView.WmsSimViewDisp = true;


            AsrsInterface.IAsrsManageToCtl asrsResManage = presenter.WmsSvc;
            AsrsInterface.IAsrsCtlToManage asrsCtl       = presenter.GetAsrsCtlInterfaceObj();
            asrsCtlView.SetAsrsResManage(asrsResManage);

            AttachModuleView(nodeMonitorView);
            foreach (BaseChildView childView in childViews)
            {
                childView.ChangeRoleID(this.roleID);
            }
            presenter.SetAsrsResManage(asrsResManage);

            string[] nodeEnableCfgIDS = new string[] { "1001", "1002", "1003", "1004", "1005", "1006" };
            List <FlowCtlBaseModel.CtlNodeBaseModel> nodeEnableCfgs = new List <FlowCtlBaseModel.CtlNodeBaseModel>();

            foreach (string nodeID in nodeEnableCfgIDS)
            {
                nodeEnableCfgs.Add(presenter.CtlNodeManager.GetNodeByID(nodeID));
            }
            configView.SetCfgNodes(nodeEnableCfgs);

            return(true);
        }
Beispiel #5
0
        /// <summary>
        /// 模块加载
        /// </summary>
        private void ModuleAttach()
        {
            logView = new LogView("日志");
            childViews.Add(logView);
            logView.SetParent(this);

            asrsCtlView = new AsrsCtlView("立库控制");
            childViews.Add(asrsCtlView);
            asrsCtlView.SetParent(this);
            asrsCtlView.RegisterMenus(this.menuStrip1, "立库控制");
            asrsCtlView.SetLoginterface(logView.GetLogrecorder());
            asrsCtlView.Init();

            nodeMonitorView = new ProcessMonitorView("流程监控");
            childViews.Add(nodeMonitorView);
            nodeMonitorView.SetParent(this);
            nodeMonitorView.RegisterMenus(this.menuStrip1, "流程监控");
            nodeMonitorView.SetLoginterface(logView.GetLogrecorder());
            nodeMonitorView.SetAsrsPresener(asrsCtlView.GetPresenter());
            if (!nodeMonitorView.Init())
            {
                MessageBox.Show("控制模块初始化失败");
                return;
            }
            nodeMonitorView.SetAsrsMonitors(asrsCtlView.AsrsMonitors);
            //  nodeMonitorView.SetAsrsBatchSetCtl(asrsCtlView.AsrsBatchSettingCtl);

            logView.RegisterMenus(this.menuStrip1, "日志查询");
            logView.SetLogDispInterface(this);

            recordView = new RecordView();
            recordView.SetParent(this);
            recordView.RegisterMenus(this.menuStrip1, "记录查询与管理");
            recordView.SetLoginterface(logView.GetLogrecorder());
            //recordView.SetHKAccessObj(nodeMonitorView.Presenter.HkAccessList[1]);
            //recordView.SetOcvAccessObj(nodeMonitorView.Presenter.OcvAccessObj);

            storageView = new StorageMainView();
            childViews.Add(storageView);
            storageView.SetParent(this);
            storageView.RegisterMenus(this.menuStrip1, "库存管理");
            storageView.SetLoginterface(logView.GetLogrecorder());
            nodeMonitorView.SetAsrsBatchSetCtl(storageView.BatchSetControl);


            AsrsInterface.IAsrsManageToCtl asrsResManage = null;
            AsrsInterface.IAsrsCtlToManage asrsCtl       = asrsCtlView.GetPresenter();
            string reStr = "";

            if (!storageView.Init(asrsCtl, ref asrsResManage, ref reStr))
            {
                logView.GetLogrecorder().AddLog(new LogModel("主模块", "立库管理层模块初始化错误," + reStr, EnumLoglevel.错误));
            }

            asrsCtlView.SetAsrsResManage(asrsResManage);
            nodeMonitorView.SetAsrsResManage(asrsResManage);

            configView = new ConfiManageView();
            childViews.Add(configView);
            configView.SetParent(this);
            configView.RegisterMenus(this.menuStrip1, "配置管理");
            configView.SetLoginterface(logView.GetLogrecorder());
            List <string> logSrcList = new List <string>();
            //List<string> logSrcs = asrsCtlView.GetLogsrcList();
            //if(logSrcs != null)
            //{
            //    logSrcList.AddRange(logSrcs);
            //}

            List <string> logSrcs = nodeMonitorView.GetLogsrcList();

            if (logSrcs != null)
            {
                logSrcList.AddRange(logSrcs);
            }
            logSrcs = storageView.GetLogsrcList();
            if (logSrcs != null)
            {
                logSrcList.AddRange(logSrcs);
            }
            logView.SetLogsrcList(logSrcList);
            AttachModuleView(nodeMonitorView);
            foreach (BaseChildView childView in childViews)
            {
                childView.ChangeRoleID(this.roleID);
            }
        }
Beispiel #6
0
        /// <summary>
        /// 模块加载
        /// </summary>
        private void ModuleAttach()
        {
            logView = new LogView("日志");
            childViews.Add(logView);
            logView.SetParent(this);


            nodeMonitorView = new NodeMonitorView("流程监控");
            childViews.Add(nodeMonitorView);
            nodeMonitorView.SetParent(this);
            nodeMonitorView.RegisterMenus(this.menuStrip1, "流程监控");
            nodeMonitorView.SetLoginterface(logView.GetLogrecorder());
            nodeMonitorView.Init();


            //nodeMonitorView.SetAsrsMonitors(asrsCtlView.AsrsMonitors);
            //  nodeMonitorView.SetAsrsBatchSetCtl(asrsCtlView.AsrsBatchSettingCtl);

            logView.RegisterMenus(this.menuStrip1, "日志查询");
            logView.SetLogDispInterface(this);

            recordView = new RecordView();
            childViews.Add(recordView);
            recordView.SetParent(this);
            recordView.RegisterMenus(this.menuStrip1, "记录查询与管理");
            recordView.SetLoginterface(logView.GetLogrecorder());

            configView = new ConfiManageView();
            childViews.Add(configView);
            configView.SetParent(this);
            configView.RegisterMenus(this.menuStrip1, "配置管理");
            configView.SetLoginterface(logView.GetLogrecorder());

            List <CtlDevBaseModel> devModelList = nodeMonitorView.GetDevList();

            configView.SetDevList(devModelList);
            configView.SetNodeList(nodeMonitorView.GetCtlNodeList());

            List <string> logSrcList = new List <string>();
            //List<string> logSrcs = asrsCtlView.GetLogsrcList();
            //if(logSrcs != null)
            //{
            //    logSrcList.AddRange(logSrcs);
            //}



            //List<CtlDevBaseModel> devModelList = nodeMonitorView.GetDevList();
            //plcSettingView = new PLCSettingView();
            //childViews.Add(plcSettingView);
            //plcSettingView.SetParent(this);
            //plcSettingView.RegisterMenus(this.menuStrip1, "配置管理");
            //plcSettingView.SetLoginterface(logView.GetLogrecorder());
            //plcSettingView.SetDevList(devModelList);

            List <string> logSrcs = nodeMonitorView.GetLogsrcList();

            if (logSrcs != null)
            {
                logSrcList.AddRange(logSrcs);
            }
            logView.SetLogsrcList(logSrcList);
            //IList<string> devList = nodeMonitorView.LinePresenter.GetDevList();

            recordView.SetDevList(devModelList);
            recordView.SetOpStations(nodeMonitorView.GetNodeNames().ToArray());
            AttachModuleView(nodeMonitorView);

            foreach (BaseChildView childView in childViews)
            {
                childView.ChangeRoleID(this.roleID);
            }
        }
Beispiel #7
0
        private bool LoadModules()
        {
            logView = new LogView("日志");
            childViews.Add(logView);
            logView.SetParent(this);
            logView.RegisterMenus(this.menuStrip1, "日志查询");
            logView.SetLogDispInterface(this);

            configView = new ConfiManageView();
            childViews.Add(configView);
            configView.SetParent(this);
            configView.RegisterMenus(this.menuStrip1, "配置管理");
            configView.SetLoginterface(logView.GetLogrecorder());

            asrsCtlView = new AsrsCtlView("立库控制");
            childViews.Add(asrsCtlView);
            asrsCtlView.SetParent(this);
            asrsCtlView.RegisterMenus(this.menuStrip1, "立库控制");
            asrsCtlView.SetLoginterface(logView.GetLogrecorder());
            asrsCtlView.SetAsrsPresenter(presenter.AsrsPresenter);
            asrsCtlView.Init();

            nodeMonitorView = new CtlNodeMonitorView("流程监控");
            childViews.Add(nodeMonitorView);
            nodeMonitorView.SetParent(this);
            nodeMonitorView.RegisterMenus(this.menuStrip1, "流程监控");
            nodeMonitorView.SetLoginterface(logView.GetLogrecorder());

            storageView = new StorageMainView();
            childViews.Add(storageView);
            storageView.SetParent(this);
            storageView.RegisterMenus(this.menuStrip1, "库存管理");
            storageView.SetLoginterface(logView.GetLogrecorder());
            nodeMonitorView.SetAsrsBatchSetCtl(storageView.BatchSetControl);
            nodeMonitorView.SetAsrsMonitors(asrsCtlView.AsrsMonitors);

            List <string> logSrcs     = presenter.GetLogsrcList();
            List <string> storLogSrcs = storageView.GetLogsrcList();

            if (storLogSrcs != null)
            {
                logSrcs.AddRange(storLogSrcs);
            }

            logView.SetLogsrcList(logSrcs);

            AsrsInterface.IAsrsManageToCtl asrsResManage = null;
            AsrsInterface.IAsrsCtlToManage asrsCtl       = presenter.GetAsrsCtlInterfaceObj();
            string reStr = "";

            if (!storageView.Init(asrsCtl, ref asrsResManage, ref reStr))
            {
                // logView.GetLogrecorder().AddLog(new LogModel("主模块", "立库管理层模块初始化错误," + reStr, EnumLoglevel.错误));
                Console.WriteLine("立库管理层模块初始化错误," + reStr);
                return(false);
            }
            asrsCtlView.SetAsrsResManage(asrsResManage);
            AttachModuleView(nodeMonitorView);
            foreach (BaseChildView childView in childViews)
            {
                childView.ChangeRoleID(this.roleID);
            }
            presenter.SetAsrsResManage(asrsResManage);
            return(true);
        }