/// <summary> /// Creates the ComicsScreen /// </summary> public ComicsScreen() { SnapStream.Logging.WriteLog("Comics Plugin Started"); System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly(); System.IO.FileInfo fi = new System.IO.FileInfo(a.Location); _homeDirectory = fi.DirectoryName; // Create a new updater //_updater = new ComicsUpdater(); SingletonComicsUpdater.Instance.Initialize(fi.DirectoryName); // Register the handler for changing days daysChanged.Execute += new CommandExecuteHandler(daysChanged_Execute); // Text Objects // Show the instructions _instructions = new TextWindow(); Add(_instructions); // Create the viewer window for the comics _comicsViewer = new VariableItemList(); Add(_comicsViewer); // Sort by option _sortBy = new OptionList(); _sortBy.DefaultItemTextHeightPercent = 0.5; OptionListItem byWhat = new OptionListItem("Sort By"); byWhat.AddSelectorItem("Date", "Date"); byWhat.AddSelectorItem("Comic", "Comic"); _sortBy.AddItem(byWhat); Add(_sortBy); byWhat.SelectorValueChanged += new SelectorValueChangedEventHandler(sortBy_SelectorValueChanged); _sortBy.Visible = false; _comicsViewer.ItemActivated += new ItemActivatedEventHandler(ComicsViewer_ItemActivated); _comicsViewer.Visible = true; _comicsViewer.Focus(); _comicsViewer.Height = 480; this.Render(); _comicsViewer.HighlightItemImage = String.Empty; _comicsViewer.DefaultItemImage = String.Empty; return; }
/// <summary> /// Creates the ComicsScreen /// </summary> public ComicsScreen() { SnapStream.Logging.WriteLog("Comics Plugin Started"); System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly(); System.IO.FileInfo fi = new System.IO.FileInfo( a.Location ); _homeDirectory = fi.DirectoryName; // Create a new updater //_updater = new ComicsUpdater(); SingletonComicsUpdater.Instance.Initialize( fi.DirectoryName ); // Register the handler for changing days daysChanged.Execute += new CommandExecuteHandler( daysChanged_Execute ); // Text Objects // Show the instructions _instructions = new TextWindow(); Add( _instructions ); // Create the viewer window for the comics _comicsViewer = new VariableItemList(); Add( _comicsViewer ); // Sort by option _sortBy = new OptionList(); _sortBy.DefaultItemTextHeightPercent = 0.5; OptionListItem byWhat = new OptionListItem("Sort By"); byWhat.AddSelectorItem("Date","Date"); byWhat.AddSelectorItem("Comic","Comic"); _sortBy.AddItem(byWhat); Add ( _sortBy ); byWhat.SelectorValueChanged += new SelectorValueChangedEventHandler( sortBy_SelectorValueChanged ); _sortBy.Visible = false; _comicsViewer.ItemActivated += new ItemActivatedEventHandler(ComicsViewer_ItemActivated); _comicsViewer.Visible = true; _comicsViewer.Focus(); _comicsViewer.Height = 480; this.Render(); _comicsViewer.HighlightItemImage = String.Empty; _comicsViewer.DefaultItemImage = String.Empty; return; }