Ejemplo n.º 1
0
 internal override void ActivatePage(int previousIndex)
 {
     base.ActivatePage(previousIndex);
     wizard = (KeyRecoveryWizard)this.Parent;
     selectedDomain = wizard.DomainSelectionPage.SelectedDomain;
     this.accountBox.Text = selectedDomain.Name;
     this.oneTimePassphrase.Enabled = false;
        ((KeyRecoveryWizard)this.Parent).WizardButtons = KeyRecoveryWizardButtons.Back | KeyRecoveryWizardButtons.Cancel;
        this.LocationEntry.Focus();
 }
Ejemplo n.º 2
0
 internal override void ActivatePage(int previousIndex)
 {
     base.ActivatePage(previousIndex);
     wizard = (KeyRecoveryWizard)this.Parent;
     selectedDomain = wizard.DomainSelectionPage.SelectedDomain;
     this.accountBox.Text = wizard.DomainSelectionPage.SelectedDomain.Name +"-"+ wizard.DomainSelectionPage.SelectedDomain.Host;
     ((KeyRecoveryWizard)this.Parent).WizardButtons = KeyRecoveryWizardButtons.Back | KeyRecoveryWizardButtons.Cancel;
      UpdateSensitivity();
      p12TextBox.Focus();
 }
Ejemplo n.º 3
0
 internal override void ActivatePage(int previousIndex)
 {
     base.ActivatePage(previousIndex);
     wizard = (KeyRecoveryWizard)this.Parent;
     selectedDomain = wizard.DomainSelectionPage.SelectedDomain ;
     this.accountBox.Text = wizard.DomainSelectionPage.SelectedDomain.Name +"-"+ wizard.DomainSelectionPage.SelectedDomain.Host;
     DisplayRAName(selectedDomain);
     this.filePath.Text = GetDefaultPath(selectedDomain.Name);
     UpdateSensitivity();
 }
Ejemplo n.º 4
0
 private void menuCreate_Click(object sender, System.EventArgs e)
 {
     ArrayList domains = new ArrayList();
     DomainInformation[] domainsInfo = simiasWebService.GetDomains(false);
     if( defaultDomainInfo == null && domainsInfo!= null && domainsInfo.Length > 0)
         defaultDomainInfo = domainsInfo[0];
        DomainItem selectedDomainItem = null;
     if( defaultDomainInfo != null)
         selectedDomainItem = new DomainItem( defaultDomainInfo.Name, defaultDomainInfo.ID );
     if (null != domainsInfo)
     {
         for (int i = 0; i < domainsInfo.Length; i++)
         {
             DomainItem domainItem = new DomainItem(domainsInfo[i].Name, domainsInfo[i].ID, domainsInfo[i].Host, domainsInfo[i].HostUrl);
             domains.Add(domainItem);
         }
     }
        CreateiFolder createiFolder = new CreateiFolder();
     try
     {
         createiFolder.Servers = domains;
         if (selectedDomainItem != null)
             createiFolder.SelectedDomain = selectedDomainItem;
     }
     catch (Exception ex)
     {
         throw (ex);
     }
        createiFolder.LoadPath = Application.StartupPath;
        createiFolder.iFolderWebService = ifWebService;
        createiFolder.simiasWebService = this.simiasWebService;
        if ((DialogResult.OK == createiFolder.ShowDialog()) && iFolderComponent.DisplayConfirmationEnabled)
        {
     new iFolderComponent().NewiFolderWizard(Application.StartupPath, createiFolder.iFolderPath);
        }
 }
Ejemplo n.º 5
0
 private void DisplayRAName(DomainItem selectedDomain)
 {
     try
     {
         string RAName = this.ifWebService.GetRAName(selectedDomain.ID);
         if (RAName == null || RAName == "")
         {
             this.recoveryAgent.Text = "";
             return;
         }
         else
         {
             this.recoveryAgent.Text = RAName;
             char[] EmailParser = { '=' };
             string[] ParsedString = RAName.Split(EmailParser);
             string emailID = "";
             if (ParsedString.Length > 1)
             {
                 for (int x = 0; x < ParsedString.Length; x++)
                 {
                     char[] FinalEmailParser = { '@' };
                     string[] FinalParsedString = ParsedString[x].Split(FinalEmailParser);
                     if (FinalParsedString.Length > 1)
                     {
                         emailID = ParsedString[x];
                         emailAddress = emailID;
                     }
                 }
             }
         }
     }
     catch (Exception)
     {
     }
 }
