public PluginManager() : base() { this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>(); this.ConfigureAutoMapper(); }
public PluginManager() : base() { this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>(); PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>(); this.ConfigureAutoMapper(); }
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()); }
/// <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()); }
/// <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()); }
public AddRoleViewModel() { PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance<IAuthorisationComponent>(); this.AddCommand = new RelayCommand(() => this.AddRole(), () => this.CanAddRole()); }
public AddRoleViewModel() { PluginContext.Host.UserConnected += (sender, e) => this.component = PluginContext.ComponentFactory.GetInstance <IAuthorisationComponent>(); this.AddCommand = new RelayCommand(() => this.AddRole(), () => this.CanAddRole()); }