mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
refactor(*): re-arrange project
This commit is contained in:
parent
7558bbd4f2
commit
5ce9cffcee
140 changed files with 4980 additions and 5003 deletions
|
@ -6,11 +6,11 @@
|
||||||
|
|
||||||
* DarkTheme
|
* DarkTheme
|
||||||
|
|
||||||
![Preview_Dark](./Preview_Dark.png)
|
![Theme Dark](./screenshots/theme_dark.png)
|
||||||
|
|
||||||
* LightTheme
|
* LightTheme
|
||||||
|
|
||||||
![Preview_Light](./Preview_Light.png)
|
![Theme Light](./screenshots/theme_light.png)
|
||||||
|
|
||||||
|
|
||||||
## Thanks
|
## Thanks
|
||||||
|
|
|
@ -1,25 +0,0 @@
|
||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
|
||||||
# Visual Studio Version 16
|
|
||||||
VisualStudioVersion = 16.0.30011.22
|
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SourceGit", "SourceGit\SourceGit.csproj", "{0A04DD59-7A6C-410C-B427-7DC8183993BD}"
|
|
||||||
EndProject
|
|
||||||
Global
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
||||||
Debug|Any CPU = Debug|Any CPU
|
|
||||||
Release|Any CPU = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
|
||||||
{0A04DD59-7A6C-410C-B427-7DC8183993BD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
|
||||||
{0A04DD59-7A6C-410C-B427-7DC8183993BD}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
|
||||||
{0A04DD59-7A6C-410C-B427-7DC8183993BD}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
|
||||||
{0A04DD59-7A6C-410C-B427-7DC8183993BD}.Release|Any CPU.Build.0 = Release|Any CPU
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
|
||||||
HideSolutionNode = FALSE
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
|
||||||
SolutionGuid = {01F4EC04-5B3C-4D74-BB48-1C251B2D2853}
|
|
||||||
EndGlobalSection
|
|
||||||
EndGlobal
|
|
|
@ -1,3 +0,0 @@
|
||||||
using System.Windows;
|
|
||||||
|
|
||||||
[assembly: ThemeInfo(ResourceDictionaryLocation.None, ResourceDictionaryLocation.SourceAssembly)]
|
|
Before Width: | Height: | Size: 115 KiB After Width: | Height: | Size: 115 KiB |
Before Width: | Height: | Size: 117 KiB After Width: | Height: | Size: 117 KiB |
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
|
@ -1,263 +1,263 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace SourceGit.Git {
|
namespace SourceGit.Git {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Diff helper.
|
/// Diff helper.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Diff {
|
public class Diff {
|
||||||
private static readonly Regex REG_INDICATOR = new Regex(@"^@@ \-(\d+),?\d* \+(\d+),?\d* @@", RegexOptions.None);
|
private static readonly Regex REG_INDICATOR = new Regex(@"^@@ \-(\d+),?\d* \+(\d+),?\d* @@", RegexOptions.None);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Line mode.
|
/// Line mode.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum LineMode {
|
public enum LineMode {
|
||||||
Normal,
|
Normal,
|
||||||
Indicator,
|
Indicator,
|
||||||
Empty,
|
Empty,
|
||||||
Added,
|
Added,
|
||||||
Deleted,
|
Deleted,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Side
|
/// Side
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum Side {
|
public enum Side {
|
||||||
Left,
|
Left,
|
||||||
Right,
|
Right,
|
||||||
Both,
|
Both,
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Binary change.
|
/// Binary change.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BinaryChange {
|
public class BinaryChange {
|
||||||
public long Size = 0;
|
public long Size = 0;
|
||||||
public long PreSize = 0;
|
public long PreSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Block
|
/// Block
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Block {
|
public class Block {
|
||||||
public Side Side = Side.Both;
|
public Side Side = Side.Both;
|
||||||
public LineMode Mode = LineMode.Normal;
|
public LineMode Mode = LineMode.Normal;
|
||||||
public int LeftStart = 0;
|
public int LeftStart = 0;
|
||||||
public int RightStart = 0;
|
public int RightStart = 0;
|
||||||
public int Count = 0;
|
public int Count = 0;
|
||||||
public StringBuilder Builder = new StringBuilder();
|
public StringBuilder Builder = new StringBuilder();
|
||||||
|
|
||||||
public bool IsLeftDelete => Side == Side.Left && Mode == LineMode.Deleted;
|
public bool IsLeftDelete => Side == Side.Left && Mode == LineMode.Deleted;
|
||||||
public bool IsRightAdded => Side == Side.Right && Mode == LineMode.Added;
|
public bool IsRightAdded => Side == Side.Right && Mode == LineMode.Added;
|
||||||
public bool IsBothSideNormal => Side == Side.Both && Mode == LineMode.Normal;
|
public bool IsBothSideNormal => Side == Side.Both && Mode == LineMode.Normal;
|
||||||
public bool CanShowNumber => Mode != LineMode.Indicator && Mode != LineMode.Empty;
|
public bool CanShowNumber => Mode != LineMode.Indicator && Mode != LineMode.Empty;
|
||||||
|
|
||||||
public void Append(string data) {
|
public void Append(string data) {
|
||||||
if (Count > 0) Builder.AppendLine();
|
if (Count > 0) Builder.AppendLine();
|
||||||
Builder.Append(data);
|
Builder.Append(data);
|
||||||
Count++;
|
Count++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Diff result.
|
/// Diff result.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Result {
|
public class Result {
|
||||||
public bool IsValid = false;
|
public bool IsValid = false;
|
||||||
public bool IsBinary = false;
|
public bool IsBinary = false;
|
||||||
public List<Block> Blocks = new List<Block>();
|
public List<Block> Blocks = new List<Block>();
|
||||||
public int LeftLineCount = 0;
|
public int LeftLineCount = 0;
|
||||||
public int RightLineCount = 0;
|
public int RightLineCount = 0;
|
||||||
|
|
||||||
public void SetBinary() {
|
public void SetBinary() {
|
||||||
IsValid = true;
|
IsValid = true;
|
||||||
IsBinary = true;
|
IsBinary = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Add(Block b) {
|
public void Add(Block b) {
|
||||||
if (b.Count == 0) return;
|
if (b.Count == 0) return;
|
||||||
|
|
||||||
switch (b.Side) {
|
switch (b.Side) {
|
||||||
case Side.Left:
|
case Side.Left:
|
||||||
LeftLineCount += b.Count;
|
LeftLineCount += b.Count;
|
||||||
break;
|
break;
|
||||||
case Side.Right:
|
case Side.Right:
|
||||||
RightLineCount += b.Count;
|
RightLineCount += b.Count;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
LeftLineCount += b.Count;
|
LeftLineCount += b.Count;
|
||||||
RightLineCount += b.Count;
|
RightLineCount += b.Count;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
Blocks.Add(b);
|
Blocks.Add(b);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Fit() {
|
public void Fit() {
|
||||||
if (LeftLineCount > RightLineCount) {
|
if (LeftLineCount > RightLineCount) {
|
||||||
var b = new Block();
|
var b = new Block();
|
||||||
b.Side = Side.Right;
|
b.Side = Side.Right;
|
||||||
b.Mode = LineMode.Empty;
|
b.Mode = LineMode.Empty;
|
||||||
|
|
||||||
var delta = LeftLineCount - RightLineCount;
|
var delta = LeftLineCount - RightLineCount;
|
||||||
for (int i = 0; i < delta; i++) b.Append("");
|
for (int i = 0; i < delta; i++) b.Append("");
|
||||||
|
|
||||||
Add(b);
|
Add(b);
|
||||||
} else if (LeftLineCount < RightLineCount) {
|
} else if (LeftLineCount < RightLineCount) {
|
||||||
var b = new Block();
|
var b = new Block();
|
||||||
b.Side = Side.Left;
|
b.Side = Side.Left;
|
||||||
b.Mode = LineMode.Empty;
|
b.Mode = LineMode.Empty;
|
||||||
|
|
||||||
var delta = RightLineCount - LeftLineCount;
|
var delta = RightLineCount - LeftLineCount;
|
||||||
for (int i = 0; i < delta; i++) b.Append("");
|
for (int i = 0; i < delta; i++) b.Append("");
|
||||||
|
|
||||||
Add(b);
|
Add(b);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Run diff process.
|
/// Run diff process.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repo"></param>
|
/// <param name="repo"></param>
|
||||||
/// <param name="args"></param>
|
/// <param name="args"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Result Run(Repository repo, string args) {
|
public static Result Run(Repository repo, string args) {
|
||||||
var rs = new Result();
|
var rs = new Result();
|
||||||
var current = new Block();
|
var current = new Block();
|
||||||
var left = 0;
|
var left = 0;
|
||||||
var right = 0;
|
var right = 0;
|
||||||
|
|
||||||
repo.RunCommand($"diff --ignore-cr-at-eol {args}", line => {
|
repo.RunCommand($"diff --ignore-cr-at-eol {args}", line => {
|
||||||
if (rs.IsBinary) return;
|
if (rs.IsBinary) return;
|
||||||
|
|
||||||
if (!rs.IsValid) {
|
if (!rs.IsValid) {
|
||||||
var match = REG_INDICATOR.Match(line);
|
var match = REG_INDICATOR.Match(line);
|
||||||
if (!match.Success) {
|
if (!match.Success) {
|
||||||
if (line.StartsWith("Binary ")) rs.SetBinary();
|
if (line.StartsWith("Binary ")) rs.SetBinary();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
rs.IsValid = true;
|
rs.IsValid = true;
|
||||||
left = int.Parse(match.Groups[1].Value);
|
left = int.Parse(match.Groups[1].Value);
|
||||||
right = int.Parse(match.Groups[2].Value);
|
right = int.Parse(match.Groups[2].Value);
|
||||||
current.Mode = LineMode.Indicator;
|
current.Mode = LineMode.Indicator;
|
||||||
current.Append(line);
|
current.Append(line);
|
||||||
} else {
|
} else {
|
||||||
if (line[0] == '-') {
|
if (line[0] == '-') {
|
||||||
if (current.IsLeftDelete) {
|
if (current.IsLeftDelete) {
|
||||||
current.Append(line.Substring(1));
|
current.Append(line.Substring(1));
|
||||||
} else {
|
} else {
|
||||||
rs.Add(current);
|
rs.Add(current);
|
||||||
|
|
||||||
current = new Block();
|
current = new Block();
|
||||||
current.Side = Side.Left;
|
current.Side = Side.Left;
|
||||||
current.Mode = LineMode.Deleted;
|
current.Mode = LineMode.Deleted;
|
||||||
current.LeftStart = left;
|
current.LeftStart = left;
|
||||||
current.Append(line.Substring(1));
|
current.Append(line.Substring(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
left++;
|
left++;
|
||||||
} else if (line[0] == '+') {
|
} else if (line[0] == '+') {
|
||||||
if (current.IsRightAdded) {
|
if (current.IsRightAdded) {
|
||||||
current.Append(line.Substring(1));
|
current.Append(line.Substring(1));
|
||||||
} else {
|
} else {
|
||||||
rs.Add(current);
|
rs.Add(current);
|
||||||
|
|
||||||
current = new Block();
|
current = new Block();
|
||||||
current.Side = Side.Right;
|
current.Side = Side.Right;
|
||||||
current.Mode = LineMode.Added;
|
current.Mode = LineMode.Added;
|
||||||
current.RightStart = right;
|
current.RightStart = right;
|
||||||
current.Append(line.Substring(1));
|
current.Append(line.Substring(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
right++;
|
right++;
|
||||||
} else if (line[0] == '\\') {
|
} else if (line[0] == '\\') {
|
||||||
var tmp = new Block();
|
var tmp = new Block();
|
||||||
tmp.Side = current.Side;
|
tmp.Side = current.Side;
|
||||||
tmp.Mode = LineMode.Indicator;
|
tmp.Mode = LineMode.Indicator;
|
||||||
tmp.Append(line.Substring(1));
|
tmp.Append(line.Substring(1));
|
||||||
|
|
||||||
rs.Add(current);
|
rs.Add(current);
|
||||||
rs.Add(tmp);
|
rs.Add(tmp);
|
||||||
rs.Fit();
|
rs.Fit();
|
||||||
|
|
||||||
current = new Block();
|
current = new Block();
|
||||||
current.LeftStart = left;
|
current.LeftStart = left;
|
||||||
current.RightStart = right;
|
current.RightStart = right;
|
||||||
} else {
|
} else {
|
||||||
var match = REG_INDICATOR.Match(line);
|
var match = REG_INDICATOR.Match(line);
|
||||||
if (match.Success) {
|
if (match.Success) {
|
||||||
rs.Add(current);
|
rs.Add(current);
|
||||||
rs.Fit();
|
rs.Fit();
|
||||||
|
|
||||||
left = int.Parse(match.Groups[1].Value);
|
left = int.Parse(match.Groups[1].Value);
|
||||||
right = int.Parse(match.Groups[2].Value);
|
right = int.Parse(match.Groups[2].Value);
|
||||||
|
|
||||||
current = new Block();
|
current = new Block();
|
||||||
current.Mode = LineMode.Indicator;
|
current.Mode = LineMode.Indicator;
|
||||||
current.Append(line);
|
current.Append(line);
|
||||||
} else {
|
} else {
|
||||||
if (current.IsBothSideNormal) {
|
if (current.IsBothSideNormal) {
|
||||||
current.Append(line.Substring(1));
|
current.Append(line.Substring(1));
|
||||||
} else {
|
} else {
|
||||||
rs.Add(current);
|
rs.Add(current);
|
||||||
rs.Fit();
|
rs.Fit();
|
||||||
|
|
||||||
current = new Block();
|
current = new Block();
|
||||||
current.LeftStart = left;
|
current.LeftStart = left;
|
||||||
current.RightStart = right;
|
current.RightStart = right;
|
||||||
current.Append(line.Substring(1));
|
current.Append(line.Substring(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
left++;
|
left++;
|
||||||
right++;
|
right++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
rs.Add(current);
|
rs.Add(current);
|
||||||
rs.Fit();
|
rs.Fit();
|
||||||
|
|
||||||
if (rs.IsBinary) rs.Blocks.Clear();
|
if (rs.IsBinary) rs.Blocks.Clear();
|
||||||
return rs;
|
return rs;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get file size changes for binary file.
|
/// Get file size changes for binary file.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repo"></param>
|
/// <param name="repo"></param>
|
||||||
/// <param name="revisions"></param>
|
/// <param name="revisions"></param>
|
||||||
/// <param name="path"></param>
|
/// <param name="path"></param>
|
||||||
/// <param name="orgPath"></param>
|
/// <param name="orgPath"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static BinaryChange GetSizeChange(Repository repo, string[] revisions, string path, string orgPath = null) {
|
public static BinaryChange GetSizeChange(Repository repo, string[] revisions, string path, string orgPath = null) {
|
||||||
var change = new BinaryChange();
|
var change = new BinaryChange();
|
||||||
|
|
||||||
if (revisions.Length == 0) { // Compare working copy with HEAD
|
if (revisions.Length == 0) { // Compare working copy with HEAD
|
||||||
change.Size = new FileInfo(Path.Combine(repo.Path, path)).Length;
|
change.Size = new FileInfo(Path.Combine(repo.Path, path)).Length;
|
||||||
change.PreSize = repo.GetFileSize("HEAD", path);
|
change.PreSize = repo.GetFileSize("HEAD", path);
|
||||||
} else if (revisions.Length == 1) { // Compare HEAD with given revision.
|
} else if (revisions.Length == 1) { // Compare HEAD with given revision.
|
||||||
change.Size = repo.GetFileSize("HEAD", path);
|
change.Size = repo.GetFileSize("HEAD", path);
|
||||||
if (!string.IsNullOrEmpty(orgPath)) {
|
if (!string.IsNullOrEmpty(orgPath)) {
|
||||||
change.PreSize = repo.GetFileSize(revisions[0], orgPath);
|
change.PreSize = repo.GetFileSize(revisions[0], orgPath);
|
||||||
} else {
|
} else {
|
||||||
change.PreSize = repo.GetFileSize(revisions[0], path);
|
change.PreSize = repo.GetFileSize(revisions[0], path);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
change.Size = repo.GetFileSize(revisions[1], path);
|
change.Size = repo.GetFileSize(revisions[1], path);
|
||||||
if (!string.IsNullOrEmpty(orgPath)) {
|
if (!string.IsNullOrEmpty(orgPath)) {
|
||||||
change.PreSize = repo.GetFileSize(revisions[0], orgPath);
|
change.PreSize = repo.GetFileSize(revisions[0], orgPath);
|
||||||
} else {
|
} else {
|
||||||
change.PreSize = repo.GetFileSize(revisions[0], path);
|
change.PreSize = repo.GetFileSize(revisions[0], path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return change;
|
return change;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,97 +1,97 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace SourceGit.Git {
|
namespace SourceGit.Git {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Git remote
|
/// Git remote
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Remote {
|
public class Remote {
|
||||||
private static readonly Regex FORMAT = new Regex(@"^([\w\.\-]+)\s*(\S+).*$");
|
private static readonly Regex FORMAT = new Regex(@"^([\w\.\-]+)\s*(\S+).*$");
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Name of this remote
|
/// Name of this remote
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// URL
|
/// URL
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string URL { get; set; }
|
public string URL { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Parsing remote
|
/// Parsing remote
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repo">Repository</param>
|
/// <param name="repo">Repository</param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static List<Remote> Load(Repository repo) {
|
public static List<Remote> Load(Repository repo) {
|
||||||
var remotes = new List<Remote>();
|
var remotes = new List<Remote>();
|
||||||
var added = new List<string>();
|
var added = new List<string>();
|
||||||
|
|
||||||
repo.RunCommand("remote -v", data => {
|
repo.RunCommand("remote -v", data => {
|
||||||
var match = FORMAT.Match(data);
|
var match = FORMAT.Match(data);
|
||||||
if (!match.Success) return;
|
if (!match.Success) return;
|
||||||
|
|
||||||
var remote = new Remote() {
|
var remote = new Remote() {
|
||||||
Name = match.Groups[1].Value,
|
Name = match.Groups[1].Value,
|
||||||
URL = match.Groups[2].Value,
|
URL = match.Groups[2].Value,
|
||||||
};
|
};
|
||||||
|
|
||||||
if (added.Contains(remote.Name)) return;
|
if (added.Contains(remote.Name)) return;
|
||||||
|
|
||||||
added.Add(remote.Name);
|
added.Add(remote.Name);
|
||||||
remotes.Add(remote);
|
remotes.Add(remote);
|
||||||
});
|
});
|
||||||
|
|
||||||
return remotes;
|
return remotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Add new remote
|
/// Add new remote
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repo"></param>
|
/// <param name="repo"></param>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="url"></param>
|
/// <param name="url"></param>
|
||||||
public static void Add(Repository repo, string name, string url) {
|
public static void Add(Repository repo, string name, string url) {
|
||||||
var errs = repo.RunCommand($"remote add {name} {url}", null);
|
var errs = repo.RunCommand($"remote add {name} {url}", null);
|
||||||
if (errs != null) {
|
if (errs != null) {
|
||||||
App.RaiseError(errs);
|
App.RaiseError(errs);
|
||||||
} else {
|
} else {
|
||||||
repo.Fetch(new Remote() { Name = name }, true, null);
|
repo.Fetch(new Remote() { Name = name }, true, null);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Delete remote.
|
/// Delete remote.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repo"></param>
|
/// <param name="repo"></param>
|
||||||
/// <param name="remote"></param>
|
/// <param name="remote"></param>
|
||||||
public static void Delete(Repository repo, string remote) {
|
public static void Delete(Repository repo, string remote) {
|
||||||
var errs = repo.RunCommand($"remote remove {remote}", null);
|
var errs = repo.RunCommand($"remote remove {remote}", null);
|
||||||
if (errs != null) App.RaiseError(errs);
|
if (errs != null) App.RaiseError(errs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Edit remote.
|
/// Edit remote.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repo"></param>
|
/// <param name="repo"></param>
|
||||||
/// <param name="name"></param>
|
/// <param name="name"></param>
|
||||||
/// <param name="url"></param>
|
/// <param name="url"></param>
|
||||||
public void Edit(Repository repo, string name, string url) {
|
public void Edit(Repository repo, string name, string url) {
|
||||||
string errs = null;
|
string errs = null;
|
||||||
|
|
||||||
if (name != Name) {
|
if (name != Name) {
|
||||||
errs = repo.RunCommand($"remote rename {Name} {name}", null);
|
errs = repo.RunCommand($"remote rename {Name} {name}", null);
|
||||||
if (errs != null) {
|
if (errs != null) {
|
||||||
App.RaiseError(errs);
|
App.RaiseError(errs);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (url != URL) {
|
if (url != URL) {
|
||||||
errs = repo.RunCommand($"remote set-url {name} {url}", null);
|
errs = repo.RunCommand($"remote set-url {name} {url}", null);
|
||||||
if (errs != null) App.RaiseError(errs);
|
if (errs != null) App.RaiseError(errs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -430,10 +430,10 @@ namespace SourceGit.Git {
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Repository Clone(string url, string folder, string rName, string lName, Action<string> onProgress) {
|
public static Repository Clone(string url, string folder, string rName, string lName, Action<string> onProgress) {
|
||||||
string RemoteName;
|
string RemoteName;
|
||||||
if (rName != null) {
|
if (rName != null) {
|
||||||
RemoteName = $" --origin {rName}";
|
RemoteName = $" --origin {rName}";
|
||||||
} else {
|
} else {
|
||||||
RemoteName = null;
|
RemoteName = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var errs = RunCommand(folder, $"-c credential.helper=manager clone --progress --verbose {RemoteName} --recurse-submodules {url} {lName}", line => {
|
var errs = RunCommand(folder, $"-c credential.helper=manager clone --progress --verbose {RemoteName} --recurse-submodules {url} {lName}", line => {
|
||||||
|
@ -471,8 +471,8 @@ namespace SourceGit.Git {
|
||||||
|
|
||||||
var errs = RunCommand(args, line => {
|
var errs = RunCommand(args, line => {
|
||||||
if (line != null) onProgress?.Invoke(line);
|
if (line != null) onProgress?.Invoke(line);
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
OnSubmoduleChanged?.Invoke();
|
OnSubmoduleChanged?.Invoke();
|
||||||
|
|
||||||
AssertCommand(errs);
|
AssertCommand(errs);
|
|
@ -1,224 +1,224 @@
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace SourceGit.Helpers {
|
namespace SourceGit.Helpers {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Attached properties to TextBox.
|
/// Attached properties to TextBox.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class TextBoxHelper {
|
public static class TextBoxHelper {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Auto scroll on text changed or selection changed.
|
/// Auto scroll on text changed or selection changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly DependencyProperty AutoScrollProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty AutoScrollProperty = DependencyProperty.RegisterAttached(
|
||||||
"AutoScroll",
|
"AutoScroll",
|
||||||
typeof(bool),
|
typeof(bool),
|
||||||
typeof(TextBoxHelper),
|
typeof(TextBoxHelper),
|
||||||
new PropertyMetadata(false, OnAutoScrollChanged));
|
new PropertyMetadata(false, OnAutoScrollChanged));
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Placeholder property
|
/// Placeholder property
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly DependencyProperty PlaceholderProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty PlaceholderProperty = DependencyProperty.RegisterAttached(
|
||||||
"Placeholder",
|
"Placeholder",
|
||||||
typeof(string),
|
typeof(string),
|
||||||
typeof(TextBoxHelper),
|
typeof(TextBoxHelper),
|
||||||
new PropertyMetadata(string.Empty, OnPlaceholderChanged));
|
new PropertyMetadata(string.Empty, OnPlaceholderChanged));
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Vertical alignment for placeholder.
|
/// Vertical alignment for placeholder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly DependencyProperty PlaceholderBaselineProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty PlaceholderBaselineProperty = DependencyProperty.RegisterAttached(
|
||||||
"PlaceholderBaseline",
|
"PlaceholderBaseline",
|
||||||
typeof(AlignmentY),
|
typeof(AlignmentY),
|
||||||
typeof(TextBoxHelper),
|
typeof(TextBoxHelper),
|
||||||
new PropertyMetadata(AlignmentY.Center));
|
new PropertyMetadata(AlignmentY.Center));
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Property to store generated placeholder brush.
|
/// Property to store generated placeholder brush.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static readonly DependencyProperty PlaceholderBrushProperty = DependencyProperty.RegisterAttached(
|
public static readonly DependencyProperty PlaceholderBrushProperty = DependencyProperty.RegisterAttached(
|
||||||
"PlaceholderBrush",
|
"PlaceholderBrush",
|
||||||
typeof(Brush),
|
typeof(Brush),
|
||||||
typeof(TextBoxHelper),
|
typeof(TextBoxHelper),
|
||||||
new PropertyMetadata(Brushes.Transparent));
|
new PropertyMetadata(Brushes.Transparent));
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setter for AutoScrollProperty
|
/// Setter for AutoScrollProperty
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="element"></param>
|
/// <param name="element"></param>
|
||||||
/// <param name="enabled"></param>
|
/// <param name="enabled"></param>
|
||||||
public static void SetAutoScroll(UIElement element, bool enabled) {
|
public static void SetAutoScroll(UIElement element, bool enabled) {
|
||||||
element.SetValue(AutoScrollProperty, enabled);
|
element.SetValue(AutoScrollProperty, enabled);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Getter for AutoScrollProperty
|
/// Getter for AutoScrollProperty
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="element"></param>
|
/// <param name="element"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static bool GetAutoScroll(UIElement element) {
|
public static bool GetAutoScroll(UIElement element) {
|
||||||
return (bool)element.GetValue(AutoScrollProperty);
|
return (bool)element.GetValue(AutoScrollProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Triggered when AutoScroll property changed.
|
/// Triggered when AutoScroll property changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="d"></param>
|
/// <param name="d"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
public static void OnAutoScrollChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) {
|
public static void OnAutoScrollChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) {
|
||||||
var textBox = d as TextBox;
|
var textBox = d as TextBox;
|
||||||
if (textBox == null) return;
|
if (textBox == null) return;
|
||||||
|
|
||||||
textBox.SelectionChanged -= UpdateScrollOnSelectionChanged;
|
textBox.SelectionChanged -= UpdateScrollOnSelectionChanged;
|
||||||
if ((bool)e.NewValue == true) {
|
if ((bool)e.NewValue == true) {
|
||||||
textBox.SelectionChanged += UpdateScrollOnSelectionChanged;
|
textBox.SelectionChanged += UpdateScrollOnSelectionChanged;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Triggered when placeholder changed.
|
/// Triggered when placeholder changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="d"></param>
|
/// <param name="d"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private static void OnPlaceholderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) {
|
private static void OnPlaceholderChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) {
|
||||||
var textBox = d as TextBox;
|
var textBox = d as TextBox;
|
||||||
if (textBox != null) textBox.Loaded += OnTextLoaded;
|
if (textBox != null) textBox.Loaded += OnTextLoaded;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setter for Placeholder property
|
/// Setter for Placeholder property
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="element"></param>
|
/// <param name="element"></param>
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
public static void SetPlaceholder(UIElement element, string value) {
|
public static void SetPlaceholder(UIElement element, string value) {
|
||||||
element.SetValue(PlaceholderProperty, value);
|
element.SetValue(PlaceholderProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Getter for Placeholder property
|
/// Getter for Placeholder property
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="element"></param>
|
/// <param name="element"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static string GetPlaceholder(UIElement element) {
|
public static string GetPlaceholder(UIElement element) {
|
||||||
return (string)element.GetValue(PlaceholderProperty);
|
return (string)element.GetValue(PlaceholderProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setter for PlaceholderBaseline property
|
/// Setter for PlaceholderBaseline property
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="element"></param>
|
/// <param name="element"></param>
|
||||||
/// <param name="align"></param>
|
/// <param name="align"></param>
|
||||||
public static void SetPlaceholderBaseline(UIElement element, AlignmentY align) {
|
public static void SetPlaceholderBaseline(UIElement element, AlignmentY align) {
|
||||||
element.SetValue(PlaceholderBaselineProperty, align);
|
element.SetValue(PlaceholderBaselineProperty, align);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setter for PlaceholderBaseline property.
|
/// Setter for PlaceholderBaseline property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="element"></param>
|
/// <param name="element"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static AlignmentY GetPlaceholderBaseline(UIElement element) {
|
public static AlignmentY GetPlaceholderBaseline(UIElement element) {
|
||||||
return (AlignmentY)element.GetValue(PlaceholderBaselineProperty);
|
return (AlignmentY)element.GetValue(PlaceholderBaselineProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Setter for PlaceholderBrush property.
|
/// Setter for PlaceholderBrush property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="element"></param>
|
/// <param name="element"></param>
|
||||||
/// <param name="value"></param>
|
/// <param name="value"></param>
|
||||||
public static void SetPlaceholderBrush(UIElement element, Brush value) {
|
public static void SetPlaceholderBrush(UIElement element, Brush value) {
|
||||||
element.SetValue(PlaceholderBrushProperty, value);
|
element.SetValue(PlaceholderBrushProperty, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Getter for PlaceholderBrush property.
|
/// Getter for PlaceholderBrush property.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="element"></param>
|
/// <param name="element"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public static Brush GetPlaceholderBrush(UIElement element) {
|
public static Brush GetPlaceholderBrush(UIElement element) {
|
||||||
return (Brush)element.GetValue(PlaceholderBrushProperty);
|
return (Brush)element.GetValue(PlaceholderBrushProperty);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Set placeholder as background when TextBox was loaded.
|
/// Set placeholder as background when TextBox was loaded.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private static void OnTextLoaded(object sender, RoutedEventArgs e) {
|
private static void OnTextLoaded(object sender, RoutedEventArgs e) {
|
||||||
var textBox = sender as TextBox;
|
var textBox = sender as TextBox;
|
||||||
if (textBox == null) return;
|
if (textBox == null) return;
|
||||||
|
|
||||||
Label placeholder = new Label();
|
Label placeholder = new Label();
|
||||||
placeholder.Content = textBox.GetValue(PlaceholderProperty);
|
placeholder.Content = textBox.GetValue(PlaceholderProperty);
|
||||||
|
|
||||||
VisualBrush brush = new VisualBrush();
|
VisualBrush brush = new VisualBrush();
|
||||||
brush.AlignmentX = AlignmentX.Left;
|
brush.AlignmentX = AlignmentX.Left;
|
||||||
brush.AlignmentY = GetPlaceholderBaseline(textBox);
|
brush.AlignmentY = GetPlaceholderBaseline(textBox);
|
||||||
brush.TileMode = TileMode.None;
|
brush.TileMode = TileMode.None;
|
||||||
brush.Stretch = Stretch.None;
|
brush.Stretch = Stretch.None;
|
||||||
brush.Opacity = 0.3;
|
brush.Opacity = 0.3;
|
||||||
brush.Visual = placeholder;
|
brush.Visual = placeholder;
|
||||||
|
|
||||||
textBox.SetValue(PlaceholderBrushProperty, brush);
|
textBox.SetValue(PlaceholderBrushProperty, brush);
|
||||||
textBox.Background = brush;
|
textBox.Background = brush;
|
||||||
textBox.TextChanged += UpdatePlaceholder;
|
textBox.TextChanged += UpdatePlaceholder;
|
||||||
UpdatePlaceholder(textBox, null);
|
UpdatePlaceholder(textBox, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Dynamically hide/show placeholder.
|
/// Dynamically hide/show placeholder.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private static void UpdatePlaceholder(object sender, RoutedEventArgs e) {
|
private static void UpdatePlaceholder(object sender, RoutedEventArgs e) {
|
||||||
var textBox = sender as TextBox;
|
var textBox = sender as TextBox;
|
||||||
if (string.IsNullOrEmpty(textBox.Text)) {
|
if (string.IsNullOrEmpty(textBox.Text)) {
|
||||||
textBox.Background = textBox.GetValue(PlaceholderBrushProperty) as Brush;
|
textBox.Background = textBox.GetValue(PlaceholderBrushProperty) as Brush;
|
||||||
} else {
|
} else {
|
||||||
textBox.Background = Brushes.Transparent;
|
textBox.Background = Brushes.Transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private static void UpdateScrollOnSelectionChanged(object sender, RoutedEventArgs e) {
|
private static void UpdateScrollOnSelectionChanged(object sender, RoutedEventArgs e) {
|
||||||
var textBox = sender as TextBox;
|
var textBox = sender as TextBox;
|
||||||
if (textBox != null && textBox.IsFocused) {
|
if (textBox != null && textBox.IsFocused) {
|
||||||
if (Mouse.LeftButton == MouseButtonState.Pressed && textBox.SelectionLength > 0) {
|
if (Mouse.LeftButton == MouseButtonState.Pressed && textBox.SelectionLength > 0) {
|
||||||
var p = Mouse.GetPosition(textBox);
|
var p = Mouse.GetPosition(textBox);
|
||||||
if (p.X <= 8) {
|
if (p.X <= 8) {
|
||||||
textBox.LineLeft();
|
textBox.LineLeft();
|
||||||
} else if (p.X >= textBox.ActualWidth - 8) {
|
} else if (p.X >= textBox.ActualWidth - 8) {
|
||||||
textBox.LineRight();
|
textBox.LineRight();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p.Y <= 8) {
|
if (p.Y <= 8) {
|
||||||
textBox.LineUp();
|
textBox.LineUp();
|
||||||
} else if (p.Y >= textBox.ActualHeight - 8) {
|
} else if (p.Y >= textBox.ActualHeight - 8) {
|
||||||
textBox.LineDown();
|
textBox.LineDown();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
var rect = textBox.GetRectFromCharacterIndex(textBox.CaretIndex);
|
var rect = textBox.GetRectFromCharacterIndex(textBox.CaretIndex);
|
||||||
if (rect.Left <= 0) {
|
if (rect.Left <= 0) {
|
||||||
textBox.ScrollToHorizontalOffset(textBox.HorizontalOffset + rect.Left);
|
textBox.ScrollToHorizontalOffset(textBox.HorizontalOffset + rect.Left);
|
||||||
} else if (rect.Right >= textBox.ActualWidth) {
|
} else if (rect.Right >= textBox.ActualWidth) {
|
||||||
textBox.ScrollToHorizontalOffset(textBox.HorizontalOffset + rect.Right);
|
textBox.ScrollToHorizontalOffset(textBox.HorizontalOffset + rect.Right);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rect.Top <= 0) {
|
if (rect.Top <= 0) {
|
||||||
textBox.ScrollToVerticalOffset(textBox.VerticalOffset + rect.Top);
|
textBox.ScrollToVerticalOffset(textBox.VerticalOffset + rect.Top);
|
||||||
} else if (rect.Bottom >= textBox.ActualHeight) {
|
} else if (rect.Bottom >= textBox.ActualHeight) {
|
||||||
textBox.ScrollToVerticalOffset(textBox.VerticalOffset + rect.Bottom);
|
textBox.ScrollToVerticalOffset(textBox.VerticalOffset + rect.Bottom);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,61 +1,61 @@
|
||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
|
||||||
<Geometry x:Key="Icon.Git">M1004.824 466.4L557.72 19.328c-25.728-25.76-67.488-25.76-93.28 0L360.568 123.2l78.176 78.176c12.544-5.984 26.56-9.376 41.376-9.376 53.024 0 96 42.976 96 96 0 14.816-3.36 28.864-9.376 41.376l127.968 127.968c12.544-5.984 26.56-9.376 41.376-9.376 53.024 0 96 42.976 96 96s-42.976 96-96 96-96-42.976-96-96c0-14.816 3.36-28.864 9.376-41.376L521.496 374.624a88.837 88.837 0 0 1-9.376 3.872v266.976c37.28 13.184 64 48.704 64 90.528 0 53.024-42.976 96-96 96s-96-42.976-96-96c0-41.792 26.72-77.344 64-90.528V378.496c-37.28-13.184-64-48.704-64-90.528 0-14.816 3.36-28.864 9.376-41.376l-78.176-78.176L19.416 464.288c-25.76 25.792-25.76 67.52 0 93.28l447.136 447.072c25.728 25.76 67.488 25.76 93.28 0l444.992-444.992c25.76-25.76 25.76-67.552 0-93.28z</Geometry>
|
<Geometry x:Key="Icon.Git">M1004.824 466.4L557.72 19.328c-25.728-25.76-67.488-25.76-93.28 0L360.568 123.2l78.176 78.176c12.544-5.984 26.56-9.376 41.376-9.376 53.024 0 96 42.976 96 96 0 14.816-3.36 28.864-9.376 41.376l127.968 127.968c12.544-5.984 26.56-9.376 41.376-9.376 53.024 0 96 42.976 96 96s-42.976 96-96 96-96-42.976-96-96c0-14.816 3.36-28.864 9.376-41.376L521.496 374.624a88.837 88.837 0 0 1-9.376 3.872v266.976c37.28 13.184 64 48.704 64 90.528 0 53.024-42.976 96-96 96s-96-42.976-96-96c0-41.792 26.72-77.344 64-90.528V378.496c-37.28-13.184-64-48.704-64-90.528 0-14.816 3.36-28.864 9.376-41.376l-78.176-78.176L19.416 464.288c-25.76 25.792-25.76 67.52 0 93.28l447.136 447.072c25.728 25.76 67.488 25.76 93.28 0l444.992-444.992c25.76-25.76 25.76-67.552 0-93.28z</Geometry>
|
||||||
<Geometry x:Key="Icon.Submodule">M557.696 545.347L789.873 402.66c23.998-14.999 31.297-46.496 16.398-70.493-14.798-23.798-45.995-31.197-69.993-16.699L506.501 456.555 277.123 315.37c-24.098-14.798-55.595-7.3-70.493 16.799-14.799 24.097-7.3 55.594 16.798 70.493l231.778 142.586V819.12c0 28.297 22.897 51.195 51.195 51.195 28.297 0 51.195-22.898 51.195-51.195V545.347h0.1zM506.5 0l443.356 255.975v511.95L506.501 1023.9 63.144 767.925v-511.95L506.5 0z</Geometry>
|
<Geometry x:Key="Icon.Submodule">M557.696 545.347L789.873 402.66c23.998-14.999 31.297-46.496 16.398-70.493-14.798-23.798-45.995-31.197-69.993-16.699L506.501 456.555 277.123 315.37c-24.098-14.798-55.595-7.3-70.493 16.799-14.799 24.097-7.3 55.594 16.798 70.493l231.778 142.586V819.12c0 28.297 22.897 51.195 51.195 51.195 28.297 0 51.195-22.898 51.195-51.195V545.347h0.1zM506.5 0l443.356 255.975v511.95L506.501 1023.9 63.144 767.925v-511.95L506.5 0z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.ScrollLeft">M753.613 996.727L269.38 511.505 754.602 27.272z</Geometry>
|
<Geometry x:Key="Icon.ScrollLeft">M753.613 996.727L269.38 511.505 754.602 27.272z</Geometry>
|
||||||
<Geometry x:Key="Icon.ScrollRight">M270.387 27.273L754.62 512.495 269.398 996.728z</Geometry>
|
<Geometry x:Key="Icon.ScrollRight">M270.387 27.273L754.62 512.495 269.398 996.728z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.Minimize">F1M0,6L0,9 9,9 9,6 0,6z</Geometry>
|
<Geometry x:Key="Icon.Minimize">F1M0,6L0,9 9,9 9,6 0,6z</Geometry>
|
||||||
<Geometry x:Key="Icon.Maximize">F1M0,0L0,9 9,9 9,0 0,0 0,3 8,3 8,8 1,8 1,3z</Geometry>
|
<Geometry x:Key="Icon.Maximize">F1M0,0L0,9 9,9 9,0 0,0 0,3 8,3 8,8 1,8 1,3z</Geometry>
|
||||||
<Geometry x:Key="Icon.Restore">F1M0,10L0,3 3,3 3,0 10,0 10,2 4,2 4,3 7,3 7,6 6,6 6,5 1,5 1,10z M1,10L7,10 7,7 10,7 10,2 9,2 9,6 6,6 6,9 1,9z</Geometry>
|
<Geometry x:Key="Icon.Restore">F1M0,10L0,3 3,3 3,0 10,0 10,2 4,2 4,3 7,3 7,6 6,6 6,5 1,5 1,10z M1,10L7,10 7,7 10,7 10,2 9,2 9,6 6,6 6,9 1,9z</Geometry>
|
||||||
<Geometry x:Key="Icon.Close">M810.666667 273.493333L750.506667 213.333333 512 451.84 273.493333 213.333333 213.333333 273.493333 451.84 512 213.333333 750.506667 273.493333 810.666667 512 572.16 750.506667 810.666667 810.666667 750.506667 572.16 512z</Geometry>
|
<Geometry x:Key="Icon.Close">M810.666667 273.493333L750.506667 213.333333 512 451.84 273.493333 213.333333 213.333333 273.493333 451.84 512 213.333333 750.506667 273.493333 810.666667 512 572.16 750.506667 810.666667 810.666667 750.506667 572.16 512z</Geometry>
|
||||||
<Geometry x:Key="Icon.Check">M512 597.33333332m-1.26648097 0a1.26648097 1.26648097 0 1 0 2.53296194 0 1.26648097 1.26648097 0 1 0-2.53296194 0ZM809.691429 392.777143L732.16 314.514286 447.634286 599.771429 292.571429 443.977143 214.308571 521.508571l155.794286 155.794286 77.531429 77.531429 362.057143-362.057143z</Geometry>
|
<Geometry x:Key="Icon.Check">M512 597.33333332m-1.26648097 0a1.26648097 1.26648097 0 1 0 2.53296194 0 1.26648097 1.26648097 0 1 0-2.53296194 0ZM809.691429 392.777143L732.16 314.514286 447.634286 599.771429 292.571429 443.977143 214.308571 521.508571l155.794286 155.794286 77.531429 77.531429 362.057143-362.057143z</Geometry>
|
||||||
<Geometry x:Key="Icon.Loading">M511.680999 0C233.071131 0 6.524722 222.580887 0.12872 499.655715 6.013042 257.886821 189.834154 63.960025 415.740962 63.960025c229.61649 0 415.740162 200.450718 415.740162 447.720175 0 52.958901 42.981137 95.940037 95.940038 95.940037s95.940037-42.981137 95.940037-95.940037c0-282.57539-229.104809-511.6802-511.6802-511.6802z m0 1023.3604c278.609869 0 505.156277-222.580887 511.55228-499.655715-5.884322 241.768894-189.705434 435.69569-415.612242 435.69569-229.61649 0-415.740162-200.450718-415.740163-447.720175 0-52.958901-42.981137-95.940037-95.940037-95.940038s-95.940037 42.981137-95.940037 95.940038c0 282.57539 229.104809 511.6802 511.680199 511.6802z</Geometry>
|
<Geometry x:Key="Icon.Loading">M511.680999 0C233.071131 0 6.524722 222.580887 0.12872 499.655715 6.013042 257.886821 189.834154 63.960025 415.740962 63.960025c229.61649 0 415.740162 200.450718 415.740162 447.720175 0 52.958901 42.981137 95.940037 95.940038 95.940037s95.940037-42.981137 95.940037-95.940037c0-282.57539-229.104809-511.6802-511.6802-511.6802z m0 1023.3604c278.609869 0 505.156277-222.580887 511.55228-499.655715-5.884322 241.768894-189.705434 435.69569-415.612242 435.69569-229.61649 0-415.740162-200.450718-415.740163-447.720175 0-52.958901-42.981137-95.940037-95.940037-95.940038s-95.940037 42.981137-95.940037 95.940038c0 282.57539 229.104809 511.6802 511.680199 511.6802z</Geometry>
|
||||||
<Geometry x:Key="Icon.Search">M701.9062029 677.41589899L589.90712068 565.41681675a148.33953321 148.33953321 0 1 0-24.97646381 26.55648342L676.07895931 703.12160261z m-346.38891409-199.50786053a114.97681148 114.97681148 0 1 1 114.85527151 114.97681148A115.09835147 115.09835147 0 0 1 355.45651882 477.90803846z</Geometry>
|
<Geometry x:Key="Icon.Search">M701.9062029 677.41589899L589.90712068 565.41681675a148.33953321 148.33953321 0 1 0-24.97646381 26.55648342L676.07895931 703.12160261z m-346.38891409-199.50786053a114.97681148 114.97681148 0 1 1 114.85527151 114.97681148A115.09835147 115.09835147 0 0 1 355.45651882 477.90803846z</Geometry>
|
||||||
<Geometry x:Key="Icon.Conflict">M352 64h320L960 352v320L672 960h-320L64 672v-320L352 64z m161.28 362.688L344.128 256 259.584 341.312 428.736 512l-169.152 170.688L344.128 768 513.28 597.312 682.432 768l84.544-85.312L597.824 512l169.152-170.688L682.432 256 513.28 426.688z</Geometry>
|
<Geometry x:Key="Icon.Conflict">M352 64h320L960 352v320L672 960h-320L64 672v-320L352 64z m161.28 362.688L344.128 256 259.584 341.312 428.736 512l-169.152 170.688L344.128 768 513.28 597.312 682.432 768l84.544-85.312L597.824 512l169.152-170.688L682.432 256 513.28 426.688z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.List">M51.2 204.8h102.4v102.4H51.2V204.8z m204.8 0h716.8v102.4H256V204.8zM51.2 460.8h102.4v102.4H51.2V460.8z m204.8 0h716.8v102.4H256V460.8z m-204.8 256h102.4v102.4H51.2v-102.4z m204.8 0h716.8v102.4H256v-102.4z</Geometry>
|
<Geometry x:Key="Icon.List">M51.2 204.8h102.4v102.4H51.2V204.8z m204.8 0h716.8v102.4H256V204.8zM51.2 460.8h102.4v102.4H51.2V460.8z m204.8 0h716.8v102.4H256V460.8z m-204.8 256h102.4v102.4H51.2v-102.4z m204.8 0h716.8v102.4H256v-102.4z</Geometry>
|
||||||
<Geometry x:Key="Icon.Tree">M912 737l0 150L362 887l0-100 0-50 0-150 0-150 0-150L112 287l0-150 450 0 0 150L412 287l0 150L912 437l0 150L412 587l0 150L912 737z</Geometry>
|
<Geometry x:Key="Icon.Tree">M912 737l0 150L362 887l0-100 0-50 0-150 0-150 0-150L112 287l0-150 450 0 0 150L412 287l0 150L912 437l0 150L412 587l0 150L912 737z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.MoveUp">M868 545.5L536.1 163c-12.7-14.7-35.5-14.7-48.3 0L156 545.5c-4.5 5.2-0.8 13.2 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z</Geometry>
|
<Geometry x:Key="Icon.MoveUp">M868 545.5L536.1 163c-12.7-14.7-35.5-14.7-48.3 0L156 545.5c-4.5 5.2-0.8 13.2 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2z</Geometry>
|
||||||
<Geometry x:Key="Icon.MoveDown">M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861c12.7 14.7 35.5 14.7 48.3 0L868 478.5c4.5-5.2 0.8-13.2-6-13.2z</Geometry>
|
<Geometry x:Key="Icon.MoveDown">M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861c12.7 14.7 35.5 14.7 48.3 0L868 478.5c4.5-5.2 0.8-13.2-6-13.2z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.StageSelected">M509.44 546.304l270.848-270.912 90.56 90.56-347.52 349.056-0.832-0.768-13.056 13.056-362.624-361.28 91.136-91.264z</Geometry>
|
<Geometry x:Key="Icon.StageSelected">M509.44 546.304l270.848-270.912 90.56 90.56-347.52 349.056-0.832-0.768-13.056 13.056-362.624-361.28 91.136-91.264z</Geometry>
|
||||||
<Geometry x:Key="Icon.StageAll">M256 224l1e-8 115.2L512 544l255.99999999-204.8 1e-8-115.2-256 204.80000001L256 224zM512 684.8l-256-204.8L256 595.2 512 800 768 595.2l0-115.2L512 684.8z</Geometry>
|
<Geometry x:Key="Icon.StageAll">M256 224l1e-8 115.2L512 544l255.99999999-204.8 1e-8-115.2-256 204.80000001L256 224zM512 684.8l-256-204.8L256 595.2 512 800 768 595.2l0-115.2L512 684.8z</Geometry>
|
||||||
<Geometry x:Key="Icon.UnstageSelected">M169.5 831l342.8-341.9L855.1 831l105.3-105.3-448.1-448.1L64.2 725.7 169.5 831z</Geometry>
|
<Geometry x:Key="Icon.UnstageSelected">M169.5 831l342.8-341.9L855.1 831l105.3-105.3-448.1-448.1L64.2 725.7 169.5 831z</Geometry>
|
||||||
<Geometry x:Key="Icon.UnstageAll">M768 800V684.8L512 480 256 684.8V800l256-204.8L768 800zM512 339.2L768 544V428.8L512 224 256 428.8V544l256-204.8z</Geometry>
|
<Geometry x:Key="Icon.UnstageAll">M768 800V684.8L512 480 256 684.8V800l256-204.8L768 800zM512 339.2L768 544V428.8L512 224 256 428.8V544l256-204.8z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.Preference">M64.2 180.3h418.2v120.6H64.2zM64.2 461.7h358.5v120.6H64.2zM64.2 723.1h418.2v120.6H64.2zM601.9 180.3h358.5v120.6H601.9zM482.4 119.9h179.2v241.3H482.4zM303.2 401.4h179.2v241.3H303.2zM482.4 662.8h179.2v241.3H482.4zM540.3 461.7h420.1v120.6H540.3zM601.9 723.1h358.5v120.6H601.9z</Geometry>
|
<Geometry x:Key="Icon.Preference">M64.2 180.3h418.2v120.6H64.2zM64.2 461.7h358.5v120.6H64.2zM64.2 723.1h418.2v120.6H64.2zM601.9 180.3h358.5v120.6H601.9zM482.4 119.9h179.2v241.3H482.4zM303.2 401.4h179.2v241.3H303.2zM482.4 662.8h179.2v241.3H482.4zM540.3 461.7h420.1v120.6H540.3zM601.9 723.1h358.5v120.6H601.9z</Geometry>
|
||||||
<Geometry x:Key="Icon.Setting">M887 576.8v-129.4L796.6 418c-4.6-14-10.2-27.4-16.8-40.4l43.2-84.8-91.6-91.6-84.8 43.2c-13-6.6-26.6-12.2-40.4-16.8l-29.4-90.4h-129.4L418 227.6c-13.8 4.6-27.4 10.2-40.4 16.8l-84.8-43.2-91.6 91.6 43.2 84.8c-6.6 13-12.2 26.6-16.8 40.4l-90.4 29.4v129.4l90.4 29.4c4.6 13.8 10.2 27.4 16.8 40.4l-43.2 84.8 91.6 91.6 84.8-43.2c13 6.6 26.6 12.2 40.4 16.8l29.4 90.4h129.4l29.4-90.4c14-4.6 27.4-10.2 40.4-16.8l84.8 43.2 91.6-91.6-43.2-84.8c6.6-13 12.2-26.6 16.8-40.4l90.4-29.4zM512 662c-82.8 0-150-67.2-150-150s67.2-150 150-150 150 67.2 150 150-67.2 150-150 150z</Geometry>
|
<Geometry x:Key="Icon.Setting">M887 576.8v-129.4L796.6 418c-4.6-14-10.2-27.4-16.8-40.4l43.2-84.8-91.6-91.6-84.8 43.2c-13-6.6-26.6-12.2-40.4-16.8l-29.4-90.4h-129.4L418 227.6c-13.8 4.6-27.4 10.2-40.4 16.8l-84.8-43.2-91.6 91.6 43.2 84.8c-6.6 13-12.2 26.6-16.8 40.4l-90.4 29.4v129.4l90.4 29.4c4.6 13.8 10.2 27.4 16.8 40.4l-43.2 84.8 91.6 91.6 84.8-43.2c13 6.6 26.6 12.2 40.4 16.8l29.4 90.4h129.4l29.4-90.4c14-4.6 27.4-10.2 40.4-16.8l84.8 43.2 91.6-91.6-43.2-84.8c6.6-13 12.2-26.6 16.8-40.4l90.4-29.4zM512 662c-82.8 0-150-67.2-150-150s67.2-150 150-150 150 67.2 150 150-67.2 150-150 150z</Geometry>
|
||||||
<Geometry x:Key="Icon.Info">M 38,19C 48.4934,19 57,27.5066 57,38C 57,48.4934 48.4934,57 38,57C 27.5066,57 19,48.4934 19,38C 19,27.5066 27.5066,19 38,19 Z M 33.25,33.25L 33.25,36.4167L 36.4166,36.4167L 36.4166,47.5L 33.25,47.5L 33.25,50.6667L 44.3333,50.6667L 44.3333,47.5L 41.1666,47.5L 41.1666,36.4167L 41.1666,33.25L 33.25,33.25 Z M 38.7917,25.3333C 37.48,25.3333 36.4167,26.3967 36.4167,27.7083C 36.4167,29.02 37.48,30.0833 38.7917,30.0833C 40.1033,30.0833 41.1667,29.02 41.1667,27.7083C 41.1667,26.3967 40.1033,25.3333 38.7917,25.3333 Z</Geometry>
|
<Geometry x:Key="Icon.Info">M 38,19C 48.4934,19 57,27.5066 57,38C 57,48.4934 48.4934,57 38,57C 27.5066,57 19,48.4934 19,38C 19,27.5066 27.5066,19 38,19 Z M 33.25,33.25L 33.25,36.4167L 36.4166,36.4167L 36.4166,47.5L 33.25,47.5L 33.25,50.6667L 44.3333,50.6667L 44.3333,47.5L 41.1666,47.5L 41.1666,36.4167L 41.1666,33.25L 33.25,33.25 Z M 38.7917,25.3333C 37.48,25.3333 36.4167,26.3967 36.4167,27.7083C 36.4167,29.02 37.48,30.0833 38.7917,30.0833C 40.1033,30.0833 41.1667,29.02 41.1667,27.7083C 41.1667,26.3967 40.1033,25.3333 38.7917,25.3333 Z</Geometry>
|
||||||
<Geometry x:Key="Icon.Folder">M64 864h896V288h-396.224a64 64 0 0 1-57.242667-35.376L460.224 160H64v704z m-64 32V128a32 32 0 0 1 32-32h448a32 32 0 0 1 28.624 17.690667L563.776 224H992a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32z</Geometry>
|
<Geometry x:Key="Icon.Folder">M64 864h896V288h-396.224a64 64 0 0 1-57.242667-35.376L460.224 160H64v704z m-64 32V128a32 32 0 0 1 32-32h448a32 32 0 0 1 28.624 17.690667L563.776 224H992a32 32 0 0 1 32 32v640a32 32 0 0 1-32 32H32a32 32 0 0 1-32-32z</Geometry>
|
||||||
<Geometry x:Key="Icon.Folder.Fill">M448 64l128 128h448v768H0V64z</Geometry>
|
<Geometry x:Key="Icon.Folder.Fill">M448 64l128 128h448v768H0V64z</Geometry>
|
||||||
<Geometry x:Key="Icon.Folder.Open">M832 960l192-512H192L0 960zM128 384L0 960V128h288l128 128h416v128z</Geometry>
|
<Geometry x:Key="Icon.Folder.Open">M832 960l192-512H192L0 960zM128 384L0 960V128h288l128 128h416v128z</Geometry>
|
||||||
<Geometry x:Key="Icon.File">M958.656 320H960v639.936A64 64 0 0 1 896.128 1024H191.936A63.872 63.872 0 0 1 128 959.936V64.064A64 64 0 0 1 191.936 0H640v320.96h319.616L958.656 320zM320 544c0 17.152 14.464 32 32.192 32h383.552A32.384 32.384 0 0 0 768 544c0-17.152-14.464-32-32.256-32H352.192A32.448 32.448 0 0 0 320 544z m0 128c0 17.152 14.464 32 32.192 32h383.552a32.384 32.384 0 0 0 32.256-32c0-17.152-14.464-32-32.256-32H352.192a32.448 32.448 0 0 0-32.192 32z m0 128c0 17.152 14.464 32 32.192 32h383.552a32.384 32.384 0 0 0 32.256-32c0-17.152-14.464-32-32.256-32H352.192a32.448 32.448 0 0 0-32.192 32z</Geometry>
|
<Geometry x:Key="Icon.File">M958.656 320H960v639.936A64 64 0 0 1 896.128 1024H191.936A63.872 63.872 0 0 1 128 959.936V64.064A64 64 0 0 1 191.936 0H640v320.96h319.616L958.656 320zM320 544c0 17.152 14.464 32 32.192 32h383.552A32.384 32.384 0 0 0 768 544c0-17.152-14.464-32-32.256-32H352.192A32.448 32.448 0 0 0 320 544z m0 128c0 17.152 14.464 32 32.192 32h383.552a32.384 32.384 0 0 0 32.256-32c0-17.152-14.464-32-32.256-32H352.192a32.448 32.448 0 0 0-32.192 32z m0 128c0 17.152 14.464 32 32.192 32h383.552a32.384 32.384 0 0 0 32.256-32c0-17.152-14.464-32-32.256-32H352.192a32.448 32.448 0 0 0-32.192 32z</Geometry>
|
||||||
<Geometry x:Key="Icon.Diff">M854.2 306.6L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23zM553.4 201.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM568 753c0 3.8-3.4 7-7.5 7h-225c-4.1 0-7.5-3.2-7.5-7v-42c0-3.8 3.4-7 7.5-7h225c4.1 0 7.5 3.2 7.5 7v42z m0-220c0 3.8-3.4 7-7.5 7H476v84.9c0 3.9-3.1 7.1-7 7.1h-42c-3.8 0-7-3.2-7-7.1V540h-84.5c-4.1 0-7.5-3.2-7.5-7v-42c0-3.9 3.4-7 7.5-7H420v-84.9c0-3.9 3.2-7.1 7-7.1h42c3.9 0 7 3.2 7 7.1V484h84.5c4.1 0 7.5 3.1 7.5 7v42z</Geometry>
|
<Geometry x:Key="Icon.Diff">M854.2 306.6L611.3 72.9c-6-5.7-13.9-8.9-22.2-8.9H296c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h277l219 210.6V824c0 4.4 3.6 8 8 8h56c4.4 0 8-3.6 8-8V329.6c0-8.7-3.5-17-9.8-23zM553.4 201.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v704c0 17.7 14.3 32 32 32h512c17.7 0 32-14.3 32-32V397.3c0-8.5-3.4-16.6-9.4-22.6L553.4 201.4zM568 753c0 3.8-3.4 7-7.5 7h-225c-4.1 0-7.5-3.2-7.5-7v-42c0-3.8 3.4-7 7.5-7h225c4.1 0 7.5 3.2 7.5 7v42z m0-220c0 3.8-3.4 7-7.5 7H476v84.9c0 3.9-3.1 7.1-7 7.1h-42c-3.8 0-7-3.2-7-7.1V540h-84.5c-4.1 0-7.5-3.2-7.5-7v-42c0-3.9 3.4-7 7.5-7H420v-84.9c0-3.9 3.2-7.1 7-7.1h42c3.9 0 7 3.2 7 7.1V484h84.5c4.1 0 7.5 3.1 7.5 7v42z</Geometry>
|
||||||
<Geometry x:Key="Icon.Filter">M599.22969 424.769286 599.22969 657.383158 424.769286 831.844585 424.769286 424.769286 192.155415 192.155415 831.844585 192.155415Z</Geometry>
|
<Geometry x:Key="Icon.Filter">M599.22969 424.769286 599.22969 657.383158 424.769286 831.844585 424.769286 424.769286 192.155415 192.155415 831.844585 192.155415Z</Geometry>
|
||||||
<Geometry x:Key="Icon.Binary">M71.111111 1024V0h661.333333L952.888889 219.420444V1024H71.111111z m808.305778-731.420444l-220.444445-219.448889H144.583111V950.897778h734.833778V292.579556zM438.528 512h-220.444444V219.420444h220.444444V512z m-73.500444-219.420444H291.555556v146.289777h73.472v-146.289777z m0 512h73.500444v73.130666h-220.444444v-73.130666H291.555556v-146.289778H218.083556V585.102222h146.944v219.448889z m293.944888-365.710223h73.472V512H512v-73.130667h73.472v-146.289777H512V219.420444h146.972444v219.448889z m73.472 438.840889H512V585.130667h220.444444v292.579555z m-73.472-219.420444h-73.500444v146.289778h73.500444v-146.289778z</Geometry>
|
<Geometry x:Key="Icon.Binary">M71.111111 1024V0h661.333333L952.888889 219.420444V1024H71.111111z m808.305778-731.420444l-220.444445-219.448889H144.583111V950.897778h734.833778V292.579556zM438.528 512h-220.444444V219.420444h220.444444V512z m-73.500444-219.420444H291.555556v146.289777h73.472v-146.289777z m0 512h73.500444v73.130666h-220.444444v-73.130666H291.555556v-146.289778H218.083556V585.102222h146.944v219.448889z m293.944888-365.710223h73.472V512H512v-73.130667h73.472v-146.289777H512V219.420444h146.972444v219.448889z m73.472 438.840889H512V585.130667h220.444444v292.579555z m-73.472-219.420444h-73.500444v146.289778h73.500444v-146.289778z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.Vertical">M1024 1024H0V0h1024v1024z m-64-64V320H320V256h640V64H64v896h192V64h64v896z</Geometry>
|
<Geometry x:Key="Icon.Vertical">M1024 1024H0V0h1024v1024z m-64-64V320H320V256h640V64H64v896h192V64h64v896z</Geometry>
|
||||||
<Geometry x:Key="Icon.Horizontal">M81.92 81.92v860.16h860.16V81.92H81.92z m802.304 57.856V322.56H139.776V139.776h744.448z m-744.448 240.64H322.56v503.808H139.776V380.416z m240.128 503.808V380.416h504.32v503.808H379.904z</Geometry>
|
<Geometry x:Key="Icon.Horizontal">M81.92 81.92v860.16h860.16V81.92H81.92z m802.304 57.856V322.56H139.776V139.776h744.448z m-744.448 240.64H322.56v503.808H139.776V380.416z m240.128 503.808V380.416h504.32v503.808H379.904z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.Fetch">M1024 896v128H0V704h128v192h768V704h128v192zM576 554.688L810.688 320 896 405.312l-384 384-384-384L213.312 320 448 554.688V0h128v554.688z</Geometry>
|
<Geometry x:Key="Icon.Fetch">M1024 896v128H0V704h128v192h768V704h128v192zM576 554.688L810.688 320 896 405.312l-384 384-384-384L213.312 320 448 554.688V0h128v554.688z</Geometry>
|
||||||
<Geometry x:Key="Icon.Pull">M432 0h160c26.6 0 48 21.4 48 48v336h175.4c35.6 0 53.4 43 28.2 68.2L539.4 756.6c-15 15-39.6 15-54.6 0L180.2 452.2c-25.2-25.2-7.4-68.2 28.2-68.2H384V48c0-26.6 21.4-48 48-48z m592 752v224c0 26.6-21.4 48-48 48H48c-26.6 0-48-21.4-48-48V752c0-26.6 21.4-48 48-48h293.4l98 98c40.2 40.2 105 40.2 145.2 0l98-98H976c26.6 0 48 21.4 48 48z m-248 176c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z m128 0c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z</Geometry>
|
<Geometry x:Key="Icon.Pull">M432 0h160c26.6 0 48 21.4 48 48v336h175.4c35.6 0 53.4 43 28.2 68.2L539.4 756.6c-15 15-39.6 15-54.6 0L180.2 452.2c-25.2-25.2-7.4-68.2 28.2-68.2H384V48c0-26.6 21.4-48 48-48z m592 752v224c0 26.6-21.4 48-48 48H48c-26.6 0-48-21.4-48-48V752c0-26.6 21.4-48 48-48h293.4l98 98c40.2 40.2 105 40.2 145.2 0l98-98H976c26.6 0 48 21.4 48 48z m-248 176c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z m128 0c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z</Geometry>
|
||||||
<Geometry x:Key="Icon.Push">M592 768h-160c-26.6 0-48-21.4-48-48V384h-175.4c-35.6 0-53.4-43-28.2-68.2L484.6 11.4c15-15 39.6-15 54.6 0l304.4 304.4c25.2 25.2 7.4 68.2-28.2 68.2H640v336c0 26.6-21.4 48-48 48z m432-16v224c0 26.6-21.4 48-48 48H48c-26.6 0-48-21.4-48-48V752c0-26.6 21.4-48 48-48h272v16c0 61.8 50.2 112 112 112h160c61.8 0 112-50.2 112-112v-16h272c26.6 0 48 21.4 48 48z m-248 176c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z m128 0c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z</Geometry>
|
<Geometry x:Key="Icon.Push">M592 768h-160c-26.6 0-48-21.4-48-48V384h-175.4c-35.6 0-53.4-43-28.2-68.2L484.6 11.4c15-15 39.6-15 54.6 0l304.4 304.4c25.2 25.2 7.4 68.2-28.2 68.2H640v336c0 26.6-21.4 48-48 48z m432-16v224c0 26.6-21.4 48-48 48H48c-26.6 0-48-21.4-48-48V752c0-26.6 21.4-48 48-48h272v16c0 61.8 50.2 112 112 112h160c61.8 0 112-50.2 112-112v-16h272c26.6 0 48 21.4 48 48z m-248 176c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z m128 0c0-22-18-40-40-40s-40 18-40 40 18 40 40 40 40-18 40-40z</Geometry>
|
||||||
<Geometry x:Key="Icon.SaveStash">M961.3 319.6L512 577.3 62.7 319.6 512 62l449.3 257.6zM512 628.4L185.4 441.6 62.7 512 512 769.6 961.3 512l-122.7-70.4L512 628.4zM512 820.8L185.4 634 62.7 704.3 512 962l449.3-257.7L838.6 634 512 820.8z</Geometry>
|
<Geometry x:Key="Icon.SaveStash">M961.3 319.6L512 577.3 62.7 319.6 512 62l449.3 257.6zM512 628.4L185.4 441.6 62.7 512 512 769.6 961.3 512l-122.7-70.4L512 628.4zM512 820.8L185.4 634 62.7 704.3 512 962l449.3-257.7L838.6 634 512 820.8z</Geometry>
|
||||||
<Geometry x:Key="Icon.Apply">M295.328 472l143.184 276.032S671.184 186.992 1038.096 0c-8.944 133.568-44.8 249.328 17.904 391.792C894.912 427.408 563.792 828.112 456.4 1024 304.272 837.008 125.296 694.544 0 650.016z</Geometry>
|
<Geometry x:Key="Icon.Apply">M295.328 472l143.184 276.032S671.184 186.992 1038.096 0c-8.944 133.568-44.8 249.328 17.904 391.792C894.912 427.408 563.792 828.112 456.4 1024 304.272 837.008 125.296 694.544 0 650.016z</Geometry>
|
||||||
<Geometry x:Key="Icon.Terminal">M89.6 806.4h844.8V217.6H89.6v588.8zM0 128h1024v768H0V128z m242.816 577.536L192 654.72l154.304-154.368L192 346.048l50.816-50.816L448 500.352 242.816 705.536z m584.32 13.248H512V640h315.072v78.72z</Geometry>
|
<Geometry x:Key="Icon.Terminal">M89.6 806.4h844.8V217.6H89.6v588.8zM0 128h1024v768H0V128z m242.816 577.536L192 654.72l154.304-154.368L192 346.048l50.816-50.816L448 500.352 242.816 705.536z m584.32 13.248H512V640h315.072v78.72z</Geometry>
|
||||||
<Geometry x:Key="Icon.Flow">M508.928 556.125091l92.904727 148.759273h124.462546l-79.639273-79.173819 49.245091-49.524363 164.584727 163.700363-164.631273 163.002182-49.152-49.617454 79.36-78.568728h-162.955636l-95.650909-153.227636 41.472-65.349818z m186.973091-394.705455l164.584727 163.700364-164.631273 163.002182-49.152-49.617455L726.109091 359.936H529.687273l-135.540364 223.976727H139.636364v-69.818182h215.133091l135.586909-223.976727h235.938909l-79.639273-79.173818 49.245091-49.524364z</Geometry>
|
<Geometry x:Key="Icon.Flow">M508.928 556.125091l92.904727 148.759273h124.462546l-79.639273-79.173819 49.245091-49.524363 164.584727 163.700363-164.631273 163.002182-49.152-49.617454 79.36-78.568728h-162.955636l-95.650909-153.227636 41.472-65.349818z m186.973091-394.705455l164.584727 163.700364-164.631273 163.002182-49.152-49.617455L726.109091 359.936H529.687273l-135.540364 223.976727H139.636364v-69.818182h215.133091l135.586909-223.976727h235.938909l-79.639273-79.173818 49.245091-49.524364z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.Commit">M795.968 471.04A291.584 291.584 0 0 0 512 256a293.376 293.376 0 0 0-283.968 215.04H0v144h228.032A292.864 292.864 0 0 0 512 832a291.136 291.136 0 0 0 283.968-216.96H1024V471.04h-228.032M512 688A145.856 145.856 0 0 1 366.016 544 144.576 144.576 0 0 1 512 400c80 0 145.984 63.104 145.984 144A145.856 145.856 0 0 1 512 688</Geometry>
|
<Geometry x:Key="Icon.Commit">M795.968 471.04A291.584 291.584 0 0 0 512 256a293.376 293.376 0 0 0-283.968 215.04H0v144h228.032A292.864 292.864 0 0 0 512 832a291.136 291.136 0 0 0 283.968-216.96H1024V471.04h-228.032M512 688A145.856 145.856 0 0 1 366.016 544 144.576 144.576 0 0 1 512 400c80 0 145.984 63.104 145.984 144A145.856 145.856 0 0 1 512 688</Geometry>
|
||||||
<Geometry x:Key="Icon.WorkingCopy">M0 586.459429l403.968 118.784 497.517714-409.892572-385.536 441.490286-1.609143 250.587428 154.916572-204.580571 278.601143 83.456L1170.285714 36.571429z</Geometry>
|
<Geometry x:Key="Icon.WorkingCopy">M0 586.459429l403.968 118.784 497.517714-409.892572-385.536 441.490286-1.609143 250.587428 154.916572-204.580571 278.601143 83.456L1170.285714 36.571429z</Geometry>
|
||||||
<Geometry x:Key="Icon.Histories">M24.356571 512A488.155429 488.155429 0 0 1 512 24.356571 488.155429 488.155429 0 0 1 999.643429 512 488.155429 488.155429 0 0 1 512 999.643429 488.155429 488.155429 0 0 1 24.356571 512z m446.976-325.046857v326.656L242.614857 619.227429l51.126857 110.665142 299.52-138.24V186.953143H471.332571z</Geometry>
|
<Geometry x:Key="Icon.Histories">M24.356571 512A488.155429 488.155429 0 0 1 512 24.356571 488.155429 488.155429 0 0 1 999.643429 512 488.155429 488.155429 0 0 1 512 999.643429 488.155429 488.155429 0 0 1 24.356571 512z m446.976-325.046857v326.656L242.614857 619.227429l51.126857 110.665142 299.52-138.24V186.953143H471.332571z</Geometry>
|
||||||
<Geometry x:Key="Icon.Stashes">M714.624 253.648h-404.8l-57.808 57.328h520.48z m-491.568 85.984v200.624h578.336V339.632z m404.8 143.296h-28.88v-28.64H425.472v28.64h-28.912v-57.312h231.328v57.312z m-404.8 295.12h578.336V559.36H223.056z m173.504-132.704h231.328v57.328h-28.912v-28.656H425.472v28.656h-28.912v-57.328z</Geometry>
|
<Geometry x:Key="Icon.Stashes">M714.624 253.648h-404.8l-57.808 57.328h520.48z m-491.568 85.984v200.624h578.336V339.632z m404.8 143.296h-28.88v-28.64H425.472v28.64h-28.912v-57.312h231.328v57.312z m-404.8 295.12h578.336V559.36H223.056z m173.504-132.704h231.328v57.328h-28.912v-28.656H425.472v28.656h-28.912v-57.328z</Geometry>
|
||||||
<Geometry x:Key="Icon.Branch">M868.736 144.96a144.64 144.64 0 1 0-289.408 0c0 56.064 32.64 107.008 83.456 130.624-4.928 95.552-76.608 128-201.088 174.592-52.48 19.712-110.336 41.6-159.744 74.432V276.16A144.448 144.448 0 0 0 241.664 0.192a144.64 144.64 0 0 0-144.64 144.768c0 58.24 34.688 108.288 84.352 131.2v461.184a144.32 144.32 0 0 0-84.416 131.2 144.704 144.704 0 1 0 289.472 0 144.32 144.32 0 0 0-83.52-130.688c4.992-95.488 76.672-127.936 201.152-174.592 122.368-45.952 273.792-103.168 279.744-286.784a144.64 144.64 0 0 0 84.928-131.52zM241.664 61.44a83.456 83.456 0 1 1 0 166.912 83.456 83.456 0 0 1 0-166.912z m0 890.56a83.52 83.52 0 1 1 0-167.04 83.52 83.52 0 0 1 0 167.04zM724.032 228.416a83.52 83.52 0 1 1 0-167.04 83.52 83.52 0 0 1 0 167.04z</Geometry>
|
<Geometry x:Key="Icon.Branch">M868.736 144.96a144.64 144.64 0 1 0-289.408 0c0 56.064 32.64 107.008 83.456 130.624-4.928 95.552-76.608 128-201.088 174.592-52.48 19.712-110.336 41.6-159.744 74.432V276.16A144.448 144.448 0 0 0 241.664 0.192a144.64 144.64 0 0 0-144.64 144.768c0 58.24 34.688 108.288 84.352 131.2v461.184a144.32 144.32 0 0 0-84.416 131.2 144.704 144.704 0 1 0 289.472 0 144.32 144.32 0 0 0-83.52-130.688c4.992-95.488 76.672-127.936 201.152-174.592 122.368-45.952 273.792-103.168 279.744-286.784a144.64 144.64 0 0 0 84.928-131.52zM241.664 61.44a83.456 83.456 0 1 1 0 166.912 83.456 83.456 0 0 1 0-166.912z m0 890.56a83.52 83.52 0 1 1 0-167.04 83.52 83.52 0 0 1 0 167.04zM724.032 228.416a83.52 83.52 0 1 1 0-167.04 83.52 83.52 0 0 1 0 167.04z</Geometry>
|
||||||
<Geometry x:Key="Icon.Branch.Add">M896 128h-64V64c0-35.2-28.8-64-64-64s-64 28.8-64 64v64h-64c-35.2 0-64 28.8-64 64s28.8 64 64 64h64v64c0 35.2 28.8 64 64 64s64-28.8 64-64V256h64c35.2 0 64-28.8 64-64s-28.8-64-64-64z m-203.52 307.2C672.64 480.64 628.48 512 576 512H448c-46.72 0-90.24 12.8-128 35.2V372.48C394.24 345.6 448 275.2 448 192c0-106.24-85.76-192-192-192S64 85.76 64 192c0 83.2 53.76 153.6 128 180.48v279.68c-74.24 25.6-128 96.64-128 179.84 0 106.24 85.76 192 192 192s192-85.76 192-192c0-66.56-33.92-124.8-84.48-159.36 22.4-19.84 51.84-32.64 84.48-32.64h128c121.6 0 223.36-85.12 248.96-199.04-18.56 4.48-37.12 7.04-56.96 7.04-26.24 0-51.2-5.12-75.52-12.8zM256 128c35.2 0 64 28.8 64 64s-28.8 64-64 64-64-28.8-64-64 28.8-64 64-64z m0 768c-35.2 0-64-28.8-64-64s28.8-64 64-64 64 28.8 64 64-28.8 64-64 64z</Geometry>
|
<Geometry x:Key="Icon.Branch.Add">M896 128h-64V64c0-35.2-28.8-64-64-64s-64 28.8-64 64v64h-64c-35.2 0-64 28.8-64 64s28.8 64 64 64h64v64c0 35.2 28.8 64 64 64s64-28.8 64-64V256h64c35.2 0 64-28.8 64-64s-28.8-64-64-64z m-203.52 307.2C672.64 480.64 628.48 512 576 512H448c-46.72 0-90.24 12.8-128 35.2V372.48C394.24 345.6 448 275.2 448 192c0-106.24-85.76-192-192-192S64 85.76 64 192c0 83.2 53.76 153.6 128 180.48v279.68c-74.24 25.6-128 96.64-128 179.84 0 106.24 85.76 192 192 192s192-85.76 192-192c0-66.56-33.92-124.8-84.48-159.36 22.4-19.84 51.84-32.64 84.48-32.64h128c121.6 0 223.36-85.12 248.96-199.04-18.56 4.48-37.12 7.04-56.96 7.04-26.24 0-51.2-5.12-75.52-12.8zM256 128c35.2 0 64 28.8 64 64s-28.8 64-64 64-64-28.8-64-64 28.8-64 64-64z m0 768c-35.2 0-64-28.8-64-64s28.8-64 64-64 64 28.8 64 64-28.8 64-64 64z</Geometry>
|
||||||
<Geometry x:Key="Icon.Remote">M901.802667 479.232v-1.024c0-133.461333-111.616-241.664-249.514667-241.664-105.813333 0-195.925333 63.829333-232.448 153.941333-27.989333-20.138667-62.464-32.426667-100.010667-32.426666-75.776 0-139.605333 49.152-159.744 116.053333-51.882667 36.522667-86.016 96.938667-86.016 165.205333 0 111.616 90.453333 201.728 201.728 201.728h503.466667c111.616 0 201.728-90.453333 201.728-201.728 0-65.194667-31.061333-123.221333-79.189333-160.085333z</Geometry>
|
<Geometry x:Key="Icon.Remote">M901.802667 479.232v-1.024c0-133.461333-111.616-241.664-249.514667-241.664-105.813333 0-195.925333 63.829333-232.448 153.941333-27.989333-20.138667-62.464-32.426667-100.010667-32.426666-75.776 0-139.605333 49.152-159.744 116.053333-51.882667 36.522667-86.016 96.938667-86.016 165.205333 0 111.616 90.453333 201.728 201.728 201.728h503.466667c111.616 0 201.728-90.453333 201.728-201.728 0-65.194667-31.061333-123.221333-79.189333-160.085333z</Geometry>
|
||||||
<Geometry x:Key="Icon.Remote.Add">M363.789474 512h67.368421v107.789474h107.789473v67.368421h-107.789473v107.789473h-67.368421v-107.789473h-107.789474v-67.368421h107.789474v-107.789474z m297.539368-64A106.671158 106.671158 0 0 1 768 554.671158C768 613.578105 719.548632 660.210526 660.210526 660.210526h-107.789473v-53.894737h-107.789474v-107.789473h-94.31579v107.789473h-94.315789c4.311579-21.194105 22.231579-46.807579 43.560421-50.755368l-0.889263-11.560421a74.671158 74.671158 0 0 1 71.248842-74.590316 128.053895 128.053895 0 0 1 238.605474-7.437473 106.172632 106.172632 0 0 1 52.816842-13.972211z</Geometry>
|
<Geometry x:Key="Icon.Remote.Add">M363.789474 512h67.368421v107.789474h107.789473v67.368421h-107.789473v107.789473h-67.368421v-107.789473h-107.789474v-67.368421h107.789474v-107.789474z m297.539368-64A106.671158 106.671158 0 0 1 768 554.671158C768 613.578105 719.548632 660.210526 660.210526 660.210526h-107.789473v-53.894737h-107.789474v-107.789473h-94.31579v107.789473h-94.315789c4.311579-21.194105 22.231579-46.807579 43.560421-50.755368l-0.889263-11.560421a74.671158 74.671158 0 0 1 71.248842-74.590316 128.053895 128.053895 0 0 1 238.605474-7.437473 106.172632 106.172632 0 0 1 52.816842-13.972211z</Geometry>
|
||||||
<Geometry x:Key="Icon.Tag">M177.311335 156.116617c-22.478967 4.729721-32.774451 17.336854-36.251645 36.893258-10.080589 56.697303-33.399691 257.604032-13.234419 277.769304l445.342858 445.341834c23.177885 23.177885 60.757782 23.178909 83.935668 0l246.019183-246.019183c23.177885-23.177885 23.177885-60.757782 0-83.935668l-445.341834-445.341834C437.419398 120.463606 231.004211 144.82034 177.311335 156.116617zM331.22375 344.221786c-26.195615 26.195615-68.667939 26.195615-94.863555 0-26.195615-26.195615-26.195615-68.666916 0-94.863555s68.667939-26.195615 94.862531 0C357.418342 275.55487 357.419366 318.02617 331.22375 344.221786z</Geometry>
|
<Geometry x:Key="Icon.Tag">M177.311335 156.116617c-22.478967 4.729721-32.774451 17.336854-36.251645 36.893258-10.080589 56.697303-33.399691 257.604032-13.234419 277.769304l445.342858 445.341834c23.177885 23.177885 60.757782 23.178909 83.935668 0l246.019183-246.019183c23.177885-23.177885 23.177885-60.757782 0-83.935668l-445.341834-445.341834C437.419398 120.463606 231.004211 144.82034 177.311335 156.116617zM331.22375 344.221786c-26.195615 26.195615-68.667939 26.195615-94.863555 0-26.195615-26.195615-26.195615-68.666916 0-94.863555s68.667939-26.195615 94.862531 0C357.418342 275.55487 357.419366 318.02617 331.22375 344.221786z</Geometry>
|
||||||
<Geometry x:Key="Icon.Tag.Add">M682.666667 536.576h-143.701334v-142.336h-142.336V283.306667H238.933333a44.032 44.032 0 0 0-40.96 40.96v170.666666a55.978667 55.978667 0 0 0 14.336 34.133334l320.512 320.512a40.96 40.96 0 0 0 57.685334 0l173.738666-173.738667a40.96 40.96 0 0 0 0-57.685333z m-341.333334-108.544a40.96 40.96 0 1 1 0-57.685333 40.96 40.96 0 0 1 0 57.685333zM649.216 284.330667V141.994667h-68.608v142.336h-142.336v68.266666h142.336v142.336h68.608v-142.336h142.336v-68.266666h-142.336z</Geometry>
|
<Geometry x:Key="Icon.Tag.Add">M682.666667 536.576h-143.701334v-142.336h-142.336V283.306667H238.933333a44.032 44.032 0 0 0-40.96 40.96v170.666666a55.978667 55.978667 0 0 0 14.336 34.133334l320.512 320.512a40.96 40.96 0 0 0 57.685334 0l173.738666-173.738667a40.96 40.96 0 0 0 0-57.685333z m-341.333334-108.544a40.96 40.96 0 1 1 0-57.685333 40.96 40.96 0 0 1 0 57.685333zM649.216 284.330667V141.994667h-68.608v142.336h-142.336v68.266666h142.336v142.336h68.608v-142.336h142.336v-68.266666h-142.336z</Geometry>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
|
@ -1,126 +1,126 @@
|
||||||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:helpers="clr-namespace:SourceGit.Helpers">
|
xmlns:helpers="clr-namespace:SourceGit.Helpers">
|
||||||
|
|
||||||
<!-- 错误Tooltip -->
|
<!-- 错误Tooltip -->
|
||||||
<ControlTemplate x:Key="Template.Validation.Tooltip" TargetType="{x:Type ToolTip}">
|
<ControlTemplate x:Key="Template.Validation.Tooltip" TargetType="{x:Type ToolTip}">
|
||||||
<Border x:Name="Root" Margin="5,0,0,0" Opacity="0" Padding="0,0,20,20" RenderTransformOrigin="0,0">
|
<Border x:Name="Root" Margin="5,0,0,0" Opacity="0" Padding="0,0,20,20" RenderTransformOrigin="0,0">
|
||||||
<Border.RenderTransform>
|
<Border.RenderTransform>
|
||||||
<TranslateTransform x:Name="xform" X="-25" />
|
<TranslateTransform x:Name="xform" X="-25" />
|
||||||
</Border.RenderTransform>
|
</Border.RenderTransform>
|
||||||
<VisualStateManager.VisualStateGroups>
|
<VisualStateManager.VisualStateGroups>
|
||||||
<VisualStateGroup x:Name="OpenStates">
|
<VisualStateGroup x:Name="OpenStates">
|
||||||
<VisualStateGroup.Transitions>
|
<VisualStateGroup.Transitions>
|
||||||
<VisualTransition GeneratedDuration="0" />
|
<VisualTransition GeneratedDuration="0" />
|
||||||
<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
|
<VisualTransition GeneratedDuration="0:0:0.2" To="Open">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
|
<DoubleAnimation Duration="0:0:0.2" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform">
|
||||||
<DoubleAnimation.EasingFunction>
|
<DoubleAnimation.EasingFunction>
|
||||||
<BackEase Amplitude=".3" EasingMode="EaseOut" />
|
<BackEase Amplitude=".3" EasingMode="EaseOut" />
|
||||||
</DoubleAnimation.EasingFunction>
|
</DoubleAnimation.EasingFunction>
|
||||||
</DoubleAnimation>
|
</DoubleAnimation>
|
||||||
<DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root" />
|
<DoubleAnimation Duration="0:0:0.2" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root" />
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualTransition>
|
</VisualTransition>
|
||||||
</VisualStateGroup.Transitions>
|
</VisualStateGroup.Transitions>
|
||||||
<VisualState x:Name="Closed">
|
<VisualState x:Name="Closed">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root" />
|
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root" />
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
<VisualState x:Name="Open">
|
<VisualState x:Name="Open">
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform" />
|
<DoubleAnimation Duration="0" To="0" Storyboard.TargetProperty="X" Storyboard.TargetName="xform" />
|
||||||
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root" />
|
<DoubleAnimation Duration="0" To="1" Storyboard.TargetProperty="Opacity" Storyboard.TargetName="Root" />
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</VisualState>
|
</VisualState>
|
||||||
</VisualStateGroup>
|
</VisualStateGroup>
|
||||||
</VisualStateManager.VisualStateGroups>
|
</VisualStateManager.VisualStateGroups>
|
||||||
<FrameworkElement.Effect>
|
<FrameworkElement.Effect>
|
||||||
<DropShadowEffect BlurRadius="11" ShadowDepth="6" Opacity="0.4" />
|
<DropShadowEffect BlurRadius="11" ShadowDepth="6" Opacity="0.4" />
|
||||||
</FrameworkElement.Effect>
|
</FrameworkElement.Effect>
|
||||||
<Border Background="#FFDC000C" BorderThickness="1" BorderBrush="#FFBC000C">
|
<Border Background="#FFDC000C" BorderThickness="1" BorderBrush="#FFBC000C">
|
||||||
<TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding [0].ErrorContent}" UseLayoutRounding="false" />
|
<TextBlock Foreground="White" MaxWidth="250" Margin="8,4,8,4" TextWrapping="Wrap" Text="{Binding [0].ErrorContent}" UseLayoutRounding="false" />
|
||||||
</Border>
|
</Border>
|
||||||
</Border>
|
</Border>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|
||||||
<!-- 验证错误模板 -->
|
<!-- 验证错误模板 -->
|
||||||
<ControlTemplate x:Key="Template.Validation.Error">
|
<ControlTemplate x:Key="Template.Validation.Error">
|
||||||
<AdornedElementPlaceholder x:Name="Target">
|
<AdornedElementPlaceholder x:Name="Target">
|
||||||
<Border BorderBrush="#FFDB000C" BorderThickness="1" x:Name="root">
|
<Border BorderBrush="#FFDB000C" BorderThickness="1" x:Name="root">
|
||||||
<ToolTipService.ToolTip>
|
<ToolTipService.ToolTip>
|
||||||
<ToolTip x:Name="validationTooltip"
|
<ToolTip x:Name="validationTooltip"
|
||||||
Placement="Right"
|
Placement="Right"
|
||||||
PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
|
PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
|
||||||
Template="{StaticResource Template.Validation.Tooltip}"
|
Template="{StaticResource Template.Validation.Tooltip}"
|
||||||
Style="{x:Null}"/>
|
Style="{x:Null}"/>
|
||||||
</ToolTipService.ToolTip>
|
</ToolTipService.ToolTip>
|
||||||
<Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Width="12" Margin="1,-4,-4,0" VerticalAlignment="Top">
|
<Grid Background="Transparent" HorizontalAlignment="Right" Height="12" Width="12" Margin="1,-4,-4,0" VerticalAlignment="Top">
|
||||||
<Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0" />
|
<Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" Fill="#FFDC000C" Margin="1,3,0,0" />
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</AdornedElementPlaceholder>
|
</AdornedElementPlaceholder>
|
||||||
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<MultiDataTrigger>
|
<MultiDataTrigger>
|
||||||
<MultiDataTrigger.Conditions>
|
<MultiDataTrigger.Conditions>
|
||||||
<Condition Binding="{Binding ElementName=Target, Path=AdornedElement.IsKeyboardFocusWithin, Mode=OneWay}" Value="True" />
|
<Condition Binding="{Binding ElementName=Target, Path=AdornedElement.IsKeyboardFocusWithin, Mode=OneWay}" Value="True" />
|
||||||
<Condition Binding="{Binding ElementName=Target, Path=AdornedElement.(Validation.HasError), Mode=OneWay}" Value="True" />
|
<Condition Binding="{Binding ElementName=Target, Path=AdornedElement.(Validation.HasError), Mode=OneWay}" Value="True" />
|
||||||
</MultiDataTrigger.Conditions>
|
</MultiDataTrigger.Conditions>
|
||||||
<Setter TargetName="validationTooltip" Property="IsOpen" Value="True"/>
|
<Setter TargetName="validationTooltip" Property="IsOpen" Value="True"/>
|
||||||
</MultiDataTrigger>
|
</MultiDataTrigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
|
|
||||||
<!-- 修改默认 -->
|
<!-- 修改默认 -->
|
||||||
<Style TargetType="{x:Type TextBox}">
|
<Style TargetType="{x:Type TextBox}">
|
||||||
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
<Setter Property="SnapsToDevicePixels" Value="True"/>
|
||||||
<Setter Property="VerticalAlignment" Value="Center"/>
|
<Setter Property="VerticalAlignment" Value="Center"/>
|
||||||
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
<Setter Property="VerticalContentAlignment" Value="Center"/>
|
||||||
<Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.FG}"/>
|
<Setter Property="TextElement.Foreground" Value="{DynamicResource Brush.FG}"/>
|
||||||
<Setter Property="CaretBrush" Value="{DynamicResource Brush.FG}"/>
|
<Setter Property="CaretBrush" Value="{DynamicResource Brush.FG}"/>
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border1}"/>
|
<Setter Property="BorderBrush" Value="{DynamicResource Brush.Border1}"/>
|
||||||
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource Template.Validation.Error}"/>
|
<Setter Property="Validation.ErrorTemplate" Value="{StaticResource Template.Validation.Error}"/>
|
||||||
<Setter Property="helpers:TextBoxHelper.AutoScroll" Value="True"/>
|
<Setter Property="helpers:TextBoxHelper.AutoScroll" Value="True"/>
|
||||||
<Setter Property="ContextMenu">
|
<Setter Property="ContextMenu">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Command="ApplicationCommands.Copy" />
|
<MenuItem Command="ApplicationCommands.Copy" />
|
||||||
<MenuItem Command="ApplicationCommands.Cut" />
|
<MenuItem Command="ApplicationCommands.Cut" />
|
||||||
<MenuItem Command="ApplicationCommands.Paste" />
|
<MenuItem Command="ApplicationCommands.Paste" />
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type TextBox}">
|
<ControlTemplate TargetType="{x:Type TextBox}">
|
||||||
<Border x:Name="Border"
|
<Border x:Name="Border"
|
||||||
Background="{TemplateBinding Background}"
|
Background="{TemplateBinding Background}"
|
||||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
|
||||||
BorderThickness="{TemplateBinding BorderThickness}"
|
BorderThickness="{TemplateBinding BorderThickness}"
|
||||||
BorderBrush="{TemplateBinding BorderBrush}">
|
BorderBrush="{TemplateBinding BorderBrush}">
|
||||||
<ScrollViewer x:Name="PART_ContentHost"
|
<ScrollViewer x:Name="PART_ContentHost"
|
||||||
Margin="{TemplateBinding Padding}"
|
Margin="{TemplateBinding Padding}"
|
||||||
VerticalAlignment="Center"
|
VerticalAlignment="Center"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
IsTabStop="False"
|
IsTabStop="False"
|
||||||
CanContentScroll="False"
|
CanContentScroll="False"
|
||||||
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="true">
|
<Trigger Property="IsMouseOver" Value="true">
|
||||||
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource Brush.Accent1}"/>
|
<Setter TargetName="Border" Property="BorderBrush" Value="{DynamicResource Brush.Accent1}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="AcceptsReturn" Value="True">
|
<Trigger Property="AcceptsReturn" Value="True">
|
||||||
<Setter TargetName="PART_ContentHost" Property="VerticalAlignment" Value="Top"/>
|
<Setter TargetName="PART_ContentHost" Property="VerticalAlignment" Value="Top"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
|
@ -1,22 +1,27 @@
|
||||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net46</TargetFramework>
|
<TargetFramework>net46</TargetFramework>
|
||||||
<OutputType>WinExe</OutputType>
|
<OutputType>WinExe</OutputType>
|
||||||
<UseWPF>true</UseWPF>
|
<UseWPF>true</UseWPF>
|
||||||
<UseWindowsForms>true</UseWindowsForms>
|
<UseWindowsForms>true</UseWindowsForms>
|
||||||
<ApplicationIcon>App.ico</ApplicationIcon>
|
<ApplicationIcon>App.ico</ApplicationIcon>
|
||||||
<Company>sourcegit</Company>
|
<Company>sourcegit</Company>
|
||||||
<Description>OpenSource GIT client for Windows</Description>
|
<Description>OpenSource GIT client for Windows</Description>
|
||||||
<Copyright>Copyright © sourcegit 2020. All rights reserved.</Copyright>
|
<Copyright>Copyright © sourcegit 2020. All rights reserved.</Copyright>
|
||||||
<ApplicationManifest>App.manifest</ApplicationManifest>
|
<ApplicationManifest>App.manifest</ApplicationManifest>
|
||||||
<Version>1.5</Version>
|
<Version>1.5</Version>
|
||||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||||
</PropertyGroup>
|
<StartupObject>SourceGit.App</StartupObject>
|
||||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
<PackageProjectUrl>https://gitee.com/sourcegit/SourceGit.git</PackageProjectUrl>
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<RepositoryUrl>https://gitee.com/sourcegit/SourceGit.git</RepositoryUrl>
|
||||||
<Prefer32Bit>true</Prefer32Bit>
|
<RepositoryType>Public</RepositoryType>
|
||||||
</PropertyGroup>
|
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||||
<ItemGroup>
|
</PropertyGroup>
|
||||||
<Resource Include="App.ico" />
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
|
||||||
</ItemGroup>
|
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||||
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<Resource Include="App.ico" />
|
||||||
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
|
@ -1,82 +1,82 @@
|
||||||
<Window x:Class="SourceGit.UI.About"
|
<Window x:Class="SourceGit.UI.About"
|
||||||
x:Name="me"
|
x:Name="me"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Height="280" Width="400"
|
Height="280" Width="400"
|
||||||
Title="About"
|
Title="About"
|
||||||
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
WindowStartupLocation="CenterOwner" ResizeMode="NoResize">
|
||||||
|
|
||||||
<!-- Enable WindowChrome Feature -->
|
<!-- Enable WindowChrome Feature -->
|
||||||
<WindowChrome.WindowChrome>
|
<WindowChrome.WindowChrome>
|
||||||
<WindowChrome UseAeroCaptionButtons="False" CornerRadius="0" CaptionHeight="32"/>
|
<WindowChrome UseAeroCaptionButtons="False" CornerRadius="0" CaptionHeight="32"/>
|
||||||
</WindowChrome.WindowChrome>
|
</WindowChrome.WindowChrome>
|
||||||
|
|
||||||
<!-- Window Layout -->
|
<!-- Window Layout -->
|
||||||
<Border Background="{StaticResource Brush.BG1}">
|
<Border Background="{StaticResource Brush.BG1}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="32"/>
|
<RowDefinition Height="32"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Titlebar -->
|
<!-- Titlebar -->
|
||||||
<Grid Grid.Row="0" Background="{StaticResource Brush.BG4}">
|
<Grid Grid.Row="0" Background="{StaticResource Brush.BG4}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- LOGO -->
|
<!-- LOGO -->
|
||||||
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Info}"/>
|
<Path Width="20" Height="20" Margin="6,-1,2,0" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Info}"/>
|
||||||
|
|
||||||
<!-- Title -->
|
<!-- Title -->
|
||||||
<Label Grid.Column="1" Content="ABOUT" FontWeight="Light"/>
|
<Label Grid.Column="1" Content="ABOUT" FontWeight="Light"/>
|
||||||
|
|
||||||
<!-- Close Button -->
|
<!-- Close Button -->
|
||||||
<Button Click="Quit" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
<Button Click="Quit" Width="32" Grid.Column="3" WindowChrome.IsHitTestVisibleInChrome="True">
|
||||||
<Button.Style>
|
<Button.Style>
|
||||||
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.HighlightHover}">
|
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource Style.Button.HighlightHover}">
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Background" Value="Red"/>
|
<Setter Property="Background" Value="Red"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
</Button.Style>
|
</Button.Style>
|
||||||
|
|
||||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Close}"/>
|
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Close}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Grid Grid.Row="1">
|
<Grid Grid.Row="1">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="90"/>
|
<RowDefinition Height="90"/>
|
||||||
<RowDefinition Height="40"/>
|
<RowDefinition Height="40"/>
|
||||||
<RowDefinition Height="32"/>
|
<RowDefinition Height="32"/>
|
||||||
<RowDefinition Height="24"/>
|
<RowDefinition Height="24"/>
|
||||||
<RowDefinition Height="24"/>
|
<RowDefinition Height="24"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,6,0,0">
|
<StackPanel Grid.Row="0" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0,6,0,0">
|
||||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="#FFF05133"/>
|
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Git}" Fill="#FFF05133"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<Label Grid.Row="1" Content="SourceGit - OPEN SOURCE GIT CLIENT" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" FontSize="18" FontWeight="Bold"/>
|
<Label Grid.Row="1" Content="SourceGit - OPEN SOURCE GIT CLIENT" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" FontSize="18" FontWeight="Bold"/>
|
||||||
<Label Grid.Row="2" Content="{Binding ElementName=me, Path=Version}" HorizontalContentAlignment="Center" FontSize="11"/>
|
<Label Grid.Row="2" Content="{Binding ElementName=me, Path=Version}" HorizontalContentAlignment="Center" FontSize="11"/>
|
||||||
|
|
||||||
<Label Grid.Row="3" HorizontalContentAlignment="Center" FontSize="11">
|
<Label Grid.Row="3" HorizontalContentAlignment="Center" FontSize="11">
|
||||||
<Hyperlink RequestNavigate="OpenSource" NavigateUri="https://gitee.com/sourcegit/SourceGit.git">
|
<Hyperlink RequestNavigate="OpenSource" NavigateUri="https://gitee.com/sourcegit/SourceGit.git">
|
||||||
<Run Text="https://gitee.com/sourcegit/SourceGit.git"/>
|
<Run Text="https://gitee.com/sourcegit/SourceGit.git"/>
|
||||||
</Hyperlink>
|
</Hyperlink>
|
||||||
</Label>
|
</Label>
|
||||||
|
|
||||||
<Label Grid.Row="4" Content="Copyright © sourcegit 2020. All rights reserved." HorizontalContentAlignment="Center" FontSize="11"/>
|
<Label Grid.Row="4" Content="Copyright © sourcegit 2020. All rights reserved." HorizontalContentAlignment="Center" FontSize="11"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Window>
|
</Window>
|
|
@ -24,8 +24,8 @@
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid.Resources>
|
<Grid.Resources>
|
||||||
<converters:InverseBool x:Key="InverseBool"/>
|
<converters:InverseBool x:Key="InverseBool"/>
|
||||||
</Grid.Resources>
|
</Grid.Resources>
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Apply Patch"/>
|
<Label Grid.Row="0" Grid.ColumnSpan="2" FontWeight="DemiBold" FontSize="18" Content="Apply Patch"/>
|
||||||
|
@ -68,9 +68,9 @@
|
||||||
</ComboBox.ItemTemplate>
|
</ComboBox.ItemTemplate>
|
||||||
</ComboBox>
|
</ComboBox>
|
||||||
|
|
||||||
<CheckBox Grid.Row="4" Grid.Column="1"
|
<CheckBox Grid.Row="4" Grid.Column="1"
|
||||||
x:Name="chkIgnoreWhitespace"
|
x:Name="chkIgnoreWhitespace"
|
||||||
IsChecked="True"
|
IsChecked="True"
|
||||||
Content="Ignore whitespace changes"/>
|
Content="Ignore whitespace changes"/>
|
||||||
|
|
||||||
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
<Grid Grid.Row="6" Grid.ColumnSpan="2">
|
|
@ -4,7 +4,7 @@
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
Title="Blame"
|
Title="Blame"
|
||||||
Height="600" Width="800">
|
Height="600" Width="800">
|
||||||
|
|
||||||
|
@ -152,11 +152,11 @@
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch"
|
VerticalAlignment="Stretch"
|
||||||
FontFamily="Consolas">
|
FontFamily="Consolas">
|
||||||
<RichTextBox.ContextMenu>
|
<RichTextBox.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Command="ApplicationCommands.Copy"/>
|
<MenuItem Command="ApplicationCommands.Copy"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</RichTextBox.ContextMenu>
|
</RichTextBox.ContextMenu>
|
||||||
<FlowDocument PageWidth="0"/>
|
<FlowDocument PageWidth="0"/>
|
||||||
</RichTextBox>
|
</RichTextBox>
|
||||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
|
@ -1,203 +1,203 @@
|
||||||
<UserControl x:Class="SourceGit.UI.DiffViewer"
|
<UserControl x:Class="SourceGit.UI.DiffViewer"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
FontFamily="Consolas">
|
FontFamily="Consolas">
|
||||||
<Border BorderThickness="1" BorderBrush="{StaticResource Brush.Border2}">
|
<Border BorderThickness="1" BorderBrush="{StaticResource Brush.Border2}">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="26"/>
|
<RowDefinition Height="26"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Border Grid.Row="0" BorderBrush="{StaticResource Brush.Border2}" BorderThickness="0,0,0,1">
|
<Border Grid.Row="0" BorderBrush="{StaticResource Brush.Border2}" BorderThickness="0,0,0,1">
|
||||||
<Grid Margin="8,4">
|
<Grid Margin="8,4">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<StackPanel Grid.Column="0" x:Name="orgFileNamePanel" Orientation="Horizontal">
|
<StackPanel Grid.Column="0" x:Name="orgFileNamePanel" Orientation="Horizontal">
|
||||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.File}"/>
|
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.File}"/>
|
||||||
<TextBlock x:Name="orgFileName" Margin="4,0,0,0" VerticalAlignment="Center" Foreground="{StaticResource Brush.FG}"/>
|
<TextBlock x:Name="orgFileName" Margin="4,0,0,0" VerticalAlignment="Center" Foreground="{StaticResource Brush.FG}"/>
|
||||||
<TextBlock Margin="8,0" VerticalAlignment="Center" Text="→" Foreground="{StaticResource Brush.FG}"/>
|
<TextBlock Margin="8,0" VerticalAlignment="Center" Text="→" Foreground="{StaticResource Brush.FG}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
<StackPanel Grid.Column="1" Orientation="Horizontal">
|
||||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.File}"/>
|
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.File}"/>
|
||||||
<TextBlock x:Name="fileName" Margin="4,0" VerticalAlignment="Center" Foreground="{StaticResource Brush.FG}"/>
|
<TextBlock x:Name="fileName" Margin="4,0" VerticalAlignment="Center" Foreground="{StaticResource Brush.FG}"/>
|
||||||
<Path x:Name="loading" Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Loading}"/>
|
<Path x:Name="loading" Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Loading}"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Grid.Column="2" x:Name="diffNavigation" Orientation="Horizontal" HorizontalAlignment="Right">
|
<StackPanel Grid.Column="2" x:Name="diffNavigation" Orientation="Horizontal" HorizontalAlignment="Right">
|
||||||
<Button Width="26" Click="Go2Next" ToolTip="Next Difference" Background="Transparent">
|
<Button Width="26" Click="Go2Next" ToolTip="Next Difference" Background="Transparent">
|
||||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.MoveDown}"/>
|
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.MoveDown}"/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
||||||
<Button Click="Go2Prev" ToolTip="Previous Difference" Background="Transparent">
|
<Button Click="Go2Prev" ToolTip="Previous Difference" Background="Transparent">
|
||||||
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.MoveUp}"/>
|
<Path Width="10" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.MoveUp}"/>
|
||||||
</Button>
|
</Button>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Grid x:Name="textChange" Grid.Row="1" ClipToBounds="True">
|
<Grid x:Name="textChange" Grid.Row="1" ClipToBounds="True">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="*" MinWidth="100"/>
|
<ColumnDefinition Width="*" MinWidth="100"/>
|
||||||
<ColumnDefinition Width="2"/>
|
<ColumnDefinition Width="2"/>
|
||||||
<ColumnDefinition Width="*" MinWidth="100"/>
|
<ColumnDefinition Width="*" MinWidth="100"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Grid Grid.Column="0">
|
<Grid Grid.Column="0">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="1"/>
|
<ColumnDefinition Width="1"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="leftLineNumber"
|
x:Name="leftLineNumber"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
AcceptsTab="True"
|
AcceptsTab="True"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
Padding="2,0"
|
Padding="2,0"
|
||||||
Margin="0"
|
Margin="0"
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
HorizontalContentAlignment="Right"
|
HorizontalContentAlignment="Right"
|
||||||
VerticalAlignment="Stretch"/>
|
VerticalAlignment="Stretch"/>
|
||||||
|
|
||||||
<Rectangle Grid.Column="1" Width="1" Fill="{StaticResource Brush.Border2}"/>
|
<Rectangle Grid.Column="1" Width="1" Fill="{StaticResource Brush.Border2}"/>
|
||||||
|
|
||||||
<RichTextBox
|
<RichTextBox
|
||||||
x:Name="leftText"
|
x:Name="leftText"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
AcceptsTab="True"
|
AcceptsTab="True"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="{StaticResource Brush.FG}"
|
Foreground="{StaticResource Brush.FG}"
|
||||||
Height="Auto"
|
Height="Auto"
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
HorizontalScrollBarVisibility="Auto"
|
HorizontalScrollBarVisibility="Auto"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
RenderOptions.ClearTypeHint="Enabled"
|
RenderOptions.ClearTypeHint="Enabled"
|
||||||
ScrollViewer.ScrollChanged="OnViewerScroll"
|
ScrollViewer.ScrollChanged="OnViewerScroll"
|
||||||
PreviewMouseWheel="OnViewerMouseWheel"
|
PreviewMouseWheel="OnViewerMouseWheel"
|
||||||
SizeChanged="LeftSizeChanged"
|
SizeChanged="LeftSizeChanged"
|
||||||
SelectionChanged="OnViewerSelectionChanged"
|
SelectionChanged="OnViewerSelectionChanged"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch">
|
VerticalAlignment="Stretch">
|
||||||
<RichTextBox.Document>
|
<RichTextBox.Document>
|
||||||
<FlowDocument PageWidth="0"/>
|
<FlowDocument PageWidth="0"/>
|
||||||
</RichTextBox.Document>
|
</RichTextBox.Document>
|
||||||
<RichTextBox.ContextMenu>
|
<RichTextBox.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Command="ApplicationCommands.Copy"/>
|
<MenuItem Command="ApplicationCommands.Copy"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</RichTextBox.ContextMenu>
|
</RichTextBox.ContextMenu>
|
||||||
</RichTextBox>
|
</RichTextBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<GridSplitter Grid.Column="1" Width="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{StaticResource Brush.Border2}"/>
|
<GridSplitter Grid.Column="1" Width="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Background="{StaticResource Brush.Border2}"/>
|
||||||
|
|
||||||
<Grid Grid.Column="2">
|
<Grid Grid.Column="2">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="1"/>
|
<ColumnDefinition Width="1"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<TextBox
|
<TextBox
|
||||||
x:Name="rightLineNumber"
|
x:Name="rightLineNumber"
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
AcceptsTab="True"
|
AcceptsTab="True"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Padding="2,0"
|
Padding="2,0"
|
||||||
Margin="0"
|
Margin="0"
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
HorizontalContentAlignment="Right"
|
HorizontalContentAlignment="Right"
|
||||||
VerticalAlignment="Stretch"/>
|
VerticalAlignment="Stretch"/>
|
||||||
|
|
||||||
<Rectangle Grid.Column="1" Width="1" Fill="{StaticResource Brush.Border2}"/>
|
<Rectangle Grid.Column="1" Width="1" Fill="{StaticResource Brush.Border2}"/>
|
||||||
|
|
||||||
<RichTextBox
|
<RichTextBox
|
||||||
x:Name="rightText"
|
x:Name="rightText"
|
||||||
Grid.Column="2"
|
Grid.Column="2"
|
||||||
AcceptsReturn="True"
|
AcceptsReturn="True"
|
||||||
AcceptsTab="True"
|
AcceptsTab="True"
|
||||||
IsReadOnly="True"
|
IsReadOnly="True"
|
||||||
BorderThickness="0"
|
BorderThickness="0"
|
||||||
Background="Transparent"
|
Background="Transparent"
|
||||||
Foreground="{StaticResource Brush.FG}"
|
Foreground="{StaticResource Brush.FG}"
|
||||||
Height="Auto"
|
Height="Auto"
|
||||||
FontSize="13"
|
FontSize="13"
|
||||||
HorizontalScrollBarVisibility="Auto"
|
HorizontalScrollBarVisibility="Auto"
|
||||||
VerticalScrollBarVisibility="Auto"
|
VerticalScrollBarVisibility="Auto"
|
||||||
RenderOptions.ClearTypeHint="Enabled"
|
RenderOptions.ClearTypeHint="Enabled"
|
||||||
ScrollViewer.ScrollChanged="OnViewerScroll"
|
ScrollViewer.ScrollChanged="OnViewerScroll"
|
||||||
PreviewMouseWheel="OnViewerMouseWheel"
|
PreviewMouseWheel="OnViewerMouseWheel"
|
||||||
SizeChanged="RightSizeChanged"
|
SizeChanged="RightSizeChanged"
|
||||||
SelectionChanged="OnViewerSelectionChanged"
|
SelectionChanged="OnViewerSelectionChanged"
|
||||||
HorizontalAlignment="Stretch"
|
HorizontalAlignment="Stretch"
|
||||||
VerticalAlignment="Stretch">
|
VerticalAlignment="Stretch">
|
||||||
<RichTextBox.Document>
|
<RichTextBox.Document>
|
||||||
<FlowDocument PageWidth="0"/>
|
<FlowDocument PageWidth="0"/>
|
||||||
</RichTextBox.Document>
|
</RichTextBox.Document>
|
||||||
<RichTextBox.ContextMenu>
|
<RichTextBox.ContextMenu>
|
||||||
<ContextMenu>
|
<ContextMenu>
|
||||||
<MenuItem Command="ApplicationCommands.Copy"/>
|
<MenuItem Command="ApplicationCommands.Copy"/>
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
</RichTextBox.ContextMenu>
|
</RichTextBox.ContextMenu>
|
||||||
</RichTextBox>
|
</RichTextBox>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<Border x:Name="sizeChange" Grid.Row="1" ClipToBounds="True" Background="{StaticResource Brush.BG3}" Visibility="Collapsed">
|
<Border x:Name="sizeChange" Grid.Row="1" ClipToBounds="True" Background="{StaticResource Brush.BG3}" Visibility="Collapsed">
|
||||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
|
||||||
<Label Content="BINARY DIFF" Margin="0,0,0,32" FontSize="18" FontWeight="UltraBold" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Center"/>
|
<Label Content="BINARY DIFF" Margin="0,0,0,32" FontSize="18" FontWeight="UltraBold" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Center"/>
|
||||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Binary}" Fill="{StaticResource Brush.FG2}"/>
|
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Binary}" Fill="{StaticResource Brush.FG2}"/>
|
||||||
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" TextElement.FontSize="18" TextElement.FontWeight="UltraBold">
|
<Grid Margin="0,16,0,0" HorizontalAlignment="Center" TextElement.FontSize="18" TextElement.FontWeight="UltraBold">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="32"/>
|
<RowDefinition Height="32"/>
|
||||||
<RowDefinition Height="32"/>
|
<RowDefinition Height="32"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="64"/>
|
<ColumnDefinition Width="64"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Label Grid.Row="0" Grid.Column="0" Content="OLD :" Foreground="{StaticResource Brush.FG2}"/>
|
<Label Grid.Row="0" Grid.Column="0" Content="OLD :" Foreground="{StaticResource Brush.FG2}"/>
|
||||||
<Label Grid.Row="0" Grid.Column="1" x:Name="txtOldSize" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/>
|
<Label Grid.Row="0" Grid.Column="1" x:Name="txtOldSize" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/>
|
||||||
<Label Grid.Row="1" Grid.Column="0" Content="NEW :" Foreground="{StaticResource Brush.FG2}"/>
|
<Label Grid.Row="1" Grid.Column="0" Content="NEW :" Foreground="{StaticResource Brush.FG2}"/>
|
||||||
<Label Grid.Row="1" Grid.Column="1" x:Name="txtNewSize" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/>
|
<Label Grid.Row="1" Grid.Column="1" x:Name="txtNewSize" Foreground="{StaticResource Brush.FG2}" HorizontalAlignment="Right"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border x:Name="noChange" Grid.Row="1" Background="{StaticResource Brush.BG3}" Visibility="Collapsed">
|
<Border x:Name="noChange" Grid.Row="1" Background="{StaticResource Brush.BG3}" Visibility="Collapsed">
|
||||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Opacity=".2">
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Opacity=".2">
|
||||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Check}"/>
|
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Check}"/>
|
||||||
<Label Margin="0,8,0,0" Content="NO CHANGES OR ONLY EOL CHANGES" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
<Label Margin="0,8,0,0" Content="NO CHANGES OR ONLY EOL CHANGES" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<Border x:Name="mask" Grid.RowSpan="2" Background="{StaticResource Brush.BG3}" Visibility="Collapsed">
|
<Border x:Name="mask" Grid.RowSpan="2" Background="{StaticResource Brush.BG3}" Visibility="Collapsed">
|
||||||
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Opacity=".2">
|
<StackPanel Orientation="Vertical" VerticalAlignment="Center" Opacity=".2">
|
||||||
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Diff}"/>
|
<Path Width="64" Height="64" Style="{StaticResource Style.Icon}" Data="{StaticResource Icon.Diff}"/>
|
||||||
<Label Margin="0,8,0,0" Content="SELECT FILE TO VIEW CHANGES" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
<Label Margin="0,8,0,0" Content="SELECT FILE TO VIEW CHANGES" FontSize="18" FontWeight="UltraBold" HorizontalAlignment="Center"/>
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</UserControl>
|
</UserControl>
|
|
@ -1,405 +1,405 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Documents;
|
using System.Windows.Documents;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
|
|
||||||
namespace SourceGit.UI {
|
namespace SourceGit.UI {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Viewer for git diff
|
/// Viewer for git diff
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class DiffViewer : UserControl {
|
public partial class DiffViewer : UserControl {
|
||||||
private double minWidth = 0;
|
private double minWidth = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Diff options.
|
/// Diff options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Option {
|
public class Option {
|
||||||
public string[] RevisionRange = new string[] { };
|
public string[] RevisionRange = new string[] { };
|
||||||
public string Path = "";
|
public string Path = "";
|
||||||
public string OrgPath = null;
|
public string OrgPath = null;
|
||||||
public string ExtraArgs = "";
|
public string ExtraArgs = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor
|
/// Constructor
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DiffViewer() {
|
public DiffViewer() {
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
Reset();
|
Reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reset data.
|
/// Reset data.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void Reset() {
|
public void Reset() {
|
||||||
mask.Visibility = Visibility.Visible;
|
mask.Visibility = Visibility.Visible;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Diff with options.
|
/// Diff with options.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repo"></param>
|
/// <param name="repo"></param>
|
||||||
/// <param name="opts"></param>
|
/// <param name="opts"></param>
|
||||||
public void Diff(Git.Repository repo, Option opts) {
|
public void Diff(Git.Repository repo, Option opts) {
|
||||||
SetTitle(opts.Path, opts.OrgPath);
|
SetTitle(opts.Path, opts.OrgPath);
|
||||||
|
|
||||||
loading.Visibility = Visibility.Visible;
|
loading.Visibility = Visibility.Visible;
|
||||||
mask.Visibility = Visibility.Collapsed;
|
mask.Visibility = Visibility.Collapsed;
|
||||||
textChange.Visibility = Visibility.Collapsed;
|
textChange.Visibility = Visibility.Collapsed;
|
||||||
sizeChange.Visibility = Visibility.Collapsed;
|
sizeChange.Visibility = Visibility.Collapsed;
|
||||||
noChange.Visibility = Visibility.Collapsed;
|
noChange.Visibility = Visibility.Collapsed;
|
||||||
|
|
||||||
Task.Run(() => {
|
Task.Run(() => {
|
||||||
var args = $"{opts.ExtraArgs} ";
|
var args = $"{opts.ExtraArgs} ";
|
||||||
if (opts.RevisionRange.Length > 0) args += $"{opts.RevisionRange[0]} ";
|
if (opts.RevisionRange.Length > 0) args += $"{opts.RevisionRange[0]} ";
|
||||||
if (opts.RevisionRange.Length > 1) args += $"{opts.RevisionRange[1]} -- ";
|
if (opts.RevisionRange.Length > 1) args += $"{opts.RevisionRange[1]} -- ";
|
||||||
if (!string.IsNullOrEmpty(opts.OrgPath)) args += $"\"{opts.OrgPath}\" ";
|
if (!string.IsNullOrEmpty(opts.OrgPath)) args += $"\"{opts.OrgPath}\" ";
|
||||||
args += $"\"{opts.Path}\"";
|
args += $"\"{opts.Path}\"";
|
||||||
|
|
||||||
var rs = Git.Diff.Run(repo, args);
|
var rs = Git.Diff.Run(repo, args);
|
||||||
if (rs.IsBinary) {
|
if (rs.IsBinary) {
|
||||||
SetSizeChangeData(Git.Diff.GetSizeChange(repo, opts.RevisionRange, opts.Path, opts.OrgPath));
|
SetSizeChangeData(Git.Diff.GetSizeChange(repo, opts.RevisionRange, opts.Path, opts.OrgPath));
|
||||||
} else if (rs.Blocks.Count > 0) {
|
} else if (rs.Blocks.Count > 0) {
|
||||||
SetData(rs);
|
SetData(rs);
|
||||||
} else {
|
} else {
|
||||||
SetSame();
|
SetSame();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
#region LAYOUT
|
#region LAYOUT
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show diff title
|
/// Show diff title
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="file"></param>
|
/// <param name="file"></param>
|
||||||
/// <param name="orgFile"></param>
|
/// <param name="orgFile"></param>
|
||||||
private void SetTitle(string file, string orgFile) {
|
private void SetTitle(string file, string orgFile) {
|
||||||
fileName.Text = file;
|
fileName.Text = file;
|
||||||
if (!string.IsNullOrEmpty(orgFile) && orgFile != "/dev/null") {
|
if (!string.IsNullOrEmpty(orgFile) && orgFile != "/dev/null") {
|
||||||
orgFileNamePanel.Visibility = Visibility.Visible;
|
orgFileNamePanel.Visibility = Visibility.Visible;
|
||||||
orgFileName.Text = orgFile;
|
orgFileName.Text = orgFile;
|
||||||
} else {
|
} else {
|
||||||
orgFileNamePanel.Visibility = Visibility.Collapsed;
|
orgFileNamePanel.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show size changes.
|
/// Show size changes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="bc"></param>
|
/// <param name="bc"></param>
|
||||||
private void SetSizeChangeData(Git.Diff.BinaryChange bc) {
|
private void SetSizeChangeData(Git.Diff.BinaryChange bc) {
|
||||||
Dispatcher.Invoke(() => {
|
Dispatcher.Invoke(() => {
|
||||||
loading.Visibility = Visibility.Collapsed;
|
loading.Visibility = Visibility.Collapsed;
|
||||||
sizeChange.Visibility = Visibility.Visible;
|
sizeChange.Visibility = Visibility.Visible;
|
||||||
diffNavigation.Visibility = Visibility.Collapsed;
|
diffNavigation.Visibility = Visibility.Collapsed;
|
||||||
txtNewSize.Content = $"{bc.Size} Bytes";
|
txtNewSize.Content = $"{bc.Size} Bytes";
|
||||||
txtOldSize.Content = $"{bc.PreSize} Bytes";
|
txtOldSize.Content = $"{bc.PreSize} Bytes";
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show no changes or only EOL changes.
|
/// Show no changes or only EOL changes.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void SetSame() {
|
private void SetSame() {
|
||||||
Dispatcher.Invoke(() => {
|
Dispatcher.Invoke(() => {
|
||||||
loading.Visibility = Visibility.Collapsed;
|
loading.Visibility = Visibility.Collapsed;
|
||||||
noChange.Visibility = Visibility.Visible;
|
noChange.Visibility = Visibility.Visible;
|
||||||
diffNavigation.Visibility = Visibility.Collapsed;
|
diffNavigation.Visibility = Visibility.Collapsed;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Show diff content.
|
/// Show diff content.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="rs"></param>
|
/// <param name="rs"></param>
|
||||||
private void SetData(Git.Diff.Result rs) {
|
private void SetData(Git.Diff.Result rs) {
|
||||||
Dispatcher.Invoke(() => {
|
Dispatcher.Invoke(() => {
|
||||||
loading.Visibility = Visibility.Collapsed;
|
loading.Visibility = Visibility.Collapsed;
|
||||||
textChange.Visibility = Visibility.Visible;
|
textChange.Visibility = Visibility.Visible;
|
||||||
diffNavigation.Visibility = Visibility.Visible;
|
diffNavigation.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
minWidth = Math.Max(leftText.ActualWidth, rightText.ActualWidth) - 16;
|
minWidth = Math.Max(leftText.ActualWidth, rightText.ActualWidth) - 16;
|
||||||
|
|
||||||
leftLineNumber.Text = "";
|
leftLineNumber.Text = "";
|
||||||
rightLineNumber.Text = "";
|
rightLineNumber.Text = "";
|
||||||
leftText.Document.Blocks.Clear();
|
leftText.Document.Blocks.Clear();
|
||||||
rightText.Document.Blocks.Clear();
|
rightText.Document.Blocks.Clear();
|
||||||
|
|
||||||
foreach (var b in rs.Blocks) ShowBlock(b);
|
foreach (var b in rs.Blocks) ShowBlock(b);
|
||||||
|
|
||||||
leftText.Document.PageWidth = minWidth + 16;
|
leftText.Document.PageWidth = minWidth + 16;
|
||||||
rightText.Document.PageWidth = minWidth + 16;
|
rightText.Document.PageWidth = minWidth + 16;
|
||||||
leftText.ScrollToHome();
|
leftText.ScrollToHome();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Make paragraph.
|
/// Make paragraph.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="b"></param>
|
/// <param name="b"></param>
|
||||||
private void ShowBlock(Git.Diff.Block b) {
|
private void ShowBlock(Git.Diff.Block b) {
|
||||||
var content = b.Builder.ToString();
|
var content = b.Builder.ToString();
|
||||||
|
|
||||||
Paragraph p = new Paragraph(new Run(content));
|
Paragraph p = new Paragraph(new Run(content));
|
||||||
p.Margin = new Thickness(0);
|
p.Margin = new Thickness(0);
|
||||||
p.Padding = new Thickness();
|
p.Padding = new Thickness();
|
||||||
p.LineHeight = 1;
|
p.LineHeight = 1;
|
||||||
p.Background = Brushes.Transparent;
|
p.Background = Brushes.Transparent;
|
||||||
p.Foreground = FindResource("Brush.FG") as SolidColorBrush;
|
p.Foreground = FindResource("Brush.FG") as SolidColorBrush;
|
||||||
p.FontStyle = FontStyles.Normal;
|
p.FontStyle = FontStyles.Normal;
|
||||||
p.DataContext = b;
|
p.DataContext = b;
|
||||||
|
|
||||||
switch (b.Mode) {
|
switch (b.Mode) {
|
||||||
case Git.Diff.LineMode.Normal:
|
case Git.Diff.LineMode.Normal:
|
||||||
break;
|
break;
|
||||||
case Git.Diff.LineMode.Indicator:
|
case Git.Diff.LineMode.Indicator:
|
||||||
p.Foreground = Brushes.Gray;
|
p.Foreground = Brushes.Gray;
|
||||||
p.FontStyle = FontStyles.Italic;
|
p.FontStyle = FontStyles.Italic;
|
||||||
break;
|
break;
|
||||||
case Git.Diff.LineMode.Empty:
|
case Git.Diff.LineMode.Empty:
|
||||||
p.Background = new SolidColorBrush(Color.FromArgb(40, 0, 0, 0));
|
p.Background = new SolidColorBrush(Color.FromArgb(40, 0, 0, 0));
|
||||||
break;
|
break;
|
||||||
case Git.Diff.LineMode.Added:
|
case Git.Diff.LineMode.Added:
|
||||||
p.Background = new SolidColorBrush(Color.FromArgb(60, 0, 255, 0));
|
p.Background = new SolidColorBrush(Color.FromArgb(60, 0, 255, 0));
|
||||||
break;
|
break;
|
||||||
case Git.Diff.LineMode.Deleted:
|
case Git.Diff.LineMode.Deleted:
|
||||||
p.Background = new SolidColorBrush(Color.FromArgb(60, 255, 0, 0));
|
p.Background = new SolidColorBrush(Color.FromArgb(60, 255, 0, 0));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
var formatter = new FormattedText(
|
var formatter = new FormattedText(
|
||||||
content,
|
content,
|
||||||
CultureInfo.CurrentUICulture,
|
CultureInfo.CurrentUICulture,
|
||||||
FlowDirection.LeftToRight,
|
FlowDirection.LeftToRight,
|
||||||
new Typeface(leftText.FontFamily, p.FontStyle, p.FontWeight, p.FontStretch),
|
new Typeface(leftText.FontFamily, p.FontStyle, p.FontWeight, p.FontStretch),
|
||||||
leftText.FontSize,
|
leftText.FontSize,
|
||||||
Brushes.Black,
|
Brushes.Black,
|
||||||
new NumberSubstitution(),
|
new NumberSubstitution(),
|
||||||
TextFormattingMode.Ideal);
|
TextFormattingMode.Ideal);
|
||||||
|
|
||||||
if (minWidth < formatter.Width) minWidth = formatter.Width;
|
if (minWidth < formatter.Width) minWidth = formatter.Width;
|
||||||
|
|
||||||
switch (b.Side) {
|
switch (b.Side) {
|
||||||
case Git.Diff.Side.Left:
|
case Git.Diff.Side.Left:
|
||||||
leftText.Document.Blocks.Add(p);
|
leftText.Document.Blocks.Add(p);
|
||||||
for (int i = 0; i < b.Count; i++) {
|
for (int i = 0; i < b.Count; i++) {
|
||||||
if (b.CanShowNumber) leftLineNumber.AppendText($"{i + b.LeftStart}\n");
|
if (b.CanShowNumber) leftLineNumber.AppendText($"{i + b.LeftStart}\n");
|
||||||
else leftLineNumber.AppendText("\n");
|
else leftLineNumber.AppendText("\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case Git.Diff.Side.Right:
|
case Git.Diff.Side.Right:
|
||||||
rightText.Document.Blocks.Add(p);
|
rightText.Document.Blocks.Add(p);
|
||||||
for (int i = 0; i < b.Count; i++) {
|
for (int i = 0; i < b.Count; i++) {
|
||||||
if (b.CanShowNumber) rightLineNumber.AppendText($"{i + b.RightStart}\n");
|
if (b.CanShowNumber) rightLineNumber.AppendText($"{i + b.RightStart}\n");
|
||||||
else rightLineNumber.AppendText("\n");
|
else rightLineNumber.AppendText("\n");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
leftText.Document.Blocks.Add(p);
|
leftText.Document.Blocks.Add(p);
|
||||||
|
|
||||||
var cp = new Paragraph(new Run(content));
|
var cp = new Paragraph(new Run(content));
|
||||||
cp.Margin = new Thickness(0);
|
cp.Margin = new Thickness(0);
|
||||||
cp.Padding = new Thickness();
|
cp.Padding = new Thickness();
|
||||||
cp.LineHeight = 1;
|
cp.LineHeight = 1;
|
||||||
cp.Background = p.Background;
|
cp.Background = p.Background;
|
||||||
cp.Foreground = p.Foreground;
|
cp.Foreground = p.Foreground;
|
||||||
cp.FontStyle = p.FontStyle;
|
cp.FontStyle = p.FontStyle;
|
||||||
cp.DataContext = b;
|
cp.DataContext = b;
|
||||||
rightText.Document.Blocks.Add(cp);
|
rightText.Document.Blocks.Add(cp);
|
||||||
|
|
||||||
for (int i = 0; i < b.Count; i++) {
|
for (int i = 0; i < b.Count; i++) {
|
||||||
if (b.Mode != Git.Diff.LineMode.Indicator) {
|
if (b.Mode != Git.Diff.LineMode.Indicator) {
|
||||||
leftLineNumber.AppendText($"{i + b.LeftStart}\n");
|
leftLineNumber.AppendText($"{i + b.LeftStart}\n");
|
||||||
rightLineNumber.AppendText($"{i + b.RightStart}\n");
|
rightLineNumber.AppendText($"{i + b.RightStart}\n");
|
||||||
} else {
|
} else {
|
||||||
leftLineNumber.AppendText("\n");
|
leftLineNumber.AppendText("\n");
|
||||||
rightLineNumber.AppendText("\n");
|
rightLineNumber.AppendText("\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region EVENTS
|
#region EVENTS
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Sync scroll both sides.
|
/// Sync scroll both sides.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void OnViewerScroll(object sender, ScrollChangedEventArgs e) {
|
private void OnViewerScroll(object sender, ScrollChangedEventArgs e) {
|
||||||
if (e.VerticalChange != 0) {
|
if (e.VerticalChange != 0) {
|
||||||
if (leftText.VerticalOffset != e.VerticalOffset) {
|
if (leftText.VerticalOffset != e.VerticalOffset) {
|
||||||
leftText.ScrollToVerticalOffset(e.VerticalOffset);
|
leftText.ScrollToVerticalOffset(e.VerticalOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rightText.VerticalOffset != e.VerticalOffset) {
|
if (rightText.VerticalOffset != e.VerticalOffset) {
|
||||||
rightText.ScrollToVerticalOffset(e.VerticalOffset);
|
rightText.ScrollToVerticalOffset(e.VerticalOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
leftLineNumber.Margin = new Thickness(0, -e.VerticalOffset, 0, 0);
|
leftLineNumber.Margin = new Thickness(0, -e.VerticalOffset, 0, 0);
|
||||||
rightLineNumber.Margin = new Thickness(0, -e.VerticalOffset, 0, 0);
|
rightLineNumber.Margin = new Thickness(0, -e.VerticalOffset, 0, 0);
|
||||||
} else {
|
} else {
|
||||||
if (leftText.HorizontalOffset != e.HorizontalOffset) {
|
if (leftText.HorizontalOffset != e.HorizontalOffset) {
|
||||||
leftText.ScrollToHorizontalOffset(e.HorizontalOffset);
|
leftText.ScrollToHorizontalOffset(e.HorizontalOffset);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rightText.HorizontalOffset != e.HorizontalOffset) {
|
if (rightText.HorizontalOffset != e.HorizontalOffset) {
|
||||||
rightText.ScrollToHorizontalOffset(e.HorizontalOffset);
|
rightText.ScrollToHorizontalOffset(e.HorizontalOffset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Scroll using mouse wheel.
|
/// Scroll using mouse wheel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void OnViewerMouseWheel(object sender, MouseWheelEventArgs e) {
|
private void OnViewerMouseWheel(object sender, MouseWheelEventArgs e) {
|
||||||
var text = sender as RichTextBox;
|
var text = sender as RichTextBox;
|
||||||
if (text == null) return;
|
if (text == null) return;
|
||||||
|
|
||||||
if (e.Delta > 0) {
|
if (e.Delta > 0) {
|
||||||
text.LineUp();
|
text.LineUp();
|
||||||
} else {
|
} else {
|
||||||
text.LineDown();
|
text.LineDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fix document size for left side.
|
/// Fix document size for left side.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void LeftSizeChanged(object sender, SizeChangedEventArgs e) {
|
private void LeftSizeChanged(object sender, SizeChangedEventArgs e) {
|
||||||
if (leftText.Document.PageWidth < leftText.ActualWidth) {
|
if (leftText.Document.PageWidth < leftText.ActualWidth) {
|
||||||
leftText.Document.PageWidth = leftText.ActualWidth;
|
leftText.Document.PageWidth = leftText.ActualWidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fix document size for right side.
|
/// Fix document size for right side.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void RightSizeChanged(object sender, SizeChangedEventArgs e) {
|
private void RightSizeChanged(object sender, SizeChangedEventArgs e) {
|
||||||
if (rightText.Document.PageWidth < rightText.ActualWidth) {
|
if (rightText.Document.PageWidth < rightText.ActualWidth) {
|
||||||
rightText.Document.PageWidth = rightText.ActualWidth;
|
rightText.Document.PageWidth = rightText.ActualWidth;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Auto scroll when selection changed.
|
/// Auto scroll when selection changed.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void OnViewerSelectionChanged(object sender, RoutedEventArgs e) {
|
private void OnViewerSelectionChanged(object sender, RoutedEventArgs e) {
|
||||||
var doc = sender as RichTextBox;
|
var doc = sender as RichTextBox;
|
||||||
if (doc == null || doc.IsFocused == false) return;
|
if (doc == null || doc.IsFocused == false) return;
|
||||||
|
|
||||||
if (Mouse.LeftButton == MouseButtonState.Pressed && !doc.Selection.IsEmpty) {
|
if (Mouse.LeftButton == MouseButtonState.Pressed && !doc.Selection.IsEmpty) {
|
||||||
var p = Mouse.GetPosition(doc);
|
var p = Mouse.GetPosition(doc);
|
||||||
|
|
||||||
if (p.X <= 8) {
|
if (p.X <= 8) {
|
||||||
doc.LineLeft();
|
doc.LineLeft();
|
||||||
} else if (p.X >= doc.ActualWidth - 8) {
|
} else if (p.X >= doc.ActualWidth - 8) {
|
||||||
doc.LineRight();
|
doc.LineRight();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p.Y <= 8) {
|
if (p.Y <= 8) {
|
||||||
doc.LineUp();
|
doc.LineUp();
|
||||||
} else if (p.Y >= doc.ActualHeight - 8) {
|
} else if (p.Y >= doc.ActualHeight - 8) {
|
||||||
doc.LineDown();
|
doc.LineDown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Go to next difference.
|
/// Go to next difference.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void Go2Next(object sender, RoutedEventArgs e) {
|
private void Go2Next(object sender, RoutedEventArgs e) {
|
||||||
Paragraph next = null;
|
Paragraph next = null;
|
||||||
double minTop = 0;
|
double minTop = 0;
|
||||||
|
|
||||||
foreach (var p in leftText.Document.Blocks) {
|
foreach (var p in leftText.Document.Blocks) {
|
||||||
var rect = p.ContentStart.GetCharacterRect(LogicalDirection.Forward);
|
var rect = p.ContentStart.GetCharacterRect(LogicalDirection.Forward);
|
||||||
var block = p.DataContext as Git.Diff.Block;
|
var block = p.DataContext as Git.Diff.Block;
|
||||||
if (rect.Top > 17 && block.IsLeftDelete) {
|
if (rect.Top > 17 && block.IsLeftDelete) {
|
||||||
next = p as Paragraph;
|
next = p as Paragraph;
|
||||||
minTop = rect.Top;
|
minTop = rect.Top;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var p in rightText.Document.Blocks) {
|
foreach (var p in rightText.Document.Blocks) {
|
||||||
var rect = p.ContentStart.GetCharacterRect(LogicalDirection.Forward);
|
var rect = p.ContentStart.GetCharacterRect(LogicalDirection.Forward);
|
||||||
var block = p.DataContext as Git.Diff.Block;
|
var block = p.DataContext as Git.Diff.Block;
|
||||||
if (rect.Top > 17 && block.IsRightAdded) {
|
if (rect.Top > 17 && block.IsRightAdded) {
|
||||||
if (next == null || minTop > rect.Top) {
|
if (next == null || minTop > rect.Top) {
|
||||||
next = p as Paragraph;
|
next = p as Paragraph;
|
||||||
minTop = rect.Top;
|
minTop = rect.Top;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (next != null) {
|
if (next != null) {
|
||||||
rightText.ScrollToVerticalOffset(rightText.VerticalOffset + minTop - 16);
|
rightText.ScrollToVerticalOffset(rightText.VerticalOffset + minTop - 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Go to previous difference.
|
/// Go to previous difference.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void Go2Prev(object sender, RoutedEventArgs e) {
|
private void Go2Prev(object sender, RoutedEventArgs e) {
|
||||||
Paragraph next = null;
|
Paragraph next = null;
|
||||||
double maxTop = 0;
|
double maxTop = 0;
|
||||||
|
|
||||||
var p = leftText.Document.Blocks.LastBlock as Paragraph;
|
var p = leftText.Document.Blocks.LastBlock as Paragraph;
|
||||||
do {
|
do {
|
||||||
var rect = p.ContentStart.GetCharacterRect(LogicalDirection.Forward);
|
var rect = p.ContentStart.GetCharacterRect(LogicalDirection.Forward);
|
||||||
var block = p.DataContext as Git.Diff.Block;
|
var block = p.DataContext as Git.Diff.Block;
|
||||||
if (rect.Top < 15 && block.IsLeftDelete) {
|
if (rect.Top < 15 && block.IsLeftDelete) {
|
||||||
next = p;
|
next = p;
|
||||||
maxTop = rect.Top;
|
maxTop = rect.Top;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = p.PreviousBlock as Paragraph;
|
p = p.PreviousBlock as Paragraph;
|
||||||
} while (p != null);
|
} while (p != null);
|
||||||
|
|
||||||
p = rightText.Document.Blocks.LastBlock as Paragraph;
|
p = rightText.Document.Blocks.LastBlock as Paragraph;
|
||||||
do {
|
do {
|
||||||
var rect = p.ContentStart.GetCharacterRect(LogicalDirection.Forward);
|
var rect = p.ContentStart.GetCharacterRect(LogicalDirection.Forward);
|
||||||
var block = p.DataContext as Git.Diff.Block;
|
var block = p.DataContext as Git.Diff.Block;
|
||||||
if (rect.Top < 15 && block.IsRightAdded) {
|
if (rect.Top < 15 && block.IsRightAdded) {
|
||||||
if (next == null || maxTop < rect.Top) {
|
if (next == null || maxTop < rect.Top) {
|
||||||
next = p;
|
next = p;
|
||||||
maxTop = rect.Top;
|
maxTop = rect.Top;
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
p = p.PreviousBlock as Paragraph;
|
p = p.PreviousBlock as Paragraph;
|
||||||
} while (p != null);
|
} while (p != null);
|
||||||
|
|
||||||
if (next != null) {
|
if (next != null) {
|
||||||
rightText.ScrollToVerticalOffset(rightText.VerticalOffset + maxTop - 16);
|
rightText.ScrollToVerticalOffset(rightText.VerticalOffset + maxTop - 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,120 +1,120 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Animation;
|
using System.Windows.Media.Animation;
|
||||||
using System.Windows.Navigation;
|
using System.Windows.Navigation;
|
||||||
|
|
||||||
namespace SourceGit.UI {
|
namespace SourceGit.UI {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// File histories panel.
|
/// File histories panel.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class FileHistories : Window {
|
public partial class FileHistories : Window {
|
||||||
private Git.Repository repo = null;
|
private Git.Repository repo = null;
|
||||||
private string file = null;
|
private string file = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Constructor.
|
/// Constructor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="repo"></param>
|
/// <param name="repo"></param>
|
||||||
/// <param name="file"></param>
|
/// <param name="file"></param>
|
||||||
public FileHistories(Git.Repository repo, string file) {
|
public FileHistories(Git.Repository repo, string file) {
|
||||||
this.repo = repo;
|
this.repo = repo;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
// Move to center
|
// Move to center
|
||||||
var parent = App.Current.MainWindow;
|
var parent = App.Current.MainWindow;
|
||||||
Left = parent.Left + (parent.Width - Width) * 0.5;
|
Left = parent.Left + (parent.Width - Width) * 0.5;
|
||||||
Top = parent.Top + (parent.Height - Height) * 0.5;
|
Top = parent.Top + (parent.Height - Height) * 0.5;
|
||||||
|
|
||||||
// Show loading
|
// Show loading
|
||||||
DoubleAnimation anim = new DoubleAnimation(0, 360, TimeSpan.FromSeconds(1));
|
DoubleAnimation anim = new DoubleAnimation(0, 360, TimeSpan.FromSeconds(1));
|
||||||
anim.RepeatBehavior = RepeatBehavior.Forever;
|
anim.RepeatBehavior = RepeatBehavior.Forever;
|
||||||
loading.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, anim);
|
loading.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, anim);
|
||||||
loading.Visibility = Visibility.Visible;
|
loading.Visibility = Visibility.Visible;
|
||||||
|
|
||||||
// Load commits
|
// Load commits
|
||||||
Task.Run(() => {
|
Task.Run(() => {
|
||||||
var commits = repo.Commits($"-n 10000 -- \"{file}\"");
|
var commits = repo.Commits($"-n 10000 -- \"{file}\"");
|
||||||
Dispatcher.Invoke(() => {
|
Dispatcher.Invoke(() => {
|
||||||
commitList.ItemsSource = commits;
|
commitList.ItemsSource = commits;
|
||||||
commitList.SelectedIndex = 0;
|
commitList.SelectedIndex = 0;
|
||||||
|
|
||||||
loading.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null);
|
loading.RenderTransform.BeginAnimation(RotateTransform.AngleProperty, null);
|
||||||
loading.Visibility = Visibility.Collapsed;
|
loading.Visibility = Visibility.Collapsed;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Logo click
|
/// Logo click
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void LogoMouseButtonDown(object sender, MouseButtonEventArgs e) {
|
private void LogoMouseButtonDown(object sender, MouseButtonEventArgs e) {
|
||||||
var element = e.OriginalSource as FrameworkElement;
|
var element = e.OriginalSource as FrameworkElement;
|
||||||
if (element == null) return;
|
if (element == null) return;
|
||||||
|
|
||||||
var pos = PointToScreen(new Point(0, 33));
|
var pos = PointToScreen(new Point(0, 33));
|
||||||
SystemCommands.ShowSystemMenu(this, pos);
|
SystemCommands.ShowSystemMenu(this, pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Minimize
|
/// Minimize
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Minimize(object sender, RoutedEventArgs e) {
|
private void Minimize(object sender, RoutedEventArgs e) {
|
||||||
SystemCommands.MinimizeWindow(this);
|
SystemCommands.MinimizeWindow(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Maximize/Restore
|
/// Maximize/Restore
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void MaximizeOrRestore(object sender, RoutedEventArgs e) {
|
private void MaximizeOrRestore(object sender, RoutedEventArgs e) {
|
||||||
if (WindowState == WindowState.Normal) {
|
if (WindowState == WindowState.Normal) {
|
||||||
SystemCommands.MaximizeWindow(this);
|
SystemCommands.MaximizeWindow(this);
|
||||||
} else {
|
} else {
|
||||||
SystemCommands.RestoreWindow(this);
|
SystemCommands.RestoreWindow(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Quit
|
/// Quit
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void Quit(object sender, RoutedEventArgs e) {
|
private void Quit(object sender, RoutedEventArgs e) {
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Commit selection change event.
|
/// Commit selection change event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void CommitSelectionChanged(object sender, SelectionChangedEventArgs e) {
|
private void CommitSelectionChanged(object sender, SelectionChangedEventArgs e) {
|
||||||
if (e.AddedItems.Count != 1) return;
|
if (e.AddedItems.Count != 1) return;
|
||||||
|
|
||||||
var commit = e.AddedItems[0] as Git.Commit;
|
var commit = e.AddedItems[0] as Git.Commit;
|
||||||
var start = $"{commit.SHA}^";
|
var start = $"{commit.SHA}^";
|
||||||
if (commit.Parents.Count == 0) start = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
if (commit.Parents.Count == 0) start = "4b825dc642cb6eb9a060e54bf8d69288fbee4904";
|
||||||
|
|
||||||
diff.Diff(repo, new DiffViewer.Option() {
|
diff.Diff(repo, new DiffViewer.Option() {
|
||||||
RevisionRange = new string[] { start, commit.SHA },
|
RevisionRange = new string[] { start, commit.SHA },
|
||||||
Path = file
|
Path = file
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Navigate to given string
|
/// Navigate to given string
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="sender"></param>
|
/// <param name="sender"></param>
|
||||||
/// <param name="e"></param>
|
/// <param name="e"></param>
|
||||||
private void NavigateToCommit(object sender, RequestNavigateEventArgs e) {
|
private void NavigateToCommit(object sender, RequestNavigateEventArgs e) {
|
||||||
repo.OnNavigateCommit?.Invoke(e.Uri.OriginalString);
|
repo.OnNavigateCommit?.Invoke(e.Uri.OriginalString);
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue