Example #1
0
        public MonitorView(string captionText) : base(captionText)
        {
            InitializeComponent();
            this.Text = captionText;
            string ipAddr = ConfigurationManager.AppSettings["svcAddr"];

            string svcAddr = string.Format(@"http://{0}:8733/ZZ/LineNodes/NodeMonitorSvc/", ipAddr);

            nodeMonitorSvc = ChannelFactory <MonitorSVC.INodeMonitorSvc> .CreateChannel(new BasicHttpBinding(), new EndpointAddress(svcAddr));;//new AsrsSvc.AsrsPowerSvcClient();
        }
Example #2
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            this.MainTabControl.DrawMode   = TabDrawMode.OwnerDrawFixed;
            this.MainTabControl.Padding    = new System.Drawing.Point(CLOSE_SIZE, CLOSE_SIZE);
            this.MainTabControl.DrawItem  += new DrawItemEventHandler(this.tabControlMain_DrawItem);
            this.MainTabControl.MouseDown += new System.Windows.Forms.MouseEventHandler(this.tabControlMain_MouseDown);
            Console.SetOut(new TextBoxWriter(this.richTextBoxLog));
            // corePresenter = new CtlcorePresenter();

            ModuleAttach();

            string svcAddr = @"http://localhost:8733/ZZ/LineNodes/NodeMonitorSvc/";

            nodeMonitorSvc = ChannelFactory <MonitorSVC.INodeMonitorSvc> .CreateChannel(new BasicHttpBinding(), new EndpointAddress(svcAddr));;//new AsrsSvc.AsrsPowerSvcClient();
            //MonitorSVC.CtlNodeStatus[] nodeStatusArray = nodeMonitorSvc.GetNodeStatus();
            //foreach (MonitorSVC.CtlNodeStatus s in nodeStatusArray)
            //{
            //    Console.WriteLine(s.NodeName + "," + s.Status.ToString());
            //}
            //nodeMonitorSvc.DoWork();
        }