Beispiel #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;
        }
Beispiel #2
0
        private void buttonPostsPanelExecute(object i_Sender, EventArgs i_E)
        {
            if (isUserLogged())
            {
                handleControlsPanelSwitch();
                if (FormPosts == null)
                {
                    FormPosts = new FormPosts(DataManager)
                    {
                        Dock = DockStyle.Fill, TopLevel = false, TopMost = true
                    };
                }

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