示例#1
0
        internal Preferences(ViewerCore gotcore)
        {
            InitializeComponent();
            core = gotcore;

            if (xkcd_Viewer.Properties.Settings.Default.offlineMode)
                offlineViewingButton.Text = "Disable...";
            else
                offlineViewingButton.Text = "Enable...";
        }
示例#2
0
        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
        }
示例#3
0
        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;
            }
        }
示例#4
0
 internal GoToDialog(MainWindow main, ViewerCore gotcore)
 {
     InitializeComponent();
     caller = main;
     core = gotcore;
 }
示例#5
0
 internal FirstRun(ViewerCore givenCore)
 {
     core = givenCore;
     InitializeComponent();
 }