Exemplo n.º 1
0
        /// <summary>
        /// Initializes the members used by a solution
        /// </summary>
        private void OnSolutionOpened()
        {
            // --- Every time a new solution has been opened, initialize the
            // --- Spectrum virtual machine with all of its accessories
            var vm = MachineViewModel = new MachineViewModel();

            vm.RomProvider         = new PackageRomProvider();
            vm.ClockProvider       = new ClockProvider();
            vm.KeyboardProvider    = new KeyboardProvider(vm);
            vm.AllowKeyboardScan   = true;
            vm.ScreenFrameProvider = new DelegatingScreenFrameProvider();
            vm.EarBitFrameProvider = new WaveEarbitFrameProvider(new BeeperConfiguration());
            vm.LoadContentProvider = new ProjectFileTapeContentProvider();
            vm.SaveToTapeProvider  = new TempFileSaveToTapeProvider();
            vm.StackDebugSupport   = new SimpleStackDebugSupport();
            vm.DisplayMode         = SpectrumDisplayMode.Fit;

            CodeDiscoverySolution.CollectProjects(ApplicationObject.DTE.Solution);
            CurrentWorkspace = WorkspaceInfo.CreateFromSolution(CodeDiscoverySolution);
            Messenger.Default.Send(new SolutionOpenedMessage());
        }