public virtual string GetToolTip(TreeNodeAdv node) { if (ToolTipProvider != null) return ToolTipProvider.GetToolTip(node, this); else return string.Empty; }
public virtual string GetToolTip(TreeNodeAdv node) { if (ToolTipProvider != null) { return(ToolTipProvider.GetToolTip(node)); } return(string.Empty); }
private void BindKeys() { _keyboardHook.HookedKeys.Add(Keys.Space); _keyboardHook.HookedKeys.Add(Keys.M); _keyboardHook.HookedKeys.Add(Keys.N); _keyboardHook.HookedKeys.Add(Keys.A); _keyboardHook.KeyUp += KeyboardHook_KeyUp; ToolTipProvider.SetToolTip(cmdPrevious, string.Format("Previous (Hotkey: {0})", Keys.N)); ToolTipProvider.SetToolTip(cmdNext, string.Format("Next (Hotkey: {0})", Keys.M)); ToolTipProvider.SetToolTip(cmdPlayPause, string.Format("Play/Pause (Hotkey: {0})", Keys.Space)); }
internal static ToolTipProvider GetToolTipProviderInternal(ITextArea textView) { if (textView == null) { throw new ArgumentNullException("textView"); } ToolTipProvider property = null; IPropertyOwner owner = textView; if (!owner.TryGetProperty <ToolTipProvider>("ToolTipProvider", out property)) { property = new ToolTipProvider(textView); owner.AddProperty("ToolTipProvider", property); } return(property); }
private void PlayCurrentItem() { //If the current item is null, go to the start of the list. if (Session.Playlist.CurrentItem == null && Session.Playlist.Count <= 0) { Text = "Rejive"; Title.Text = Text; return; } if (Session.Playlist.CurrentItem == null) { Session.Playlist.MoveFirst(); } //Load and play _player.Load(Session.Playlist.CurrentItem.TrackPathName); _player.Play(); //Uncheck the pause button cmdPlayPause.Text = PauseText; //Index playing or how many items in our playlist PlaylistCount.Text = string.Format("{0}/{1}", Session.Playlist.CurrentPosition + 1, Session.Playlist.Count); //Set the title Text = Session.Playlist.CurrentItem.TrackName; ToolTipProvider.SetToolTip(Title, Text); Title.Text = Text; //Art if (Art.Image != null) { Art.Image.Dispose(); Art.Image = null; } var img = Session.Playlist.CurrentItem.FetchImage(); if (img != null) { Art.Image = img; } }
public void SetupIntellisense(TextEditorControl control) { _control = control; control.SetHighlighting((SupportedLanguage == SupportedLanguage.CSharp) ? "C#" : "VBNET"); control.ShowEOLMarkers = false; control.ShowInvalidLines = false; HostCallbackImplementation.Register(this); CodeCompletionKeyHandler.Attach(this, control); ToolTipProvider.Attach(this, control); ProjectContentRegistry = new ProjectContentRegistry(); // Default .NET 2.0 registry // Persistence lets SharpDevelop.Dom create a cache file on disk so that // future starts are faster. // It also caches XML documentation files in an on-disk hash table, thus // reducing memory usage. try { if (Settings.Default.CacheFiles) { var persistencePath = Path.Combine(Path.GetTempPath(), ReflexilPersistence); var persistenceCheck = Path.Combine(persistencePath, ReflexilPersistenceCheck); Directory.CreateDirectory(persistencePath); // Check write/access to directory File.WriteAllText(persistenceCheck, @"Using cache!"); // Check write file rights File.ReadAllText(persistenceCheck); // Check read file rights ProjectContentRegistry.ActivatePersistence(persistencePath); } } // ReSharper disable once EmptyGeneralCatchClause catch (Exception) { // don't use cache file } ProjectContent = new DefaultProjectContent { Language = LanguageProperties }; ParseInformation = new ParseInformation(new DefaultCompilationUnit(ProjectContent)); }
public PDDLTabItem(string moduleName) { InitializeComponent(); AddEventHandlerForButtons(); toolStripContainer1.Visible = false; textEditorControl = new SharpDevelopTextAreaControl(); textEditorControl.Dock = DockStyle.Fill; textEditorControl.ContextMenuStrip = EditorContextMenuStrip; textEditorControl.BorderStyle = BorderStyle.Fixed3D; textEditorControl.Visible = true; splitContainer1.Panel2.Controls.Add(textEditorControl); TabText = "Document " + counter; counter++; textEditorControl.FileNameChanged += _EditorControl_FileNameChanged; textEditorControl.TextChanged += textEditorControl_TextChanged; textEditorControl.Tag = this; Padding = new Padding(2, 2, 2, 2); DockableAreas = DockAreas.Document; secondaryViewContentCollection = new SecondaryViewContentCollection(this); InitFiles(); file = FileService.CreateUntitledOpenedFile(TabText, new byte[] { }); file.CurrentView = this; textEditorControl.FileName = file.FileName; files.Clear(); files.Add(file); SetSyntaxLanguage(moduleName); textEditorControl.Document.FoldingManager.FoldingStrategy = new FoldingStrategy(); // Highlight the matching bracket or not... textEditorControl.ShowMatchingBracket = true; textEditorControl.BracketMatchingStyle = BracketMatchingStyle.Before; HostCallbackImplementation.Register(this); CodeCompletionKeyHandler.Attach(this, textEditorControl); ToolTipProvider.Attach(this, textEditorControl); pcRegistry = new ProjectContentRegistry(); // Default .NET 2.0 registry // Persistence lets SharpDevelop.Dom create a cache file on disk so that // future starts are faster. // It also caches XML documentation files in an on-disk hash table, thus // reducing memory usage. pcRegistry.ActivatePersistence(Path.Combine(Path.GetTempPath(), "CSharpCodeCompletion")); myProjectContent = new DefaultProjectContent(); myProjectContent.Language = LanguageProperties.CSharp; TreeView_Structure.HideSelection = false; splitContainer1.SplitterDistance = 100; TreeView_Structure.ExpandAll(); ProblemsNode.ExpandAll(); }