public WabbitcodeStatusBarService(IDockingService dockingService, WabbitcodeStatusBar statusBar)
		{
			if (dockingService == null)
			{
				throw new ArgumentNullException("dockingService");
			}
			if (statusBar == null)
			{
				throw new ArgumentNullException("statusBar");
			}
			this.dockingService = dockingService;
			this.statusBar = statusBar;
			this.statusBar.DockingService = dockingService;
		}
예제 #2
0
        public void InitPanels(WabbitcodeStatusBar statusBar)
        {
            StatusBar = new WabbitcodeStatusBarService(this, statusBar);

            //Init Normal Panels
            LabelList = new LabelList();
            LabelList.Show(DockManager, AnchorStyle.Right);

            ProjectViewer = new ProjectViewer();
            ProjectViewer.Show(DockManager, AnchorStyle.Left);

            OutputWindow = new OutputWindow();
            OutputWindow.Show(DockManager, AnchorStyle.Bottom);

            ErrorList = new ErrorList();
            ErrorList.Show(DockManager, AnchorStyle.Bottom);

            if (File.Exists(pathsService.DockConfig))
            {
                try
                {
                    DockManager.RestoreLayout(pathsService.DockConfig);
                } catch (Exception) { }
            }
            IDocumentService documentService = ServiceFactory.Instance.GetServiceInstance <DocumentService>();

            try
            {
                DocumentContent[] docs = new DocumentContent[Documents.Count];
                Documents.CopyTo(docs, 0);
                foreach (Editor doc in docs)
                {
                    documentService.OpenDocument(doc);
                }
            }
            catch (Exception ex)
            {
                ShowError("Error restoring documents", ex);
            }
        }
예제 #3
0
 public StatusBarService(WabbitcodeStatusBar statusBar)
 {
     _statusBar = statusBar;
 }