コード例 #1
0
        public MainForm()
        {
            InitializeComponent();

            outputView = new OutputView(this);

            registersView = new RegisterView(this);

            displayView = new DisplayView(this);
            controlView = new ControlView(this);

            callStackView  = new CallStackView(this);
            stackFrameView = new StackFrameView(this);

            statusView      = new StatusView(this);
            symbolView      = new SymbolView(this);
            watchView       = new WatchView(this);
            breakPointView  = new BreakpointView(this);
            instructionView = new InstructionView(this);
            methodView      = new MethodView(this);

            //scriptView = new ScriptView(this);

            sourceView     = new SourceView(this);
            sourceDataView = new SourceDataView(this);

            AppLocations.FindApplications();
            LauncherOptions.EnableQemuGDB = true;
        }
コード例 #2
0
        public MainView(IThemeProvider themeProvider)
        {
            if (themeProvider == null)
            {
                throw new ArgumentNullException(nameof(themeProvider));
            }


            InitializeComponent();

            this.messenger = new Messenger(this);

            this.settingsView = new SettingsView(themeProvider, messenger);
            this.settingsView.Show(this.dockPanel, DockState.DockLeft);
            this.dockPanel.DockLeftPortion = 400;

            var helpContentIndexProvider = new HelpContentIndexProvider();
            var helpContentIndex         = helpContentIndexProvider.GetIndex();
            var helpRepository           = new HelpRepository(helpContentIndex, GetType().Assembly);
            var helpView = new HelpView(this.messenger, this.outputView, helpRepository, Topics.Home);

            helpView.Show(this.dockPanel, DockState.DockRight);
            helpView.DockState = DockState.DockRightAutoHide;

            this.outputView = new OutputView(themeProvider, messenger);
            this.outputView.Show(this.dockPanel, DockState.Document);

            this.messenger.Register <Export>(OnExportRequested);
        }
コード例 #3
0
        public MainView(ISettingsProvider <Settings> settingsProvider, IThemeProvider themeProvider)
        {
            InitializeComponent();


            this.messenger = new Messenger(this);

            this.viewModel = new MainViewModel(settingsProvider);
            var scheduler = new AsyncJobScheduler(this, viewModel);

            var output = new OutputView(themeProvider, messenger);

            output.Show(this.dockPanel1, DockState.DockBottom);


            var entityTreeView = new EntityTreeView(output, messenger, scheduler);

            entityTreeView.Show(this.dockPanel1, DockState.DockLeft);



            this.tConnectToEnvironment.Bind(_ => _.Visible, this.viewModel, _ => _.IsConnectToEnvirnmentVisible);
            this.tEnvironmentName.Bind(_ => _.Visible, this.viewModel, _ => _.IsEnvironmentNameVisible);
            this.tEnvironmentName.Bind(_ => _.Text, this.viewModel, _ => _.ConnectionName);

            this.tOpenFolder.BindCommand(() => this.viewModel.OpenWikiFolder);
        }
コード例 #4
0
ファイル: Controller.cs プロジェクト: SimonMTS/Sokoban
        private void StartLevel(int levelNumber)
        {
            Game level = new Game(levelNumber);

            bool won = false;

            while (!won)
            {
                OutputView.DrawLevel(level.Map, false);
                GameAction action = InputView.AwaitActionGame();

                if (action == GameAction.Stop)
                {
                    break;
                }
                else if (action != GameAction.Invalid)
                {
                    level.ApplyAction(action);

                    won = level.HasWon();
                }
            }

            if (won)
            {
                OutputView.DrawLevel(level.Map, true);
                InputView.AwaitAnyKey();
            }
        }
コード例 #5
0
        public Controller()
        {
            _inputView  = new InputView();
            _outputView = new OutputView();

            InitializeTimers();
        }
