Beispiel #1
0
        private void NetworkClient_messageEvent(object sender, messageArgs e)
        {
            if (App.loginID == null || App.loginID == string.Empty)
            {
                if (e.message.Equals("200"))
                {
                    this.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate
                    {
                        main        = new Main();
                        App.main    = main;
                        App.loginID = this.id.Text;
                        main.Show();
                        this.Hide();
                    }));
                }
                else
                {
                    this.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate
                    {
                        this.id.IsEnabled     = true;
                        this.server.IsEnabled = true;
                    }));

                    notify.showError("아이디를 확인하세요.");
                }
            }
        }
Beispiel #2
0
 private void Sock_messageEvent(object sender, messageArgs e)
 {
     App.Current.Dispatcher.Invoke(new Action(delegate
     {
         var socketInstance = sock.GetSocketInstance();
         if (socketInstance != null)
         {
             if (socketInstance.lastSendtime != null)
             {
                 TimeSpan timediff = DateTime.Now - socketInstance.lastSendtime;
                 if (timediff.TotalSeconds > 5)
                 {
                     notifier.ClearMessages(new ClearAll());
                     notifier.ShowInformation("본사에서 메시지가 도착했습니다.\n" + e.message);
                 }
             }
         }
     }));
 }