//===================================================================== /// <summary> /// Constructor /// </summary> public AttachmentsControl() { InitializeComponent(); attach = new AttachPropertyCollection(); this.SetButtonStates(); }
/// <summary> /// Initialize the dialog controls using the specified attachments collection /// </summary> /// <param name="attachments">The attachments from which to get the settings</param> public void SetValues(AttachPropertyCollection attachments) { string desc; attach.Clear(); attach.CloneRange(attachments); lbAttachments.Items.Clear(); foreach (AttachProperty a in attach) { if (a.ValueLocation == ValLocValue.Binary) { desc = String.Format("Inline - {0}", a.FormatType); } else { desc = String.Format("External - {0}, {1}", a.FormatType, a.Value); } lbAttachments.Items.Add(desc); } if (attach.Count > 0) { lbAttachments.SelectedIndex = 0; } else { lbAttachments.SelectedIndex = -1; } this.SetButtonStates(); }
/// <summary> /// The method can be called to clear all current property values from the journal. The version is left /// unchanged. /// </summary> public override void ClearProperties() { classification = null; categories = null; url = null; uid = null; lastMod = null; dateCreated = null; startDate = null; timeStamp = null; summary = null; desc = null; sequence = null; comment = null; organizer = null; recurId = null; status = null; contacts = null; attendees = null; relatedTo = null; attachments = null; reqStats = null; customProps = null; base.ClearProperties(); }
/// <summary> /// Initialize the dialog controls using the specified attachments collection /// </summary> /// <param name="attachments">The attachments from which to get the settings</param> public void SetValues(AttachPropertyCollection attachments) { string desc; attach.Clear(); attach.CloneRange(attachments); lbAttachments.Items.Clear(); foreach(AttachProperty a in attach) { if(a.ValueLocation == ValLocValue.Binary) desc = String.Format("Inline - {0}", a.FormatType); else desc = String.Format("External - {0}, {1}", a.FormatType, a.Value); lbAttachments.Items.Add(desc); } if(attach.Count > 0) lbAttachments.SelectedIndex = 0; else lbAttachments.SelectedIndex = -1; this.SetButtonStates(); }
/// <summary> /// The method can be called to clear all current property values from the alarm. The version is left /// unchanged. /// </summary> public override void ClearProperties() { action = null; trigger = null; repeat = null; duration = null; summary = null; desc = null; attendees = null; attachments = null; customProps = null; }
/// <summary> /// The method can be called to clear all current property values from the event. The version is left /// unchanged. /// </summary> public override void ClearProperties() { classification = null; categories = null; resources = null; url = null; uid = null; geo = null; lastMod = null; dateCreated = null; startDate = null; endDate = null; dateStamp = null; summary = null; desc = null; location = null; priority = null; sequence = null; transp = null; rNum = null; comment = null; organizer = null; recurId = null; status = null; duration = null; contacts = null; attendees = null; relatedTo = null; attachments = null; reqStats = null; alarms = null; customProps = null; base.ClearProperties(); }
/// <summary> /// Update the attachments collection with the dialog control values /// </summary> /// <param name="attachments">The attachments collection to update</param> public void GetValues(AttachPropertyCollection attachments) { attachments.Clear(); attachments.CloneRange(attach); }