Exemple #1
0
        /// <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();
        }
Exemple #2
0
 /// <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);
 }
 /// <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);
 }