Example #1
0
        public PkMainForm()
        {
            PkSplashForm.ShowSplashScreen();

            this.controller = new PkController();
            this.flying     = false;
            this.data       = PkData.Load();

            this.LogIn();
            this.SynchronizeAccountInfo();

            this.InitForm();
            this.UpdateDaysLeft();
            this.kitePanel.AddKites(this.data.Kites);
            this.StartRenewLoginThread();

            PkLogging.LogPanelUpdate += new EventHandler(this.logPanel.UpdateLog);
            this.logPanel.UpdateLog(this, EventArgs.Empty);

            PkSplashForm.CloseSplashScreen();
        }
Example #2
0
        private void LogIn()
        {
            if (this.data.Options.RememberMe)
            {
                PkServiceInfo info = PkService.Login(this.data.ServiceInfo.AccountId, this.data.ServiceInfo.Credentials, true);

                if (info != null)
                {
                    PkLogging.Logger(PkLogging.Level.Info, "Successfully logged in.");
                }
                else
                {
                    PkSplashForm.CloseSplashScreen();
                    this.ShowLoginForm();
                }
            }
            else
            {
                PkSplashForm.CloseSplashScreen();
                this.ShowLoginForm();
            }
        }