コード例 #6
0
        public void Install(IWorkspace workspace)
        {
            // Add parts

            arGraph = new ActiveRecordGraphView(_model);
            arGraph.ParentWorkspace = workspace;

            outView = new OutputView(_model);
            outView.ParentWorkspace = workspace;

            projExplorer = new ProjectExplorer(_model);
            projExplorer.ParentWorkspace = workspace;

            avaShapes = new AvailableShapes(_model);
            avaShapes.ParentWorkspace = workspace;

            // Register Actions

            FileActionGroup group1 = new FileActionGroup();

            group1.Init(_model);
            group1.Install(workspace);

            ViewActionSet group2 = new ViewActionSet(arGraph, outView, projExplorer, avaShapes);

            group2.Init(_model);
            group2.Install(workspace);

            HelpActionSet group3 = new HelpActionSet();

            group3.Init(_model);
            group3.Install(workspace);
        }
コード例 #7
0
ファイル: MainForm.cs プロジェクト: mlintell/MOSA-Project
        public MainForm()
        {
            InitializeComponent();

            outputView = new OutputView(this);

            registersView = new RegisterView(this);

            displayView = new DisplayView(this);
            controlView = new ControlView(this);

            callStackView  = new CallStackView(this);
            stackFrameView = new StackFrameView(this);

            //stackView = new StackView(this);
            //flagView = new FlagView(this);
            statusView      = new StatusView(this);
            symbolView      = new SymbolView(this);
            watchView       = new WatchView(this);
            breakPointView  = new BreakPointView(this);
            instructionView = new InstructionView(this);
            methodView      = new MethodView(this);

            //scriptView = new ScriptView(this);

            AppLocations.FindApplications();
        }
コード例 #8
0
        private async void OutputView_Loaded(object sender, RoutedEventArgs e)
        {
            string markdownCode = editor.TextLF;
            string html         = await Markdown.MarkdownToHTML(markdownCode : markdownCode);

            OutputView.NavigateToString(html);
        }
コード例 #9
0
 public InputView(OutputView outputView)
 {
     System.Diagnostics.Debug.Assert(outputView != null, "OutputView can not be null");
     _outputView = outputView;
     OutputRectangle.Bottom = OutputRectangle.Top = _outputView.OutputRectangle.Bottom;
     OutputRectangle.Right = _outputView.OutputRectangle.Right;
 }
コード例 #10
0
ファイル: MainView.cs プロジェクト: neronotte/Greg.Xrm
        public MainView(IThemeProvider themeProvider)
        {
            InitializeComponent();

            var messenger = new Messenger(this);

            this.viewModel = new MainViewModel(messenger);

            var scheduler = new AsyncJobScheduler(this, this.viewModel);

            this.outputView = new OutputView(themeProvider, messenger);
            this.outputView.Show(this.dockPanel, DockState.DockBottom);

            this.environmentListView = new EnvironmentListView(themeProvider, messenger);
            this.environmentListView.Show(this.dockPanel, DockState.DockLeft);

            this.solutionsView = new SolutionsView(this.outputView, themeProvider, messenger, scheduler);
            this.solutionsView.Show(this.dockPanel, DockState.Document);

            this.solutionComponentsView = new SolutionComponentsView(this.outputView, themeProvider, messenger, scheduler);
            this.solutionComponentsView.Show(this.dockPanel, DockState.Document);

            this.solutionsView.Show();


            messenger.Register <AddNewConnectionMessage>(m => this.AddAdditionalOrganization());
            messenger.Register <RemoveConnectionMessage>(m => this.RemoveAdditionalOrganization(m.Detail));
        }
コード例 #11
0
 public GameController()
 {
     this._inputView  = new InputView();
     this._outputView = new OutputView();
     this._fileReader = new FileReader();
     this.StartGame();
 }
コード例 #12
0
 private void CloseToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FuzzyApp.Initalize();
     variable1.ClearVariable();
     InputView.Clear();
     OutputView.Clear();
     reultsUI1.loadVariables();
 }
コード例 #13
0
 public ViewActionSet(ActiveRecordGraphView graph, OutputView outputview,
                      ProjectExplorer explorer, AvailableShapes shapes)
 {
     _graph      = graph;
     _outputview = outputview;
     _explorer   = explorer;
     _shapes     = shapes;
 }
