Ejemplo n.º 1
0
        public BeforeSignInViewModel(ConfluenceToolWindowNavigatorViewModel parent)
        {
            this._parent          = parent;
            this._isAuthenticated = false;

            SettingsManager settingsManager = new ShellSettingsManager(ServiceProvider.GlobalProvider);

            this._userSettingsStore = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            //this.SignInCommand = new DelegateCommand(SignIn);
            this.SignInOAuthCommand = new DelegateCommand(SignInOAuth);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public ContentListViewModel(Space space, ConfluenceToolWindowNavigatorViewModel parent)
        {
            string spaceKey = space.Key;

            this._parent = parent;

            this._contentService  = new ContentService();
            this.SpaceContentList = new ObservableCollection <Content>();

            this.GetContentBySpaceKeyAsync(spaceKey);

            this.SpaceContentSelectedCommand = new DelegateCommand(OnItemSelected);
        }
Ejemplo n.º 3
0
        public OAuthVerifierConfirmationViewModel(ConfluenceToolWindowNavigatorViewModel parent, IToken requestToken)
        {
            this._parent = parent;

            this._requestToken = requestToken;

            this.StartRequestTokenExpireTimeCountdown();

            SettingsManager settingsManager = new ShellSettingsManager(ServiceProvider.GlobalProvider);

            this._userSettingsStore = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            this.SignInCommand = new DelegateCommand(SignIn);
        }
Ejemplo n.º 4
0
        public AfterSignInViewModel(ConfluenceToolWindowNavigatorViewModel parent)
        {
            this._parent = parent;

            this._oauthService = new OAuthService();
            this._userService  = new UserService();
            this.GetAuthenticatedUserAsync();

            SettingsManager settingsManager = new ShellSettingsManager(ServiceProvider.GlobalProvider);

            this._userSettingsStore = settingsManager.GetWritableSettingsStore(SettingsScope.UserSettings);

            this.SignOutCommand = new DelegateCommand(SignOut);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Initializes a new instance of the MainViewModel class.
        /// </summary>
        public SpaceListViewModel(ConfluenceToolWindowNavigatorViewModel parent)
        {
            this._spaceService = new SpaceService();

            this._parent   = parent;
            this.SpaceList = new ObservableCollection <Space>();

            this.SpaceSelectedCommand = new DelegateCommand(OnItemSelected);
            OleMenuCommandService service = ConfluencePackage.Mcs;

            InitializeCommands(service);

            GetSpacesAsync();

            this.SpaceList.CollectionChanged += this.OnCollectionChanged;
        }