Exemple #1
0
 private void OnMainVocalSearch(object o)
 {
     try
     {
         if (SpeechRecognitionTool.RecognizeText.Count() != 0)
         {
             SpeechRecognitionTool.RecognizeText.Clear();
         }
         SpeechRecognitionTool.RecognizeText.Add("");
         SpeechRecognitionTool.start();
         MainVocalSearch.RaiseCanExecuteChanged();
         while (SpeechRecognitionTool.IsMicroUse)
         {
         }
         if (SpeechRecognitionTool.RecognizeText == null || ((SpeechRecognitionTool.RecognizeText.Count == 0 || SpeechRecognitionTool.Error) && SpeechRecognitionTool.RecognizeText[0] == ""))
         {
             throw (new Exception("Erreur de reconnaissance vocale:\n"));
         }
         SearchWord = FindGoodString(SpeechRecognitionTool.RecognizeText);
         SpeechRecognitionTool.MicClient.EndMicAndRecognition();
     }
     catch (Exception E)
     {
         SpeechRecognitionTool.MicClient.EndMicAndRecognition();
         ExceptionViewModel v = new ExceptionViewModel(E);
         ExceptionView      ExceptionWindow = new ExceptionView();
         ExceptionWindow.DataContext = v;
         ExceptionWindow.ShowDialog();
     }
 }
Exemple #2
0
 private void OnEditCommand(object o)
 {
     try
     {
         EditView      modifier = new EditView();
         EditViewModel modele   = new EditViewModel(modifier);
         modifier.DataContext = modele;
         modifier.ShowDialog();
         if (!modele.NormalEnd)
         {
             return;
         }
         if (modele.Nom == " ")
         {
             throw (new ArgumentException("Vous n'avez pas rentrez de nom. Erreur: \n"));
         }
         if (!modele.TestI)
         {
             if (Speaker == null)
             {
                 throw (new ArgumentException("Vous n'avez pas sélectioner d'intervenants. Erreur:\n"));
             }
             if (Speaker.Nom == modele.Nom && Speaker.TitreDIntervention == modele.Intervention)
             {
                 throw (new ArgumentException("Vous n'avez pas modifier l'intervenant. Erreur:\n"));
             }
             if (modele.Intervention == " ")
             {
                 throw (new ArgumentException("Vous n'avez pas rentrez d'intervention. Erreur: \n"));
             }
             ListeSpeaker[ListeSpeaker.ToList().FindIndex(Intervenant => (Intervenant.Nom == Speaker.Nom && Intervenant.TitreDIntervention == Speaker.TitreDIntervention))].Nom = modele.Nom;
             ListeSpeaker[ListeSpeaker.ToList().FindIndex(Intervenant => (Intervenant.Nom == Speaker.Nom && Intervenant.TitreDIntervention == Speaker.TitreDIntervention))].TitreDIntervention = modele.Intervention;
             Speaker = ListeSpeaker[ListeSpeaker.ToList().FindIndex(Intervenant => (Intervenant.Nom == modele.Nom && Intervenant.TitreDIntervention == modele.Intervention))];
             UpdateListeSpeaker();
         }
         else
         {
             if (Spectator == null)
             {
                 throw (new ArgumentException("Vous n'avez pas sélectionner de spectateurs. Erreur:\n"));
             }
             if (Spectator.Nom == modele.Nom)
             {
                 throw (new ArgumentException("Vous n'avez pas modifier le spectateur. Erreur:\n"));
             }
             ListeSpectator[ListeSpectator.ToList().FindIndex(Internaute => (Internaute.Nom == Spectator.Nom))].Nom = modele.Nom;
             Spectator = ListeSpectator[ListeSpectator.ToList().FindIndex(Internaute => (Internaute.Nom == modele.Nom))];
             UpdateListeSpectator();
         }
         NotifyPropertyChanged("ListeSpectator");
         NotifyPropertyChanged("ListeSpeaker");
     }
     catch (Exception E)
     {
         ExceptionViewModel v = new ExceptionViewModel(E);
         ExceptionView      ExceptionWindow = new ExceptionView();
         ExceptionWindow.DataContext = v;
         ExceptionWindow.ShowDialog();
     }
 }
