Ejemplo n.º 1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            LoadConfiguration();
            this.WindowState            = FormWindowState.Maximized;
            managementServerCommunicate = new ManagementServerCommunicate(serverManagerIP, serverManagerPort, localIP);
            omServerCommunicate         = new OMServerCommunicate(OMServerIP, OMServerPort, localIP);
            logServerCommunicate        = new LogServerCommunicate(logServerIP, logServerPort, localIP);

            mapForm               = new MapForm();
            mapForm.Owner         = this;
            mapForm.ShowInTaskbar = false;
            mapForm.TopLevel      = false;
            this.panelEx_Base.Controls.Add(mapForm);
            omServerCommunicate.UpdateDeviceInfo        += mapForm.UpdateDeviceInfo;
            omServerCommunicate.UpdateCameraStatus      += mapForm.UpdateCameraStatus;
            omServerCommunicate.UpdateUPSStatus         += mapForm.UpdateUPSStatus;
            omServerCommunicate.UpdateSolarEnergyStatus += mapForm.UpdateSolarEnergyStatus;
            omServerCommunicate.UpdatestationStatus     += mapForm.UpdateStationStatus;
            mapForm.Show();

            statisticsForm               = new StatisticsForm();
            statisticsForm.Owner         = this;
            statisticsForm.ShowInTaskbar = false;
            statisticsForm.TopLevel      = false;
            this.panelEx_Base.Controls.Add(statisticsForm);
            omServerCommunicate.UpdateDeviceInfo        += statisticsForm.UpdateDeviceInfo;
            omServerCommunicate.UpdateCameraStatus      += statisticsForm.UpdateCameraStatus;
            omServerCommunicate.UpdateUPSStatus         += statisticsForm.UpdateUPSStatus;
            omServerCommunicate.UpdateSolarEnergyStatus += statisticsForm.UpdateSolarEnergyStatus;
            omServerCommunicate.SocketCreateConnect();

            managementServerForm               = new ManagementServerForm(managementServerCommunicate);
            managementServerForm.Owner         = this;
            managementServerForm.ShowInTaskbar = false;
            managementServerForm.TopLevel      = false;
            this.panelEx_Base.Controls.Add(managementServerForm);
            managementServerCommunicate.UpdateMyNodeStatus += managementServerForm.UpdateMyNodeStatus;
            managementServerCommunicate.SocketCreateConnect();

            logServerForm               = new LogServerForm(logServerCommunicate);
            logServerForm.Owner         = this;
            logServerForm.ShowInTaskbar = false;
            logServerForm.TopLevel      = false;
            this.panelEx_Base.Controls.Add(logServerForm);
            logServerCommunicate.GetAlarmLog += logServerForm.GetAlarmLog;
            logServerCommunicate.GetRunLog   += logServerForm.GetRunLog;
            logServerCommunicate.GetErrLog   += logServerForm.GetErrLog;
            logServerCommunicate.QueryLog    += logServerForm.QueryLog;
            logServerCommunicate.SocketCreateConnect();
        }
Ejemplo n.º 2
0
 public LogServerForm(LogServerCommunicate logServerCommunicate)
 {
     InitializeComponent();
     this.logServerCommunicate = logServerCommunicate;
 }