-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Navigation Bar (new feature) + Symbol location (source code or metadata) distinguishability + Better themed interface + Better preview of syntax highlight options + Used different icons for compiler diagnostics in Super Quick Info + Possible to disable C# quick info temporarily when Ctrl is pressed ! Optimized priority of C# syntax highlighting ! Default config and syntax highlight tweaks ! Migrating to async and await model - Fixed no feature was enabled after initial installation - Fixed issue #42 (UI got frozen when adjusting syntax highlight options) - Other fixes and tweaks
- Loading branch information
Showing
18 changed files
with
197 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using System.Windows; | ||
using System.Windows.Controls.Primitives; | ||
using AppHelpers; | ||
|
||
namespace Codist.Controls | ||
{ | ||
sealed class StateButton<TState> : ToggleButton | ||
where TState : struct, Enum | ||
{ | ||
readonly TState _State; | ||
readonly Func<TState> _StateGetter; | ||
readonly Action<TState, bool> _StateSetter; | ||
bool _lockUI; | ||
|
||
public StateButton(TState state, Func<TState> stateGetter, Action<TState, bool> stateSetter) { | ||
_State = state; | ||
_StateGetter = stateGetter; | ||
_StateSetter = stateSetter; | ||
this.SetBackgroundForCrispImage(ThemeHelper.TitleBackgroundColor); | ||
} | ||
|
||
public void UpdateState() { | ||
_lockUI = true; | ||
try { | ||
IsChecked = _StateGetter().MatchFlags(_State); | ||
} | ||
finally { | ||
_lockUI = false; | ||
} | ||
} | ||
|
||
protected override void OnChecked(RoutedEventArgs e) { | ||
base.OnChecked(e); | ||
if (_lockUI == false) { | ||
_StateSetter(_State, IsChecked.GetValueOrDefault()); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
|
||
namespace Codist.CodeBar | ||
{ | ||
readonly struct SymbolHistory : IEquatable<SymbolHistory> | ||
{ | ||
internal static List<SymbolHistory> Records { get; } = new List<SymbolHistory>(); | ||
internal static void Add(string document) { | ||
for (int i = 0; i < Records.Count; i++) { | ||
if (String.Equals(Records[i].Document, document, StringComparison.OrdinalIgnoreCase)) { | ||
Records.RemoveAt(i); | ||
break; | ||
} | ||
} | ||
Records.Insert(0, new SymbolHistory(document, 1, 1)); | ||
if (Records.Count > 10) { | ||
Records.RemoveAt(10); | ||
} | ||
} | ||
|
||
public readonly string Document; | ||
public readonly int Line, Column; | ||
|
||
public SymbolHistory(string document, int line, int column) { | ||
Document = document; | ||
Line = line; | ||
Column = column; | ||
} | ||
|
||
public override bool Equals(object obj) { | ||
return AppHelpers.ClrHacker.DirectCompare(this, (SymbolHistory)obj); | ||
} | ||
|
||
public bool Equals(SymbolHistory other) { | ||
return AppHelpers.ClrHacker.DirectCompare(this, other); | ||
} | ||
|
||
public override int GetHashCode() { | ||
var hashCode = 1439312346; | ||
hashCode = hashCode * -1521134295 + EqualityComparer<string>.Default.GetHashCode(Document); | ||
hashCode = hashCode * -1521134295 + Line.GetHashCode(); | ||
hashCode = hashCode * -1521134295 + Column.GetHashCode(); | ||
return hashCode; | ||
} | ||
|
||
public static bool operator ==(SymbolHistory history1, SymbolHistory history2) { | ||
return history1.Equals(history2); | ||
} | ||
|
||
public static bool operator !=(SymbolHistory history1, SymbolHistory history2) { | ||
return !(history1 == history2); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.