public void frmCNDServiceApplication_Load(System.Object sender, System.EventArgs e)
        {
            try
            {
                this._stxeventLog = CustomEventLog.GetInstance();
                this._stxeventLog.LogEntryReceived += this._stxeventLog_LogEntryReceived;
            }
            catch (Exception)
            {
            }
            frmServiceIndex frm = new frmServiceIndex();

            try
            {
                this._CNDService = CNDService.GetInstance();
                this._CNDService.CNDTableStatusChanged += this.CNDTableStatusChanged;
                this.dgrdServiceParameters.DataSource   = this._CNDService.ServiceParametersTable;
                this.dgrdCNDTable.DataSource            = this._CNDService.ComponentNetworkDirectoryTable;
                this.dgrdCNDTable.Columns[0].Width      = (int)((double)dgrdCNDTable.Width / 2);
                this.dgrdCNDTable.Columns[1].Width      = (int)((double)dgrdCNDTable.Width / 2);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            finally
            {
                frm.Dispose();
            }
        }
        public void STXDataSocketClient_Load(System.Object sender, System.EventArgs e)
        {
            try
            {
                this._STXEventLog = CustomEventLog.GetInstance();
                this._STXEventLog.LogEntryReceived += this._STXEventLog_LogEntryReceived;
            }
            catch (Exception)
            {
            }

            this._errorsCount        = 0;
            this.txtErrorsCount.Text = System.Convert.ToString(this._errorsCount);

            try
            {
                this._STXDataSocketClient = new DPE_DataPublicationsClient();
                this._STXDataSocketClient.ConnectionWithSTXDataServerLost += this.ConnectionWithServerLost;
                this._STXDataSocketClient.ConnectToServer();
                this.ssConnectionLabel.Text = "Connected to Server";

                try
                {
                    this.dgrdServerParameters.DataSource = this._STXDataSocketClient.ServerParametersTable;
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                try
                {
                    this.dgrdSTXDSSClients.DataSource = this._STXDataSocketClient.GetClientsRegistryTable();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                try
                {
                    this.dgrdPublihsers.DataSource = this._STXDataSocketClient.GetPublihsersRegistryTable();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                try
                {
                    this.dgrdPublications.DataSource = this._STXDataSocketClient.GetPublicationsRegistryTable();
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            catch (Exception ex)
            {
                this.btnConnectToServer.Visible = true;
                MessageBox.Show(ex.Message);
            }
        }
Exemplo n.º 3
0
        public frmSocketsServerClientTest(string host, int port)
        {
            // This call is required by the Windows Form Designer.
            InitializeComponent();
            try
            {
                // Add any initialization after the InitializeComponent() call.
                this._dataSocketClient = new SocketsServerClient(host, port);
                this._dataSocketClient.DataReceived   += this.DataReceived;
                this._dataSocketClient.ConnectionLost += this.Disconnection;
                this._dataSocketClient.Connect();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            try
            {
                this._stxEventLog = CustomEventLog.GetInstance();
                this._stxEventLog.LogEntryReceived += this._stxEventLog_LogEntryReceived;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
            try
            {
                this.Text = "Sockets Server Client on : " + host + " : " + System.Convert.ToString(port);
            }
            catch (Exception)
            {
            }
        }
        public void frmDataSocketServerApplication_Load(System.Object sender, System.EventArgs e)
        {
            AppRunCheck.Check_If_IAm_Running_ExitIfTrue_And_ShowMessage();

            try
            {
                _eventLog = CustomEventLog.GetInstance();
                _eventLog.LogEntryReceived += _stxEventLog_LogEntryReceived;
            }
            catch (Exception)
            {
            }
            this._errorsCount = 0;

            this.txtErrorsCount.Text = System.Convert.ToString(this._errorsCount);

            try
            {
                this._DPEDataPublicationsServer       = DPE_DataPublicationsServer.GetInstance();
                this.dgrdServiceParameters.DataSource = this._DPEDataPublicationsServer.ServiceParametersTable;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
        public frmSocketsServerTest(int listeningPort)
        {
            InitializeComponent();
            try
            {
                this._stxEventLog = CustomEventLog.GetInstance();
                this._stxEventLog.LogEntryReceived += this._stxEventLog_LogEntryReceived;
            }
            catch (Exception)
            {
            }

            this._DataSocketServer = new SocketsServer(listeningPort);
            this._DataSocketServer.NewClientConnection      += this.NewClientConnection;
            this._DataSocketServer.ClientDataReceived       += this.ClientDataReceived;
            this._DataSocketServer.ClientConnectionFinished += this.ClientConnectionFinished;

            this.Text = "Sockets Server : " + System.Convert.ToString(listeningPort);
        }
 public void frmSTXCommunicationsEnvironmentTestForm_Load(System.Object sender, System.EventArgs e)
 {
     try
     {
         this._eventLog = CustomEventLog.GetInstance();
         this._eventLog.LogEntryReceived += new CustomEventLog.LogEntryReceivedEventHandler(this._stxeventLog_LogEntryReceived);
     }
     catch (Exception)
     {
     }
     try
     {
         manager = CommunicationsManager.GetInstance();
         manager.CNDTableChanged     += new  CommunicationsManager.CNDTableChangedEventHandler(this.manager_CNDTableChanged);
         this.dgrdCNDTable.DataSource = manager.CNDTable;
     }
     catch (Exception ex)
     {
         Interaction.MsgBox(ex.Message);
     }
 }
Exemplo n.º 7
0
 public void frmCNDClientMAinform_Load(System.Object sender, System.EventArgs e)
 {
     try
     {
         this._eventLog = CustomEventLog.GetInstance();
         this._eventLog.LogEntryReceived += this._STXEventLog_LogEntryReceived;
     }
     catch (Exception)
     {
     }
     try
     {
         this._CNDClient = new CNDClient();
         this._CNDClient.TableUpdatedByServer += this._CNDClient_TableUpdatedByServer;
         this._CNDClient.Connect();
         this.dgrdConnectedComponents.DataSource = this._CNDClient.GetCNDTableFromServer();
         this.dgrdServicePArams.DataSource       = this._CNDClient.ServiceParametersTable;
     }
     catch (Exception)
     {
     }
 }