예제 #1
0
        /// <summary>
        /// Update button action, perform google calendar sync
        /// </summary>
        /// <param name="sender">sender object</param>
        /// <param name="e">event arguments</param>
        private void BtnUpdate_Click(object sender, EventArgs e)
        {
            if (Charites.HaveRequiredData())
            {
                // disable buttons while performing update
                btnSettings.Enabled = false;
                btnUpdate.Enabled   = false;
                btnExit.Enabled     = false;

                this.backgroundSynchWorker.RunWorkerAsync();
            }
            else
            {
                MessageBox.Show("Please update program settings to enter an Account and select a Calendar to Update.");
            }
        }
예제 #2
0
 /// <summary>
 /// Background update worker, update the google calendar
 /// </summary>
 /// <param name="sender">sender object</param>
 /// <param name="e">event arguments</param>
 void BgSynchWorker_DoWork(object sender, DoWorkEventArgs e)
 {
     Charites.UpdateGoogleCalendar();
 }