public InfoViewModel(IUnityContainer container) { _container = container; App.Locator.MainWindowViewModel.ChangedRecipe += (object sender, Recipe newRecipe, Recipe oldRecipe) => App.Locator.MainWindowViewModel.CurrentRecipe = newRecipe; InspectCommand = new KentDelegateCommand(Inspect, () => App.Locator.MainWindowViewModel.CurrentRecipe != null); }
public MainWindowViewModel(IUnityContainer container) { _container = container; LoadedCommand = new KentDelegateCommand(Loaded); ClosedCommand = new KentDelegateCommand(Closed); AccountInfoMap.Add("developer", new AccountInfo() { Id = "developer", Name = "Developer", Description = "모든 권한.", Password = "******", RoleIndex = 1, RoleInfoMap = RoleInfoMap }); AccountInfoMap.Add("user", new AccountInfo() { Id = "user", Name = "User", Description = "권한 없음.", Password = "******", RoleIndex = 0, RoleInfoMap = RoleInfoMap }); //MilApplication.Instance().Alloc(); //MilSystem.Instance().Alloc(); }
public GrabInfoViewModel(IUnityContainer container) { _container = container; _grabInfo = _container.Resolve <GrabInfo>(); GrabCommand = new KentDelegateCommand(Grab); }
public DrawingViewModel(IUnityContainer container) { _container = container; DrawCommand = new KentDelegateCommand(Draw, () => SelectedController != null && SelectedController.CanDraw == true); App.Locator.MainWindowViewModel.ChangedRecipe += App_ChangedRecipe;; }
public ImageViewModel(IUnityContainer container) { _container = container; MouseMoveCommand = new KentDelegateCommand <MouseEventArgsWithSender>(MouseMove); MouseLeftButtonUpCommand = new KentDelegateCommand <MouseButtonEventArgsWithSender>(MouseLeftButtonUp); MouseLeftButtonDownCommand = new KentDelegateCommand <MouseButtonEventArgsWithSender>(MouseLeftButtonDown); DeleteCommand = new KentDelegateCommand <KeyboardEventArgs>(Delete); _grabImageList.CollectionChanged += GrabImageList_CollectionChanged; App.Locator.MainWindowViewModel.ChangedRecipe += App_ChangedRecipe; }