Ejemplo n.º 1
0
        private void restartApp()
        {
            // reset forms
            FormPosts?.Dispose();
            FormPosts = null;
            FormCheckIns?.Dispose();
            FormCheckIns = null;
            FormMusic?.Dispose();
            FormMusic = null;
            buttonAbout.PerformClick();

            // reset labels
            labelFirstName.Text = "First Name: N/A";
            labelLastName.Text  = "Last Name: N/A";
            labelGender.Text    = "Gender: N/A";
            labelBirthDay.Text  = "BirthDay: N/A";
            labelCity.Text      = "City: N/A";
            labelEmail.Text     = "Email: N/A";

            // reset profile picture
            this.circularPictureBoxProfile.Image = Properties.Resources.Facebook_no_profile_picture;

            // reset friends list
            listBoxFriends.Invoke(new Action(() => listBoxFriends.Items.Clear()));

            // logout
            this.buttonLogin.Visible   = true;
            LoginManager               = null;
            checkBoxRememberMe.Checked = false;
            checkBoxRememberMe.Enabled = false;
        }
Ejemplo n.º 2
0
        private void buttonCheckinPanelExecute(object i_Sender, EventArgs i_E)
        {
            if (isUserLogged())
            {
                handleControlsPanelSwitch();
                if (FormCheckIns == null)
                {
                    FormCheckIns = new FormCheckIns(DataManager)
                    {
                        Dock = DockStyle.Fill, TopLevel = false, TopMost = true
                    };
                }

                this.panelForm.Controls.Add(FormCheckIns);
                FormCheckIns.Show();
                this.labelPanelTitle.Text = ((Button)i_Sender).Text;
            }
        }