예제 #1
0
        public DashSystemController(IDashSystemUI ui, IDashSystem dashSystem)
        {
            UI         = ui;
            DashSystem = dashSystem;

            ui.CommandEnteredEvent += OnCommandEntered;

            AdminCommands ac = new AdminCommands(UI, DashSystem);

            AdminCommandLookup = new Dictionary <string, Action <string[]> >
            {
                { ":q", ac.Quit },
                { ":quit", ac.Quit },
                { ":activate", ac.Activate },
                { ":deactivate", ac.Deactivate },
                { ":crediton", ac.CreditOn },
                { ":creditoff", ac.CreditOff },
                { ":addcredits", ac.AddCredits },
                { ":debug", ac.SetDebug },
                { ":critical", ac.GetUsersWithCriticalBalance },
                { ":getuser", ac.GetUserByUsername }
            };
        }
예제 #2
0
 public AdminCommands(IDashSystemUI ui, IDashSystem dashSystem)
 {
     UI         = ui;
     DashSystem = dashSystem;
 }