Interaction logic for RunnerToolbar.xaml
Inheritance: System.Windows.Controls.UserControl
        private void CreateToolbar()
        {
            var toolbar = new RunnerToolbar();

            toolbar.RunClicked += delegate
            {
                PluginManager.ReceiveOutput("Building Project. See \"Build\" tab for more information...");
                Compile((succeeded) =>
                {
                    if (succeeded)
                    {
                        bool hasErrors = GetIfHasErrors();
                        if (hasErrors)
                        {
                            var runAnywayMessage = "Your project has content errors. To fix them, see the Errors tab. You can still run the game but you may experience crashes. Run anyway?";

                            GlueCommands.Self.DialogCommands.ShowYesNoMessageBox(runAnywayMessage, runner.Run);
                        }
                        else
                        {
                            PluginManager.ReceiveOutput("Building succeeded. Running project...");

                            runner.Run();
                        }
                    }
                    else
                    {
                        PluginManager.ReceiveError("Building failed. See \"Build\" tab for more information.");
                    }
                });
            };
            base.AddToToolBar(toolbar, "Standard");
        }
Exemple #2
0
        private void CreateToolbar()
        {
            var toolbar = new RunnerToolbar();

            toolbar.RunClicked += HandleToolbarRunClicked;
            toolbar.DataContext = viewModel;
            base.AddToToolBar(toolbar, "Standard");
        }
Exemple #3
0
        private void CreateToolbar()
        {
            var toolbar = new RunnerToolbar();

            toolbar.RunClicked += delegate
            {
                PluginManager.ReceiveOutput("Building Project. See \"Build\" tab for more information...");
                Compile((succeeded) =>
                {
                    if (succeeded)
                    {
                        PluginManager.ReceiveOutput("Building succeeded. Running project...");

                        runner.Run();
                    }
                    else
                    {
                        PluginManager.ReceiveError("Building failed. See \"Build\" tab for more information.");
                    }
                });
            };
            base.AddToToolBar(toolbar, "Standard");
        }
Exemple #4
0
        private void CreateToolbar()
        {
            var toolbar = new RunnerToolbar();
            toolbar.RunClicked += delegate
            {
                PluginManager.ReceiveOutput("Building Project. See \"Build\" tab for more information...");
                Compile((succeeded) =>
                {
                    if (succeeded)
                    {
                        PluginManager.ReceiveOutput("Building succeeded. Running project...");

                        runner.Run();
                    }
                    else
                    {
                        PluginManager.ReceiveError("Building failed. See \"Build\" tab for more information.");


                    }
                });
            };
            base.AddToToolBar(toolbar, "Standard");
        }