public JetBoxOptionsPage(Lifetime lifetime, IUIApplication environment, ClientFactory clientFactory, JetBoxSettingsStorage jetBoxSettings, JetPopupMenus jetPopupMenus) : base(lifetime, environment, PID) { mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); myLifetimes = new SequentialLifetimes(lifetime); myClient = clientFactory.CreateClient(); myClient.UserLogin = mySettingsStore.GetValue(JetBoxSettingsAccessor.Login); // init UI myLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true }; myLoggedPanel.Controls.Add(myLoginLabel = new RichTextLabel(environment)); myLoggedPanel.Controls.Add(new LinkLabel("Logout", Logout, jetPopupMenus)); myNonLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true, FlowDirection = FlowDirection.TopDown }; myNonLoggedPanel.Controls.Add(new LinkLabel("Login", Login, jetPopupMenus) { Image = Environment.Theming.Icons[UnnamedThemedIcons.Dropbox.Id].CurrentGdipBitmapScreenDpi, ImageAlign = ContentAlignment.MiddleLeft, Padding = new Padding(20, 0, 0, 0) }); Controls.Add(myLoggedPanel); Controls.Add(myNonLoggedPanel); InitLoginState(); }
public void Open(Lifetime lifetime, IShellLocks shellLocks, ChangeManager changeManager, ISolution solution, DocumentManager documentManager, IActionManager actionManager, ICommandProcessor commandProcessor, TextControlChangeUnitFactory changeUnitFactory, JetPopupMenus jetPopupMenus) { Debug.Assert(!IsOpened); _solution = solution; DocumentManager = documentManager; _jetPopupMenus = jetPopupMenus; changeManager.Changed2.Advise(lifetime, Handler); lifetime.AddAction(Close); var expandAction = actionManager.Defs.TryGetActionDefById(GotoDeclarationAction.ACTION_ID); if (expandAction != null) { var postfixHandler = new GotoDeclarationHandler(lifetime, shellLocks, commandProcessor, changeUnitFactory, this); lifetime.AddBracket( FOpening: () => actionManager.Handlers.AddHandler(expandAction, postfixHandler), FClosing: () => actionManager.Handlers.RemoveHandler(expandAction, postfixHandler)); } var findUsagesAction = actionManager.Defs.GetActionDef <FindUsagesAction>(); var findUsagesHandler = new FindUsagesHandler(lifetime, shellLocks, commandProcessor, changeUnitFactory, this); lifetime.AddBracket( FOpening: () => actionManager.Handlers.AddHandler(findUsagesAction, findUsagesHandler), FClosing: () => actionManager.Handlers.RemoveHandler(findUsagesAction, findUsagesHandler)); }
public void Open(Lifetime lifetime, IShellLocks shellLocks, ChangeManager changeManager, ISolution solution, DocumentManager documentManager, IActionManager actionManager, ICommandProcessor commandProcessor, TextControlChangeUnitFactory changeUnitFactory, JetPopupMenus jetPopupMenus) { Debug.Assert(!IsOpened); _solution = solution; DocumentManager = documentManager; _jetPopupMenus = jetPopupMenus; changeManager.Changed2.Advise(lifetime, Handler); lifetime.AddAction(Close); var expandAction = actionManager.Defs.TryGetActionDefById(GotoDeclarationAction.ACTION_ID); if (expandAction != null) { var postfixHandler = new GotoDeclarationHandler(lifetime, shellLocks, commandProcessor, changeUnitFactory, this); lifetime.AddBracket( FOpening: () => actionManager.Handlers.AddHandler(expandAction, postfixHandler), FClosing: () => actionManager.Handlers.RemoveHandler(expandAction, postfixHandler)); } var findUsagesAction = actionManager.Defs.GetActionDef<FindUsagesAction>(); var findUsagesHandler = new FindUsagesHandler(lifetime, shellLocks, commandProcessor, changeUnitFactory, this); lifetime.AddBracket( FOpening: () => actionManager.Handlers.AddHandler(findUsagesAction, findUsagesHandler), FClosing: () => actionManager.Handlers.RemoveHandler(findUsagesAction, findUsagesHandler)); }
public ExpressionChooser([NotNull] JetPopupMenus popupMenus, [NotNull] ShellLocks shellLocks, [NotNull] IActionManager actionManager, [NotNull] IThreading threading, [NotNull] IDocumentMarkupManager markupManager) { myPopupMenus = popupMenus; myShellLocks = shellLocks; myActionManager = actionManager; myMarkupManager = markupManager; myThreading = threading; }
public ExpressionChooser([NotNull] JetPopupMenus popupMenus, [NotNull] ShellLocks shellLocks, [NotNull] IActionManager actionManager, [NotNull] IThreading threading, [NotNull] IDocumentMarkupManager markupManager) { myPopupMenus = popupMenus; myShellLocks = shellLocks; myActionManager = actionManager; myMarkupManager = markupManager; myThreading = threading; }
public JetPopupMenusInteractivePatcher(JetPopupMenus menus) { // To not fail in unit tests if (menus is JetPopupMenusInteractive menusInteractive) { menusInteractive.OnViewCreated.Advise(Lifetime.Eternal, (args) => { if (args.view is JetPopupMenuOverlordView overlordView) { ContextMenuSectionNavigationConfigurator.ConfigureMenuView(overlordView.MenuView); } }); } }
private void OpenFileSelectionModal(JetPopupMenus jetPopupMenus, ITextControl textControl, ISet <SpecflowStepsDefinitionsCache.AvailableBindingClass> availableBindingClasses, GherkinStepKind getStepKind, string getStepText) { jetPopupMenus.ShowModal(JetPopupMenu.ShowWhen.AutoExecuteIfSingleEnabledItem, (lifetime, menu) => { menu.Caption.Value = WindowlessControlAutomation.Create("Where to create the step ?"); menu.ItemKeys.AddRange(availableBindingClasses); menu.DescribeItem.Advise(lifetime, e => { var key = (SpecflowStepsDefinitionsCache.AvailableBindingClass)e.Key; e.Descriptor.Icon = PsiCSharpThemedIcons.Csharp.Id; e.Descriptor.Style = MenuItemStyle.Enabled; e.Descriptor.Text = new RichText(key.SourceFile.DisplayName); }); menu.ItemClicked.Advise(lifetime, e => { var availableBindingClass = (SpecflowStepsDefinitionsCache.AvailableBindingClass)e; AddSpecflowStep(availableBindingClass.SourceFile, availableBindingClass.ClassClrName, getStepKind, getStepText); }); menu.PopupWindowContextSource = textControl.PopupWindowContextFactory.ForCaret(); }); }
public JetBoxOptionsPage(Lifetime lifetime, IUIApplication environment, ClientFactory clientFactory, JetBoxSettingsStorage jetBoxSettings, JetPopupMenus jetPopupMenus, OpensUri opensUri) : base(lifetime, environment, PID) { mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); myOpensUri = opensUri; myClient = clientFactory.CreateClient(); myClient.UserLogin = mySettingsStore.GetValue(JetBoxSettingsAccessor.Login); // init UI myLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true }; myLoggedPanel.Controls.Add(myLoginLabel = new RichTextLabel(environment)); myLoggedPanel.Controls.Add(new LinkLabel("Logout", Logout, jetPopupMenus)); myNonLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true, FlowDirection = FlowDirection.TopDown }; myNonLoggedPanel.Controls.Add(new LinkLabel("Login", Login, jetPopupMenus)); myNonLoggedPanel.Controls.Add(new LinkLabel("Get access (click after approving access on the web)", GetInfo, jetPopupMenus)); Controls.Add(myLoggedPanel); Controls.Add(myNonLoggedPanel); InitLoginState(); }
public TestExpressionChooser([NotNull] JetPopupMenus popupMenus, [NotNull] ShellLocks shellLocks, [NotNull] IActionManager actionManager, [NotNull] IThreading threading, [NotNull] IDocumentMarkupManager markupManager) : base(popupMenus, shellLocks, actionManager, threading, markupManager) { }
public JetBoxOptionsPage(Lifetime lifetime, IUIApplication environment, ClientFactory clientFactory, JetBoxSettingsStorage jetBoxSettings, JetPopupMenus jetPopupMenus) : base(lifetime, environment, PID) { mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); myLifetimes = new SequentialLifetimes(lifetime); myClient = clientFactory.CreateClient(); myClient.UserLogin = mySettingsStore.GetValue(JetBoxSettingsAccessor.Login); // init UI myLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true }; myLoggedPanel.Controls.Add(myLoginLabel = new RichTextLabel(environment)); myLoggedPanel.Controls.Add(new LinkLabel("Logout", Logout, jetPopupMenus)); myNonLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true, FlowDirection = FlowDirection.TopDown }; myNonLoggedPanel.Controls.Add(new LinkLabel("Login", Login, jetPopupMenus) { Image = Environment.Theming.Icons[UnnamedThemedIcons.Dropbox.Id].CurrentGdipBitmapNotSure(), ImageAlign = ContentAlignment.MiddleLeft, Padding = new Padding(20, 0, 0, 0) }); Controls.Add(myLoggedPanel); Controls.Add(myNonLoggedPanel); InitLoginState(); }
public ReSharperSolution(Lifetime lifetime, IShellLocks shellLocks, ChangeManager changeManager, ISolution solution, DocumentManager documentManager, IActionManager actionManager, ICommandProcessor commandProcessor, TextControlChangeUnitFactory changeUnitFactory, JetPopupMenus jetPopupMenus) { XXLanguageXXSolution.Open(lifetime, shellLocks, changeManager, solution, documentManager, actionManager, commandProcessor, changeUnitFactory, jetPopupMenus); }
public JetBoxOptionsPage(Lifetime lifetime, IUIApplication environment, ClientFactory clientFactory, JetBoxSettingsStorage jetBoxSettings, JetPopupMenus jetPopupMenus, OpensUri opensUri) : base(lifetime, environment, PID) { mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); myOpensUri = opensUri; myClient = clientFactory.CreateClient(); myClient.UserLogin = mySettingsStore.GetValue(JetBoxSettingsAccessor.Login); // init UI myLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true }; myLoggedPanel.Controls.Add(myLoginLabel = new RichTextLabel(environment)); myLoggedPanel.Controls.Add(new LinkLabel("Logout", Logout, jetPopupMenus)); myNonLoggedPanel = new FlowLayoutPanel { Visible = false, AutoSize = true, FlowDirection = FlowDirection.TopDown }; myNonLoggedPanel.Controls.Add(new LinkLabel("Login", Login, jetPopupMenus)); myNonLoggedPanel.Controls.Add(new LinkLabel("Get access (click after approving access on the web)", GetInfo, jetPopupMenus)); Controls.Add(myLoggedPanel); Controls.Add(myNonLoggedPanel); InitLoginState(); }
public ReSharperSolution(Lifetime lifetime, IShellLocks shellLocks, ChangeManager changeManager, ISolution solution, DocumentManager documentManager, IActionManager actionManager, ICommandProcessor commandProcessor, TextControlChangeUnitFactory changeUnitFactory, JetPopupMenus jetPopupMenus) { XXLanguageXXSolution.Open(lifetime, shellLocks, changeManager, solution, documentManager, actionManager, commandProcessor, changeUnitFactory, jetPopupMenus); }