Exemplo n.º 1
0
 public MainPresenter(IMainView view)
 {
     this.view      = view;
     devCommManager = new CtlManage.CommDevManage();
     prsNodeManager = new PrcsCtlModelsAoyouCp.PrsCtlnodeManage();
     asrsPresenter  = new AsrsControl.AsrsCtlPresenter();
     ctlNodeManager = new CtlManage.CtlNodeManage();
 }
Exemplo n.º 2
0
 public AsrsCtlView(string captionText)
     : base(captionText)
 {
     InitializeComponent();
     this.Text        = captionText;
     presenter        = new AsrsCtlPresenter(this);
     this.ctlTaskView = new CtlTaskView("控制任务");
     portBufView      = new PortBufferView("入库口缓存信息");
 }
Exemplo n.º 3
0
        public void Init()
        {
            //string dbSrc = ConfigurationManager.AppSettings["DBSource"];
            // CtlDBAccess.PubConstant.ConnectionString = string.Format(@"{0}Initial Catalog=AsrsCtlDB;User ID=sa;Password=123456;", dbSrc);
            presenter = new AsrsCtlPresenter(this);

            presenter.CtlInit();
            presenter.SetLogRecorder(logRecorder);
            foreach (AsrsCtlModel asrs in presenter.AsrsCtls)
            {
                View.AsrsMonitorUsercontrol ctl = new View.AsrsMonitorUsercontrol(asrs);
                asrsMonitors.Add(ctl);
            }

            //
            this.portBufView.AsrsPorts = presenter.AsrsPorts;

            this.asrsBatchSettingCtl = new View.AsrsBatchSettingControl();

            //宿主服务IAsrsCtlToManage
            Uri                 _baseAddress = new Uri("http://localhost:8733/ZZ/AsrsCtlSvc/AsrsCtl/");
            EndpointAddress     _Address     = new EndpointAddress(_baseAddress);
            BasicHttpBinding    _Binding     = new BasicHttpBinding();
            ContractDescription _Contract    = ContractDescription.GetContract(typeof(AsrsInterface.IAsrsCtlToManage));
            ServiceEndpoint     endpoint     = new ServiceEndpoint(_Contract, _Binding, _Address);
            ServiceHost         host         = new ServiceHost(this.presenter, _baseAddress);

            //添加终结点ABC
            host.Description.Endpoints.Add(endpoint);
            //启用元数据交换
            ServiceMetadataBehavior meta = new ServiceMetadataBehavior();

            meta.HttpGetEnabled = true;
            host.Description.Behaviors.Add(meta);
            //host.Open();
        }
Exemplo n.º 4
0
 public void SetAsrsPresenter(AsrsCtlPresenter presenter)
 {
     this.presenter = presenter;
 }