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; using TeamAAS_VP.Interfaces; namespace TeamAAS_VP.ViewModels.DebugMod { public class VisionSolutionViewModel : BindableBase { IContainerProvider _container; ISystemDatabaseService _systemDatabaseService; private DelegateCommand _LoadedCommand; public DelegateCommand LoadedCommand => _LoadedCommand ?? (_LoadedCommand = new DelegateCommand(ExecuteLoadedCommand)); public VisionSolutionViewModel(IContainerProvider container, ISystemDatabaseService systemDatabaseService) { _container = container; _systemDatabaseService = systemDatabaseService; } void ExecuteLoadedCommand() { try { if (_systemDatabaseService.GetCurrentUser().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; } } } }