Ejemplo n.º 1
0
        public void AddUniversityMember(IUniversityMember member)
        {
            ICommand command = new AddUniversityMemberCommand(university, member);

            commandsManager.Execute(command);
            uiManager.UpdateUI();
        }
Ejemplo n.º 2
0
 public void RemoveSelectedUniversityMember()
 {
     if (uiManager.UniversityMemberSelected)
     {
         IUniversityMember uMember = university[uiManager.UniversityMemberIndex];
         ICommand          command = new RemoveUniversityMemberCommand(university, uMember);
         commandsManager.Execute(command);
         uiManager.UpdateUI();
     }
 }
Ejemplo n.º 3
0
        // ---------------------------------------------------------------------------------------------
        // Обработка событий от элементов интерфейса.
        // ---------------------------------------------------------------------------------------------

        private void miAddPluginUniversityMember_Click(object sender, EventArgs e)
        {
            try
            {
                string            type   = (sender as ToolStripMenuItem).Name.Substring(2);
                IUniversityMember member = (IUniversityMember)Activator.CreateInstance(pluginsManager[type]);
                taskManager.AddUniversityMember(member);
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
            }
        }
Ejemplo n.º 4
0
 public RemoveUniversityMemberCommand(University university,
                                      IUniversityMember member) : base(university)
 {
     oldMember = member ?? throw new ArgumentNullException();
 }
Ejemplo n.º 5
0
 public AddUniversityMemberCommand(University university,
                                   IUniversityMember member) : base(university)
 {
     newMember = member ?? throw new ArgumentNullException();
 }