コード例 #14
0
 internal CommandConsole(LuaEnvironment lua, DrawingSizeF screenSize, GameApplication.OutputStreams streams, int maxLines = 500)
 {
     Debug.Assert(lua != null, "Lua environment can not be null");
     Debug.Assert(streams != null, "Streams can not be null");
     _streams = streams;
     _lua = lua;
     _outputView = ToDispose<OutputView>(new OutputView(screenSize));
     _inputView = ToDispose<InputView>(new InputView(_outputView));
 }
コード例 #15
0
        public GameController()
        {
            OutputView.PrintWelcomeMessage();
            InputView.PrintGameStart();

            Console.ReadLine();

            PlayGame();
        }
コード例 #16
0
    public Controller()
    {
        //Prepare views
        inputView = new InputView();
        outputView = new OutputView();

        //Start input loop
        Start();
    }
コード例 #17
0
 public MainController()
 {
     game = new Game();
     new MapCreator(game);
     inputView       = new InputView(game);
     outputView      = new OutputView(game);
     CountDownThread = new Thread(CountDown);
     CountDownThread.Start();
     Console.ReadLine();
 }
コード例 #18
0
        private void StartUp()
        {
            OutputView.ShowStartScreen();
            int i;

            while ((i = InputView.readLevelInput()) == 0)
            {
            }
            ReadLevel(i);
        }
コード例 #19
0
        public GameController()
        {
            _outputView = new OutputView();
            _inputView  = new InputView();
            LevelReader p = new LevelReader();

            _maze = p.ReadFile(AskLevel());
            _outputView.PrintMaze(_maze.FirstTile);
            GameCycle();
        }
コード例 #20
0
        private void OnResetButtonClicked(object sender, RoutedEventArgs e)
        {
            Fileview.Clear();
            IntroText.Text              = m_initialIntroText;
            StatusText.Content          = m_initialStatusText;
            MainGrid.AllowDrop          = true;
            PostExportButton.Visibility = Visibility.Hidden;
            ResetButton.Visibility      = Visibility.Hidden;
            OutputView.Clear();
            m_processingFiles = null;

            GameStructure.Dispose();
        }
コード例 #21
0
 private void Test2ToolStripMenuItem_Click(object sender, EventArgs e)
 {
     FuzzyApp.Initalize();
     variable1.ClearVariable();
     InputView.Clear();
     OutputView.Clear();
     FuzzyApp.defaultSettings2();
     if (FuzzyApp.InputVariables.Count > 0)
     {
         variable1.Current = FuzzyApp.InputVariables[0];
         variable1.Populate();
         populateVariables();
     }
 }
コード例 #22
0
 public MainController()
 {
     _outputView = new OutputView();
     _outputView.PrintWelcomeMessage();
     _inputView        = new InputView();
     _parser           = new Parser();
     _outputView.Print = _parser.BuildMaze();
     _route            = _parser.Route;
     mainThread        = new Thread(new ThreadStart(Run));
     mainThread.Start();
     SwitchInput();
     mainThread.Interrupt();
     _outputView.WriteEndGameMessage(_route.Score);
     Console.ReadLine();
 }
コード例 #23
0
        public void MoveSwitch(ConsoleKey input)
        {
            if (!IsPlaying)
            {
                return;
            }

            ConsoleKey[] keys = { ConsoleKey.D1, ConsoleKey.D2, ConsoleKey.D3, ConsoleKey.D4, ConsoleKey.D5 };

            if (keys.Contains(input))
            {
                PlayingGround.MoveSwitch(Array.IndexOf(keys, input) + 1);
                OutputView.PrintPlayground(PlayingGround);
                InputView.PrintGameInstruction();
            }
        }
