public wuc_login(CImapClient srv, LoginCred login, Domains domains)
        {
            InitializeComponent();
              this.srv = srv;
              this.login = login;
              this.domains = domains;

              FillDomains();
        }
示例#2
0
 /// <summary>
 /// Serialize Domain object.
 /// </summary>
 /// <param name="serializableObject">The Domain object you would like to serialize</param>
 /// <param name="fileName">The path string you would like the file to be saved</param>
 public static void SerializeDomains(Domains serializableObject, string fileName)
 {
     if (serializableObject == null)
     return;
       XmlSerializer xmls = new XmlSerializer(typeof(Domains));
       Stream stream = File.Open(fileName, FileMode.Create);
       xmls.Serialize(stream, serializableObject);
       stream.Close();
       stream.Dispose();
 }
示例#3
0
 /// <summary>
 /// Checks if the domain file exists; if so, deserialize it, if not, create the list and add default domain.
 /// </summary>
 private void GetDomains()
 {
     if (File.Exists(domainPath))
       {
     try
     {
       this.domains = Common.DeserializeDomains(domainPath);
     }
     catch (Exception)
     {
       File.Delete(domainPath);
       domains = new Domains();
       domains.DomainList.Add("gmail.com");
     }
       }
       else
       {
     domains = new Domains();
     domains.DomainList.Add("gmail.com");
       }
 }
 public wuc_addDomain(Domains domains)
 {
     InitializeComponent();
       this.domains = domains;
 }