internal Preferences(ViewerCore gotcore) { InitializeComponent(); core = gotcore; if (xkcd_Viewer.Properties.Settings.Default.offlineMode) offlineViewingButton.Text = "Disable..."; else offlineViewingButton.Text = "Enable..."; }
static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); ViewerCore core = new ViewerCore(); if (xkcd_Viewer.Properties.Settings.Default.isFirstRun) // Call the Out-Of-Box-Experience if needed Application.Run(new FirstRun(core)); Application.Run(new MainWindow()); // Continue to main window }
public MainWindow() { InitializeComponent(); core = new ViewerCore(); // Get latest comic ID currentMaxID = core.getMaxID(); if (xkcd_Viewer.Properties.Settings.Default.lastComicID != -1) { // Obviously the program has been used, so we'll restore state __goToID(xkcd_Viewer.Properties.Settings.Default.lastComicID); currentID = xkcd_Viewer.Properties.Settings.Default.lastComicID; } else { // Must be first run; go-to latest ID __goToID(currentMaxID); currentID = currentMaxID; xkcd_Viewer.Properties.Settings.Default.lastComicID = currentMaxID; } }
internal GoToDialog(MainWindow main, ViewerCore gotcore) { InitializeComponent(); caller = main; core = gotcore; }
internal FirstRun(ViewerCore givenCore) { core = givenCore; InitializeComponent(); }