コード例 #24
0
        /// <summary>
        /// Finishes initializing component by creating and registering OutputView control</summary>
        public void Initialize()
        {
            m_view             = new OutputView();
            m_viewModel        = new OutputVm();
            m_view.DataContext = m_viewModel;

            ControlHostService.RegisterControl(
                m_view,
                "Output".Localize(),
                "View errors, warnings, and informative messages".Localize(),
                Sce.Atf.Applications.StandardControlGroup.Bottom,
                kId.ToString(),
                this);

            m_uiDispatcher = Dispatcher.CurrentDispatcher;
        }
コード例 #25
0
        public MainController()
        {
            OutputView = new OutputView();
            InputView  = new InputView();
            LevelData  = new LevelData();
            Game       = new Game();
            StartUp();

            GameOver = false;
            GameWon  = false;

            CountDownThread = new Thread(CountDown);
            CountDownThread.Start();

            OutputView.printLevel(Game, LevelLength);
            StartGame();
        }
コード例 #26
0
ファイル: Controller.cs プロジェクト: SimonMTS/Sokoban
        public Controller()
        {
            while (true)
            {
                OutputView.DrawMenu();
                GameAction action = InputView.AwaitActionMenu();

                if (action == GameAction.Stop)
                {
                    break;
                }
                else if (action != GameAction.Invalid)
                {
                    StartLevel((int)action);
                }
            }
        }
コード例 #27
0
        public Game()
        {
            IsPlaying = true;

            PlayingGround = Reviver.GeneratePlayingGround();
            Score         = 0;
            Timer         = new Timer(1000)
            {
                AutoReset = true
            };
            Timer.Elapsed += TimerTick;

            Timer.Start();

            OutputView.PrintPlayground(PlayingGround);
            InputView.PrintGameInstruction();
        }
コード例 #28
0
        public void TimerTick(object sender, ElapsedEventArgs eventArgs)
        {
            PlayingGround.MoveVehicles();
            PlayingGround.SpawnNewCarts();

            OutputView.PrintPlayground(PlayingGround);

            if (!IsPlaying)
            {
                Timer.Stop();
                Timer.Dispose();

                OutputView.PrintEndGame(Score);
                return;
            }

            InputView.PrintGameInstruction();
        }
コード例 #29
0
ファイル: MainForm.cs プロジェクト: jwoff78/MOSA-Project
        public MainForm()
        {
            InitializeComponent();

            outputView = new OutputView(this);

            registersView = new RegisterView(this);

            displayView = new DisplayView(this);
            controlView = new ControlView(this);
            traceView   = new TraceView(this);

            callStackView  = new CallStackView(this);
            stackFrameView = new StackFrameView(this);

            statusView           = new StatusView(this);
            symbolView           = new SymbolView(this);
            watchView            = new WatchView(this);
            breakPointView       = new BreakpointView(this);
            instructionView      = new InstructionView(this);
            methodView           = new MethodView(this);
            methodParametersView = new MethodParametersView(this);

            //scriptView = new ScriptView(this);

            sourceView = new SourceView(this);

            sourceDataView = new SourceDataView(this);              // only useful when debugging this tool

            launchView = new LaunchView(this);

            Settings = AppLocationsSettings.GetAppLocations();

            Settings.SetValue("Emulator.GDB", true);
            Settings.SetValue("Emulator.Serial", "TCPServer");
            Settings.SetValue("Emulator.Serial.Port", 1250);
            Settings.SetValue("Emulator.Display", false);

            GDBPort = 1234;

            AppDomain.CurrentDomain.DomainUnload       += (s, e) => { KillVMProcess(); };
            AppDomain.CurrentDomain.ProcessExit        += (s, e) => { KillVMProcess(); };
            AppDomain.CurrentDomain.UnhandledException += (s, e) => { KillVMProcess(); };
        }
