/// <summary> /// Initializes a new instance of the <see cref="pgcal.Core.EventConverter"/> class. /// </summary> /// <param name="gcal">the google calendar user framework, /// as an GCalFramework object</param> /// <param name="evt">the event, as an EventEntry object</param> public EventConverter(GCalFramework gcal, EventEntry evt) { this.place = ""; this.gcal = gcal; this.evt = evt; }
/// <summary> /// Tries to connect to google calendar, through a new framework. /// </summary> protected void Connect() { try { this.SetStatus( StringsL18n.Get( StringsL18n.StringId.StCreatingFramework ) ); this.gcalFrm = new GCalFramework( this.edtUsr.Text, this.edtPsw.Text ); this.OnTransaction = false; this.SetCalendarClientMode(); this.UpdateCurrentEventEntry(); this.edtUsr.Text = this.gcalFrm.Usr; this.edtPsw.Text = this.gcalFrm.Psw; this.SetStatus(); } catch(Exception exc) { MessageBox.Show( this, string.Format( "{0}:\n{1}", StringsL18n.Get( StringsL18n.StringId.ErConnection ), exc.Message ), AppInfo.Name, MessageBoxButtons.OK, MessageBoxIcon.Error ); this.SetConnectMode(); } }
/// <summary> /// Initializes a new instance of the <see cref="pgcal.Core.EventConverter"/> class. /// </summary> /// <param name="gcal">the google calendar user framework, /// as an GCalFramework object</param> /// <param name="evt">the event, as an EventEntry object</param> public EventConverter(GCalFramework gcal, EventEntry evt) { this.place = ""; this.gcal = gcal; this.evt = evt; }
/// <summary> /// Prepares the UI for connection to google calendar /// </summary> protected void SetConnectMode() { // Data this.gcalFrm = null; // Gui this.DeactivateGui(); this.pnlEventsContainer.Hide(); this.SetStatus( StringsL18n.Get( StringsL18n.StringId.StLogin ) ); this.pnlLogin.Show(); this.edtUsr.Focus(); this.ActiveControl = this.edtUsr; }