Ejemplo n.º 6
0
 private void GetLoggedInDomains()
 {
     try
        {
     DomainInformation[] domains;
     domains = this.simiasWebservice.GetDomains(true);
         string defaultDomainID = this.simiasWebservice.GetDefaultDomainID();
     foreach (DomainInformation di in domains)
     {
      if( di.Authenticated)
      {
       DomainItem domainItem = new DomainItem(di.Name, di.ID,di.Host);
       this.DomainComboBox.Items.Add(domainItem);
                 if (defaultDomainID != null && defaultDomainID == di.ID)
                     selectedDomain = domainItem;
      }
     }
        }
        catch(Exception )
        {
        }
 }
Ejemplo n.º 7
0
 private void GetLoggedInDomains()
 {
     try
        {
     DomainInformation[] domains;
     domains = this.simiasWebservice.GetDomains(true);
     foreach (DomainInformation di in domains)
     {
      if( di.Authenticated)
      {
       DomainItem domainItem = new DomainItem(di.Name, di.ID);
       this.DomainComboBox.Items.Add(domainItem);
      }
     }
        }
        catch(Exception ex)
        {
        }
 }
Ejemplo n.º 8
0
 private void GetLoggedInDomains()
 {
     try
     {
         DomainInformation[] domains;
         domains = this.simiasWebService.GetDomains(true);
         string defaultDomainID = this.simiasWebService.GetDefaultDomainID();
         this.domainComboBox.Items.Clear();
         foreach (DomainInformation di in domains)
         {
             if (di.Authenticated)
             {
                 DomainItem domainItem = new DomainItem(di.Name, di.ID,di.Host);
                 this.domainComboBox.Items.Add(domainItem);
                  if (defaultDomainID != null && defaultDomainID == di.ID)
                     this.domainComboBox.SelectedItem = domainItem;
             }
         }
         if (this.domainComboBox.SelectedItem == null)
                     this.domainComboBox.SelectedIndex = 0;
     }
     catch
     {
     }
 }
Ejemplo n.º 9
0
 private void GetLoggedInDomains()
 {
     try
     {
         DomainInformation[] domains;
         domains = this.simiasWebService.GetDomains(true);
         this.domainComboBox.Items.Clear();
         foreach (DomainInformation di in domains)
         {
             if (di.Authenticated)
             {
                 DomainItem domainItem = new DomainItem(di.Name, di.ID,di.Host);
                 this.domainComboBox.Items.Add(domainItem);
                 this.domainComboBox.SelectedIndex = 0;
             }
         }
     }
     catch
     {
     }
 }
Ejemplo n.º 10
0
 private void menuCreate_Click(object sender, System.EventArgs e)
 {
     ArrayList domains = new ArrayList();
        Domain selectedDomain = (Domain)servers.SelectedItem;
        selectedDomain = selectedDomain.ShowAll ? defaultDomain : selectedDomain;
        DomainItem selectedDomainItem = null;
        foreach (Domain d in servers.Items)
        {
     if (!d.ShowAll)
     {
      DomainItem domainItem = new DomainItem(d.Name, d.ID);
      if ((selectedDomain != null) && d.ID.Equals(selectedDomain.ID))
      {
       selectedDomainItem = domainItem;
      }
      domains.Add(domainItem);
     }
        }
        CreateiFolder createiFolder = new CreateiFolder();
        createiFolder.Servers = domains;
        createiFolder.SelectedDomain = selectedDomainItem;
        createiFolder.LoadPath = Application.StartupPath;
        createiFolder.iFolderWebService = ifWebService;
        if ((DialogResult.OK == createiFolder.ShowDialog()) && iFolderComponent.DisplayConfirmationEnabled)
        {
     new iFolderComponent().NewiFolderWizard(Application.StartupPath, createiFolder.iFolderPath);
        }
 }
