private void RegisterNavigationItem() { _navigationService = _container.Resolve <INavigationService>(); _navigationService.RegisterMenu("Main/View[0]", new ToolStripMenuItemCodon("Welcome", Language.Current.Navigation_Menu_StartPage, (sender, codon) => { _workbenchService.Show <StartPageView>(StartPageScheme.STARTPAGE_URI); })); }
public StartPageView(IEventAggregator eventAggregator, IWorkbenchService workbenchService) { _eventAggregator = eventAggregator; this.HideOnClose = false; this.TabText = "Browser"; _browserPane.View.GetSchemeFunc = (sender, e) => { if (e.SchemeName.Equals(StartPageScheme.SCHEMENAME, StringComparison.CurrentCultureIgnoreCase)) { return(StartPageScheme.Instance); } else { return(null); } }; _browserPane.View.StatusTextChanged = (e) => { workbenchService.SetStatusMessage(e); }; _browserPane.View.TitleChanged = (e) => { this.TabText = e; }; _browserPane.View.NewWindow += (sender, e) => { workbenchService.Show(new BrowserView(e.BrowserPane, e.Url)); }; this.Controls.Add(_browserPane.View); _browserPane.Navigate(StartPageScheme.STARTPAGE_URI); this.Single = true; this.SingleKey = StartPageScheme.STARTPAGE_URI; SubscribeEvents(); }
public BrowserView(BrowserPane browserPane, Uri url) { InitializeComponent(); this.HideOnClose = false; this.TabText = "Browser"; _workbenchService = ServiceUnity.Container.Resolve <IWorkbenchService>(); browserPane.View.StatusTextChanged = (e) => { _workbenchService.SetStatusMessage(e); }; browserPane.View.TitleChanged = (e) => { this.TabText = e; }; browserPane.View.NewWindow += (sender, e) => { _workbenchService.Show(new BrowserView(e.BrowserPane, e.Url)); }; this.Controls.Add(browserPane.View); browserPane.Navigate(url.ToString()); }
private void RegisterNavigationItem() { Func <IToolStripItemCodon, bool> projectIsOpend = (codon) => { return(_projectService.Current != null); }; _navigationService.RegisterMenu("Main/File[0]", new ToolStripMenuItemCodon("NewProject", Language.Current.Navigation_Menu_NewProject, (sender, codon) => { _projectService.NewProject(); })); _navigationService.RegisterMenu("Main/File[1]", new ToolStripMenuItemCodon("OpenProject", Language.Current.Navigation_Menu_OpenProject, (sender, codon) => { _projectService.OpenProject(); })); _navigationService.RegisterMenu("Main/File[2]", new ToolStripMenuItemCodon("CloseProject", Language.Current.Navigation_Menu_CloseProject, (sender, codon) => { _projectService.CloseProject(); }) { IsEnabled = projectIsOpend }); _navigationService.RegisterMenu("Main/File[3]", new ToolStripSeparatorCodon()); _navigationService.RegisterMenu("Main/Edit[0]", new ToolStripMenuItemCodon("ProjectProperty", Language.Current.Navigation_Menu_ProjectProperty, (sender, codon) => { ProjectPropertyView.ShowView(); }) { IsEnabled = projectIsOpend }); _navigationService.RegisterMenu("Main/View[1]", new ToolStripMenuItemCodon("ProjectStartPage", Language.Current.Navigation_Menu_ProjectStartPage, (sender, codon) => { _workbenchService.Show <ProjectStartPageView>(ProjectStartPageScheme.PROJECT_STARTPAGE_URI); }) { IsEnabled = projectIsOpend }); _navigationService.RegisterMenu("Main/Build", new ToolStripMenuItemCodon("BuildProject", Language.Current.Navigation_Menu_BuildProject, (sender, codon) => { }) { IsEnabled = projectIsOpend }); _navigationService.RegisterToolStrip("Main", new ToolStripButtonCodon("NewProject", Language.Current.Navigation_ToolStrip_NewProject, IconsLibrary.New2, (sender, e) => { _projectService.NewProject(); })); _navigationService.RegisterToolStrip("Main", new ToolStripButtonCodon("OpenProject", Language.Current.Navigation_ToolStrip_OpenProject, IconsLibrary.OpenFolder, ToolStripItemDisplayStyle.ImageAndText, (sender, e) => { _projectService.OpenProject(); })); _navigationService.RegisterToolStrip("Main", new ToolStripSeparatorCodon()); }
public CreateSqlCommand() { ExcuteHandler = () => { List <DataEntity> entityList = GetArgument(); if (entityList == null || entityList.Count == 0) { return; } DataEntityScriptView formDataEntityCreateSql = new DataEntityScriptView(entityList); formDataEntityCreateSql.HideOnClose = false; formDataEntityCreateSql.TabText = Language.Current.DataEntityCreateSqlView_TabText + " - " + entityList[0].Name; if (entityList.Count > 1) { formDataEntityCreateSql.TabText += "..."; } _workbenchService.Show(formDataEntityCreateSql); }; }
private void RegisterNavigationItem() { Func <IToolStripItemCodon, bool> projectIsOpend = (codon) => { return(_projectService.Current != null); }; _navigationService.RegisterMenu("Main/Edit[2]", new ToolStripMenuItemCodon("Dictionary", Language.Current.Navigation_Menu_Dictionary, Resources.Enum, (sender, codon) => { _workbenchService.Show <EnumView>(EnumView.SINGLEKEY); }) { IsEnabled = projectIsOpend }); _navigationService.RegisterToolStrip("Main", new ToolStripButtonCodon("Dictionary", Language.Current.Navigation_ToolStrip_Dictionary, Resources.Enum, (sender, e) => { _workbenchService.Show <EnumView>(EnumView.SINGLEKEY); }) { IsEnabled = projectIsOpend }); }
private void RegisterNavigationItem() { Func <IToolStripItemCodon, bool> projectIsOpend = (codon) => { return(_projectService.Current != null); }; _navigationService.RegisterMenu("Main/Edit[2]", new ToolStripMenuItemCodon("DataEntity", Language.Current.Navigation_Menu_DataEntity, Resources.DataEntity, (sender, codon) => { _workbenchService.Show <ExplorerView>(ExplorerView.SINGLEKEY); }) { IsEnabled = projectIsOpend }); _navigationService.RegisterMenu("Main/Build[0]", new ToolStripMenuItemCodon("DataBaseCreateWizard", Language.Current.Navigation_Menu_DataBaseCreateWizard, IconsLibrary.DataSource2, (sender, codon) => { DataBaseCreateWizard.Show(); }) { IsEnabled = projectIsOpend }); _navigationService.RegisterToolStrip("Main", new ToolStripButtonCodon("DataEntity", Language.Current.Navigation_ToolStrip_DataEntity, Resources.DataEntity, (sender, e) => { _workbenchService.Show <ExplorerView>(ExplorerView.SINGLEKEY); }) { IsEnabled = projectIsOpend }); }
private void RegisterNavigationItem() { Func <IToolStripItemCodon, bool> projectIsOpend = (codon) => { return(_projectService.Current != null); }; _navigationService.RegisterMenu("Main/Edit[5]", new ToolStripMenuItemCodon("Window", Language.Current.Navigation_Menu_Window, IconsLibrary.Form, (sender, codon) => { _workbenchService.Show <ExplorerView>(ExplorerView.SINGLEKEY); }) { IsEnabled = projectIsOpend }); _navigationService.RegisterToolStrip("Main", new ToolStripButtonCodon("Window", Language.Current.Navigation_ToolStrip_Window, IconsLibrary.Form, (sender, e) => { _workbenchService.Show <ExplorerView>(ExplorerView.SINGLEKEY); }) { IsEnabled = projectIsOpend }); }
public void OpenDesigner(WindowEntity entity) { _workbenchService.Show(FormHostingContainer.Instance); FormHostingContainer.Instance.Create(entity); }