public StoreTreeNode(SharedFoldersManager folders, GABHandler gab, GABUser user, string text, Dictionary <BackendId, SharedFolder> currentFolders) : base(text) { this._initialShares = currentFolders; this._feature = folders.Feature; this._gab = gab; this._user = user; // Create an empty current state. When loading the nodes, the shares will be added. This has the benefit of // cleaning up automatically any obsolote shares. this._currentShares = new Dictionary <BackendId, SharedFolder>(); ChildLoader = new UserFolderLoader(this, folders, user); ChildLoader.ReloadOnCloseOpen = true; HasCheckBox = false; // TODO: better icons, better way of handling this ImageIndex = user == GABUser.USER_PUBLIC ? 0 : 11; // Reloader _reloader = new KAnimator(); _reloader.Animation = Properties.Resources.TreeLoading; _reloader.Visible = false; _reloader.Click += (s, e) => { ChildLoader.Reload(); }; Control = _reloader; }
public SharedFoldersDialog(FeatureSharedFolders feature, ZPushAccount account, SyncId initial = null) { this._account = account; this._folders = feature.Manage(account); this._initialSyncId = initial; InitializeComponent(); // TODO: make a specialised class out of this this.kTreeFolders.Images = new OutlookImageList( "NewFolder", // Other "JunkEmailMarkAsNotJunk", // Inbox "GoDrafts", // Drafts "RecycleBin", // WasteBasket "ReceiveMenu", // SentMail "NewFolder", // Outbox "ShowTaskPage", // Task "ShowAppointmentPage", // Appointment "ShowContactPage", // Contact "NewNote", // Note "ShowJournalPage", // Journal "LastModifiedBy" // Store ).Images; // Add the email address to the title Text = string.Format(Text, account.Account.SmtpAddress); // Set up options ShowOptions(new KTreeNode[0]); // Set up user selector gabLookup.GAB = FeatureGAB.FindGABForAccount(account); }
public StoreTreeNode(SharedFoldersManager folders, GABHandler gab, GABUser user, string sendAsAddress, string text, Dictionary <BackendId, SharedFolder> currentFolders, bool isShared, bool showRemindersWholeStore) : base(text) { this._initialShares = currentFolders; // Patch in send as address foreach (SharedFolder share in _initialShares.Values) { if (string.IsNullOrWhiteSpace(share.SendAsAddress)) { share.SendAsAddress = sendAsAddress; } } this._feature = folders.Feature; this._featureSendAs = ThisAddIn.Instance.GetFeature <FeatureSendAs>(); this._account = folders.Account; this._gab = gab; this._user = user; this._sendAsAddress = sendAsAddress; this.IsReadOnly = false; this._isShared = isShared; // Create an empty current state. When loading the nodes, the shares will be added. This has the benefit of // cleaning up automatically any obsolote shares. this._currentShares = new Dictionary <BackendId, SharedFolder>(); ChildLoader = new UserFolderLoader(this, folders, user); ChildLoader.ReloadOnCloseOpen = true; // Can only open the whole store if it's supported and there's an email address, as that's needed to open it // However, if it's already opened, we can remove it without the email address HasCheckBox = folders.SupportsWholeStore && (!string.IsNullOrWhiteSpace(user.EmailAddress) || isShared); ApplyReadOnly(this, IsReadOnly); // TODO: better icons, better way of handling this ImageIndex = user == GABUser.USER_PUBLIC ? 0 : 11; // Reloader _reloader = new KAnimator(); _reloader.Animation = Properties.Resources.TreeLoading; _reloader.Visible = false; _reloader.Click += (s, e) => { ChildLoader.Reload(); }; Control = _reloader; // Set up sharing WantShare = isShared; ShowRemindersInitial = showRemindersWholeStore; ShowReminders = ShowRemindersInitial; }
public RemindersQueryFolders(FeatureSharedFolders feature, IStore store) : base(feature, store) { }
public RemindersQuery(FeatureSharedFolders feature, IStore store) { this._feature = feature; this._folder = store.GetSpecialFolder(SpecialFolder.Reminders); }
public SharedFoldersManager(FeatureSharedFolders featureSharedFolders, ZPushAccount account) { this._feature = featureSharedFolders; this._account = account; _api = new SharedFoldersAPI(account); }