public AddElementCommand(string name, IWorkbench workbench) : base(name) { this.name = name; this.workbench = workbench; activePackageFilesView = new ActivePackageFilesView(workbench); }
static void CreateWorkspace()//创建整个工作空间. { DefaultWorkbench w = new DefaultWorkbench();//新建一个空的工作台实例. workbench = w; w.InitializeWorkspace();//初始化菜单,工具栏,状态栏之类的东西. }
/*private void CheckAndCopyPT4Files(string FileName) * { * * string fn=PABCWorkDirectory+"\\"+FileName; * string instfn=PT4Directory+"\\"+FileName; * try * { * if (!File.Exists(fn)) * if (File.Exists(instfn)) * File.Copy(instfn, fn); * } * catch (Exception) * { * } * * }*/ public PT4Provider_VisualPascalABCPlugin(IWorkbench Workbench) { VisualEnvironmentCompiler = Workbench.VisualEnvironmentCompiler; VisualEnvironmentCompiler.ChangeVisualEnvironmentState += new ChangeVisualEnvironmentStateDelegate(VisualEnvironmentCompiler_ChangeVisualEnvironmentState); VisualEnvironmentCompiler.Compiler.OnChangeCompilerState += Compiler_OnChangeCompilerState; PABCWorkDirectory = VisualEnvironmentCompiler.ExecuteAction(VisualEnvironmentCompilerAction.GetDirectory, "%WORKINGDIRECTORY%") as string; /*if (PABCWorkDirectory == null) * PABCWorkDirectory = ""; * else * if (Directory.Exists(PABCWorkDirectory)) * { * CheckAndCopyPT4Files(PT4Provider.Constants.ResultsABCFileName); * //CheckAndCopyPT4Files(PT4Provider.Constants.ResultsDATFileName); * } */ /*string PABCOutputDirectory = VisualEnvironmentCompiler.ExecuteAction(VisualEnvironmentCompilerAction.GetDirectory, "%OUTPUTDIRECTORY%") as string; * if (PABCOutputDirectory != null) * if (Directory.Exists(PABCOutputDirectory)) * { * PABCWorkDirectory = PABCOutputDirectory; * CheckAndCopyPT4Files(PT4Provider.Constants.ResultsABCFileName); * //CheckAndCopyPT4Files(PT4Provider.Constants.ResultsDATFileName); * } */ }
public void Init() { IDocument doc = MockTextMarkerService.CreateDocumentWithMockService(); markerService = doc.GetRequiredService <ITextMarkerService>(); // Add xpath marker to document. doc.Text = "<Test/>"; XPathNodeTextMarker xpathNodeMarker = new XPathNodeTextMarker(doc); XPathNodeMatch nodeMatch = new XPathNodeMatch("Test", "<Test/>", 0, 1, XPathNodeType.Element); xpathNodeMarker.AddMarker(nodeMatch); // Add non text editor provider view to workbench. workbench = MockRepository.GenerateStrictMock <IWorkbench>(); workbench.Stub(w => w.ViewContentCollection).Return(new List <IViewContent>()); nonTextEditorProviderView = new MockViewContent(); workbench.ViewContentCollection.Add(nonTextEditorProviderView); // Add document to view content. textEditorView = new MockTextEditorProviderViewContent(); textEditorView.MockTextEditor.SetDocument(doc); workbench.ViewContentCollection.Add(textEditorView); command = new RemoveXPathHighlightingCommand(workbench); }
public void Attach(IWorkbench workbench) { wbForm = (DefaultWorkbench)workbench; wbForm.SuspendLayout(); wbForm.IsMdiContainer = true; //dockPanel = new WeifenLuo.WinFormsUI.DockPanel(); //dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel(); //dockPanel.ActiveAutoHideContent = null; //dockPanel.Dock = DockStyle.Fill; //wbForm.Controls.Add(dockPanel);// 将eifenLuo.WinFormsUI.DockPanel dockpanel加入到controls InitOutlook(wbForm); wbForm.TopMenu.Dock = System.Windows.Forms.DockStyle.Top; wbForm.Controls.Add(wbForm.TopMenu);// 加入菜单 LoadConfiguration(); //ShowPads(); //ShowViewContents(); //RedrawAllComponents(); wbForm.ResumeLayout(false); }
public void Init() { IDocument doc = MockTextMarkerService.CreateDocumentWithMockService(); markerService = doc.GetRequiredService<ITextMarkerService>(); // Add xpath marker to document. doc.Text = "<Test/>"; XPathNodeTextMarker xpathNodeMarker = new XPathNodeTextMarker(doc); XPathNodeMatch nodeMatch = new XPathNodeMatch("Test", "<Test/>", 0, 1, XPathNodeType.Element); xpathNodeMarker.AddMarker(nodeMatch); // Add non text editor provider view to workbench. workbench = MockRepository.GenerateStrictMock<IWorkbench>(); workbench.Stub(w => w.ViewContentCollection).Return(new List<IViewContent>()); nonTextEditorProviderView = new MockViewContent(); workbench.ViewContentCollection.Add(nonTextEditorProviderView); // Add document to view content. textEditorView = new MockTextEditorProviderViewContent(); textEditorView.MockTextEditor.SetDocument(doc); workbench.ViewContentCollection.Add(textEditorView); command = new RemoveXPathHighlightingCommand(workbench); }
public WorkbenchBuildService() { Workbench = WorkbenchServiceFactory.Workbench; ProjectService = WorkbenchServiceFactory.ProjectService; DesignerService = WorkbenchServiceFactory.DesignerService; DocumentService = WorkbenchServiceFactory.DocumentService; }
public override void Run() { ICollection <ResourceItem> unusedKeys; // Allow the menu to close Application.DoEvents(); using (AsynchronousWaitDialog monitor = AsynchronousWaitDialog.ShowWaitDialog("${res:Hornung.ResourceToolkit.FindUnusedResourceKeys}")) { unusedKeys = ResourceRefactoringService.FindUnusedKeys(monitor); } if (unusedKeys == null) { return; } if (unusedKeys.Count == 0) { MessageService.ShowMessage("${res:Hornung.ResourceToolkit.UnusedResourceKeys.NotFound}"); return; } IWorkbench workbench = WorkbenchSingleton.Workbench; if (workbench != null) { UnusedResourceKeysViewContent vc = new UnusedResourceKeysViewContent(unusedKeys); workbench.ShowView(vc); } }
public void Attach(IWorkbench currentWorkbench) { workbench = (DefaultWorkbench)currentWorkbench; workbench.Controls.Clear(); tabControl.Style = (Crownwood.Magic.Common.VisualStyle)propertyService.GetProperty("NetFocus.DataStructure.Gui.VisualStyle", Crownwood.Magic.Common.VisualStyle.IDE); tabControl.Dock = DockStyle.Fill; tabControl.ShrinkPagesToFit = true; tabControl.ShowArrows = false; tabControl.Appearance = Crownwood.Magic.Controls.TabControl.VisualAppearance.MultiBox; workbench.Controls.Add(tabControl); tabControl.Visible = false; dockManager = new DockingManager(workbench, VisualStyle.IDE); IStatusBarService statusBarService = (IStatusBarService)ServiceManager.Services.GetService(typeof(IStatusBarService)); workbench.Controls.Add(statusBarService.Control); workbench.Menu = null; workbench.AddMenuAndToolbarControls(); dockManager.InnerControl = tabControl; dockManager.OuterControl = statusBarService.Control; foreach (IViewContent content in workbench.ViewContentCollection) { ShowView(content); } contentVisibleHandler = new DockingManager.ContentHandler(RefreshMainMenu); dockManager.ContentHidden += contentVisibleHandler; dockManager.ContentShown += contentVisibleHandler; }
public VisualEnvironmentCompiler(InvokeDegegate beginInvoke, SetFlagDelegate setCompilingButtonsEnabled, SetFlagDelegate setCompilingDebugEnabled, SetTextDelegate setStateText, SetTextDelegate addTextToCompilerMessages, ToolStripMenuItem pluginsMenuItem, ToolStrip pluginsToolStrip, ExecuteSourceLocationActionDelegate ExecuteSLAction, ExecuteVisualEnvironmentCompilerActionDelegate ExecuteVECAction, PascalABCCompiler.Errors.ErrorsStrategyManager ErrorsManager, RunManager RunnerManager, DebugHelper DebugHelper,UserOptions UserOptions,System.Collections.Hashtable StandartDirectories, Dictionary<string, CodeFileDocumentControl> OpenDocuments, IWorkbench workbench) { this.StandartDirectories = StandartDirectories; this.ErrorsManager = ErrorsManager; this.ChangeVisualEnvironmentState += new ChangeVisualEnvironmentStateDelegate(onChangeVisualEnvironmentState); SetCompilingButtonsEnabled = setCompilingButtonsEnabled; SetDebugButtonsEnabled = setCompilingDebugEnabled; SetStateText = setStateText; AddTextToCompilerMessages = addTextToCompilerMessages; this.beginInvoke = beginInvoke; this.ExecuteSLAction=ExecuteSLAction; this.ExecuteVECAction = ExecuteVECAction; PluginsMenuItem = pluginsMenuItem; PluginsToolStrip = pluginsToolStrip; PluginsController = new VisualPascalABCPlugins.PluginsController(this, PluginsMenuItem, PluginsToolStrip, workbench); this.RunnerManager = RunnerManager; this.DebugHelper = DebugHelper; DebugHelper.Starting += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Starting); DebugHelper.Exited += new DebugHelper.DebugHelperActionDelegate(DebugHelper_Exited); RunnerManager.Starting += new RunManager.RunnerManagerActionDelegate(RunnerManager_Starting); RunnerManager.Exited += new RunManager.RunnerManagerActionDelegate(RunnerManager_Exited); this.CodeCompletionParserController = WorkbenchServiceFactory.CodeCompletionParserController; this.CodeCompletionParserController.visualEnvironmentCompiler = this; this.UserOptions = UserOptions; this.OpenDocuments = OpenDocuments; }
public SyntaxTreeVisualisator_VisualPascalABCPlugin(IWorkbench Workbench) { VisualEnvironmentCompiler = Workbench.VisualEnvironmentCompiler; SemanticTreeVisualisatorForm.VisualEnvironmentCompiler = VisualEnvironmentCompiler; }
void OnModelGraphLayoutUpdated(IWorkbench workbench) { // Grab values. var network = workbench.BayesianNetwork; var positions = workbench.NetworkLayout.Positions; var abbreviations = workbench.BayesianNetworkVariableAbbreviations; var options = workbench.NetworkLayoutOptions; // Init graph inspector. Dispatcher.Invoke(delegate { // Update graph inspector. xGraphInspector.SetLayoutOptions(options); xGraphInspector.SetGraphLayout(positions); // Update network inspector. { var variablesOrderedVertically = positions .OrderBy(kvp => kvp.Value.Y) .ThenBy(kvp => kvp.Value.X) .Select(kvp => network.GetVariable(kvp.Key)) .ToList(); xVariablesInspector.SetVariables(variablesOrderedVertically, abbreviations); } }); }
public PluginsController(IVisualEnvironmentCompiler VisualEnvironmentCompiler, System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem, System.Windows.Forms.ToolStrip ToolStrip, IWorkbench workbench) { this.ToolStripMenuItem = ToolStripMenuItem; this.ToolStrip = ToolStrip; this.VisualEnvironmentCompiler = VisualEnvironmentCompiler; this.workbench = workbench; }
public void Attach(IWorkbench workbench) { wbForm = (DefaultWorkbench)workbench; wbForm.SuspendLayout(); wbForm.Controls.Clear(); ToolStripContainer tsc = new ToolStripContainer(); tsc.Dock = DockStyle.Fill; tsc.TopToolStripPanel.Controls.AddRange(wbForm.ToolBars); tsc.TopToolStripPanel.Controls.Add(wbForm.TopMenu); tsc.BottomToolStripPanel.Controls.Add(StatusBarService.Control); SplitContainer splitContainer = new SplitContainer(); splitContainer.Dock = DockStyle.Fill; documentTabs = new WorkbenchTabControl(this); documentTabs.Dock = DockStyle.Fill; splitContainer.Panel2.Controls.Add(documentTabs); padTabs = new TabControl(); padTabs.Multiline = true; padTabs.Dock = DockStyle.Fill; splitContainer.Panel1.Controls.Add(padTabs); tsc.ContentPanel.Controls.Add(splitContainer); wbForm.Controls.Add(tsc); wbForm.ResumeLayout(false); }
/// <summary> /// Displays the output from NAnt after it has exited. /// </summary> /// <param name="sender">The event source.</param> /// <param name="e">The NAnt exit event arguments.</param> void NAntExited(object sender, NAntExitEventArgs e) { // Update output window. string outputText = String.Empty; System.Diagnostics.Debug.Assert(e.Error.Length == 0); outputText = String.Concat(outputText, e.Output); // Update task list. TaskCollection tasks = NAntOutputParser.Parse(outputText); foreach (Task task in tasks) { WorkbenchSingleton.SafeThreadAsyncCall(TaskService.Add, task); } // Bring task list to front. if (tasks.Count > 0 && ErrorListPad.ShowAfterBuild) { IWorkbench workbench = ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.Workbench; PadDescriptor padDescriptor = workbench.GetPad(typeof(ErrorListPad)); if (padDescriptor != null) { WorkbenchSingleton.SafeThreadAsyncCall(padDescriptor.BringPadToFront); } } }
public PluginsController(IVisualEnvironmentCompiler VisualEnvironmentCompiler,System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem, System.Windows.Forms.ToolStrip ToolStrip, IWorkbench workbench) { this.ToolStripMenuItem = ToolStripMenuItem; this.ToolStrip = ToolStrip; this.VisualEnvironmentCompiler = VisualEnvironmentCompiler; this.workbench = workbench; }
static void CreateWorkspace() //创建整个工作空间. { DefaultWorkbench w = new DefaultWorkbench(); //新建一个空的工作台实例. workbench = w; w.InitializeWorkspace(); //初始化菜单,工具栏,状态栏之类的东西. }
public static void Main() { if (null == sm_theProjectService) { sm_theProjectService = new Altaxo.Main.ProjectService(); sm_thePrintingService = new Altaxo.Main.PrintingService(); // we construct the main document sm_theProjectService.CurrentOpenProject = new AltaxoDocument(); MainController ctrl = new MainController(); sm_theWorkbench = new AltaxoWorkbench(new MainView()); ctrl.SetMenuToMainWindow(); // InitializeMainController(ctrl); } try { System.Windows.Forms.Application.Run(Current.MainWindow); } catch (Exception e) { System.Windows.Forms.MessageBox.Show(e.ToString()); } }
public void Attach(IWorkbench workbench) { wbForm = (DefaultWorkbench)workbench; wbForm.SuspendLayout(); wbForm.Controls.Clear(); mainMenuContainer = new AutoHideMenuStripContainer(wbForm.TopMenu); mainMenuContainer.Dock = DockStyle.Top; statusStripContainer = new AutoHideStatusStripContainer((StatusStrip)StatusBarService.Control); statusStripContainer.Dock = DockStyle.Bottom; toolBarPanel = new ToolStripPanel(); if (wbForm.ToolBars != null) { toolBarPanel.Controls.AddRange(wbForm.ToolBars); } toolBarPanel.Dock = DockStyle.Top; dockPanel = new DockPanel(); dockPanel.Dock = DockStyle.Fill; dockPanel.RightToLeftLayout = true; // Known issues with certain DocumentStyles: // DockingMdi: // - this is the default value // - after switching between layouts, text editor tooltips sometimes do not show up anymore // DockingSdi: // - in this mode, the tab bar is not shown when there is only one open window // DockingWindow: // - SharpDevelop 2.x used this mode // - it was also the only mode supported by the early DockPanelSuite versions used by SharpDevelop 1.x dockPanel.DocumentStyle = DocumentStyle.DockingWindow; wbForm.Controls.Add(dockPanel); wbForm.Controls.Add(toolBarPanel); wbForm.Controls.Add(mainMenuContainer); wbForm.Controls.Add(statusStripContainer); wbForm.MainMenuStrip = wbForm.TopMenu; // dock panel has to be added to the form before LoadLayoutConfiguration is called to fix SD2-463 LoadLayoutConfiguration(); ShowPads(); ShowViewContents(); RedrawAllComponents(); dockPanel.ActiveDocumentChanged += new EventHandler(ActiveMdiChanged); dockPanel.ActiveContentChanged += new EventHandler(ActiveContentChanged); ActiveMdiChanged(this, EventArgs.Empty); wbForm.ResumeLayout(false); Properties fullscreenProperties = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.FullscreenOptions", new Properties()); fullscreenProperties.PropertyChanged += TrackFullscreenPropertyChanges; }
public TypeScriptWorkbenchMonitor( IWorkbench workbench, TypeScriptContextProvider provider) { workbench.ViewOpened += ViewOpened; workbench.ViewClosed += ViewClosed; this.provider = provider; }
public ShellViewModel(IToolbar toolbar, IWorkbench workbench) { Contract.Requires(toolbar != null); Contract.Requires(workbench != null); this.toolbar = toolbar; this.workbench = workbench; }
public InternalErrorReport_VisualPascalABCPlugin(IWorkbench Workbench) { this.VisualEnvironmentCompiler=Workbench.VisualEnvironmentCompiler; VisualEnvironmentCompiler.StandartCompiler.OnChangeCompilerState += new PascalABCCompiler.ChangeCompilerStateEventDelegate(Compiler_OnChangeCompilerState); if(VisualEnvironmentCompiler.RemoteCompiler!=null) VisualEnvironmentCompiler.RemoteCompiler.OnChangeCompilerState += new PascalABCCompiler.ChangeCompilerStateEventDelegate(Compiler_OnChangeCompilerState); //CompilerInternalErrorReport.Parent=(VisualEnvironmentCompiler as System.Windows.Forms.Control); }
public TestPlugin_VisualPascalABCPlugin(IWorkbench Workbench) { this.Workbench = Workbench; VisualEnvironmentCompiler = Workbench.VisualEnvironmentCompiler; testForm.VisualEnvironmentCompiler = VisualEnvironmentCompiler; }
static void WorkbenchCreated(object sender, EventArgs e) { IWorkbench workbench = SD.Workbench; workbench.MainWindow.Closing += MainWindowClosing; workbenchMonitor = new TypeScriptWorkbenchMonitor(workbench, contextProvider); projectMonitor = new TypeScriptProjectMonitor(contextProvider); parserService.Start(); }
public PackageFilesView Create(WixProject project, IWorkbench workbench) { createMethodProjectParameter = project; createMethodWorkbenchParameter = workbench; packageFilesControl = new MockWixPackageFilesControl(); packageFilesViewCreated = new PackageFilesView(project, workbench, packageFilesControl); return(packageFilesViewCreated); }
public PackageFilesView Create(WixProject project, IWorkbench workbench) { createMethodProjectParameter = project; createMethodWorkbenchParameter = workbench; packageFilesControl = new MockWixPackageFilesControl(); packageFilesViewCreated = new PackageFilesView(project, workbench, packageFilesControl); return packageFilesViewCreated; }
public FileService(IPropertyService propertyService, IEventAggregator eventAggregator, IWorkbench workbench, IDisplayBindingService displayBindingService) { property_service = propertyService; event_aggregator = eventAggregator; this.workbench = workbench; display_binding_service = displayBindingService; //SD.ParserService.LoadSolutionProjectsThread.Finished += ParserServiceLoadSolutionProjectsThreadEnded; }
public InternalErrorReport_VisualPascalABCPlugin(IWorkbench Workbench) { this.VisualEnvironmentCompiler = Workbench.VisualEnvironmentCompiler; VisualEnvironmentCompiler.StandartCompiler.OnChangeCompilerState += new PascalABCCompiler.ChangeCompilerStateEventDelegate(Compiler_OnChangeCompilerState); if (VisualEnvironmentCompiler.RemoteCompiler != null) { VisualEnvironmentCompiler.RemoteCompiler.OnChangeCompilerState += new PascalABCCompiler.ChangeCompilerStateEventDelegate(Compiler_OnChangeCompilerState); } //CompilerInternalErrorReport.Parent=(VisualEnvironmentCompiler as System.Windows.Forms.Control); }
public TestExecutionManager() { this.buildService = SD.BuildService; this.taskService = new UnitTestTaskService(); this.saveAllFilesCommand = new UnitTestSaveAllFilesCommand(); this.testService = SD.GetRequiredService <ITestService>(); this.workbench = SD.Workbench; this.statusBarService = SD.StatusBar; this.mainThread = SD.MainThread; this.buildOptions = new UnitTestBuildOptions(); }
/// <summary> /// Sets the main workbench. /// </summary> /// <param name="workbench">The main workbench to use in this application.</param> public static void SetWorkbench(IWorkbench workbench) { if (null == sm_theWorkbench) { sm_theWorkbench = workbench; } else { throw new ApplicationException("The workbench can not be re-set to another value, only initialized for the first time!"); } }
/// <summary> /// Shows the view for the specified project. /// </summary> public static void Show(WixProject project, IWorkbench workbench) { PackageFilesView openView = GetOpenPackageFilesView(project, workbench); if (openView != null) { openView.WorkbenchWindow.SelectWindow(); } else { PackageFilesView newView = new PackageFilesView(project); workbench.ShowView(newView); newView.ShowFiles(); } }
public LanguageConverter_VisualPascalABCPlugin(IWorkbench Workbench) { Languages = LoadLanguages(); currentLanguage = Languages[0]; this.VisualEnvironmentCompiler = Workbench.VisualEnvironmentCompiler; //TextFormatter = new TextFormatter(); TextFormatterForm = new TextFormatterForm(); TextFormatterForm.Plugin = this; TextFormatterForm.Init(); VisualEnvironmentCompiler.StandartCompiler.OnChangeCompilerState += new PascalABCCompiler.ChangeCompilerStateEventDelegate(Compiler_OnChangeCompilerState); }
public TestExecutionManager() { this.buildService = SD.BuildService; this.taskService = new UnitTestTaskService(); this.saveAllFilesCommand = new UnitTestSaveAllFilesCommand(); this.testService = SD.GetRequiredService<ITestService>(); this.workbench = SD.Workbench; this.statusBarService = SD.StatusBar; this.mainThread = SD.MainThread; this.buildOptions = new UnitTestBuildOptions(); }
void CreateReference(string name) { project = new TestableDTEProject(); msbuildProject = project.TestableProject; referenceProjectItem = msbuildProject.AddReference(name); fakeProjectService = project.FakeProjectService; CreateReference(project, referenceProjectItem); IWorkbench workbench = MockRepository.GenerateStub <IWorkbench>(); ICSharpCode.SharpDevelop.SD.Services.AddService(typeof(IWorkbench), workbench); }
void CreateProjectItemProperties() { project = new TestableDTEProject(); msbuildProject = project.TestableProject; msbuildFileProjectItem = new SD.FileProjectItem(msbuildProject, SD.ItemType.Compile); projectItem = new ProjectItem(project, msbuildFileProjectItem); properties = (ICSharpCode.PackageManagement.EnvDTE.Properties)projectItem.Properties; IWorkbench workbench = MockRepository.GenerateStub <IWorkbench>(); ICSharpCode.SharpDevelop.SD.Services.AddService(typeof(IWorkbench), workbench); }
/// <summary> /// Gets the package files view that is already open and displaying the files /// for the specified project. /// </summary> static PackageFilesView GetOpenPackageFilesView(WixProject project, IWorkbench workbench) { foreach (IViewContent view in workbench.ViewContentCollection) { PackageFilesView packageFilesView = view as PackageFilesView; if (packageFilesView != null && packageFilesView.Project == project) { return(packageFilesView); } } return(null); }
public static void InitializeWorkbench(IWorkbench workbench, IWorkbenchLayout layout) { WorkbenchSingleton.workbench = workbench; LanguageService.ValidateLanguage(); DisplayBindingService.InitializeService(); LayoutConfiguration.LoadLayoutConfiguration(); FileService.InitializeService(); //by hanz //DomHostCallback.Register(); // must be called after StatusBarService.Initialize() //ParserService.InitializeParserService(); //TaskService.Initialize(); //Bookmarks.BookmarkManager.Initialize(); //Project.CustomToolsService.Initialize(); //Project.BuildModifiedProjectsOnlyService.Initialize(); var messageService = ICSharpCode.Core.Services.ServiceManager.Instance.MessageService as IDialogMessageService; if (messageService != null) { messageService.DialogOwner = workbench.MainWin32Window; Debug.Assert(messageService.DialogOwner != null); messageService.DialogSynchronizeInvoke = workbench.SynchronizingObject; } workbench.Initialize(); workbench.SetMemento(PropertyService.Get(workbenchMemento, new Properties())); workbench.WorkbenchLayout = layout; ApplicationStateInfoService.RegisterStateGetter(activeContentState, delegate { return(WorkbenchSingleton.Workbench.ActiveContent); }); OnWorkbenchCreated(); // initialize workbench-dependent services: //Project.ProjectService.InitializeService();//by hanz NavigationService.InitializeService(); workbench.ActiveContentChanged += delegate { Debug.WriteLine("ActiveContentChanged to " + workbench.ActiveContent); LoggingService.Debug("ActiveContentChanged to " + workbench.ActiveContent); }; workbench.ActiveViewContentChanged += delegate { Debug.WriteLine("ActiveViewContentChanged to " + workbench.ActiveViewContent); LoggingService.Debug("ActiveViewContentChanged to " + workbench.ActiveViewContent); }; workbench.ActiveWorkbenchWindowChanged += delegate { Debug.WriteLine("ActiveWorkbenchWindowChanged to " + workbench.ActiveWorkbenchWindow); LoggingService.Debug("ActiveWorkbenchWindowChanged to " + workbench.ActiveWorkbenchWindow); }; }
public CompilerController_VisualPascalABCPlugin(IWorkbench Workbench) { IVisualEnvironmentCompiler VisualEnvironmentCompiler = Workbench.VisualEnvironmentCompiler; this.VisualEnvironmentCompiler=VisualEnvironmentCompiler; CompilerInformation.VisualEnvironmentCompiler = VisualEnvironmentCompiler; CompilerInformation.LoadOptions(CompilerInformation.OptionsFileName); VisualEnvironmentCompiler.StandartCompiler.InternalDebug.UseStandarParserForIntellisense = CompilerInformation.cbUseStandarParserForInellisense.Checked; VisualEnvironmentCompiler.StandartCompiler.InternalDebug.RunOnMono = CompilerInformation.cbRunMono.Checked; VisualEnvironmentCompiler.RemoteCompiler.InternalDebug.RunOnMono = CompilerInformation.cbRunMono.Checked; VisualEnvironmentCompiler.StandartCompiler.OnChangeCompilerState += Compiler_OnChangeCompilerState; if (VisualEnvironmentCompiler.RemoteCompiler != null) VisualEnvironmentCompiler.RemoteCompiler.OnChangeCompilerState += Compiler_OnChangeCompilerState; }
public AspectForm(IWorkbench workbench) { this.workbench = workbench; InitializeComponent(); awp = new AspectWindowPane(new PABCInterop(workbench)); awp.Parent = this; awp.Dock = DockStyle.Fill; awp.Visible = true; (workbench as Form1).FormClosed += AspectForm_FormClosed; //костыль, на собственное событие не реагирует this.Text = awp.WindowTitle; this.TabText = awp.WindowTitle; }
/// <summary> /// Gets any extra arguments from the NAnt pad's text box. /// </summary> protected string GetPadTextBoxArguments() { string arguments = String.Empty; IWorkbench Workbench = ICSharpCode.SharpDevelop.Gui.WorkbenchSingleton.Workbench; PadDescriptor padDescriptor = Workbench.GetPad(typeof(NAntPadContent)); if (padDescriptor != null && padDescriptor.PadContent != null) { arguments = ((NAntPadContent)padDescriptor.PadContent).Arguments; } return(arguments); }
public WorkbenchRunService() { Workbench = WorkbenchServiceFactory.Workbench; RunnerManager = new RunManager(ReadStringRequest); RunnerManager.Exited += new RunManager.RunnerManagerActionDelegate(RunnerManager_Exited); RunnerManager.Starting += new RunManager.RunnerManagerActionDelegate(RunnerManager_Started); RunnerManager.OutputStringReceived += new RunManager.TextRecivedDelegate(RunnerManager_OutputStringReceived); RunnerManager.RunnerManagerUnhanledRuntimeException += new RunManager.RunnerManagerUnhanledRuntimeExceptionDelegate(RunnerManager_RunnerManagerUnhanledRuntimeException); DesignerService = WorkbenchServiceFactory.DesignerService; this.DebuggerManager = WorkbenchServiceFactory.DebuggerManager; BuildService = WorkbenchServiceFactory.BuildService; DebuggerOperationsService = WorkbenchServiceFactory.DebuggerOperationsService; DocumentService = WorkbenchServiceFactory.DocumentService; }
public void Attach(IWorkbench workbench) { wbForm = (DefaultWorkbench)workbench; wbForm.SuspendLayout(); wbForm.Controls.Clear(); toolStripContainer = new ToolStripContainer(); toolStripContainer.SuspendLayout(); toolStripContainer.Dock = DockStyle.Fill; mainMenuContainer = new AutoHideMenuStripContainer(((DefaultWorkbench)wbForm).TopMenu); mainMenuContainer.Dock = DockStyle.Top; statusStripContainer = new AutoHideStatusStripContainer((StatusStrip)StatusBarService.Control); statusStripContainer.Dock = DockStyle.Bottom; dockPanel = new WeifenLuo.WinFormsUI.DockPanel(); dockPanel.DocumentStyle = DocumentStyles.DockingWindow; this.dockPanel.Dock = System.Windows.Forms.DockStyle.Fill; Panel helperPanel = new Panel(); helperPanel.Dock = DockStyle.Fill; helperPanel.Controls.Add(dockPanel); toolStripContainer.ContentPanel.Controls.Add(helperPanel); toolStripContainer.ContentPanel.Controls.Add(mainMenuContainer); toolStripContainer.ContentPanel.Controls.Add(statusStripContainer); wbForm.Controls.Add(toolStripContainer); // dock panel has to be added to the form before LoadLayoutConfiguration is called to fix SD2-463 LoadLayoutConfiguration(); ShowPads(); ShowViewContents(); RedrawAllComponents(); dockPanel.ActiveDocumentChanged += new EventHandler(ActiveMdiChanged); dockPanel.ActiveContentChanged += new EventHandler(ActiveContentChanged); ActiveMdiChanged(this, EventArgs.Empty); toolStripContainer.ResumeLayout(false); wbForm.ResumeLayout(false); Properties fullscreenProperties = PropertyService.Get("ICSharpCode.SharpDevelop.Gui.FullscreenOptions", new Properties()); fullscreenProperties.PropertyChanged += TrackFullscreenPropertyChanges; }
//IUserOptions UserOptions; //IVisualEnvironmentCompiler VisualEnvironmentCompiler; public WorkbenchRunService() { //UserOptions = WorkbenchServiceFactory.Workbench.UserOptions; Workbench = WorkbenchServiceFactory.Workbench; //VisualEnvironmentCompiler = WorkbenchServiceFactory.Workbench.VisualEnvironmentCompiler; RunnerManager = new RunManager(ReadStringRequest); RunnerManager.Exited += new RunManager.RunnerManagerActionDelegate(RunnerManager_Exited); RunnerManager.Starting += new RunManager.RunnerManagerActionDelegate(RunnerManager_Started); RunnerManager.OutputStringReceived += new RunManager.TextRecivedDelegate(RunnerManager_OutputStringReceived); RunnerManager.RunnerManagerUnhanledRuntimeException += new RunManager.RunnerManagerUnhanledRuntimeExceptionDelegate(RunnerManager_RunnerManagerUnhanledRuntimeException); DesignerService = WorkbenchServiceFactory.DesignerService; this.DebuggerManager = WorkbenchServiceFactory.DebuggerManager; BuildService = WorkbenchServiceFactory.BuildService; DebuggerOperationsService = WorkbenchServiceFactory.DebuggerOperationsService; DocumentService = WorkbenchServiceFactory.DocumentService; }
public PackageFilesView(WixProject project, IWorkbench workbench, IWixPackageFilesControl packageFilesControl, WixTextWriter wixTextWriter) { this.packageFilesControl = packageFilesControl; packageFilesControl.DirtyChanged += delegate { base.RaiseIsDirtyChanged(); }; SetLocalizedTitle("${res:ICSharpCode.WixBinding.PackageFilesView.Title}"); this.project = project; this.workbench = workbench; wixDocumentWindow = new WixDocumentWindow(workbench); workbench.ActiveViewContentChanged += ActiveViewContentChanged; this.wixTextWriter = wixTextWriter; openTextEditors = new OpenTextEditors(workbench); }
public void Attach(IWorkbench workbench) { if (this.workbench != null) throw new InvalidOperationException("Can attach only once!"); this.workbench = (WpfWorkbench)workbench; this.workbench.mainContent.Content = dockingManager; CommandManager.AddCanExecuteHandler(this.workbench, OnCanExecuteRoutedCommand); CommandManager.AddExecutedHandler(this.workbench, OnExecuteRoutedCommand); Busy = true; try { foreach (PadDescriptor pd in workbench.PadContentCollection) { ShowPad(pd); } } finally { Busy = false; } LoadConfiguration(); EnsureFloatingWindowsLocations(); }
public PackageFilesView(WixProject project, IWorkbench workbench, IWixPackageFilesControl packageFilesControl) : this(project, workbench, packageFilesControl, null) { wixTextWriter = new WixTextWriter(GetTextEditorOptions()); }
public PackageFilesView(WixProject project, IWorkbench workbench) : this(project, workbench, new WixPackageFilesControl()) { }
public void Attach(IWorkbench workbench) { wbForm = (DefaultWorkbench)workbench; wbForm.SuspendLayout(); wbForm.IsMdiContainer = true; dockPanel = new WeifenLuo.WinFormsUI.DockPanel(); dockPanel.ActiveAutoHideContent = null; dockPanel.Dock = DockStyle.Fill; wbForm.Controls.Add(dockPanel); wbForm.Controls.Add(wbForm.TopToolStrip); wbForm.Controls.Add(wbForm.TopMenu); LoadConfiguration(); ShowPads(); //ShowViewContents(); RedrawAllComponents(); wbForm.ResumeLayout(false); }
public void Attach(IWorkbench workbench) { wbForm = (DefaultWorkbench)workbench; wbForm.SuspendLayout(); wbForm.IsMdiContainer = true; //dockPanel = new WeifenLuo.WinFormsUI.DockPanel(); //dockPanel = new WeifenLuo.WinFormsUI.Docking.DockPanel(); //dockPanel.ActiveAutoHideContent = null; //dockPanel.Dock = DockStyle.Fill; //wbForm.Controls.Add(dockPanel);// ��eifenLuo.WinFormsUI.DockPanel dockpanel���뵽controls InitOutlook(wbForm); wbForm.TopMenu.Dock = System.Windows.Forms.DockStyle.Top; wbForm.Controls.Add(wbForm.TopMenu);// ����˵� LoadConfiguration(); //ShowPads(); //ShowViewContents(); //RedrawAllComponents(); wbForm.ResumeLayout(false); }
public AbstractActivePackageFilesViewCommand(IWorkbench workbench) { this.workbench = workbench; activePackageFilesView = new ActivePackageFilesView(workbench); }
public RemoveXPathHighlightingCommand(IWorkbench workbench) { this.workbench = workbench; }
public OpenTextEditors(IWorkbench workbench) { this.workbench = workbench; }
public HideDiffCommand(IWorkbench workbench) : base(workbench) { }