Exemple #3
0
 private void OnDeleteCommand(object o)
 {
     try
     {
         DeleteView      supprimer = new DeleteView();
         DeleteViewModel modele    = new DeleteViewModel(supprimer);
         supprimer.DataContext = modele;
         supprimer.ShowDialog();
         if (!modele.NormalEnd)
         {
             return;
         }
         // if (modele.Nom == " ") { throw (new ArgumentException("Vous n'avez pas rentrez de nom. Erreur: \n")); }
         if (!modele.TestI)
         {
             Event.Intervenants.RemoveAt(Event.Intervenants.ToList().FindIndex(Intervenant => (Intervenant.Nom == Speaker.Nom)));
             UpdateListeSpeaker();
         }
         else
         {
             Event.Inscrits.RemoveAt(Event.Inscrits.ToList().FindIndex(Internaute => (Internaute.Nom == Spectator.Nom)));
             UpdateListeSpectator();
         }
         NotifyPropertyChanged("ListeSpectator");
         NotifyPropertyChanged("ListeSpeaker");
     }
     catch (Exception E)
     {
         ExceptionViewModel v = new ExceptionViewModel(E);
         ExceptionView      ExceptionWindow = new ExceptionView();
         ExceptionWindow.DataContext = v;
         ExceptionWindow.ShowDialog();
     }
 }
        private void btnInfo_Click(object sender, EventArgs e)
        {
            List <string> lst         = new List <string>();
            Event         eventFilter = new Event();

            try
            {
                _loger.Information("Fwk Loggin test", "Mensaje de prueba para Fwk Loggin");
                System.Configuration.ConnectionStringSettings cnn = System.Configuration.ConfigurationManager.ConnectionStrings[_LoggingSection.GetProvider().CnnStringName];
                if (cnn == null)
                {
                    throw new Exception("no existe la ConnectionString " + _LoggingSection.GetProvider().CnnStringName + " configurada en el config file para EventType.Information");
                }
                ITarget t = DatabaseTarget.TargetFactory(TargetType.Database, cnn.Name);
                _loger.Information("test logging", "Informe de error");
                //eventFilter.LogType = EventType.Information;
                //t.SearchByParam(eventFilter);
                //foreach (Event wEvent in t.SearchByParam(eventFilter))
                //{
                //    lst.Add(wEvent.Id.ToString());
                //}
                //t.Remove(lst);
                //eventFilter.LogType = EventType.None;
                txtNoStaticResult.Text = t.SearchByParam(eventFilter).GetXml();
            }
            catch (Exception ex)
            {
                ExceptionView.Show(ex);
            }
        }
Exemple #5
0
 void Update()
 {
     if (exceptionMsg != null)
     {
         ExceptionView.Show(exceptionMsg);
         exceptionMsg = null;
     }
 }
Exemple #6
0
        /// <summary>
        /// Shows an exception window.
        /// </summary>
        /// <param name="exception"><see cref="Exception"/> object to show an exception window for.</param>
        /// <param name="parent">Parent <see cref="Window"/> object</param>
        public static void ShowExceptionWindow(Exception exception, object parent)
        {
            var exceptionWindow = new ExceptionView
            {
                DataContext = new ExceptionViewModel(exception),
                Owner       = parent as Window
            };

            exceptionWindow.ShowDialog();
        }
 private void button1_Click_1(object sender, EventArgs e)
 {
     try
     {
         _loger.Error("Test Login", "pppppppppppppppppppppppp");
     }
     catch (Exception ex)
     {
         ExceptionView.Show(ex);
     }
 }
 private void button6_Click(object sender, EventArgs e)
 {
     try
     {
         _loger.Warning("Fwk Loggin test", "Mensaje de prueba para Fwk Loggin");
         txtNoStaticResult.Text = XmlTarget.Logs.GetXml();
     }
     catch (Exception ex)
     {
         ExceptionView.Show(ex);
     }
 }
 private void button5_Click(object sender, EventArgs e)
 {
     try
     {
         _loger.Audit("Fwk Loggin test", "mensaje de prueba para Fwk Loggin", Environment.UserName, Environment.MachineName);
         txtNoStaticResult.Text = XmlTarget.Logs.GetXml();
     }
     catch (Exception ex)
     {
         ExceptionView.Show(ex);
     }
 }
