コード例 #1
0
    internal ThunderbirdStore(ThunderbirdProfile profile,
                              string persistName,
                              string displayName,
                              string storePath) {
      this.profile = profile;
      this.persistName = persistName;
      this.displayName = displayName;
      this.client = profile.GetClient();
      this.storePath = storePath;

      this.contacts = new ArrayList();
      this.folders = new ArrayList();
      this.PopulateStore();
    }
コード例 #2
0
    public ThunderbirdStore(string storePath,
                            ThunderbirdClient client) {
      this.storePath = Path.GetDirectoryName(storePath);
      this.persistName = Path.GetFileName(this.storePath);
      this.displayName = this.persistName;
      this.profile = null;
      this.client = client;
      this.contacts = new ArrayList();
      this.folders = new ArrayList();

      string folderName = Path.GetFileName(storePath);
      FolderKind folderKind = this.GetFolderKind(folderName);
      ThunderbirdFolder folder = new ThunderbirdFolder(
          folderKind,
          folderName,
          storePath,
          null,
          this);
      this.folders.Add(folder);
    }
コード例 #3
0
    // Populate the profiles vector.
    private void PopulateProfiles() {
      string searchPath;
      searchPath = Path.GetFullPath(
          Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData));
      searchPath = Path.Combine(searchPath, ThunderbirdConstants.ProfilePath);
      if (!Directory.Exists(searchPath)) {
        return;
      }

      foreach (string profileName in Directory.GetDirectories(searchPath)) {
        string tempProfileName = Path.GetFileName(profileName);
        ThunderbirdProfile profile = new ThunderbirdProfile(
            this,
            tempProfileName,
            Path.Combine(searchPath, profileName));
        this.profiles.Add(profile);
      }
    }