/// <summary> /// Initializes a new instance of the <see cref="LearningModuleTreeViewItem"/> class. /// </summary> /// <param name="learningModule">The learning module.</param> /// <remarks>Documented by Dev08, 2009-07-15</remarks> public LearningModuleTreeViewItem(IDictionary learningModule) : base() { context = SynchronizationContext.Current; if (context == null) { context = new SynchronizationContext(); } this.learningModule = learningModule; hasCustomSettings = learningModule.AllowedSettings != null && !SettingsManagerBusinessLogic.IsEmptySetting(learningModule.AllowedSettings) ? true : false; }
public CardTreeViewItem(ICard card, ChapterTreeViewItem parent) : base(parent) { this.card = card; //Cache question = BusinessLogic.HtmlHelper.HtmlStripTags(card.Question.ToString(), false, true); answer = BusinessLogic.HtmlHelper.HtmlStripTags(card.Answer.ToString(), false, true); questionExample = BusinessLogic.HtmlHelper.HtmlStripTags(card.QuestionExample.ToString(), false, true); answerExample = BusinessLogic.HtmlHelper.HtmlStripTags(card.AnswerExample.ToString(), false, true); id = card.Id; hasCustomSettings = card.Settings != null && !SettingsManagerBusinessLogic.IsEmptySetting(card.Settings) ? true : false; }
/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> /// <remarks>Documented by Dev05, 2009-04-09</remarks> /// <remarks>Documented by Dev08, 2009-07-15</remarks> public MainWindow() { InitializeComponent(); SettingsManagerLogic = new SettingsManagerBusinessLogic(); SettingsManagerLogic.LearningModuleOpened += new EventHandler(SettingsManagerLogic_LearningModuleOpened); SettingsManagerLogic.LearningModuleException += new SettingsManagerBusinessLogic.ExceptionEventHandler(SettingsManagerLogic_LearningModuleException); SettingsManagerLogic.LoadingIPhone += new SettingsManagerBusinessLogic.LoadingEventHandler(SettingsManagerLogic_LoadingIPhone); SettingsManagerLogic.FinishLoadingIPhone += new EventHandler(SettingsManagerLogic_FinishLoadingIPhone); settingsControlMain.Settings = new SettingsTemplate(); ExtensionList = new ObservableCollection <IExtension>(); TreeViewItems = new ObservableCollection <LearningModuleTreeViewItem>(); filterSortControl.TreeViewItems = TreeViewItems; EnableControls(false); }
/// <summary> /// Initializes a new instance of the <see cref="MainWindow"/> class. /// </summary> /// <remarks>Documented by Dev05, 2009-04-09</remarks> /// <remarks>Documented by Dev08, 2009-07-15</remarks> public MainWindow() { InitializeComponent(); SettingsManagerLogic = new SettingsManagerBusinessLogic(); SettingsManagerLogic.LearningModuleOpened += new EventHandler(SettingsManagerLogic_LearningModuleOpened); SettingsManagerLogic.LearningModuleException += new SettingsManagerBusinessLogic.ExceptionEventHandler(SettingsManagerLogic_LearningModuleException); SettingsManagerLogic.LoadingIPhone += new SettingsManagerBusinessLogic.LoadingEventHandler(SettingsManagerLogic_LoadingIPhone); SettingsManagerLogic.FinishLoadingIPhone += new EventHandler(SettingsManagerLogic_FinishLoadingIPhone); settingsControlMain.Settings = new SettingsTemplate(); ExtensionList = new ObservableCollection<IExtension>(); TreeViewItems = new ObservableCollection<LearningModuleTreeViewItem>(); filterSortControl.TreeViewItems = TreeViewItems; EnableControls(false); }
/// <summary> /// Initializes a new instance of the <see cref="ChapterTreeViewItem"/> class. /// </summary> /// <param name="chapter">The chapter.</param> /// <remarks>Documented by Dev08, 2009-07-15</remarks> public ChapterTreeViewItem(IChapter chapter, LearningModuleTreeViewItem parent) : base(parent) { this.chapter = chapter; hasCustomSettings = chapter.Settings != null && !SettingsManagerBusinessLogic.IsEmptySetting(chapter.Settings) ? true : false; }