Exemple #1
0
        void Run(string[] args)
        {
            SharpSnippetCompilerManager.Init();

            mainForm = new MainForm();

            // Force creation of the debugger before workbench is created.
            IDebugger debugger = DebuggerService.CurrentDebugger;

            Workbench workbench = new Workbench(mainForm);

            WorkbenchSingleton.InitializeWorkbench(workbench, new WorkbenchLayout());
            PadDescriptor errorList = workbench.GetPad(typeof(ErrorListPad));

            errorList.CreatePad();
            mainForm.ErrorList = errorList.PadContent.Control;

            PadDescriptor outputList = workbench.GetPad(typeof(CompilerMessageView));

            outputList.CreatePad();
            mainForm.OutputList = outputList.PadContent.Control;

            mainForm.Visible = true;

            SnippetCompilerProject.Load();
            IProject project = GetCurrentProject();

            ProjectService.CurrentProject = project;
            LoadFiles(project);

            ParserService.StartParserThread();

            //WorkbenchSingleton.SafeThreadAsyncCall(new Action<Program>(LoadFile));

            try {
                Application.Run(mainForm);
            } finally {
                try {
                    // Save properties
                    //PropertyService.Save();
                } catch (Exception ex) {
                    MessageService.ShowError(ex, "Properties could not be saved.");
                }
            }
        }
Exemple #2
0
        protected override void Run()
        {
            Workbench       workbench       = IdeApp.Workbench;
            WorkbenchWindow workbenchWindow = workbench.RootWindow;

            var assetsFolderPad = workbench.GetPad <AssetsFolderPad>();

            if (assetsFolderPad != null && !assetsFolderPad.Visible)
            {
                assetsFolderPad.Visible = true;
            }

            var solutionPad = workbench.Pads.SolutionPad;

            if (solutionPad != null && solutionPad.Visible)
            {
                solutionPad.Visible = false;
            }

            workbenchWindow.FocusInEvent += WorkbenchFocusInEvent;

            SetupStartupOptions();

            RestClient.SetServerUrl(StartupOptions.UnityRestServerUrl);

            //Mono.Addins.AddinManager.AddinEngine.Registry.DisableAddin ("MonoDevelop.VersionControl");

            //IdeApp.CommandService.CommandEntrySetPostProcessor += MyPostProcessor;

            //((DefaultWorkbench)IdeApp.Workbench.RootWindow).RecreateMenu ();

            InitializeRestServiceAndPair();
            IdeApp.Workbench.ShowCommandBar("UnityDebugging");


            //var dw = (DefaultWorkbench)ww;

            /*
             * Gtk.HBox contentBox = dw.Toolbar.ContentBox;
             * //contentBox.PackStart(new Gtk.Label ("LUCASLUCAS"), false, false, 0);
             * //contentBox.PackStart(new Gtk.Button ("LUCASLUCAS"), false, false, 0);
             *
             * var statusAreaAlign = new Gtk.Alignment (100, 0, 1, 1);
             * var button = new Gtk.Button ("AISHDASDADAS");
             * button.Visible = true;
             * statusAreaAlign.Add (button);
             * contentBox.PackStart (statusAreaAlign, true, true, 0);
             * contentBox.PackStart (button, false, false, 10);
             * //MonoDevelop.Debugger.DebuggerService;
             *
             * dw.Toolbar.unityDebugButton.Toggled += (sender, e) => {if (true) {
             *              DebugEditorHandler.Doit();
             *              }
             *      };*/
        }