public void CopyFrom(TextEditorOptions source) { ConvertTabsToSpaces = source.ConvertTabsToSpaces; ShowEOLMarkers = source.ShowEOLMarkers; ShowInvalidLines = source.ShowInvalidLines; ShowLineNumbers = source.ShowLineNumbers; ShowMatchingBracket = source.ShowMatchingBracket; ShowSpaces = source.ShowSpaces; ShowTabs = source.ShowTabs; IndentStyleDef = source.IndentStyleDef; TabIndent = source.TabIndent; VerticalRulerRow = source.VerticalRulerRow; HighlightSelectAndCase = source.HighlightSelectAndCase; SelectHighlightColorArgb = source.SelectHighlightColorArgb; CaseHighlightColorArgb = source.CaseHighlightColorArgb; CommentHighlightColorArgb = source.CommentHighlightColorArgb; HighlightComments = source.HighlightComments; ShowFoldMarkers = source.ShowFoldMarkers; MarkCaretLine = source.MarkCaretLine; UseAntiAliasedFont = source.UseAntiAliasedFont; AutoRemoveModifiedSignForKnownScriptableObjects = source.AutoRemoveModifiedSignForKnownScriptableObjects; FoldHighlightedSelectAndCase = source.FoldHighlightedSelectAndCase; FoldComments = source.FoldComments; FoldCodeBlocks = source.FoldCodeBlocks; AllowCaretBeyondEOL = source.AllowCaretBeyondEOL; AnalyzeSql = source.AnalyzeSql; ResultViewType = source.ResultViewType; CustomTextEditorFont = source.CustomTextEditorFont; CodeCompCacheTimeout = source.CodeCompCacheTimeout; CodeCompCacheCollectInterval = source.CodeCompCacheCollectInterval; }
public ResultView(ResultViewType type) { InitializeComponent(); Type = type; if (DesignMode) { return; } InitializeColors(); Resize += OnResize; Disposed += OnDisposed; switch (type) { case ResultViewType.Search: uiTooltip.SetToolTip(uiImage, "Click to queue, double-click to play."); uiTooltip.SetToolTip(uiDownload, "Send this track to the download queue."); break; case ResultViewType.Suggestion: uiTooltip.SetToolTip(uiImage, "Click to queue, double-click to play."); uiTooltip.SetToolTip(uiRemove, "Decline suggestion (won't show up again)."); uiTooltip.SetToolTip(uiDownload, "Accept suggestion and send to the download queue."); break; case ResultViewType.Playlist: uiTooltip.SetToolTip(uiRemove, "Remove this track from the playlist."); uiTooltip.SetToolTip(uiDownload, "Send this track to the download queue."); uiTooltip.SetToolTip(uiImage, "Click to queue, double-click to play, drag to reorder."); break; default: throw new ArgumentOutOfRangeException(); } if (type == ResultViewType.Playlist) { AllowDrop = true; DragOver += OnDragOver; DragDrop += OnDragDrop; } }
public void ResetToDefaults() { ConvertTabsToSpaces = defConvertTabsToSpaces; ShowEOLMarkers = defShowEOLMarkers; ShowInvalidLines = defShowInvalidLines; ShowLineNumbers = defShowLineNumbers; ShowMatchingBracket = defShowMatchingBracket; ShowSpaces = defShowSpaces; ShowTabs = defShowTabs; IndentStyleDef = defIndentStyle; TabIndent = defTabIndent; VerticalRulerRow = defVRulerRow; HighlightSelectAndCase = defHighligtSelectAndCase; HighlightComments = defHighligtComments; SelectHighlightColorArgb = defSelectHighlightColor.ToArgb(); CaseHighlightColorArgb = defCaseHighlightColor.ToArgb(); CommentHighlightColorArgb = defCommentHighlightColor.ToArgb(); ShowFoldMarkers = defShowFoldMarkers; MarkCaretLine = defMarkCaretLine; UseAntiAliasedFont = defUseAntiAliasedFont; AutoRemoveModifiedSignForKnownScriptableObjects = defAutoRemoveModifiedSignForKnownScriptableObjects; FoldHighlightedSelectAndCase = defFoldHighlightedSelectAndCase; FoldComments = defFoldComments; FoldCodeBlocks = defFoldCodeBlocks; WatchOpenedFiles = defWatchOpenedFiles; CustomHighlightersEnabled = defCustomHighlightersEnabled; AllowCaretBeyondEOL = defAllowCaretBeyondEOL; AnalyzeSql = defAnalyzeSql; ResultViewType = defResultViewType; CodeCompCacheTimeout = defCodeCompCacheTimeout; CodeCompCacheCollectInterval = defCodeCompCacheCollectInterval; ScriptPreviewSticked = defScriptPreviewSticked; SearchAndReplaceItemCnt = defSearchAndReplaceItemCnt; }