예제 #1
0
        public PluginManager()
            : base()
        {
            this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>();
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>();

            this.ConfigureAutoMapper();
        }
예제 #2
0
        public PluginManager()
            : base()
        {
            this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>();
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>();

            this.ConfigureAutoMapper();
        }
예제 #3
0
 public EditAssignedRoleViewModel()
 {
     if (!Designer.IsDesignMode)
     {
         this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>();
         PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>();
     }
     this.Roles         = new ObservableCollection <RoleDto>();
     this.UpdateCommand = new RelayCommand(() => this.Update(), () => this.CanUpdate());
 }
 public EditAssignedRoleViewModel()
 {
     if (!Designer.IsDesignMode)
     {
         this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>();
         PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>();
     }
     this.Roles = new ObservableCollection<RoleDto>();
     this.UpdateCommand = new RelayCommand(() => this.Update(), () => this.CanUpdate());
 }
예제 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WorkbenchViewModel"/> class.
        /// </summary>
        /// <param name="host">The host.</param>
        public WorkbenchViewModel()
        {
            if (!Designer.IsDesignMode)
            {
                this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>();
                PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>();
            }
            this.Roles = new ObservableCollection<RoleDto>();
            this.AvailableTasks = new ObservableCollection<TaskDto>();

            this.AddCommand = new RelayCommand(() => this.AddTask(), () => this.CanAddTask());
            this.RemoveTaskCommand = new RelayCommand(() => this.RemoveTask(), () => this.CanRemoveTask());
            this.RefreshRoleCommand = new RelayCommand(() => this.RefreshAvailableTasks());
            this.EditRoleCommand = new RelayCommand(() => this.EditRole(), () => this.CanModifyRole());
            this.RemoveRoleCommand = new RelayCommand(() => this.RemoveRole(), () => this.CanModifyRole());
        }
예제 #6
0
        /// <summary>
        /// Initializes a new instance of the <see cref="WorkbenchViewModel"/> class.
        /// </summary>
        /// <param name="host">The host.</param>
        public WorkbenchViewModel()
        {
            if (!Designer.IsDesignMode)
            {
                this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>();
                PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>();
            }
            this.Roles          = new ObservableCollection <RoleDto>();
            this.AvailableTasks = new ObservableCollection <TaskDto>();

            this.AddCommand         = new RelayCommand(() => this.AddTask(), () => this.CanAddTask());
            this.RemoveTaskCommand  = new RelayCommand(() => this.RemoveTask(), () => this.CanRemoveTask());
            this.RefreshRoleCommand = new RelayCommand(() => this.RefreshAvailableTasks());
            this.EditRoleCommand    = new RelayCommand(() => this.EditRole(), () => this.CanModifyRole());
            this.RemoveRoleCommand  = new RelayCommand(() => this.RemoveRole(), () => this.CanModifyRole());
        }
예제 #7
0
        public AddRoleViewModel()
        {
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>();

            this.AddCommand = new RelayCommand(() => this.AddRole(), () => this.CanAddRole());
        }
예제 #8
0
        public AddRoleViewModel()
        {
            PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>();

            this.AddCommand = new RelayCommand(() => this.AddRole(), () => this.CanAddRole());
        }