예제 #1
0
    public ClientInstance(App.ApplicationCloseDelegate appCloseHandle)
    {
      /* Close application handler. */
      this.m_appCloseDelegate = appCloseHandle;

      /* Client config. */
      this.m_clientConfig = new Configuration(CONFIG_FILENAME);

      /* Server Discoverer. */
      this.m_serverDiscoverer = new ServerDiscoverer();
      this.m_serverDiscoverer.onDiscoveryResponse += this.HandleDiscoveryResponse;
      this.m_serverDiscoverer.onDiscoveryFailed += this.HandleDiscoveryFailure;

      /* Self object for TCPIP Handling. */
      this.m_localClient = new LocalClient();
      this.m_localClient.onServerMessageReceived += this.ReceivedServerMessage;
      this.m_localClient.onClientMessageReceived += this.ReceivedClientMessage;
      this.m_localClient.onConnectionErrors += this.HandleConnectionErrors;

      /* GUI initialization. */
      this.m_guiSplash = new GUI.Splash();

      this.m_guiAuthenticate = new GUI.Authenticate();
      this.m_guiAuthenticate.onAuthorizationAccept += this.SendAuthorization;
      this.m_guiAuthenticate.onAuthorizationCancel += this.HandleApplicationClose;

      this.m_guiContacts = new GUI.Contacts(this.HandleContactItemButton, this.SendClientDataUpdateChange);
      this.m_guiContacts.onApplicationClose += this.HandleApplicationClose;

      this.m_guiContactInformation = new GUI.ContactInformation();

      this.m_guiMessages = new Dictionary<long, GUI.Message>();
    }
예제 #2
0
        private Boolean Splash()
        {
            Boolean _Resultado = true;

            GUI.Splash f = new GUI.Splash();
            f.ShowDialog();
            String U = Local.obtenerUsuario();
            String P = Local.obtenerContra();

            DataManager.CLS.DBConexion._User     = U;
            DataManager.CLS.DBConexion._password = P;
            DataTable provar = new DataTable();

            provar = CacheManager.CLS.Cache.TODOS_LOS_USUARIOS();
            if (U.Length < 1 || provar.Rows.Count < 1)
            {
                if (MessageBox.Show("Se a detectado que no hay una conexión al servicio de base de datos ¿Configurar?", "Pregunta", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    General.GUI.Conexión g = new General.GUI.Conexión();
                    g.ShowDialog();
                    if (g.Validar == false)
                    {
                        _Resultado = false;
                    }
                }
                else
                {
                    _Resultado = false;
                }
            }
            return(_Resultado);
        }
예제 #3
0
        private bool Splash()
        {
            bool flag = true;

            GUI.Splash frm = new GUI.Splash();
            frm.ShowDialog();
            return(flag);
        }
예제 #4
0
        private Boolean Splash()
        {
            Boolean resultado = true;

            GUI.Splash f = new GUI.Splash();
            f.ShowDialog();
            return(resultado);
        }
        /// <summary>
        /// Splash de inicio del sistema
        /// </summary>
        /// <returns>true</returns>
        private Boolean Splash()
        {
            Boolean Resultado = true;

            GUI.Splash f = new GUI.Splash();
            f.ShowDialog();
            if (f.OpcionDatosServidor)
            {
                this.resultadoServidor = false;
                DatosServidor();
                this.resultadoServidor = true;
            }
            return(Resultado);
        }
예제 #6
0
 private void Splash()
 {
     GUI.Splash f = new GUI.Splash();
     f.ShowDialog();
 }