using Prism.Commands; using Prism.Ioc; using Prism.Mvvm; using System; using System.Collections.Generic; using System.Linq; using Team.FFFeederService; using TeamAAS_VP.Core; namespace TeamAAS_VP.ViewModels.DebugMod { public class VisionSolutionViewModel : BindableBase { IContainerProvider _container; private DelegateCommand _LoadedCommand; public DelegateCommand LoadedCommand => _LoadedCommand ?? (_LoadedCommand = new DelegateCommand(ExecuteLoadedCommand)); public VisionSolutionViewModel(IContainerProvider container) { _container = container; } void ExecuteLoadedCommand() { try { if (_container.Resolve().CurrentUser.userPart == Enums.UserPart.Operator) { IsAllowEdit = false; } else { IsAllowEdit = true; } } catch (Exception) { } } private bool _IsAllowEdit = false; public bool IsAllowEdit { get { return _IsAllowEdit; } set { SetProperty(ref _IsAllowEdit, value); } } private void LoginChange(Models.User user) { if (user.userPart == Enums.UserPart.Operator) { IsAllowEdit = false; } else { IsAllowEdit = true; } } } }