Esempio n. 1
0
        private RemindersPanel CreatePanel()
        {
            this.existingReminders = this.getAllRemindersCommand.Do(null) as IEnumerable <IReminder>;
            this.reminderPlugins   = this.getAllReminderPluginsCommand.Do(null) as ReminderPluginsRepository;

            var newPanel = new RemindersPanel();

            newPanel.DeleteReminderClicked += this.DeleteReminder;
            newPanel.EditReminderClicked   += this.EditReminder;

            foreach (var plugin in this.reminderPlugins.All)
            {
                newPanel.AddReminderPlugin(plugin, this.NewReminder);
            }

            foreach (var reminder in this.existingReminders)
            {
                newPanel.AddReminder(reminder);
            }

            return(newPanel);
        }
        private RemindersPanel CreatePanel()
        {
            this.existingReminders = this.getAllRemindersCommand.Do(null) as IEnumerable<IReminder>;
            this.reminderPlugins = this.getAllReminderPluginsCommand.Do(null) as ReminderPluginsRepository;

            var newPanel = new RemindersPanel();

            newPanel.DeleteReminderClicked += this.DeleteReminder;
            newPanel.EditReminderClicked += this.EditReminder;

            foreach (var plugin in this.reminderPlugins.All)
            {
                newPanel.AddReminderPlugin(plugin, this.NewReminder);
            }

            foreach (var reminder in this.existingReminders)
            {
                newPanel.AddReminder(reminder);
            }

            return newPanel;
        }
Esempio n. 3
0
 public Control GetPanel()
 {
     return(this.panel ?? (this.panel = this.CreatePanel()));
 }
 public Control GetPanel()
 {
     return this.panel ?? (this.panel = this.CreatePanel());
 }