Exemple #10
0
        private void App_DispatcherUnhandledException(object sender,
                                                      System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            var exceptionView = new ExceptionView(e.Exception)
            {
                WindowStartupLocation = WindowStartupLocation.CenterScreen,
            };

            exceptionView.ShowDialog();

            e.Handled = true;
        }
        protected override void OnStartup(StartupEventArgs e)
        {
            ///MessageBox.Show("Startup");

            base.OnStartup(e);

            var container = new DependencyInjectionContainer();

            container.ExportInitialize <OptionsServicesWpf>((c, a, o) => o.SetRegistryPath("HLab.Erp"));
            container.Configure(c => c.Export <EventHandlerServiceWpf>().As <IEventHandlerService>());

            //boot.Container.ExportInitialize<BootLoaderErpWpf>((c, a, o) => o.SetMainViewMode(typeof(ViewModeKiosk)));

            NotifyHelper.EventHandlerService = container.Locate <IEventHandlerService>();
            // new EventHandlerServiceWpf(); boot.


            var boot = container.Locate <Bootstrapper>();


            var a0 = boot.LoadDll("HLab.Erp.Core.Wpf");
            var a2 = boot.LoadDll("HLab.Erp.Base.Wpf");
            var b0 = boot.LoadDll("HLab.Mvvm");
            var c0 = boot.LoadDll("HLab.Mvvm.Wpf");
            var d0 = boot.LoadDll("HLab.Erp.Data");
            var e0 = boot.LoadDll("HLab.Erp.Acl.Wpf");
            var a1 = boot.LoadDll("HLab.Erp.Workflows.Wpf");
            var f0 = boot.LoadDll("HLab.Erp.Core");
            var g0 = boot.LoadDll("HLab.Erp.Lims.Analysis.Module");

#if !DEBUG
            try
            {
#endif
            boot.Configure();

            var doc = container.Locate <IDocumentService>();
            doc.MainViewModel = container.Locate <MainWpfViewModel>();


            boot.Boot();
#if !DEBUG
        }
        catch (Exception ex)
        {
            var view = new ExceptionView {
                Exception = ex
            };
            view.ShowDialog();
        }
#endif
        }
Exemple #12
0
        private void App_DispatcherUnhandledException(object sender,
                                                      System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            var exceptionView = new ExceptionView(e.Exception)
            {
                Owner = Application.Current != null ? Application.Current.MainWindow : null,
                WindowStartupLocation = Application.Current != null ? WindowStartupLocation.CenterOwner : WindowStartupLocation.CenterScreen,
            };

            exceptionView.ShowDialog();

            e.Handled = true;
        }
Exemple #13
0
        private void button7_Click(object sender, EventArgs e)
        {
            try
            {
                Events _Logs = Fwk.Logging.Events.GetFromXml <Events>(Fwk.HelperFunctions.FileFunctions.OpenTextFile(_LoggingSection.GetProvider().FileName));

                txtNoStaticResult.Text = _Logs.GetXml();
            }
            catch (Exception ex)
            {
                ExceptionView.Show(ex);
            }
        }
Exemple #14
0
 private void CurrentDomainOnUnhandledException(object sender, UnhandledExceptionEventArgs e)
 {
     try
     {
         var wdw = new ExceptionView {
             ExceptionToDisplay = e.ExceptionObject as Exception
         };
         wdw.ShowDialog();
     }
     catch
     {
         MessageBox.Show(e.ExceptionObject?.ToString());
     }
 }
Exemple #15
0
    private void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
    {
        try
        {
            var wdw = new ExceptionView
            {
                ExceptionToDisplay = e.Exception,
            };
            wdw.ShowDialog();
        }
        catch
        {
            MessageBox.Show(e.Exception.ToString());
        }

        e.Handled = true;
    }
Exemple #16
0
 private void OnWaitingLine(object o)
 {
     try
     {
         WaitingLineViewModel m = new WaitingLineViewModel();
         WaitingLineView      v = new WaitingLineView();
         m.MainList = ListToObservableCollectionFactory.Convert(Event.ListeAttente.ToList());
         v.ShowDialog();
     }
     catch (Exception E)
     {
         ExceptionViewModel v = new ExceptionViewModel(E);
         ExceptionView      ExceptionWindow = new ExceptionView();
         ExceptionWindow.DataContext = v;
         ExceptionWindow.ShowDialog();
     }
 }
        private void ProcessRequest(object contextobj)
        {
            var context = (HttpListenerContext)contextobj;

            try
            {
                if (context.Request.HttpMethod.Equals("GET"))
                {
                    var msg = context.Request.HttpMethod + " " + context.Request.Url;

                    var runner = Router.Route(context.Request.Url.LocalPath);
                    var view   = runner.Run();

                    var response = ViewBinder.BindView(view);

                    var b = Encoding.UTF8.GetBytes(response);
                    context.Response.ContentLength64 = b.Length;
                    context.Response.OutputStream.Write(b, 0, b.Length);
                    context.Response.StatusCode = 200;
                }
                else
                {
                    throw new Exception(context.Request.HttpMethod + " Not Implemented");
                }
            }
            catch (Exception ex)
            {
                //LOG ERRORS TO Console
                Console.WriteLine("Request error: " + ex);
                var exceptionView = new ExceptionView()
                {
                    Exception = ex
                };

                var response = ViewBinder.BindView(exceptionView);

                byte[] b = Encoding.UTF8.GetBytes(response);
                context.Response.ContentLength64 = b.Length;
                context.Response.OutputStream.Write(b, 0, b.Length);
                context.Response.StatusCode = 500;
            }
            finally
            {
                context.Response.Close();
            }
        }
Exemple #18
0
 private void OnEditEventCommand(object o)
 {
     try
     {
         AddEventViewModel m = new AddEventViewModel();
         m.Name      = Event.Nom;
         m.NbPlace   = Event.NbPlaces;
         m.Place     = Event.Lieu.Nom;
         m.Date      = MaDate.DateToString(Event.Date);
         m.AddOrEdit = "Edit";
         AddEventView v = new AddEventView();
         v.DataContext = m;
         v.ShowDialog();
         if (!m.NormalEnd)
         {
             return;
         }
         if (m.Name == "" || m.Name == null)
         {
             throw (new ArgumentException("Vous n'avez pas rentrer de nom. Erreur:\n"));
         }
         if (m.Place == "" || m.Place == null)
         {
             throw (new ArgumentException("Vous n'avez pas rentrer de lieu. Erreur:\n"));
         }
         if (m.Date == "" || m.Date == null)
         {
             throw (new ArgumentException("Vous n'avez pas rentrer de date. Erreur:\n"));
         }
         Evenement tmp = new Evenement(m.Name, new MaDate(m.Date), m.NbPlace, new Lieu(m.Place));
         ListeEvent[ListeEvent.FindIndex(ev => ev.Nom == Event.Nom && ev.Date == Event.Date && ev.Lieu.Nom == Event.Lieu.Nom && ev.NbPlaces == Event.NbPlaces)].Nom      = m.Name;
         ListeEvent[ListeEvent.FindIndex(ev => ev.Nom == Event.Nom && ev.Date == Event.Date && ev.Lieu.Nom == Event.Lieu.Nom && ev.NbPlaces == Event.NbPlaces)].Lieu     = new Lieu(m.Place);
         ListeEvent[ListeEvent.FindIndex(ev => ev.Nom == Event.Nom && ev.Date == Event.Date && ev.Lieu.Nom == Event.Lieu.Nom && ev.NbPlaces == Event.NbPlaces)].NbPlaces = m.NbPlace;
         ListeEvent[ListeEvent.FindIndex(ev => ev.Nom == Event.Nom && ev.Date == Event.Date && ev.Lieu.Nom == Event.Lieu.Nom && ev.NbPlaces == Event.NbPlaces)].Date     = new MaDate(m.Date);
         UpdateListeEvent();
         NotifyPropertyChanged("ListeEventToShow");
     }
     catch (Exception E)
     {
         ExceptionViewModel v = new ExceptionViewModel(E);
         ExceptionView      ExceptionWindow = new ExceptionView();
         ExceptionWindow.DataContext = v;
         ExceptionWindow.ShowDialog();
     }
 }
Exemple #19
0
 private void OnAddCommand(object o)
 {
     try
     {
         AddView      ajouter = new AddView();
         AddViewModel modele  = new AddViewModel(ajouter);
         ajouter.DataContext = modele;
         ajouter.ShowDialog();
         if (!modele.NormalEnd)
         {
             return;
         }
         if (modele.Nom == " ")
         {
             throw (new ArgumentException("Vous n'avez pas rentrez de nom. Erreur: \n"));
         }
         if (!modele.TestI)
         {
             if (modele.Intervention == " ")
             {
                 throw (new ArgumentException("Vous n'avez pas rentrez d'intervention. Erreur: \n"));
             }
             List <Intervenant> tmp = Event.Intervenants;
             tmp.Add(new Intervenant(modele.Nom, modele.Intervention));
             Event.Intervenants = tmp;
             UpdateListeSpeaker();
         }
         else
         {
             List <Internaute> tmp = Event.Inscrits;
             tmp.Add(new Internaute(modele.Nom));
             Event.Inscrits = tmp;
             UpdateListeSpectator();
         }
         NotifyPropertyChanged("ListeSpectator");
         NotifyPropertyChanged("ListeSpeaker");
     }
     catch (Exception E)
     {
         ExceptionViewModel v = new ExceptionViewModel(E);
         ExceptionView      ExceptionWindow = new ExceptionView();
         ExceptionWindow.DataContext = v;
         ExceptionWindow.ShowDialog();
     }
 }
Exemple #20
0
 private void OnDeleteEventCommand(object o)
 {
     try
     {
         if (Event == null)
         {
             throw (new Exception("Il n y a pas d'évènements à supprimer. Erreur:\n"));
         }
         ListeEvent.Remove(Event);
         ListeEventToShow = ListToObservableCollectionFactory.Convert(ListeEvent);
         Event            = ListeEventToShow[0];
         NotifyPropertyChanged("ListeEventToShow");
         NotifyPropertyChanged("Event");
     }
     catch (Exception E)
     {
         ExceptionViewModel v = new ExceptionViewModel(E);
         ExceptionView      ExceptionWindow = new ExceptionView();
         ExceptionWindow.DataContext = v;
         ExceptionWindow.ShowDialog();
     }
 }
Exemple #21
0
 private void OnAddEventCommand(object o)
 {
     try
     {
         AddEventViewModel m = new AddEventViewModel();
         AddEventView      v = new AddEventView();
         v.DataContext = m;
         v.ShowDialog();
         if (!m.NormalEnd)
         {
             return;
         }
         if (m.Name == "" || m.Name == null)
         {
             throw (new ArgumentException("Vous n'avez pas rentrer de nom. Erreur:\n"));
         }
         if (m.Place == "" || m.Place == null)
         {
             throw (new ArgumentException("Vous n'avez pas rentrer de lieu. Erreur:\n"));
         }
         if (m.Date == "" || m.Date == null)
         {
             throw (new ArgumentException("Vous n'avez pas rentrer de date. Erreur:\n"));
         }
         Evenement tmp = new Evenement(m.Name, new MaDate(m.Date), m.NbPlace, new Lieu(m.Place));
         ListeEvent.Add(tmp);
         UpdateListeEvent();
         NotifyPropertyChanged("ListeEventToShow");
     }
     catch (Exception E)
     {
         ExceptionViewModel v = new ExceptionViewModel(E);
         ExceptionView      ExceptionWindow = new ExceptionView();
         ExceptionWindow.DataContext = v;
         ExceptionWindow.ShowDialog();
     }
 }
 public static void HandleException(Exception exception, string message)
 {
     if (exception == null)
     {
         LogTo.Error(message);
     }
     else
     {
         LogTo.Error(exception, message);
     }
     try
     {
         if (errorDialogShown)
         {
             return;
         }
         errorDialogShown = true;
         dispatcher.Invoke(() =>
         {
             var exceptionView = new ExceptionView(exception)
             {
                 Owner = ShellView.CurrentInstance
             };
             exceptionView.ShowDialog();
         });
     }
     catch (Exception showDialogException)
     {
         LogTo.Error(showDialogException, "Could not show error dialog. Shutting down.");
         Environment.Exit(1);
     }
     finally
     {
         errorDialogShown = false;
     }
 }
Exemple #23
0
 public static void HandleException(Exception exception, string message)
 {
     if (exception == null)
     {
         LogTo.Error(message);
     }
     else
     {
         LogTo.Error(exception, message);
     }
     try
     {
         if (errorDialogShown)
         {
             return;
         }
         errorDialogShown = true;
         dispatcher.Invoke(() =>
         {
             var exceptionView = new ExceptionView(exception)
             {
                 Owner = ShellView.CurrentInstance
             };
             exceptionView.ShowDialog();
         });
     }
     catch (Exception showDialogException)
     {
         LogTo.Error(showDialogException, "Could not show error dialog. Shutting down.");
         Environment.Exit(1);
     }
     finally
     {
         errorDialogShown = false;
     }
 }
Exemple #24
0
        public ViewRegistry(ITextUI ui)
        {
            TextClient GetGame() => ui.Game;

            ui.RegisterMainView(Exception     = new ExceptionView(), "exception");
            ui.RegisterMainView(Auth          = new AuthView(), "auth", "authentication", "login");
            ui.RegisterMainView(Home          = new HomeView(CommandContext.HOME.Set(), 60, 2, GetGame), "home");
            ui.RegisterSideView(GameModes     = new ListView(" # Game Modes", () => ui.Game.ActiveGameModes.Select(gm => ui.Game.Resources.GetMetadata(gm)).Where(gm => gm.PermissionLevel <= ui.Game.PermissionLevel).Select(gm => (FormattedString)gm.Name), CommandContext.HOME.Set(), 25), "modes", "gamemodes", "game modes");
            ui.RegisterSideView(Settings      = new SettingsView(GetGame), "settings", "options");
            ui.RegisterSideView(Friends       = new ListView(" # Friends", () => ui.Game.Friends.Values.Select(f => f.ToDisplay()), CommandContext.HOME.Set(), 22), "friends", "friendlist", "friend list");
            ui.RegisterSideView(Notifications = new ListView(" # Notifications", () => ui.Game.PendingFriendRequests.Keys.Select(fr => (FormattedString)string.Format("FR {0}", fr)).Concat(ui.Game.PendingPartyInvitations.Keys.Select(pi => (FormattedString)string.Format("PI {0}", pi))), CommandContext.HOME.Set(), 23), "notifications");
            ui.RegisterSideView(Party         = new PartyView(CommandContext.HOME.Set().And(c => ui.Game.Party != null), GetGame), "party");
            ui.RegisterMainView(Game          = new GameView(CommandExtensions.IsInLobbyOrGame, 60, 20, GetGame), "game");
            ui.RegisterSideView(Players       = new ListView(" # Players", () => ui.Game.GameState.Players.Select(ps => (FormattedString)(ps.Dead ? "" : ui.Game.GameState.ToName(ps.ID, true))), CommandExtensions.IsInLobbyOrGame, 25), "players", "playerlist", "player list");
            ui.RegisterSideView(Roles         = new ListView(" # Roles", () => ui.Game.GameState.Roles.Select(r => ui.Game.Resources.Of(r)), CommandExtensions.IsInLobbyOrGame, 25), "roles", "rolelist", "role list");
            ui.RegisterSideView(Graveyard     = new ListView(" # Graveyard", () => ui.Game.GameState.Graveyard.Select(ps => ui.Game.GameState.ToName(ps, true)), CommandExtensions.IsInGame, 40), "graveyard", "deaths");
            ui.RegisterSideView(Team          = new ListView(" # Team", () => ui.Game.GameState.Team.Select(ps => !ps.Dead || ps.Role == Role.DISGUISER ? ui.Game.GameState.ToName(ps, true) : ""), CommandExtensions.IsInGame, 40), "team", "teammates");
            ui.RegisterSideView(LastWill      = new WillView(CommandExtensions.IsInGame), "lw", "dn", "lastwill", "deathnote", "last will", "death note");
            ui.RegisterSideView(Winners       = new ListView(" # Winners", () => ui.Game.GameState.Winners.Select(p => (FormattedString)ui.Game.GameState.ToName(p, true)), CommandContext.GAME_END.Set(), 25), "winners", "winnerlist", "winner list");
            ui.RegisterSideView(MyLastWill    = new EditableWillView(CommandExtensions.IsInGame), "mlw", "mylastwill", "my lastwill", "my last will");
            ui.RegisterSideView(MyDeathNote   = new EditableWillView(context => CommandExtensions.IsInGame(context) && ui.Game.GameState.Role.HasDeathNote()), "mdn", "mydeathnote", "my deathnote", "my death note");
            ui.RegisterSideView(MyForgedWill  = new EditableWillView(context => CommandExtensions.IsInGame(context) && ui.Game.GameState.Role == Role.FORGER), "mfw", "myforgedwill", "my forgedwill", "my forged will");
            ui.RegisterSideView(Help          = new HelpView(ui.Commands, () => ui.CommandContext, 40, 1), "?", "h", "help");
        }
Exemple #25
0
        /// <summary>
        /// Informs the user via error popup about a given exception.
        /// </summary>
        /// <param name="ex"></param>
        public static void InformUserAboutError(Exception ex)
        {
            var exceptionView = new ExceptionView(ex);

            exceptionView.Show();
        }