Esempio n. 1
0
        public GameScriptDialogViewModel(
            GameScriptService gameScriptService)
            : base("GameScriptDialogView")
        {
            this.gameScriptService        = gameScriptService;
            this.gameScriptService.Reset += GameScriptService_Reset;

            commands = string.Join("\r\n", gameScriptService.Commands);
        }
Esempio n. 2
0
        public MainWindowViewModel(
            StoryService storyService,
            GameScriptService gameScriptService,
            ProfilerService profilerService,
            ScreenViewModel screenViewModel,
            ProfilerViewModel profilerViewModel,
            GameInfoDialogViewModel gameInfoDialogViewModel,
            GameScriptDialogViewModel gameScriptDialogViewModel)
            : base("MainWindowView")
        {
            this.storyService               = storyService;
            this.storyService.StoryOpened  += StoryService_StoryOpened;
            this.storyService.StoryClosing += StoryService_StoryClosing;

            this.gameScriptService = gameScriptService;

            this.profilerService = profilerService;

            this.screenViewModel           = screenViewModel;
            this.profilerViewModel         = profilerViewModel;
            this.gameInfoDialogViewModel   = gameInfoDialogViewModel;
            this.gameScriptDialogViewModel = gameScriptDialogViewModel;

            this.OpenStoryCommand = RegisterCommand(
                text: "Open",
                name: "Open",
                executed: OpenStoryExecuted,
                canExecute: OpenStoryCanExecute,
                inputGestures: new KeyGesture(Key.O, ModifierKeys.Control));

            this.EditGameScriptCommand = RegisterCommand(
                text: "EditGameScript",
                name: "Edit Game Script",
                executed: EditGameScriptExecuted,
                canExecute: EditGameScriptCanExecute);

            this.ExitCommand = RegisterCommand(
                text: "Exit",
                name: "Exit",
                executed: ExitExecuted,
                canExecute: ExitCanExecute,
                inputGestures: new KeyGesture(Key.F4, ModifierKeys.Alt));

            this.StopCommand = RegisterCommand(
                text: "Stop",
                name: "Stop",
                executed: StopExecuted,
                canExecute: StopCanExecute);

            this.AboutGameCommand = RegisterCommand(
                text: "AboutGame",
                name: "About Game",
                executed: AboutGameExecuted,
                canExecute: AboutGameCanExecute);
        }
Esempio n. 3
0
        public ScreenViewModel(
            StoryService storyService,
            GameScriptService gameScriptService)
            : base("ScreenView")
        {
            this.storyService = storyService;

            this.storyService.StoryOpened  += StoryService_StoryOpened;
            this.storyService.StoryClosing += StoryService_StoryClosing;

            this.gameScriptService = gameScriptService;
        }
Esempio n. 4
0
        public OutputViewModel(StoryService storyService,
                               DebuggerService debuggerService,
                               GameScriptService gameScriptService)
            : base("OutputView")
        {
            this.storyService = storyService;
            this.storyService.StoryClosing += StoryService_StoryClosing;

            this.debuggerService = debuggerService;
            this.debuggerService.MachineCreated += DebuggerService_MachineCreated;

            this.gameScriptService = gameScriptService;
        }
