Ejemplo n.º 1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            // Check for an update
            UpdateInfo info           = UpdateChecker.CheckForUpdate();
            Version    currentVersion = Assembly.GetExecutingAssembly().GetName().Version;

            if (currentVersion < info._version)
            {
                MessageBox.Show("There is a new update available.\nGo to: https://github.com/OatmealDome/LoungeChair/releases/latest");
            }

            // Check if we need to do first-run setup
            if (Configuration.currentConfig.session_token.Equals("not-logged-in"))
            {
                // Create a new authorization request
                request = new AuthorizationRequest("npf71b963c1b7b6d119://auth", "71b963c1b7b6d119", "openid user user.birthday user.mii user.screenName");

                // Open it in the browser and check if the log in was a success
                BrowserForm form = new BrowserForm(request.ToUrl());
                if (form.ShowDialog(this) == DialogResult.Cancel)
                {
                    // Close the application, the form was closed
                    MessageBox.Show("The login was cancelled. Restart LoungeChair and try again.");
                    this.Close();
                }
            }
            else
            {
                LoadingForm form = new LoadingForm(this, LoadingType.INITIAL_LOGIN, null);
                form.ShowDialog(this);
            }
        }
Ejemplo n.º 2
0
 internal LoungeChairRequestHandler(BrowserForm form)
 {
     browserForm = form;
 }