コード例 #30
0
        public UI()
        {
            InitializeComponent();

            Ctrl     = new UIController(this);
            VUMeters = new List <VUMeter>();
            VULabels = new List <Label>();

            InputView  = new InputView();
            SignalView = new SignalView();
            OutputView = new OutputView();

            Controls.Add(InputView);
            Controls.Add(SignalView);
            Controls.Add(OutputView);

            InputView.Anchor  = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
            SignalView.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;
            OutputView.Anchor = AnchorStyles.Top | AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Bottom;

            InputView.Top     = 80;
            InputView.Left    = 15;
            InputView.Width   = ClientSize.Width - 2 * 15;
            InputView.Height  = ClientSize.Height - 80 - 30 - panelMeters.Height;
            InputView.Visible = true;
            InputView.Hide();

            SignalView.Top     = 80;
            SignalView.Left    = 15;
            SignalView.Width   = ClientSize.Width - 2 * 15;
            SignalView.Height  = ClientSize.Height - 80 - 30 - panelMeters.Height;
            SignalView.Visible = true;
            SignalView.Hide();

            OutputView.Top     = 80;
            OutputView.Left    = 15;
            OutputView.Width   = ClientSize.Width - 2 * 15;
            OutputView.Height  = ClientSize.Height - 80 - 30 - panelMeters.Height;
            OutputView.Visible = true;
            OutputView.Hide();

            ChangePage(LabelInputs, null);
        }
コード例 #31
0
 private void GameIsOver()
 {
     if (!GameWon)
     {
         OutputView.ShowGameOverScreen();
     }
     else
     {
         if (LevelLength <= 0)
         {
             OutputView.ShowGameWon(Game, false);
         }
         else
         {
             for (int i = 0; i < LevelLength; i++)
             {
                 Game.AmountOfPoints += 10;
             }
             OutputView.ShowGameWon(Game, true);
         }
     }
 }
コード例 #32
0
        private void StartGame()
        {
            foreach (var item in Game.moveableObjects)
            {
                Game.tempList.Add(item);
            }
            while (!GameOver)
            {
                if (CheckDeath())
                {
                    break;
                }

                CollectedAllDiamonds();
                Game.Rockford.move(InputView.readInput());
                OutputView.printLevel(Game, LevelLength);

                if (CheckWin())
                {
                    break;
                }

                Game.moveableObjects.Clear();
                foreach (var item in Game.tempList)
                {
                    Game.moveableObjects.Add(item);
                }

                foreach (var item in Game.moveableObjects)
                {
                    item.move();
                }
                OutputView.printLevel(Game, LevelLength);
            }

            GameIsOver();
            ResetGame();
        }
コード例 #33
0
ファイル: TopView.cs プロジェクト: slagusev/whiskey2d
        private void initControls()
        {
            toolBar           = new ToolBarStrip();
            statBar           = new WhiskeyStatusBar();
            menu              = new WhiskeyMenu();
            mainPanel         = new Panel();
            mainPanel.Padding = new Padding(0, menu.Height + toolBar.Height, 0, statBar.Height);



            propView                 = new PropertyView();
            propView.Name            = "Properties";
            propViewDock             = new DockControl(mainPanel, DockStyle.Right);
            propViewDock.Name        = UIManager.VIEW_NAME_PROPERTIES;
            propViewDock.PrimaryView = propView;

            outputView                 = new OutputView();
            outputView.Name            = "Output";
            outputViewDock             = new DockControl(mainPanel, DockStyle.Bottom);
            outputViewDock.Name        = UIManager.VIEW_NAME_OUTPUT;
            outputViewDock.PrimaryView = outputView;



            libraryView                 = new LibraryView();
            libraryView.Name            = "Library";
            libraryViewDock             = new DockControl(mainPanel, DockStyle.Left);
            libraryViewDock.Name        = UIManager.VIEW_NAME_LIBRARY;
            libraryViewDock.PrimaryView = libraryView;


            docView = new DocumentView();
            UIManager.Instance.setDocumentView(docView);
            docView.Name            = "Documents";
            docViewDock             = new DockControl(mainPanel, DockStyle.Fill);
            docViewDock.Name        = UIManager.VIEW_NAME_DOCUMENTS;
            docViewDock.PrimaryView = docView;
        }