public void AddCommandViewerForSuper() { CommandViewer commandViewer = new CommandViewer(); commandViewer.Command = new Command(true, new System.Action(AddNewUser)); commandViewer.Name = "New User"; UserResps.Add(commandViewer); commandViewer = new CommandViewer(); commandViewer.Command = new Command(true, new System.Action(MyUsers)); commandViewer.Name = "My Users"; UserResps.Add(commandViewer); commandViewer = new CommandViewer(); commandViewer.Command = new Command(true, new System.Action(ProjectsCmd)); commandViewer.Name = "Projects"; UserResps.Add(commandViewer); commandViewer = new CommandViewer(); commandViewer.Command = new Command(true, new System.Action(PeriodsCmd)); commandViewer.Name = "Periods"; UserResps.Add(commandViewer); commandViewer = new CommandViewer(); commandViewer.Command = new Command(true, new System.Action(TasksCmd)); commandViewer.Name = "Our Tasks"; UserResps.Add(commandViewer); }
private void AddResponsibilities() { UserResps = new List <CommandViewer>(); CommandViewer commandViewer = new CommandViewer(); commandViewer.Command = new Command(true, new System.Action(GetInfo)); commandViewer.Name = "Get Info"; UserResps.Add(commandViewer); if (User.Possession == UserPossession.Super) { AddCommandViewerForSuper(); } commandViewer = new CommandViewer(); commandViewer.Command = new Command(true, new System.Action(LogOut)); commandViewer.Name = "Log Out"; UserResps.Add(commandViewer); }