diff --git a/src/App.xaml.cs b/src/App.xaml.cs index 0c53663a..808bd4e3 100644 --- a/src/App.xaml.cs +++ b/src/App.xaml.cs @@ -1,6 +1,5 @@ using System; using System.IO; -using System.Threading.Tasks; using System.Windows; namespace SourceGit { diff --git a/src/Commands/Blame.cs b/src/Commands/Blame.cs index eede5927..1a12a9b6 100644 --- a/src/Commands/Blame.cs +++ b/src/Commands/Blame.cs @@ -45,7 +45,7 @@ namespace SourceGit.Commands { var when = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc).AddSeconds(timestamp).ToLocalTime().ToString("yyyy-MM-dd HH:mm:ss"); var blameLine = new Models.BlameLine() { - LineNumber = $"{data.Lines.Count+1}", + LineNumber = $"{data.Lines.Count + 1}", CommitSHA = commit, Author = author, Time = when, diff --git a/src/Commands/Command.cs b/src/Commands/Command.cs index a35ba598..34115b4d 100644 --- a/src/Commands/Command.cs +++ b/src/Commands/Command.cs @@ -101,7 +101,7 @@ namespace SourceGit.Commands { #endif return; } - + if (string.IsNullOrEmpty(e.Data)) return; if (TraitErrorAsOutput) OnReadline(e.Data); @@ -147,7 +147,7 @@ namespace SourceGit.Commands { start.StandardErrorEncoding = Encoding.UTF8; if (!string.IsNullOrEmpty(Cwd)) start.WorkingDirectory = Cwd; - + var proc = new Process() { StartInfo = start }; try { proc.Start(); @@ -174,6 +174,6 @@ namespace SourceGit.Commands { /// 调用Exec时的读取函数 /// /// - public virtual void OnReadline(string line) {} + public virtual void OnReadline(string line) { } } } diff --git a/src/Commands/Commits.cs b/src/Commands/Commits.cs index 5597f05e..23dfe87e 100644 --- a/src/Commands/Commits.cs +++ b/src/Commands/Commits.cs @@ -117,7 +117,7 @@ namespace SourceGit.Commands { } } - decorators.Sort((l, r) => { + decorators.Sort((l, r) => { if (l.Type != r.Type) { return (int)l.Type - (int)r.Type; } else { diff --git a/src/Commands/Config.cs b/src/Commands/Config.cs index 19325ffe..f77216dd 100644 --- a/src/Commands/Config.cs +++ b/src/Commands/Config.cs @@ -4,7 +4,7 @@ namespace SourceGit.Commands { /// public class Config : Command { - public Config() {} + public Config() { } public Config(string repo) { Cwd = repo; diff --git a/src/Commands/Diff.cs b/src/Commands/Diff.cs index 9fdd4f9e..2615c855 100644 --- a/src/Commands/Diff.cs +++ b/src/Commands/Diff.cs @@ -71,7 +71,7 @@ namespace SourceGit.Commands { } } } - + private void ProcessChanges() { if (deleted.Any()) { if (added.Count == deleted.Count) { diff --git a/src/Commands/Discard.cs b/src/Commands/Discard.cs index 7358ae51..dd35d0ca 100644 --- a/src/Commands/Discard.cs +++ b/src/Commands/Discard.cs @@ -12,7 +12,7 @@ namespace SourceGit.Commands { this.repo = repo; } - public void Whole() { + public void Whole() { new Reset(repo, "HEAD", "--hard").Exec(); new Clean(repo).Exec(); } diff --git a/src/Commands/Fetch.cs b/src/Commands/Fetch.cs index 56adc6a1..b61e53b3 100644 --- a/src/Commands/Fetch.cs +++ b/src/Commands/Fetch.cs @@ -69,7 +69,7 @@ namespace SourceGit.Commands { private void OnTick(object o) { var now = DateTime.Now.ToFileTime(); if (nextFetchPoint > now) return; - + Models.Watcher.SetEnabled(cmd.Cwd, false); cmd.Exec(); nextFetchPoint = DateTime.Now.AddMinutes(10).ToFileTime(); diff --git a/src/Models/Issue.cs b/src/Models/Issue.cs index 9278e2d2..01bc476a 100644 --- a/src/Models/Issue.cs +++ b/src/Models/Issue.cs @@ -1,10 +1,7 @@ using System; -using System.Collections.Generic; -using System.Linq; using System.Net; -using System.Text; -using System.Threading.Tasks; using System.Reflection; +using System.Text; using System.Text.Json; using System.Text.Json.Serialization; @@ -54,7 +51,7 @@ namespace SourceGit.Models { } req.GetResponse(); - } catch {} + } catch { } } } } diff --git a/src/Models/MergeTool.cs b/src/Models/MergeTool.cs index dc0817ce..21d550d8 100644 --- a/src/Models/MergeTool.cs +++ b/src/Models/MergeTool.cs @@ -25,7 +25,7 @@ namespace SourceGit.Models { new MergeTool(5, "Beyond Compare 4", "BComp.exe", "\"$REMOTE\" \"$LOCAL\" \"$BASE\" \"$MERGED\"", "\"$LOCAL\" \"$REMOTE\"", FindBCompare), new MergeTool(6, "WinMerge", "WinMergeU.exe", "-u -e \"$REMOTE\" \"$LOCAL\" \"$MERGED\"", "-u -e \"$LOCAL\" \"$REMOTE\"", FindWinMerge), }; - + public MergeTool(int type, string name, string exec, string cmd, string diffCmd, Func finder) { Type = type; Name = name; diff --git a/src/Models/TextChanges.cs b/src/Models/TextChanges.cs index 873a589b..f769e9a5 100644 --- a/src/Models/TextChanges.cs +++ b/src/Models/TextChanges.cs @@ -43,7 +43,7 @@ namespace SourceGit.Models { } } - public Line() {} + public Line() { } public Line(LineMode mode, string content, string oldLine, string newLine) { Mode = mode; diff --git a/src/Models/Version.cs b/src/Models/Version.cs index 19da6cfb..07e384e9 100644 --- a/src/Models/Version.cs +++ b/src/Models/Version.cs @@ -2,10 +2,10 @@ using System; using System.Net; using System.Reflection; using System.Text; -using System.Text.RegularExpressions; -using System.Threading.Tasks; using System.Text.Json; using System.Text.Json.Serialization; +using System.Text.RegularExpressions; +using System.Threading.Tasks; namespace SourceGit.Models { diff --git a/src/Models/Watcher.cs b/src/Models/Watcher.cs index 1aadfe81..bbda2ed5 100644 --- a/src/Models/Watcher.cs +++ b/src/Models/Watcher.cs @@ -101,7 +101,7 @@ namespace SourceGit.Models { /// /// public void NavigateTo(string commit) { - Navigate?.Invoke(commit); + Navigate?.Invoke(commit); } /// @@ -140,7 +140,7 @@ namespace SourceGit.Models { repoWatcher.Renamed += OnRepositoryChanged; repoWatcher.Changed += OnRepositoryChanged; repoWatcher.Deleted += OnRepositoryChanged; - repoWatcher.EnableRaisingEvents = true; + repoWatcher.EnableRaisingEvents = true; timer = new Timer(Tick, null, 100, 100); } @@ -176,7 +176,7 @@ namespace SourceGit.Models { } else if (e.Name.StartsWith("refs\\stash", StringComparison.Ordinal)) { updateStashes = DateTime.Now.AddSeconds(.5).ToFileTime(); } else if (e.Name.Equals("HEAD", StringComparison.Ordinal) || - e.Name.StartsWith("refs\\heads\\", StringComparison.Ordinal) || + e.Name.StartsWith("refs\\heads\\", StringComparison.Ordinal) || e.Name.StartsWith("refs\\remotes\\", StringComparison.Ordinal) || e.Name.StartsWith("worktrees\\")) { updateBranch = DateTime.Now.AddSeconds(.5).ToFileTime(); diff --git a/src/Views/Controls/Avatar.cs b/src/Views/Controls/Avatar.cs index 5628012d..61e06c28 100644 --- a/src/Views/Controls/Avatar.cs +++ b/src/Views/Controls/Avatar.cs @@ -41,9 +41,9 @@ namespace SourceGit.Views.Controls { /// 邮件属性定义 /// public static readonly DependencyProperty EmailProperty = DependencyProperty.Register( - "Email", + "Email", typeof(string), - typeof(Avatar), + typeof(Avatar), new PropertyMetadata(null, OnEmailChanged)); /// diff --git a/src/Views/Controls/Badge.cs b/src/Views/Controls/Badge.cs index 0c72e23e..94e75188 100644 --- a/src/Views/Controls/Badge.cs +++ b/src/Views/Controls/Badge.cs @@ -1,6 +1,5 @@ using System.Windows; using System.Windows.Controls; -using System.Windows.Media; namespace SourceGit.Views.Controls { diff --git a/src/Views/Controls/Bookmark.cs b/src/Views/Controls/Bookmark.cs index 28ede88c..5decdfd1 100644 --- a/src/Views/Controls/Bookmark.cs +++ b/src/Views/Controls/Bookmark.cs @@ -1,8 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; using System.Windows; using System.Windows.Controls; using System.Windows.Media; @@ -67,7 +62,7 @@ namespace SourceGit.Views.Controls { return; } - if (!mark.IsNewPage) { + if (!mark.IsNewPage) { if (mark.Color == 0) { mark.icon.SetResourceReference(Path.FillProperty, "Brush.FG1"); mark.icon.Data = mark.FindResource("Icon.Git") as Geometry; diff --git a/src/Views/Controls/ChangeStatusIcon.cs b/src/Views/Controls/ChangeStatusIcon.cs index 5831af82..321d03c2 100644 --- a/src/Views/Controls/ChangeStatusIcon.cs +++ b/src/Views/Controls/ChangeStatusIcon.cs @@ -10,9 +10,9 @@ namespace SourceGit.Views.Controls { class ChangeStatusIcon : FrameworkElement { public static readonly DependencyProperty ChangeProperty = DependencyProperty.Register( - "Change", - typeof(Models.Change), - typeof(ChangeStatusIcon), + "Change", + typeof(Models.Change), + typeof(ChangeStatusIcon), new PropertyMetadata(null, ForceDirty)); public Models.Change Change { @@ -21,9 +21,9 @@ namespace SourceGit.Views.Controls { } public static readonly DependencyProperty IsLocalChangeProperty = DependencyProperty.Register( - "IsLocalChange", - typeof(bool), - typeof(ChangeStatusIcon), + "IsLocalChange", + typeof(bool), + typeof(ChangeStatusIcon), new PropertyMetadata(false, ForceDirty)); public bool IsLocalChange { @@ -76,7 +76,7 @@ namespace SourceGit.Views.Controls { FlowDirection.LeftToRight, new Typeface(new FontFamily("Microsoft YaHei UI"), FontStyles.Normal, FontWeights.Normal, FontStretches.Normal), icon.Width * 0.8, - new SolidColorBrush(Color.FromRgb(241,241,241)), + new SolidColorBrush(Color.FromRgb(241, 241, 241)), VisualTreeHelper.GetDpi(icon).PixelsPerDip); icon.InvalidateVisual(); diff --git a/src/Views/Controls/CommitGraph.cs b/src/Views/Controls/CommitGraph.cs index d71b26d3..ffca5905 100644 --- a/src/Views/Controls/CommitGraph.cs +++ b/src/Views/Controls/CommitGraph.cs @@ -269,7 +269,7 @@ namespace SourceGit.Views.Controls { dc.DrawEllipse(dotFill, PENS[dot.Color], dot.Center, 3, 3); } } - + private void DrawCurves(DrawingContext dc, double top, double bottom) { foreach (var line in data.Paths) { var last = line.Points[0]; diff --git a/src/Views/Controls/FolderDialog.cs b/src/Views/Controls/FolderDialog.cs index d5f9186a..ea5772da 100644 --- a/src/Views/Controls/FolderDialog.cs +++ b/src/Views/Controls/FolderDialog.cs @@ -84,7 +84,7 @@ namespace SourceGit.Views.Controls { if (result != IntPtr.Zero) { IntPtr pathPtr = Marshal.AllocHGlobal(260 * Marshal.SystemDefaultCharSize); Shell32.SHGetPathFromIDList(result, pathPtr); - + if (pathPtr != IntPtr.Zero) { SelectedPath = Marshal.PtrToStringAuto(pathPtr); ok = true; diff --git a/src/Views/Controls/HighlightableTextBlock.cs b/src/Views/Controls/HighlightableTextBlock.cs index bc6707c2..f244a58d 100644 --- a/src/Views/Controls/HighlightableTextBlock.cs +++ b/src/Views/Controls/HighlightableTextBlock.cs @@ -1,7 +1,7 @@ using System.Windows; -using System.Windows.Media; using System.Windows.Controls; using System.Windows.Documents; +using System.Windows.Media; namespace SourceGit.Views.Controls { /// @@ -15,9 +15,9 @@ namespace SourceGit.Views.Controls { private static readonly Brush HL_DELETED = new SolidColorBrush(Color.FromArgb(128, 255, 0, 0)); public static readonly DependencyProperty DataProperty = DependencyProperty.Register( - "Data", + "Data", typeof(Models.TextChanges.Line), - typeof(HighlightableTextBlock), + typeof(HighlightableTextBlock), new PropertyMetadata(null, OnContentChanged)); public Models.TextChanges.Line Data { diff --git a/src/Views/Controls/IconButton.cs b/src/Views/Controls/IconButton.cs index 54462463..2b506bc2 100644 --- a/src/Views/Controls/IconButton.cs +++ b/src/Views/Controls/IconButton.cs @@ -10,9 +10,9 @@ namespace SourceGit.Views.Controls { public class IconButton : Button { public static readonly DependencyProperty IconProperty = DependencyProperty.Register( - "Icon", - typeof(Geometry), - typeof(IconButton), + "Icon", + typeof(Geometry), + typeof(IconButton), new PropertyMetadata(null)); public Geometry Icon { @@ -21,9 +21,9 @@ namespace SourceGit.Views.Controls { } public static readonly DependencyProperty HoverBackgroundProperty = DependencyProperty.Register( - "HoverBackground", - typeof(Brush), - typeof(IconButton), + "HoverBackground", + typeof(Brush), + typeof(IconButton), new PropertyMetadata(Brushes.Transparent)); public Brush HoverBackground { diff --git a/src/Views/Controls/Loading.cs b/src/Views/Controls/Loading.cs index 397b807d..22c5d40b 100644 --- a/src/Views/Controls/Loading.cs +++ b/src/Views/Controls/Loading.cs @@ -14,9 +14,9 @@ namespace SourceGit.Views.Controls { private Path icon = null; public static readonly DependencyProperty IsAnimatingProperty = DependencyProperty.Register( - "IsAnimating", - typeof(bool), - typeof(Loading), + "IsAnimating", + typeof(bool), + typeof(Loading), new PropertyMetadata(false, OnIsAnimatingChanged)); public bool IsAnimating { diff --git a/src/Views/Controls/TextEdit.cs b/src/Views/Controls/TextEdit.cs index 59df84d2..54c594d5 100644 --- a/src/Views/Controls/TextEdit.cs +++ b/src/Views/Controls/TextEdit.cs @@ -14,7 +14,7 @@ namespace SourceGit.Views.Controls { public static readonly DependencyProperty PlaceholderProperty = DependencyProperty.Register( "Placeholder", - typeof(string), + typeof(string), typeof(TextEdit), new PropertyMetadata("")); @@ -24,9 +24,9 @@ namespace SourceGit.Views.Controls { } public static readonly DependencyProperty PlaceholderBaselineProperty = DependencyProperty.Register( - "PlaceholderBaseline", - typeof(AlignmentY), - typeof(TextEdit), + "PlaceholderBaseline", + typeof(AlignmentY), + typeof(TextEdit), new PropertyMetadata(AlignmentY.Center)); public AlignmentY PlaceholderBaseline { diff --git a/src/Views/Controls/Tree.cs b/src/Views/Controls/Tree.cs index cb2288bb..ae2ed34f 100644 --- a/src/Views/Controls/Tree.cs +++ b/src/Views/Controls/Tree.cs @@ -13,9 +13,9 @@ namespace SourceGit.Views.Controls { /// public class Tree : TreeView { public static readonly DependencyProperty MultiSelectionProperty = DependencyProperty.Register( - "MultiSelection", - typeof(bool), - typeof(Tree), + "MultiSelection", + typeof(bool), + typeof(Tree), new PropertyMetadata(false)); public bool MultiSelection { @@ -90,7 +90,7 @@ namespace SourceGit.Views.Controls { protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue) { base.OnItemsSourceChanged(oldValue, newValue); - + if (Selected.Count > 0) { Selected.Clear(); RaiseEvent(new RoutedEventArgs(SelectionChangedEvent)); diff --git a/src/Views/Controls/TreeItem.cs b/src/Views/Controls/TreeItem.cs index feecec9a..53c6a54a 100644 --- a/src/Views/Controls/TreeItem.cs +++ b/src/Views/Controls/TreeItem.cs @@ -9,9 +9,9 @@ namespace SourceGit.Views.Controls { public class TreeItem : TreeViewItem { public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register( - "IsChecked", - typeof(bool), - typeof(TreeItem), + "IsChecked", + typeof(bool), + typeof(TreeItem), new PropertyMetadata(false)); public bool IsChecked { diff --git a/src/Views/Popups/Apply.xaml.cs b/src/Views/Popups/Apply.xaml.cs index 7a7c6781..19e44337 100644 --- a/src/Views/Popups/Apply.xaml.cs +++ b/src/Views/Popups/Apply.xaml.cs @@ -7,7 +7,7 @@ namespace SourceGit.Views.Popups { /// 应用补丁 /// public partial class Apply : Controls.PopupWidget { - private string repo = null; + private string repo = null; public string File { get; set; } public Apply(string repo) { diff --git a/src/Views/Popups/Fetch.xaml.cs b/src/Views/Popups/Fetch.xaml.cs index d352ca4a..cb4110d3 100644 --- a/src/Views/Popups/Fetch.xaml.cs +++ b/src/Views/Popups/Fetch.xaml.cs @@ -7,7 +7,7 @@ namespace SourceGit.Views.Popups { /// public partial class Fetch : Controls.PopupWidget { private string repo = null; - + public Fetch(Models.Repository repo, string preferRemote) { this.repo = repo.Path; InitializeComponent(); diff --git a/src/Views/Popups/GitFlowFinish.xaml.cs b/src/Views/Popups/GitFlowFinish.xaml.cs index da67160f..3ea28f84 100644 --- a/src/Views/Popups/GitFlowFinish.xaml.cs +++ b/src/Views/Popups/GitFlowFinish.xaml.cs @@ -22,7 +22,7 @@ namespace SourceGit.Views.Popups { name = branch.Substring(repo.GitFlow.Feature.Length); break; case Models.GitFlowBranchType.Release: - txtPrefix.Text = App.Text("GitFlow.Release"); + txtPrefix.Text = App.Text("GitFlow.Release"); name = branch.Substring(repo.GitFlow.Release.Length); break; case Models.GitFlowBranchType.Hotfix: diff --git a/src/Views/Popups/Push.xaml.cs b/src/Views/Popups/Push.xaml.cs index 4ae489a2..60e41dc2 100644 --- a/src/Views/Popups/Push.xaml.cs +++ b/src/Views/Popups/Push.xaml.cs @@ -39,11 +39,11 @@ namespace SourceGit.Views.Popups { return Task.Run(() => { Models.Watcher.SetEnabled(repo.Path, false); var succ = new Commands.Push( - repo.Path, - localBranch.Name, - remoteBranch.Remote, - remoteBranch.Name.Replace(" (new)", ""), - withTags, + repo.Path, + localBranch.Name, + remoteBranch.Remote, + remoteBranch.Name.Replace(" (new)", ""), + withTags, force, track, UpdateProgress).Exec(); diff --git a/src/Views/Popups/Stash.xaml.cs b/src/Views/Popups/Stash.xaml.cs index 17d7b649..30f5e54e 100644 --- a/src/Views/Popups/Stash.xaml.cs +++ b/src/Views/Popups/Stash.xaml.cs @@ -1,6 +1,4 @@ -using System; using System.Collections.Generic; -using System.IO; using System.Threading.Tasks; namespace SourceGit.Views.Popups { diff --git a/src/Views/Validations/CloneDir.cs b/src/Views/Validations/CloneDir.cs index 74c85e3b..34f30a46 100644 --- a/src/Views/Validations/CloneDir.cs +++ b/src/Views/Validations/CloneDir.cs @@ -5,8 +5,8 @@ using System.Windows.Controls; namespace SourceGit.Views.Validations { public class CloneDir : ValidationRule { public override ValidationResult Validate(object value, CultureInfo cultureInfo) { - return Directory.Exists(value as string) - ? ValidationResult.ValidResult + return Directory.Exists(value as string) + ? ValidationResult.ValidResult : new ValidationResult(false, App.Text("BadCloneFolder")); } } diff --git a/src/Views/Validations/CommitMessage.cs b/src/Views/Validations/CommitMessage.cs index c98ab1f9..444a2c20 100644 --- a/src/Views/Validations/CommitMessage.cs +++ b/src/Views/Validations/CommitMessage.cs @@ -5,8 +5,8 @@ namespace SourceGit.Views.Validations { public class CommitMessage : ValidationRule { public override ValidationResult Validate(object value, CultureInfo cultureInfo) { var subject = value as string; - return string.IsNullOrWhiteSpace(subject) - ? new ValidationResult(false, App.Text("EmptyCommitMessage")) + return string.IsNullOrWhiteSpace(subject) + ? new ValidationResult(false, App.Text("EmptyCommitMessage")) : ValidationResult.ValidResult; } } diff --git a/src/Views/Validations/Required.cs b/src/Views/Validations/Required.cs index a0cdc076..1106266b 100644 --- a/src/Views/Validations/Required.cs +++ b/src/Views/Validations/Required.cs @@ -5,8 +5,8 @@ namespace SourceGit.Views.Validations { public class Required : ValidationRule { public override ValidationResult Validate(object value, CultureInfo cultureInfo) { var path = value as string; - return string.IsNullOrEmpty(path) ? - new ValidationResult(false, App.Text("Required")) : + return string.IsNullOrEmpty(path) ? + new ValidationResult(false, App.Text("Required")) : ValidationResult.ValidResult; } } diff --git a/src/Views/Widgets/CommitChanges.xaml.cs b/src/Views/Widgets/CommitChanges.xaml.cs index 5214f3ef..74fe7d2d 100644 --- a/src/Views/Widgets/CommitChanges.xaml.cs +++ b/src/Views/Widgets/CommitChanges.xaml.cs @@ -337,7 +337,7 @@ namespace SourceGit.Views.Widgets { var row = sender as DataGridRow; if (row == null) return; - var change = row.Item as Models.Change; + var change = row.Item as Models.Change; if (change == null) return; OpenChangeContextMenu(change); diff --git a/src/Views/Widgets/Dashboard.xaml.cs b/src/Views/Widgets/Dashboard.xaml.cs index 03f06275..98c5b6e3 100644 --- a/src/Views/Widgets/Dashboard.xaml.cs +++ b/src/Views/Widgets/Dashboard.xaml.cs @@ -454,7 +454,7 @@ namespace SourceGit.Views.Widgets { private void OpenNewBranch(object sender, RoutedEventArgs e) { var current = repo.Branches.Find(x => x.IsCurrent); - if (current != null) { + if (current != null) { new Popups.CreateBranch(repo, current).Show(); } else { Models.Exception.Raise(App.Text("CreateBranch.Idle")); @@ -815,7 +815,7 @@ namespace SourceGit.Views.Widgets { Clipboard.SetText(branch.Remote + "/" + branch.Name); e.Handled = true; }; - + menu.Items.Add(delete); menu.Items.Add(new Separator()); menu.Items.Add(createBranch); diff --git a/src/Views/Widgets/DiffViewer.xaml.cs b/src/Views/Widgets/DiffViewer.xaml.cs index c29b25f3..650300f3 100644 --- a/src/Views/Widgets/DiffViewer.xaml.cs +++ b/src/Views/Widgets/DiffViewer.xaml.cs @@ -170,7 +170,7 @@ namespace SourceGit.Views.Widgets { if (dummy != seq) return; loading.Visibility = Visibility.Collapsed; - mask.Visibility = Visibility.Collapsed; + mask.Visibility = Visibility.Collapsed; toolbarOptions.Visibility = Visibility.Collapsed; noChange.Visibility = Visibility.Visible; }); @@ -226,7 +226,7 @@ namespace SourceGit.Views.Widgets { } foreach (var s in splitters) s.Visibility = Visibility.Visible; - + editor.Columns[0].Width = new DataGridLength(lineNumberWidth, DataGridLengthUnitType.Pixel); editor.Columns[1].Width = new DataGridLength(lineNumberWidth, DataGridLengthUnitType.Pixel); editor.Columns[2].MinWidth = minWidth; diff --git a/src/Views/Widgets/Histories.xaml.cs b/src/Views/Widgets/Histories.xaml.cs index da0feaa5..1cd4a701 100644 --- a/src/Views/Widgets/Histories.xaml.cs +++ b/src/Views/Widgets/Histories.xaml.cs @@ -242,7 +242,7 @@ namespace SourceGit.Views.Widgets { mask.Visibility = Visibility.Visible; txtCounter.Text = App.Text("Histories.Selected", selected.Count); } else { - mask.Visibility = Visibility.Visible; + mask.Visibility = Visibility.Visible; txtCounter.Text = App.Text("Histories.Guide"); } } diff --git a/src/Views/Widgets/PopupPanel.xaml.cs b/src/Views/Widgets/PopupPanel.xaml.cs index 3247f5b5..e6ede10b 100644 --- a/src/Views/Widgets/PopupPanel.xaml.cs +++ b/src/Views/Widgets/PopupPanel.xaml.cs @@ -44,7 +44,7 @@ namespace SourceGit.Views.Widgets { public void ShowAndStart(Controls.PopupWidget widget) { if (locked) return; Show(widget); - Sure(null, null); + Sure(null, null); } public void UpdateProgress(string message) { diff --git a/src/Views/Widgets/Welcome.xaml.cs b/src/Views/Widgets/Welcome.xaml.cs index bd027cba..89757caa 100644 --- a/src/Views/Widgets/Welcome.xaml.cs +++ b/src/Views/Widgets/Welcome.xaml.cs @@ -200,7 +200,7 @@ namespace SourceGit.Views.Widgets { } private void OnTreeDragOver(object sender, DragEventArgs e) { - if (!e.Data.GetDataPresent(DataFormats.FileDrop) && !e.Data.GetDataPresent(typeof(Node))) return; + if (!e.Data.GetDataPresent(DataFormats.FileDrop) && !e.Data.GetDataPresent(typeof(Node))) return; var item = tree.FindItem(e.OriginalSource as DependencyObject); if (item == null) return; diff --git a/src/Views/Widgets/WorkingCopy.xaml.cs b/src/Views/Widgets/WorkingCopy.xaml.cs index 8788b5ef..0bec58f1 100644 --- a/src/Views/Widgets/WorkingCopy.xaml.cs +++ b/src/Views/Widgets/WorkingCopy.xaml.cs @@ -30,7 +30,7 @@ namespace SourceGit.Views.Widgets { List stagedChanges = new List(); foreach (var c in changes) { - if (c.Index == Models.Change.Status.Modified + if (c.Index == Models.Change.Status.Modified || c.Index == Models.Change.Status.Added || c.Index == Models.Change.Status.Deleted || c.Index == Models.Change.Status.Renamed) { diff --git a/src/Views/Widgets/WorkingCopyChanges.xaml.cs b/src/Views/Widgets/WorkingCopyChanges.xaml.cs index 8e66f8ec..7cc1f46b 100644 --- a/src/Views/Widgets/WorkingCopyChanges.xaml.cs +++ b/src/Views/Widgets/WorkingCopyChanges.xaml.cs @@ -344,7 +344,7 @@ namespace SourceGit.Views.Widgets { explore.IsEnabled = File.Exists(path) || Directory.Exists(path); explore.Header = App.Text("RevealFile"); explore.Click += (o, e) => { - if (node.IsFolder) Process.Start("explorer", path); + if (node.IsFolder) Process.Start("explorer", path); else Process.Start("explorer", $"/select,{path}"); e.Handled = true; };