コード例 #1
0
ファイル: AgentWindow.cs プロジェクト: oisy/scada
        private void AgentWindow_Load(object sender, EventArgs e)
        {
            this.CancelQuit = true;
            InitSysNotifyIcon();
            // StatusBar labels
            this.statusStrip.Items.Add(this.statusLabel);
            this.statusStrip.Items.Add(new ToolStripSeparator());
            this.statusStrip.Items.Add(this.addressLabel);
            this.statusStrip.Items.Add(new ToolStripSeparator());
            this.statusStrip.Items.Add(this.counterLabel);
            this.statusStrip.Items.Add(new ToolStripSeparator());
            this.statusStrip.Items.Add(this.uploadLabel);
            this.statusStrip.Items.Add(new ToolStripSeparator());
            this.statusStrip.Items.Add(this.pingLabel);

            this.CheckLastSendTime = true;

            this.cmdReceiver = new CommandReceiver(Ports.DataClient);
            cmdReceiver.Start(this.OnLocalCommand);

            this.InitDetailsListView();
            this.Start();
        }
コード例 #2
0
ファイル: AgentWindow.cs プロジェクト: oisy/scada
        private void AgentWindowLoad(object sender, EventArgs e)
        {
            LoggerClient.Initialize();
            this.logger.Send("ScadaDataClient", "Data (upload) Program starts at " + DateTime.Now);

            this.InitSysNotifyIcon();
            this.MakeWindowShownFront();
            this.ShowInTaskbar = false;
            this.SetExceptionToolStripMenuItem.Checked = false;
            this.statusStrip.Items.Add(this.GetConnetionString());
            this.statusStrip.Items.Add(new ToolStripSeparator());
            this.statusStrip.Items.Add("MS: " + Settings.Instance.Mn);
            this.statusStrip.Items.Add(new ToolStripSeparator());
            // this.statusStrip.Items.Add("数据中心IP:");

            this.cmdReceiver = new CommandReceiver(Ports.DataClient);
            cmdReceiver.Start(this.OnLocalCommand);

            SystemEvents.SessionEnding += SystemEvents_SessionEnding;

            this.InitDetailsListView();
            if (this.StartState)
            {
                this.Start();
            }
        }