Esempio n. 5
0
        public MainWindowViewModel(
            StoryService storyService,
            GameScriptService gameScriptService,
            DebuggerService debuggerService,
            NavigationService navigationService,
            StoryInfoViewModel storyInfoViewModel,
            MemoryMapViewModel memoryMapViewModel,
            GlobalsViewModel globalsViewModel,
            DisassemblyViewModel disassemblyViewModel,
            ObjectsViewModel objectsViewModel,
            LocalsViewModel localsViewModel,
            CallStackViewModel callStackViewModel,
            OutputViewModel outputViewModel,
            MessageLogViewModel messageLogViewModel,
            GoToAddressDialogViewModel goToAddressDialogViewModel,
            GameInfoDialogViewModel gameInfoDialogViewModel,
            GameScriptDialogViewModel gameScriptDialogViewModel)
            : base("MainWindowView")
        {
            this.storyService               = storyService;
            this.storyService.StoryOpened  += StoryService_StoryOpened;
            this.storyService.StoryClosing += StoryService_StoryClosing;

            this.gameScriptService = gameScriptService;
            this.debuggerService   = debuggerService;
            this.navigationService = navigationService;

            this.storyInfoViewModel         = storyInfoViewModel;
            this.memoryMapViewModel         = memoryMapViewModel;
            this.globalsViewModel           = globalsViewModel;
            this.disassemblyViewModel       = disassemblyViewModel;
            this.objectsViewModel           = objectsViewModel;
            this.localsViewModel            = localsViewModel;
            this.callStackViewModel         = callStackViewModel;
            this.outputViewModel            = outputViewModel;
            this.messageLogViewModel        = messageLogViewModel;
            this.goToAddressDialogViewModel = goToAddressDialogViewModel;
            this.gameInfoDialogViewModel    = gameInfoDialogViewModel;
            this.gameScriptDialogViewModel  = gameScriptDialogViewModel;

            this.OpenStoryCommand = RegisterCommand(
                text: "Open",
                name: "Open",
                executed: OpenStoryExecuted,
                canExecute: CanOpenStoryExecute,
                inputGestures: new KeyGesture(Key.O, ModifierKeys.Control));

            this.EditGameScriptCommand = RegisterCommand(
                text: "EditGameScript",
                name: "Edit Game Script",
                executed: EditGameScriptExecuted,
                canExecute: CanEditGameScriptExecute);

            this.GoToAddressCommand = RegisterCommand(
                text: "GoToAddress",
                name: "GoToAddress",
                executed: GoToAddressExecuted,
                canExecute: CanGoToAddressExecute,
                inputGestures: new KeyGesture(Key.G, ModifierKeys.Control));

            this.ExitCommand = RegisterCommand(
                text: "Exit",
                name: "Exit",
                executed: ExitExecuted,
                canExecute: CanExitExecute,
                inputGestures: new KeyGesture(Key.F4, ModifierKeys.Alt));

            this.StartDebuggingCommand = RegisterCommand(
                text: "StartDebugging",
                name: "Start Debugging",
                executed: StartDebuggingExecuted,
                canExecute: CanStartDebuggingExecute,
                inputGestures: new KeyGesture(Key.F5));

            this.StopDebuggingCommand = RegisterCommand(
                text: "PauseDebugging",
                name: "Pause Debugging",
                executed: StopDebuggingExecuted,
                canExecute: CanStopDebuggingExecute,
                inputGestures: new KeyGesture(Key.F5, ModifierKeys.Shift));

            this.StepNextCommand = RegisterCommand(
                text: "StepNext",
                name: "Step to Next Instruction",
                executed: StepNextExecuted,
                canExecute: CanStepNextExecute,
                inputGestures: new KeyGesture(Key.F10));

            this.ResetSessionCommand = RegisterCommand(
                text: "ResetSession",
                name: "Reset Debugging Session",
                executed: ResetSessionExecuted,
                canExecute: CanResetSessionExecute);

            this.ResetWindowLayoutCommand = RegisterCommand(
                text: "ResetWindowLayout",
                name: "Reset Window Layout",
                executed: ResetWindowLayoutExecuted,
                canExecute: CanResetWindowLayoutExecute);

            this.AboutGameCommand = RegisterCommand(
                text: "AboutGame",
                name: "About Game",
                executed: AboutGameExecuted,
                canExecute: CanAboutGameExecute);

            this.SetVariableViewCommand = RegisterCommand(
                text: "SetVariableView",
                name: "Set Variable View",
                executed: SetVariableViewExecuted,
                canExecute: CanSetVariableViewExecute
                );
        }