Ejemplo n.º 11
0
 private void ExportKeysDialog_Load(object sender, System.EventArgs e)
 {
     this.Icon = new Icon(System.IO.Path.Combine(Application.StartupPath, @"res\ifolder_16.ico"));
        this.waterMark.Image = Image.FromFile(System.IO.Path.Combine(Application.StartupPath, @"res\ifolder-banner.png"));
        this.pictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
        this.pictureBox.Image = Image.FromFile(System.IO.Path.Combine(Application.StartupPath, @"res\ifolder-banner-scaler.png"));
        this.btnCancel.Select();
        try
        {
     XmlDocument domainsDoc = new XmlDocument();
     domainsDoc.Load(System.IO.Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "domain.list"));
     XmlElement element = (XmlElement)domainsDoc.SelectSingleNode("/domains");
     XmlElement defaultDomainElement = (XmlElement)domainsDoc.SelectSingleNode("/domains/defaultDomain");
     string defaultID = defaultDomainElement.GetAttribute("ID");
     XmlNodeList nodeList = element.GetElementsByTagName("domain");
     foreach (XmlNode node in nodeList)
     {
      string name = ((XmlElement)node).GetAttribute("name");
      string id = ((XmlElement)node).GetAttribute("ID");
      DomainItem domainItem = new DomainItem(name, id);
      this.DomainComboBox.Items.Add(domainItem);
      if (id.Equals(defaultID))
      {
       selectedDomain = domainItem;
      }
     }
     if (selectedDomain != null)
     {
      this.DomainComboBox.SelectedItem = selectedDomain;
      DisplayRAName(selectedDomain);
     }
     else
      this.DomainComboBox.SelectedIndex = 0;
         UpdateUI();
        }
        catch (Exception ex)
        {
     MessageBox.Show("ExportKeysDialog_Load {0}", ex.Message);
        }
 }
Ejemplo n.º 12
0
 private void MigrationIdentityPage_Load(object sender, EventArgs e)
 {
     if (Domains.Items.Count == 0)
        {
     try
     {
      XmlDocument DomainsDoc = new XmlDocument();
      DomainsDoc.Load(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "domain.list"));
      XmlElement element = (XmlElement)DomainsDoc.SelectSingleNode("/domains");
      XmlElement defaultDomainElement = (XmlElement)DomainsDoc.SelectSingleNode("/domains/defaultDomain");
      string defaultID = defaultDomainElement.GetAttribute("ID");
      XmlNodeList nodeList = element.GetElementsByTagName("domain");
      foreach (XmlNode node in nodeList)
      {
       string name = ((XmlElement)node).GetAttribute("name");
       string id = ((XmlElement)node).GetAttribute("ID");
       DomainItem domainItem = new DomainItem(name, id);
       Domains.Items.Add(domainItem);
       if (id.Equals(defaultID))
       {
        selectedDomain = domainItem;
       }
      }
      if (selectedDomain != null)
       Domains.SelectedItem = selectedDomain;
      else
       Domains.SelectedIndex = 0;
     }
     catch
     {
     }
        }
        else
        {
     if (selectedDomain != null)
     {
      Domains.SelectedItem = selectedDomain;
     }
     else if (Domains.Items.Count > 0)
     {
      Domains.SelectedIndex = 0;
     }
        }
 }
