예제 #1
0
        private void ClientConnect(ConnectEventArgs args)
        {
            if (args.Error == null)
            ClientModel.Api.Register();
              else
              {
            SelectedRoom.AddSystemMessage(args.Error.Message);

            if (ClientModel.IsInited)
              ClientModel.Reset();
              }
        }
예제 #2
0
    private void ClientConnect(object sender, ConnectEventArgs e)
    {
      Dispatcher.BeginInvoke(new Action<ConnectEventArgs>(args =>
      {
        if (args.Error != null)
        {
          SelectedRoom.AddSystemMessage(args.Error.Message);

          if (ClientModel.IsInited)
            ClientModel.Reset();

          return;
        }

        if (ClientModel.Api != null)
          ClientModel.Api.Register();
      }), e);
    }