Example #1
0
 protected override void OnDispose()
 {
     mCallBackFuctions.UserViewModelNetEvent -= this.NetEventResult;
     _User.MSGSync -= OnMsgAddToRepository;
     if (CloseViewEvent != null)
     {
         Delegate[] dels = CloseViewEvent.GetInvocationList();
         foreach (Delegate d in dels)
         {
             object delObj   = d.GetType().GetProperty("Method").GetValue(d, null);
             string funcName = (string)delObj.GetType().GetProperty("Name").GetValue(delObj, null);
             CloseViewEvent -= d as EventHandler <EventArgs>;
         }
     }
     if (MsgViewModelEvent != null)
     {
         Delegate[] dels = MsgViewModelEvent.GetInvocationList();
         foreach (Delegate d in dels)
         {
             object delObj   = d.GetType().GetProperty("Method").GetValue(d, null);
             string funcName = (string)delObj.GetType().GetProperty("Name").GetValue(delObj, null);
             MsgViewModelEvent -= d as EventHandler <UserMsgViewEventArgs>;
         }
     }
 }
 public void CloseView()
 {
     CloseViewEvent?.Invoke(this, EventArgs.Empty);
 }
Example #3
0
 private void WelcomeViewCloseClicked(object sender, CloseViewEvent args)
 => Navigator.NavigateTo(args);