Ejemplo n.º 13
0
 private void CreateiFolder_Load(object sender, System.EventArgs e)
 {
     this.Icon = new Icon(Path.Combine(loadPath, @"res\ifolder_16.ico"));
        this.ok.Enabled = false;
        this.encryption.Checked = false;
        this.encryption.Enabled = this.regular.Enabled = false;
        this.regular.Checked = true;
        if (servers.Items.Count == 0)
        {
     try
     {
      XmlDocument domainsDoc = new XmlDocument();
      domainsDoc.Load(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "domain.list"));
      XmlElement element = (XmlElement)domainsDoc.SelectSingleNode("/domains");
      XmlElement defaultDomainElement = (XmlElement)domainsDoc.SelectSingleNode("/domains/defaultDomain");
      string defaultID = defaultDomainElement.GetAttribute("ID");
      XmlNodeList nodeList = element.GetElementsByTagName("domain");
             ArrayList domains = new ArrayList();
             DomainInformation[] domainsInfo = simws.GetDomains(false);
             if (null != domainsInfo)
             {
                 for (int i = 0; i < domainsInfo.Length; i++)
                 {
                     DomainItem domainItem = new DomainItem(domainsInfo[i].Name, domainsInfo[i].ID, domainsInfo[i].Host, domainsInfo[i].HostUrl);
                     servers.Items.Add(domainItem);
                     if ( (domainsInfo[i].ID).Equals(defaultID))
                     {
                         selectedDomain = domainItem;
                     }
                 }
             }
             if (selectedDomain != null)
      {
       servers.SelectedItem = selectedDomain;
      }
      else
      {
       servers.SelectedIndex = 0;
      }
     }
     catch
     {
     }
        }
        else
        {
     if (selectedDomain != null)
     {
      servers.SelectedItem = selectedDomain;
     }
     else if (servers.Items.Count > 0)
     {
      servers.SelectedIndex = 0;
     }
        }
        if (!ifolderPath.Text.Equals(string.Empty))
        {
     ifolderPath.ReadOnly = true;
     browse.Enabled = false;
        }
 }
Ejemplo n.º 14
0
 private void CreateiFolder_Load(object sender, System.EventArgs e)
 {
     if (servers.Items.Count == 0)
        {
     try
     {
      XmlDocument domainsDoc = new XmlDocument();
      domainsDoc.Load(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "domain.list"));
      XmlElement element = (XmlElement)domainsDoc.SelectSingleNode("/domains");
      XmlElement defaultDomainElement = (XmlElement)domainsDoc.SelectSingleNode("/domains/defaultDomain");
      string defaultID = defaultDomainElement.GetAttribute("ID");
      XmlNodeList nodeList = element.GetElementsByTagName("domain");
      foreach (XmlNode node in nodeList)
      {
       string name = ((XmlElement)node).GetAttribute("name");
       string id = ((XmlElement)node).GetAttribute("ID");
       DomainItem domainItem = new DomainItem(name, id);
       servers.Items.Add(domainItem);
       if (id.Equals(defaultID))
       {
        selectedDomain = domainItem;
       }
      }
      if (selectedDomain != null)
       servers.SelectedItem = selectedDomain;
      else
       servers.SelectedIndex = 0;
     }
     catch
     {
     }
        }
        else
        {
     if (selectedDomain != null)
     {
      servers.SelectedItem = selectedDomain;
     }
     else if (servers.Items.Count > 0)
     {
      servers.SelectedIndex = 0;
     }
        }
        if (!ifolderPath.Text.Equals(string.Empty))
        {
     ifolderPath.ReadOnly = true;
     browse.Enabled = false;
        }
 }
Ejemplo n.º 15
0
 private void DisplayRAName(DomainItem selectedDomain)
 {
     string emailID = null;
     try
     {
         string RAName = this.ifWebService.GetRAName(selectedDomain.ID);
         byte[] CertificateObj = this.simiasWebService.GetRACertificateOnClient(selectedDomain.ID,RAName);
         System.Security.Cryptography.X509Certificates.X509Certificate cert = new System.Security.Cryptography.X509Certificates.X509Certificate(CertificateObj);
          this.recoveryAgent.Text = RAName;
          emailID = cert.Issuer;
          char[] EmailParser = { '=',',' };
          string[] ParsedString = emailID.Split(EmailParser);
          if (ParsedString != null && ParsedString.Length > 1)
          {
                 for (int x = 0; x < ParsedString.Length; x++)
                 {
                     char[] FinalEmailParser = { '@' };
                     string[] FinalParsedString = ParsedString[x].Split(FinalEmailParser);
                     if (FinalParsedString.Length > 1)
                     {
                         emailAddress = ParsedString[x];
                     }
                 }
             }
         }
      catch (Exception)
     {
     }
 }