Ejemplo n.º 1
0
 // This is the method VS generates when you double-click the button
 private void clearButton_Click(object sender, EventArgs e)
 {
     this.Cursor = Cursors.WaitCursor;
     try
     {
         FormCleaner cleaner = new FormCleaner();
         cleaner.ClearForm(this);
     }
     catch (Exception ex)
     {
         // ... have here code to log the exception to a file
         // and/or showing a message box to the user
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Ejemplo n.º 2
0
        public FormFacebookApp()
        {
            InitializeComponent();

            m_formCleaner = new FormCleaner();

            m_formCleaner.AttachAllControls(this);             // Add all of the wanted controls to the subject./*Lior*/
            m_formCleaner.AttachLegacyControl(this.nameLabel); // Can add legacy controls individually.

            StartPosition = FormStartPosition.Manual;

            m_LoggedIn = FacebookEngine.Instance.RememberUser;

            m_FormSettings = FacebookAppSettings.LoadAppSettingsFromFile();

            commandButtonFetchResumeInfo.Command = new FetchResumeInformationCommand {
                Client = this
            };

            commandButtonCreateCv.Command = new CreateResumeCommand {
                Client = this
            };

            commandButtonSendToMail.Command = new SendResumeToMailCommand {
                Client = this
            };

            if (m_FormSettings.RememberUser)
            {
                checkBoxRemember.Checked = m_FormSettings.RememberUser;
                Location = m_FormSettings.LastWindowLocation;
                Size     = m_FormSettings.LastWindowSize;

                if (m_LoggedIn)
                {
                    fetchLoggedInUserWrapper();
                }
            }
        }