コード例 #1
0
        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);
        }
コード例 #2
0
        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();
        }
コード例 #3
0
ファイル: GrabInfoViewModel.cs プロジェクト: wiseants/Varins
        public GrabInfoViewModel(IUnityContainer container)
        {
            _container = container;

            _grabInfo = _container.Resolve <GrabInfo>();

            GrabCommand = new KentDelegateCommand(Grab);
        }
コード例 #4
0
        public DrawingViewModel(IUnityContainer container)
        {
            _container = container;

            DrawCommand = new KentDelegateCommand(Draw, () => SelectedController != null && SelectedController.CanDraw == true);

            App.Locator.MainWindowViewModel.ChangedRecipe += App_ChangedRecipe;;
        }
コード例 #5
0
ファイル: ImageViewModel.cs プロジェクト: wiseants/Varins
        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;
        }