Beispiel #1
0
 public bool OnEvent(MainEventArgs e)
 {
     Console.WriteLine("la2");
     //Event?.Invoke(this, e);
     Event(this, e);
     return(!e.Cancel);
 }
        public void OnFinishedLoading(MainEventArgs e)
        {
            EventHandler <MainEventArgs> handler = FinishedLoading;

            if (handler != null)
            {
                handler(this, e);
            }
        }
Beispiel #3
0
 private void MainWindow_ev(object sender, MainEventArgs e)
 {
     if(e.ev == Event.ReadingData)
     {
         this.Dispatcher.Invoke((Action)(() => { 
         this.label.Content = WebCM.Properties.Resources.Wait_Reading;
         }));
     }
 }
Beispiel #4
0
        private void MainWindow_ev(object sender, MainEventArgs e)
        {
            if (e.menuChange == Menu.PersonAssigned)
            {
                string error = Common.ErrorData.exception;

                error = error.Substring(error.IndexOf('[') + 1);

                string remove = error.Substring(error.IndexOf(']'));

                oldCard = error = error.Trim(remove.ToCharArray());

                this.label.Text = String.Format(WebCM.Properties.Resources.User_Exists, error);
            }
        }
Beispiel #5
0
 private void MainWindow_ev(object sender, MainEventArgs e)
 {
     this.Dispatcher.Invoke((Action)(() =>
     {
         if (e.reader == ReaderPresence.Avaible && Common.ONLINE)
         {
             this.reader.IsEnabled = true;
         }
         else if (e.reader == ReaderPresence.NotAvaible)
         {
             this.reader.IsEnabled = false;
         }
         else if (e.server == ServerResponding.Avaible && Common.readreConnected)
         {
             this.reader.IsEnabled = true;
         }
         else if (e.server == ServerResponding.NotAvaible)
         {
             this.reader.IsEnabled = false;
         }
     }));
 }
Beispiel #6
0
 // Event handler from MainWindow
 private void MainWindow_ev(object sender, MainEventArgs e)
 {
     if (e.ev == Event.loadCard)
     {
         getCard((e.Edit) ? false : true);
     }
     else if (e.menuChange == Menu.ErrorOcurred)
     {
         Common.card = ViewState.Copy();
     }
     else if (e.ev == Event.CardDefaultSatate)
     {
         initDefault(true);
     }
 }