mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-12-23 20:47:25 -08:00
feature<WorkingCopy>: gitee issue #I54W26 - toggle untracked files in working copy changes
This commit is contained in:
parent
b04c94ccc1
commit
35235df7bc
10 changed files with 3432 additions and 3370 deletions
|
@ -1,66 +1,67 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
|
|
||||||
namespace SourceGit.Commands {
|
namespace SourceGit.Commands {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 取得本地工作副本变更
|
/// 取得本地工作副本变更
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class LocalChanges : Command {
|
public class LocalChanges : Command {
|
||||||
private static readonly Regex REG_FORMAT = new Regex(@"^(\s?[\w\?]{1,4})\s+(.+)$");
|
private static readonly Regex REG_FORMAT = new Regex(@"^(\s?[\w\?]{1,4})\s+(.+)$");
|
||||||
private List<Models.Change> changes = new List<Models.Change>();
|
private static readonly string[] UNTRACKED = new string[] { "no", "all" };
|
||||||
|
private List<Models.Change> changes = new List<Models.Change>();
|
||||||
public LocalChanges(string path) {
|
|
||||||
Cwd = path;
|
public LocalChanges(string path, bool includeUntracked = true) {
|
||||||
Args = "status -uall --ignore-submodules=dirty --porcelain";
|
Cwd = path;
|
||||||
}
|
Args = $"status -u{UNTRACKED[includeUntracked ? 1 : 0]} --ignore-submodules=dirty --porcelain";
|
||||||
|
}
|
||||||
public List<Models.Change> Result() {
|
|
||||||
Exec();
|
public List<Models.Change> Result() {
|
||||||
return changes;
|
Exec();
|
||||||
}
|
return changes;
|
||||||
|
}
|
||||||
public override void OnReadline(string line) {
|
|
||||||
var match = REG_FORMAT.Match(line);
|
public override void OnReadline(string line) {
|
||||||
if (!match.Success) return;
|
var match = REG_FORMAT.Match(line);
|
||||||
if (line.EndsWith("/", StringComparison.Ordinal)) return; // Ignore changes with git-worktree
|
if (!match.Success) return;
|
||||||
|
if (line.EndsWith("/", StringComparison.Ordinal)) return; // Ignore changes with git-worktree
|
||||||
var change = new Models.Change() { Path = match.Groups[2].Value };
|
|
||||||
var status = match.Groups[1].Value;
|
var change = new Models.Change() { Path = match.Groups[2].Value };
|
||||||
|
var status = match.Groups[1].Value;
|
||||||
switch (status) {
|
|
||||||
case " M": change.Set(Models.Change.Status.None, Models.Change.Status.Modified); break;
|
switch (status) {
|
||||||
case " A": change.Set(Models.Change.Status.None, Models.Change.Status.Added); break;
|
case " M": change.Set(Models.Change.Status.None, Models.Change.Status.Modified); break;
|
||||||
case " D": change.Set(Models.Change.Status.None, Models.Change.Status.Deleted); break;
|
case " A": change.Set(Models.Change.Status.None, Models.Change.Status.Added); break;
|
||||||
case " R": change.Set(Models.Change.Status.None, Models.Change.Status.Renamed); break;
|
case " D": change.Set(Models.Change.Status.None, Models.Change.Status.Deleted); break;
|
||||||
case " C": change.Set(Models.Change.Status.None, Models.Change.Status.Copied); break;
|
case " R": change.Set(Models.Change.Status.None, Models.Change.Status.Renamed); break;
|
||||||
case "M": change.Set(Models.Change.Status.Modified, Models.Change.Status.None); break;
|
case " C": change.Set(Models.Change.Status.None, Models.Change.Status.Copied); break;
|
||||||
case "MM": change.Set(Models.Change.Status.Modified, Models.Change.Status.Modified); break;
|
case "M": change.Set(Models.Change.Status.Modified, Models.Change.Status.None); break;
|
||||||
case "MD": change.Set(Models.Change.Status.Modified, Models.Change.Status.Deleted); break;
|
case "MM": change.Set(Models.Change.Status.Modified, Models.Change.Status.Modified); break;
|
||||||
case "A": change.Set(Models.Change.Status.Added, Models.Change.Status.None); break;
|
case "MD": change.Set(Models.Change.Status.Modified, Models.Change.Status.Deleted); break;
|
||||||
case "AM": change.Set(Models.Change.Status.Added, Models.Change.Status.Modified); break;
|
case "A": change.Set(Models.Change.Status.Added, Models.Change.Status.None); break;
|
||||||
case "AD": change.Set(Models.Change.Status.Added, Models.Change.Status.Deleted); break;
|
case "AM": change.Set(Models.Change.Status.Added, Models.Change.Status.Modified); break;
|
||||||
case "D": change.Set(Models.Change.Status.Deleted, Models.Change.Status.None); break;
|
case "AD": change.Set(Models.Change.Status.Added, Models.Change.Status.Deleted); break;
|
||||||
case "R": change.Set(Models.Change.Status.Renamed, Models.Change.Status.None); break;
|
case "D": change.Set(Models.Change.Status.Deleted, Models.Change.Status.None); break;
|
||||||
case "RM": change.Set(Models.Change.Status.Renamed, Models.Change.Status.Modified); break;
|
case "R": change.Set(Models.Change.Status.Renamed, Models.Change.Status.None); break;
|
||||||
case "RD": change.Set(Models.Change.Status.Renamed, Models.Change.Status.Deleted); break;
|
case "RM": change.Set(Models.Change.Status.Renamed, Models.Change.Status.Modified); break;
|
||||||
case "C": change.Set(Models.Change.Status.Copied, Models.Change.Status.None); break;
|
case "RD": change.Set(Models.Change.Status.Renamed, Models.Change.Status.Deleted); break;
|
||||||
case "CM": change.Set(Models.Change.Status.Copied, Models.Change.Status.Modified); break;
|
case "C": change.Set(Models.Change.Status.Copied, Models.Change.Status.None); break;
|
||||||
case "CD": change.Set(Models.Change.Status.Copied, Models.Change.Status.Deleted); break;
|
case "CM": change.Set(Models.Change.Status.Copied, Models.Change.Status.Modified); break;
|
||||||
case "DR": change.Set(Models.Change.Status.Deleted, Models.Change.Status.Renamed); break;
|
case "CD": change.Set(Models.Change.Status.Copied, Models.Change.Status.Deleted); break;
|
||||||
case "DC": change.Set(Models.Change.Status.Deleted, Models.Change.Status.Copied); break;
|
case "DR": change.Set(Models.Change.Status.Deleted, Models.Change.Status.Renamed); break;
|
||||||
case "DD": change.Set(Models.Change.Status.Deleted, Models.Change.Status.Deleted); break;
|
case "DC": change.Set(Models.Change.Status.Deleted, Models.Change.Status.Copied); break;
|
||||||
case "AU": change.Set(Models.Change.Status.Added, Models.Change.Status.Unmerged); break;
|
case "DD": change.Set(Models.Change.Status.Deleted, Models.Change.Status.Deleted); break;
|
||||||
case "UD": change.Set(Models.Change.Status.Unmerged, Models.Change.Status.Deleted); break;
|
case "AU": change.Set(Models.Change.Status.Added, Models.Change.Status.Unmerged); break;
|
||||||
case "UA": change.Set(Models.Change.Status.Unmerged, Models.Change.Status.Added); break;
|
case "UD": change.Set(Models.Change.Status.Unmerged, Models.Change.Status.Deleted); break;
|
||||||
case "DU": change.Set(Models.Change.Status.Deleted, Models.Change.Status.Unmerged); break;
|
case "UA": change.Set(Models.Change.Status.Unmerged, Models.Change.Status.Added); break;
|
||||||
case "AA": change.Set(Models.Change.Status.Added, Models.Change.Status.Added); break;
|
case "DU": change.Set(Models.Change.Status.Deleted, Models.Change.Status.Unmerged); break;
|
||||||
case "UU": change.Set(Models.Change.Status.Unmerged, Models.Change.Status.Unmerged); break;
|
case "AA": change.Set(Models.Change.Status.Added, Models.Change.Status.Added); break;
|
||||||
case "??": change.Set(Models.Change.Status.Untracked, Models.Change.Status.Untracked); break;
|
case "UU": change.Set(Models.Change.Status.Unmerged, Models.Change.Status.Unmerged); break;
|
||||||
default: return;
|
case "??": change.Set(Models.Change.Status.Untracked, Models.Change.Status.Untracked); break;
|
||||||
}
|
default: return;
|
||||||
|
}
|
||||||
changes.Add(change);
|
|
||||||
}
|
changes.Add(change);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,387 +1,392 @@
|
||||||
using Microsoft.Win32;
|
using Microsoft.Win32;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text.Json;
|
using System.Text.Json;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
|
|
||||||
namespace SourceGit.Models {
|
namespace SourceGit.Models {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 程序配置
|
/// 程序配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class Preference {
|
public class Preference {
|
||||||
private static readonly string SAVE_PATH = Path.Combine(
|
private static readonly string SAVE_PATH = Path.Combine(
|
||||||
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData),
|
||||||
"SourceGit",
|
"SourceGit",
|
||||||
"preference_v4.json");
|
"preference_v4.json");
|
||||||
private static Preference instance = null;
|
private static Preference instance = null;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 通用配置
|
/// 通用配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GeneralInfo {
|
public class GeneralInfo {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 显示语言
|
/// 显示语言
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Locale { get; set; } = "en_US";
|
public string Locale { get; set; } = "en_US";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 系统字体
|
/// 系统字体
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FontFamilyWindowSetting { get; set; } = "Microsoft YaHei UI";
|
public string FontFamilyWindowSetting { get; set; } = "Microsoft YaHei UI";
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public string FontFamilyWindow {
|
public string FontFamilyWindow {
|
||||||
get => FontFamilyWindowSetting + ",Microsoft YaHei UI";
|
get => FontFamilyWindowSetting + ",Microsoft YaHei UI";
|
||||||
set => FontFamilyWindowSetting = value;
|
set => FontFamilyWindowSetting = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 用户字体(提交列表、提交日志、差异比较等)
|
/// 用户字体(提交列表、提交日志、差异比较等)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FontFamilyContentSetting { get; set; } = "Consolas";
|
public string FontFamilyContentSetting { get; set; } = "Consolas";
|
||||||
|
|
||||||
[JsonIgnore] public string FontFamilyContent {
|
[JsonIgnore] public string FontFamilyContent {
|
||||||
get => FontFamilyContentSetting + ",Microsoft YaHei UI";
|
get => FontFamilyContentSetting + ",Microsoft YaHei UI";
|
||||||
set => FontFamilyContentSetting = value;
|
set => FontFamilyContentSetting = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 头像服务器
|
/// 头像服务器
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string AvatarServer { get; set; } = "https://www.gravatar.com/avatar/";
|
public string AvatarServer { get; set; } = "https://www.gravatar.com/avatar/";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否启用深色主题
|
/// 是否启用深色主题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool UseDarkTheme { get; set; } = true;
|
public bool UseDarkTheme { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 启用更新检测
|
/// 启用更新检测
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool CheckForUpdate { get; set; } = true;
|
public bool CheckForUpdate { get; set; } = true;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上一次检测的时间(用于控制每天仅第一次启动软件时,检测)
|
/// 上一次检测的时间(用于控制每天仅第一次启动软件时,检测)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int LastCheckDay { get; set; } = 0;
|
public int LastCheckDay { get; set; } = 0;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否尝试使用 Windows Terminal 打开终端
|
/// 是否尝试使用 Windows Terminal 打开终端
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool UseWindowsTerminal { get; set; } = false;
|
public bool UseWindowsTerminal { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Git配置
|
/// Git配置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GitInfo {
|
public class GitInfo {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// git.exe所在路径
|
/// git.exe所在路径
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Path { get; set; }
|
public string Path { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 默认克隆路径
|
/// 默认克隆路径
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string DefaultCloneDir { get; set; }
|
public string DefaultCloneDir { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 启用自动拉取远程变更(每10分钟一次)
|
/// 启用自动拉取远程变更(每10分钟一次)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool AutoFetchRemotes { get; set; } = true;
|
public bool AutoFetchRemotes { get; set; } = true;
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 在本地变更列表中显示未跟踪文件
|
||||||
/// 外部合并工具配置
|
/// </summary>
|
||||||
/// </summary>
|
public bool IncludeUntrackedInWC { get; set; } = true;
|
||||||
public class MergeToolInfo {
|
}
|
||||||
/// <summary>
|
|
||||||
/// 合并工具类型
|
/// <summary>
|
||||||
/// </summary>
|
/// 外部合并工具配置
|
||||||
public int Type { get; set; } = 0;
|
/// </summary>
|
||||||
|
public class MergeToolInfo {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 合并工具可执行文件路径
|
/// 合并工具类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Path { get; set; } = "";
|
public int Type { get; set; } = 0;
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 合并工具可执行文件路径
|
||||||
/// 使用设置
|
/// </summary>
|
||||||
/// </summary>
|
public string Path { get; set; } = "";
|
||||||
public class WindowInfo {
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最近一次设置的宽度
|
/// 使用设置
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double Width { get; set; } = 800;
|
public class WindowInfo {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最近一次设置的高度
|
/// 最近一次设置的宽度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public double Height { get; set; } = 600;
|
public double Width { get; set; } = 800;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存上次关闭时是否最大化中
|
/// 最近一次设置的高度
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public WindowState State { get; set; } = WindowState.Normal;
|
public double Height { get; set; } = 600;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 将提交信息面板与提交记录左右排布
|
/// 保存上次关闭时是否最大化中
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool MoveCommitInfoRight { get; set; } = false;
|
public WindowState State { get; set; } = WindowState.Normal;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 使用合并Diff视图
|
/// 将提交信息面板与提交记录左右排布
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool UseCombinedDiff { get; set; } = false;
|
public bool MoveCommitInfoRight { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 未暂存视图中变更显示方式
|
/// 使用合并Diff视图
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Change.DisplayMode ChangeInUnstaged { get; set; } = Change.DisplayMode.Tree;
|
public bool UseCombinedDiff { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 暂存视图中变更显示方式
|
/// 未暂存视图中变更显示方式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Change.DisplayMode ChangeInStaged { get; set; } = Change.DisplayMode.Tree;
|
public Change.DisplayMode ChangeInUnstaged { get; set; } = Change.DisplayMode.Tree;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 提交信息视图中变更显示方式
|
/// 暂存视图中变更显示方式
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Change.DisplayMode ChangeInCommitInfo { get; set; } = Change.DisplayMode.Tree;
|
public Change.DisplayMode ChangeInStaged { get; set; } = Change.DisplayMode.Tree;
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 提交信息视图中变更显示方式
|
||||||
/// 恢复上次打开的窗口
|
/// </summary>
|
||||||
/// </summary>
|
public Change.DisplayMode ChangeInCommitInfo { get; set; } = Change.DisplayMode.Tree;
|
||||||
public class RestoreTabs {
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否开启该功能
|
/// 恢复上次打开的窗口
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsEnabled { get; set; } = false;
|
public class RestoreTabs {
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 上次打开的仓库
|
/// 是否开启该功能
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public List<string> Opened { get; set; } = new List<string>();
|
public bool IsEnabled { get; set; } = false;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 最后浏览的仓库
|
/// 上次打开的仓库
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string Actived { get; set; } = null;
|
public List<string> Opened { get; set; } = new List<string>();
|
||||||
}
|
|
||||||
|
/// <summary>
|
||||||
/// <summary>
|
/// 最后浏览的仓库
|
||||||
/// 全局配置
|
/// </summary>
|
||||||
/// </summary>
|
public string Actived { get; set; } = null;
|
||||||
[JsonIgnore]
|
}
|
||||||
public static Preference Instance {
|
|
||||||
get {
|
/// <summary>
|
||||||
if (instance == null) return Load();
|
/// 全局配置
|
||||||
return instance;
|
/// </summary>
|
||||||
}
|
[JsonIgnore]
|
||||||
}
|
public static Preference Instance {
|
||||||
|
get {
|
||||||
/// <summary>
|
if (instance == null) return Load();
|
||||||
/// 检测配置是否正常
|
return instance;
|
||||||
/// </summary>
|
}
|
||||||
[JsonIgnore]
|
}
|
||||||
public bool IsReady {
|
|
||||||
get => File.Exists(Git.Path) && new Commands.Version().Query() != null;
|
/// <summary>
|
||||||
}
|
/// 检测配置是否正常
|
||||||
|
/// </summary>
|
||||||
#region DATA
|
[JsonIgnore]
|
||||||
public GeneralInfo General { get; set; } = new GeneralInfo();
|
public bool IsReady {
|
||||||
public GitInfo Git { get; set; } = new GitInfo();
|
get => File.Exists(Git.Path) && new Commands.Version().Query() != null;
|
||||||
public MergeToolInfo MergeTool { get; set; } = new MergeToolInfo();
|
}
|
||||||
public WindowInfo Window { get; set; } = new WindowInfo();
|
|
||||||
public List<Group> Groups { get; set; } = new List<Group>();
|
#region DATA
|
||||||
public List<Repository> Repositories { get; set; } = new List<Repository>();
|
public GeneralInfo General { get; set; } = new GeneralInfo();
|
||||||
public List<string> Recents { get; set; } = new List<string>();
|
public GitInfo Git { get; set; } = new GitInfo();
|
||||||
public RestoreTabs Restore { get; set; } = new RestoreTabs();
|
public MergeToolInfo MergeTool { get; set; } = new MergeToolInfo();
|
||||||
#endregion
|
public WindowInfo Window { get; set; } = new WindowInfo();
|
||||||
|
public List<Group> Groups { get; set; } = new List<Group>();
|
||||||
#region LOAD_SAVE
|
public List<Repository> Repositories { get; set; } = new List<Repository>();
|
||||||
public static Preference Load() {
|
public List<string> Recents { get; set; } = new List<string>();
|
||||||
if (!File.Exists(SAVE_PATH)) {
|
public RestoreTabs Restore { get; set; } = new RestoreTabs();
|
||||||
instance = new Preference();
|
#endregion
|
||||||
} else {
|
|
||||||
try {
|
#region LOAD_SAVE
|
||||||
instance = JsonSerializer.Deserialize<Preference>(File.ReadAllText(SAVE_PATH));
|
public static Preference Load() {
|
||||||
} catch {
|
if (!File.Exists(SAVE_PATH)) {
|
||||||
instance = new Preference();
|
instance = new Preference();
|
||||||
}
|
} else {
|
||||||
}
|
try {
|
||||||
|
instance = JsonSerializer.Deserialize<Preference>(File.ReadAllText(SAVE_PATH));
|
||||||
if (!instance.IsReady) {
|
} catch {
|
||||||
var reg = RegistryKey.OpenBaseKey(
|
instance = new Preference();
|
||||||
RegistryHive.LocalMachine,
|
}
|
||||||
Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32);
|
}
|
||||||
var git = reg.OpenSubKey("SOFTWARE\\GitForWindows");
|
|
||||||
if (git != null) {
|
if (!instance.IsReady) {
|
||||||
instance.Git.Path = Path.Combine(git.GetValue("InstallPath") as string, "bin", "git.exe");
|
var reg = RegistryKey.OpenBaseKey(
|
||||||
}
|
RegistryHive.LocalMachine,
|
||||||
}
|
Environment.Is64BitOperatingSystem ? RegistryView.Registry64 : RegistryView.Registry32);
|
||||||
|
var git = reg.OpenSubKey("SOFTWARE\\GitForWindows");
|
||||||
return instance;
|
if (git != null) {
|
||||||
}
|
instance.Git.Path = Path.Combine(git.GetValue("InstallPath") as string, "bin", "git.exe");
|
||||||
|
}
|
||||||
public static void Save() {
|
}
|
||||||
var dir = Path.GetDirectoryName(SAVE_PATH);
|
|
||||||
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
|
return instance;
|
||||||
var data = JsonSerializer.Serialize(instance, new JsonSerializerOptions() { WriteIndented = true });
|
}
|
||||||
File.WriteAllText(SAVE_PATH, data);
|
|
||||||
}
|
public static void Save() {
|
||||||
#endregion
|
var dir = Path.GetDirectoryName(SAVE_PATH);
|
||||||
|
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
|
||||||
#region METHOD_ON_GROUPS
|
var data = JsonSerializer.Serialize(instance, new JsonSerializerOptions() { WriteIndented = true });
|
||||||
public Group AddGroup(string name, string parentId) {
|
File.WriteAllText(SAVE_PATH, data);
|
||||||
var group = new Group() {
|
}
|
||||||
Name = name,
|
#endregion
|
||||||
Id = Guid.NewGuid().ToString(),
|
|
||||||
Parent = parentId,
|
#region METHOD_ON_GROUPS
|
||||||
IsExpanded = false,
|
public Group AddGroup(string name, string parentId) {
|
||||||
};
|
var group = new Group() {
|
||||||
|
Name = name,
|
||||||
Groups.Add(group);
|
Id = Guid.NewGuid().ToString(),
|
||||||
Groups.Sort((l, r) => l.Name.CompareTo(r.Name));
|
Parent = parentId,
|
||||||
|
IsExpanded = false,
|
||||||
return group;
|
};
|
||||||
}
|
|
||||||
|
Groups.Add(group);
|
||||||
public Group FindGroup(string id) {
|
Groups.Sort((l, r) => l.Name.CompareTo(r.Name));
|
||||||
foreach (var group in Groups) {
|
|
||||||
if (group.Id == id) return group;
|
return group;
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
}
|
public Group FindGroup(string id) {
|
||||||
|
foreach (var group in Groups) {
|
||||||
public void RenameGroup(string id, string newName) {
|
if (group.Id == id) return group;
|
||||||
foreach (var group in Groups) {
|
}
|
||||||
if (group.Id == id) {
|
return null;
|
||||||
group.Name = newName;
|
}
|
||||||
break;
|
|
||||||
}
|
public void RenameGroup(string id, string newName) {
|
||||||
}
|
foreach (var group in Groups) {
|
||||||
|
if (group.Id == id) {
|
||||||
Groups.Sort((l, r) => l.Name.CompareTo(r.Name));
|
group.Name = newName;
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
public void RemoveGroup(string id) {
|
}
|
||||||
int removedIdx = -1;
|
|
||||||
|
Groups.Sort((l, r) => l.Name.CompareTo(r.Name));
|
||||||
for (int i = 0; i < Groups.Count; i++) {
|
}
|
||||||
if (Groups[i].Id == id) {
|
|
||||||
removedIdx = i;
|
public void RemoveGroup(string id) {
|
||||||
break;
|
int removedIdx = -1;
|
||||||
}
|
|
||||||
}
|
for (int i = 0; i < Groups.Count; i++) {
|
||||||
|
if (Groups[i].Id == id) {
|
||||||
if (removedIdx >= 0) Groups.RemoveAt(removedIdx);
|
removedIdx = i;
|
||||||
}
|
break;
|
||||||
|
}
|
||||||
public bool IsSubGroup(string parent, string subId) {
|
}
|
||||||
if (string.IsNullOrEmpty(parent)) return false;
|
|
||||||
if (parent == subId) return true;
|
if (removedIdx >= 0) Groups.RemoveAt(removedIdx);
|
||||||
|
}
|
||||||
var g = FindGroup(subId);
|
|
||||||
if (g == null) return false;
|
public bool IsSubGroup(string parent, string subId) {
|
||||||
|
if (string.IsNullOrEmpty(parent)) return false;
|
||||||
g = FindGroup(g.Parent);
|
if (parent == subId) return true;
|
||||||
while (g != null) {
|
|
||||||
if (g.Id == parent) return true;
|
var g = FindGroup(subId);
|
||||||
g = FindGroup(g.Parent);
|
if (g == null) return false;
|
||||||
}
|
|
||||||
|
g = FindGroup(g.Parent);
|
||||||
return false;
|
while (g != null) {
|
||||||
}
|
if (g.Id == parent) return true;
|
||||||
#endregion
|
g = FindGroup(g.Parent);
|
||||||
|
}
|
||||||
#region METHOD_ON_REPOSITORIES
|
|
||||||
public Repository AddRepository(string path, string gitDir, string groupId) {
|
return false;
|
||||||
var repo = FindRepository(path);
|
}
|
||||||
if (repo != null) return repo;
|
#endregion
|
||||||
|
|
||||||
var dir = new DirectoryInfo(path);
|
#region METHOD_ON_REPOSITORIES
|
||||||
repo = new Repository() {
|
public Repository AddRepository(string path, string gitDir, string groupId) {
|
||||||
Path = dir.FullName,
|
var repo = FindRepository(path);
|
||||||
GitDir = gitDir,
|
if (repo != null) return repo;
|
||||||
Name = dir.Name,
|
|
||||||
GroupId = groupId,
|
var dir = new DirectoryInfo(path);
|
||||||
};
|
repo = new Repository() {
|
||||||
|
Path = dir.FullName,
|
||||||
Repositories.Add(repo);
|
GitDir = gitDir,
|
||||||
Repositories.Sort((l, r) => l.Name.CompareTo(r.Name));
|
Name = dir.Name,
|
||||||
return repo;
|
GroupId = groupId,
|
||||||
}
|
};
|
||||||
|
|
||||||
public Repository FindRepository(string path) {
|
Repositories.Add(repo);
|
||||||
var dir = new DirectoryInfo(path);
|
Repositories.Sort((l, r) => l.Name.CompareTo(r.Name));
|
||||||
foreach (var repo in Repositories) {
|
return repo;
|
||||||
if (repo.Path == dir.FullName) return repo;
|
}
|
||||||
}
|
|
||||||
return null;
|
public Repository FindRepository(string path) {
|
||||||
}
|
var dir = new DirectoryInfo(path);
|
||||||
|
foreach (var repo in Repositories) {
|
||||||
public void RenameRepository(string path, string newName) {
|
if (repo.Path == dir.FullName) return repo;
|
||||||
var repo = FindRepository(path);
|
}
|
||||||
if (repo == null) return;
|
return null;
|
||||||
|
}
|
||||||
repo.Name = newName;
|
|
||||||
Repositories.Sort((l, r) => l.Name.CompareTo(r.Name));
|
public void RenameRepository(string path, string newName) {
|
||||||
}
|
var repo = FindRepository(path);
|
||||||
|
if (repo == null) return;
|
||||||
public void RemoveRepository(string path) {
|
|
||||||
var dir = new DirectoryInfo(path);
|
repo.Name = newName;
|
||||||
var removedIdx = -1;
|
Repositories.Sort((l, r) => l.Name.CompareTo(r.Name));
|
||||||
|
}
|
||||||
for (int i = 0; i < Repositories.Count; i++) {
|
|
||||||
if (Repositories[i].Path == dir.FullName) {
|
public void RemoveRepository(string path) {
|
||||||
removedIdx = i;
|
var dir = new DirectoryInfo(path);
|
||||||
break;
|
var removedIdx = -1;
|
||||||
}
|
|
||||||
}
|
for (int i = 0; i < Repositories.Count; i++) {
|
||||||
|
if (Repositories[i].Path == dir.FullName) {
|
||||||
if (removedIdx >= 0) Repositories.RemoveAt(removedIdx);
|
removedIdx = i;
|
||||||
}
|
break;
|
||||||
#endregion
|
}
|
||||||
|
}
|
||||||
#region RECENTS
|
|
||||||
public void AddRecent(string path) {
|
if (removedIdx >= 0) Repositories.RemoveAt(removedIdx);
|
||||||
if (Recents.Count == 0) {
|
}
|
||||||
Recents.Add(path);
|
#endregion
|
||||||
return;
|
|
||||||
}
|
#region RECENTS
|
||||||
|
public void AddRecent(string path) {
|
||||||
for (int i = 0; i < Recents.Count; i++) {
|
if (Recents.Count == 0) {
|
||||||
if (Recents[i] == path) {
|
Recents.Add(path);
|
||||||
if (i != 0) {
|
return;
|
||||||
Recents.RemoveAt(i);
|
}
|
||||||
Recents.Insert(0, path);
|
|
||||||
}
|
for (int i = 0; i < Recents.Count; i++) {
|
||||||
|
if (Recents[i] == path) {
|
||||||
return;
|
if (i != 0) {
|
||||||
}
|
Recents.RemoveAt(i);
|
||||||
}
|
Recents.Insert(0, path);
|
||||||
|
}
|
||||||
Recents.Insert(0, path);
|
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
public void RemoveRecent(string path) {
|
}
|
||||||
for (int i = 0; i < Recents.Count; i++) {
|
|
||||||
if (Recents[i] == path) {
|
Recents.Insert(0, path);
|
||||||
Recents.RemoveAt(i);
|
}
|
||||||
return;
|
|
||||||
}
|
public void RemoveRecent(string path) {
|
||||||
}
|
for (int i = 0; i < Recents.Count; i++) {
|
||||||
}
|
if (Recents[i] == path) {
|
||||||
#endregion
|
Recents.RemoveAt(i);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -1,71 +1,74 @@
|
||||||
<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.8 466.4 557.7 19.3c-25.7-25.8-67.5-25.8-93.3 0L360.6 123.2l78.2 78.2c12.5-6 26.6-9.4 41.4-9.4c53 0 96 43 96 96c0 14.8-3.4 28.9-9.4 41.4l128 128c12.5-6 26.6-9.4 41.4-9.4c53 0 96 43 96 96s-43 96-96 96s-96-43-96-96c0-14.8 3.4-28.9 9.4-41.4L521.5 374.6a88.8 88.8 0 01-9.4 3.9v267c37.3 13.2 64 48.7 64 90.5c0 53-43 96-96 96s-96-43-96-96c0-41.8 26.7-77.3 64-90.5V378.5c-37.3-13.2-64-48.7-64-90.5c0-14.8 3.4-28.9 9.4-41.4l-78.2-78.2L19.4 464.3c-25.8 25.8-25.8 67.5 0 93.3l447.1 447.1c25.7 25.8 67.5 25.8 93.3 0l445-445c25.8-25.8 25.8-67.6 0-93.3z</Geometry>
|
<Geometry x:Key="Icon.Git">M1004.8 466.4 557.7 19.3c-25.7-25.8-67.5-25.8-93.3 0L360.6 123.2l78.2 78.2c12.5-6 26.6-9.4 41.4-9.4c53 0 96 43 96 96c0 14.8-3.4 28.9-9.4 41.4l128 128c12.5-6 26.6-9.4 41.4-9.4c53 0 96 43 96 96s-43 96-96 96s-96-43-96-96c0-14.8 3.4-28.9 9.4-41.4L521.5 374.6a88.8 88.8 0 01-9.4 3.9v267c37.3 13.2 64 48.7 64 90.5c0 53-43 96-96 96s-96-43-96-96c0-41.8 26.7-77.3 64-90.5V378.5c-37.3-13.2-64-48.7-64-90.5c0-14.8 3.4-28.9 9.4-41.4l-78.2-78.2L19.4 464.3c-25.8 25.8-25.8 67.5 0 93.3l447.1 447.1c25.7 25.8 67.5 25.8 93.3 0l445-445c25.8-25.8 25.8-67.6 0-93.3z</Geometry>
|
||||||
<Geometry x:Key="Icon.Submodule">M557.7 545.3 789.9 402.7c24-15 31.3-46.5 16.4-70.5c-14.8-23.8-46-31.2-70-16.7L506.5 456.6 277.1 315.4c-24.1-14.8-55.6-7.3-70.5 16.8c-14.8 24.1-7.3 55.6 16.8 70.5l231.8 142.6V819.1c0 28.3 22.9 51.2 51.2 51.2c28.3 0 51.2-22.9 51.2-51.2V545.3h.1zM506.5 0l443.4 256v511.9L506.5 1023.9 63.1 767.9v-511.9L506.5 0z</Geometry>
|
<Geometry x:Key="Icon.Submodule">M557.7 545.3 789.9 402.7c24-15 31.3-46.5 16.4-70.5c-14.8-23.8-46-31.2-70-16.7L506.5 456.6 277.1 315.4c-24.1-14.8-55.6-7.3-70.5 16.8c-14.8 24.1-7.3 55.6 16.8 70.5l231.8 142.6V819.1c0 28.3 22.9 51.2 51.2 51.2c28.3 0 51.2-22.9 51.2-51.2V545.3h.1zM506.5 0l443.4 256v511.9L506.5 1023.9 63.1 767.9v-511.9L506.5 0z</Geometry>
|
||||||
<Geometry x:Key="Icon.SubTree">M491 256h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V128H256V64c0-13-9-21-21-21h-171c-13 0-21 9-21 21v171c0 13 9 21 21 21H128v597h341v64c0 13 9 21 21 21h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V811H171v-299h299v64c0 13 9 21 21 21h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V469H171V256h64c13 0 21-9 21-21V171h213v64c0 13 9 21 21 21z</Geometry>
|
<Geometry x:Key="Icon.SubTree">M491 256h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V128H256V64c0-13-9-21-21-21h-171c-13 0-21 9-21 21v171c0 13 9 21 21 21H128v597h341v64c0 13 9 21 21 21h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V811H171v-299h299v64c0 13 9 21 21 21h469c13 0 21-9 21-21v-171c0-13-9-21-21-21h-469c-13 0-21 9-21 21V469H171V256h64c13 0 21-9 21-21V171h213v64c0 13 9 21 21 21z</Geometry>
|
||||||
<Geometry x:Key="Icon.LFS">M170 470l0 84 86 0 0-84-86 0zM86 598l0-172 852 0 0 172-852 0zM256 298l0-84-86 0 0 84 86 0zM86 170l852 0 0 172-852 0 0-172zM170 726l0 84 86 0 0-84-86 0zM86 854l0-172 852 0 0 172-852 0z</Geometry>
|
<Geometry x:Key="Icon.LFS">M170 470l0 84 86 0 0-84-86 0zM86 598l0-172 852 0 0 172-852 0zM256 298l0-84-86 0 0 84 86 0zM86 170l852 0 0 172-852 0 0-172zM170 726l0 84 86 0 0-84-86 0zM86 854l0-172 852 0 0 172-852 0z</Geometry>
|
||||||
<Geometry x:Key="Icon.WelcomePage">M853.3 960H170.7V64h469.3l213.3 213.3zM821.3 298.7H618.7V96z</Geometry>
|
<Geometry x:Key="Icon.WelcomePage">M853.3 960H170.7V64h469.3l213.3 213.3zM821.3 298.7H618.7V96z</Geometry>
|
||||||
<Geometry x:Key="Icon.Bookmark">M192 0l0 1024 320-320 320 320 0-1024z</Geometry>
|
<Geometry x:Key="Icon.Bookmark">M192 0l0 1024 320-320 320 320 0-1024z</Geometry>
|
||||||
<Geometry x:Key="Icon.Detail">M888.8 0H135.2c-32.3 0-58.9 26.1-58.9 58.9v906.2c0 32.3 26.1 58.9 58.9 58.9h753.2c32.3 0 58.9-26.1 58.9-58.9v-906.2c.5-32.8-26.1-58.9-58.4-58.9zm-164.9 176.6c30.7 0 55.8 25.1 55.8 55.8s-25.1 55.8-55.8 55.8s-55.8-25.1-55.8-55.8s24.6-55.8 55.8-55.8zm-212 0c30.7 0 55.8 25.1 55.8 55.8S542.7 288.3 512 288.3s-55.8-25.1-55.8-55.8S481.3 176.6 512 176.6zm-212 0c30.7 0 55.8 25.1 55.8 55.8s-25.1 55.8-55.8 55.8s-55.8-25.1-55.8-55.8s25.1-55.8 55.8-55.8zm208.9 606.2H285.2c-24.6 0-44-20-44-44c0-24.6 20-44 44-44h223.7c24.6 0 44 20 44 44c0 24.1-19.5 44-44 44zm229.9-212H285.2c-24.6 0-44-20-44-44c0-24.6 20-44 44-44h453.1c24.6 0 44 20 44 44c.5 24.1-19.5 44-43.5 44z</Geometry>
|
<Geometry x:Key="Icon.Detail">M888.8 0H135.2c-32.3 0-58.9 26.1-58.9 58.9v906.2c0 32.3 26.1 58.9 58.9 58.9h753.2c32.3 0 58.9-26.1 58.9-58.9v-906.2c.5-32.8-26.1-58.9-58.4-58.9zm-164.9 176.6c30.7 0 55.8 25.1 55.8 55.8s-25.1 55.8-55.8 55.8s-55.8-25.1-55.8-55.8s24.6-55.8 55.8-55.8zm-212 0c30.7 0 55.8 25.1 55.8 55.8S542.7 288.3 512 288.3s-55.8-25.1-55.8-55.8S481.3 176.6 512 176.6zm-212 0c30.7 0 55.8 25.1 55.8 55.8s-25.1 55.8-55.8 55.8s-55.8-25.1-55.8-55.8s25.1-55.8 55.8-55.8zm208.9 606.2H285.2c-24.6 0-44-20-44-44c0-24.6 20-44 44-44h223.7c24.6 0 44 20 44 44c0 24.1-19.5 44-44 44zm229.9-212H285.2c-24.6 0-44-20-44-44c0-24.6 20-44 44-44h453.1c24.6 0 44 20 44 44c.5 24.1-19.5 44-43.5 44z</Geometry>
|
||||||
<Geometry x:Key="Icon.NewTab">M1024 427H597V0h-171v427H0v171h427V1024h171V597H1024z</Geometry>
|
<Geometry x:Key="Icon.NewTab">M1024 427H597V0h-171v427H0v171h427V1024h171V597H1024z</Geometry>
|
||||||
<Geometry x:Key="Icon.Copy">M682.7 42.7H85.3v682.7h85.3V128h512V42.7zM256 213.3l4.5 768H896V213.3H256zm554.7 682.7H341.3V298.7h469.3v597.3z</Geometry>
|
<Geometry x:Key="Icon.Copy">M682.7 42.7H85.3v682.7h85.3V128h512V42.7zM256 213.3l4.5 768H896V213.3H256zm554.7 682.7H341.3V298.7h469.3v597.3z</Geometry>
|
||||||
<Geometry x:Key="Icon.TreeAddNode">M204 291c45-11 77-49 77-96c0-53-43-98-98-98c-53 0-98 45-98 98c0 47 34 87 77 96v91c0 13 9 21 21 21h236c2 38 32 68 70 68h372c41 0 73-32 73-73v-38c0-41-32-73-73-73h-370c-38 0-70 30-70 68H204V291zm258 74h2c0-15 13-30 30-30h372c15 0 30 13 30 30v38c0 15-13 30-30 30h-375c-15 0-30-13-30-30v-38zM183 250c-30 0-55-26-55-55s26-55 55-55s55 26 55 55s-26 55-55 55zM679 495c-134 0-244 109-244 244s109 244 244 244c134 0 244-109 244-244s-109-244-244-244zm159 268h-134v134h-50V764H521v-50h134v-134h50v134h134V764zM244 766H185c-13 0-23-11-23-23s11-23 23-23h59c13 0 23 11 23 23s-11 23-23 23zM368 766h-42c-9 0-17-8-17-17v-13c0-9 8-17 17-17h42c9 0 17 8 17 17v13c0 9-8 17-17 17zM183 766c-12 0-21-9-21-21V320c0-12 9-21 21-21c12 0 21 9 21 21v425c0 12-10 21-21 21z</Geometry>
|
<Geometry x:Key="Icon.TreeAddNode">M204 291c45-11 77-49 77-96c0-53-43-98-98-98c-53 0-98 45-98 98c0 47 34 87 77 96v91c0 13 9 21 21 21h236c2 38 32 68 70 68h372c41 0 73-32 73-73v-38c0-41-32-73-73-73h-370c-38 0-70 30-70 68H204V291zm258 74h2c0-15 13-30 30-30h372c15 0 30 13 30 30v38c0 15-13 30-30 30h-375c-15 0-30-13-30-30v-38zM183 250c-30 0-55-26-55-55s26-55 55-55s55 26 55 55s-26 55-55 55zM679 495c-134 0-244 109-244 244s109 244 244 244c134 0 244-109 244-244s-109-244-244-244zm159 268h-134v134h-50V764H521v-50h134v-134h50v134h134V764zM244 766H185c-13 0-23-11-23-23s11-23 23-23h59c13 0 23 11 23 23s-11 23-23 23zM368 766h-42c-9 0-17-8-17-17v-13c0-9 8-17 17-17h42c9 0 17 8 17 17v13c0 9-8 17-17 17zM183 766c-12 0-21-9-21-21V320c0-12 9-21 21-21c12 0 21 9 21 21v425c0 12-10 21-21 21z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.Minimize">M797 486H224c-14 0-25 11-25 25c0 14 11 25 25 25H797c14 0 25-11 25-25c0-14-11-25-25-25z</Geometry>
|
<Geometry x:Key="Icon.Minimize">M797 486H224c-14 0-25 11-25 25c0 14 11 25 25 25H797c14 0 25-11 25-25c0-14-11-25-25-25z</Geometry>
|
||||||
<Geometry x:Key="Icon.Maximize">M153 154h768v768h-768v-768zm64 64v640h640v-640h-640z</Geometry>
|
<Geometry x:Key="Icon.Maximize">M153 154h768v768h-768v-768zm64 64v640h640v-640h-640z</Geometry>
|
||||||
<Geometry x:Key="Icon.Restore">M256 128l0 192L64 320l0 576 704 0 0-192 192 0L960 128 256 128zM704 832 128 832 128 384l576 0L704 832zM896 640l-128 0L768 320 320 320 320 192l576 0L896 640z</Geometry>
|
<Geometry x:Key="Icon.Restore">M256 128l0 192L64 320l0 576 704 0 0-192 192 0L960 128 256 128zM704 832 128 832 128 384l576 0L704 832zM896 640l-128 0L768 320 320 320 320 192l576 0L896 640z</Geometry>
|
||||||
<Geometry x:Key="Icon.Close">M519 459 222 162a37 37 0 10-52 52l297 297L169 809a37 37 0 1052 52l297-297 297 297a37 37 0 1052-52l-297-297 297-297a37 37 0 10-52-52L519 459z</Geometry>
|
<Geometry x:Key="Icon.Close">M519 459 222 162a37 37 0 10-52 52l297 297L169 809a37 37 0 1052 52l297-297 297 297a37 37 0 1052-52l-297-297 297-297a37 37 0 10-52-52L519 459z</Geometry>
|
||||||
<Geometry x:Key="Icon.Check">M512 597m-1 0a1 1 0 103 0a1 1 0 10-3 0ZM810 393 732 315 448 600 293 444 214 522l156 156 78 78 362-362z</Geometry>
|
<Geometry x:Key="Icon.Check">M512 597m-1 0a1 1 0 103 0a1 1 0 10-3 0ZM810 393 732 315 448 600 293 444 214 522l156 156 78 78 362-362z</Geometry>
|
||||||
<Geometry x:Key="Icon.Loading">M512 0C233 0 7 223 0 500C6 258 190 64 416 64c230 0 416 200 416 448c0 53 43 96 96 96s96-43 96-96c0-283-229-512-512-512zm0 1023c279 0 505-223 512-500c-6 242-190 436-416 436c-230 0-416-200-416-448c0-53-43-96-96-96s-96 43-96 96c0 283 229 512 512 512z</Geometry>
|
<Geometry x:Key="Icon.Loading">M512 0C233 0 7 223 0 500C6 258 190 64 416 64c230 0 416 200 416 448c0 53 43 96 96 96s96-43 96-96c0-283-229-512-512-512zm0 1023c279 0 505-223 512-500c-6 242-190 436-416 436c-230 0-416-200-416-448c0-53-43-96-96-96s-96 43-96 96c0 283 229 512 512 512z</Geometry>
|
||||||
<Geometry x:Key="Icon.Search">M702 677 590 565a148 148 0 10-25 27L676 703zm-346-200a115 115 0 11115 115A115 115 0 01355 478z</Geometry>
|
<Geometry x:Key="Icon.Search">M702 677 590 565a148 148 0 10-25 27L676 703zm-346-200a115 115 0 11115 115A115 115 0 01355 478z</Geometry>
|
||||||
<Geometry x:Key="Icon.Conflict">M352 64h320L960 352v320L672 960h-320L64 672v-320L352 64zm161 363L344 256 260 341 429 512l-169 171L344 768 513 597 682 768l85-85L598 512l169-171L682 256 513 427z</Geometry>
|
<Geometry x:Key="Icon.Conflict">M352 64h320L960 352v320L672 960h-320L64 672v-320L352 64zm161 363L344 256 260 341 429 512l-169 171L344 768 513 597 682 768l85-85L598 512l169-171L682 256 513 427z</Geometry>
|
||||||
<Geometry x:Key="Icon.Clear">M899 870l-53-306H864c14 0 26-12 26-26V346c0-14-12-26-26-26H618V138c0-14-12-26-26-26H432c-14 0-26 12-26 26v182H160c-14 0-26 12-26 26v192c0 14 12 26 26 26h18l-53 306c0 2 0 3 0 4c0 14 12 26 26 26h723c2 0 3 0 4 0c14-2 24-16 21-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4-4-8-8-8h-48c-4 0-8 4-8 8v156H416V674c0-4-4-8-8-8h-48c-4 0-8 4-8 8v156H203l45-260H776l45 260H672z</Geometry>
|
<Geometry x:Key="Icon.Clear">M899 870l-53-306H864c14 0 26-12 26-26V346c0-14-12-26-26-26H618V138c0-14-12-26-26-26H432c-14 0-26 12-26 26v182H160c-14 0-26 12-26 26v192c0 14 12 26 26 26h18l-53 306c0 2 0 3 0 4c0 14 12 26 26 26h723c2 0 3 0 4 0c14-2 24-16 21-30zM204 390h272V182h72v208h272v104H204V390zm468 440V674c0-4-4-8-8-8h-48c-4 0-8 4-8 8v156H416V674c0-4-4-8-8-8h-48c-4 0-8 4-8 8v156H203l45-260H776l45 260H672z</Geometry>
|
||||||
<Geometry x:Key="Icon.Error">M512 64C265 64 64 265 64 512s201 448 448 448s448-201 448-448S759 64 512 64zm238 642-46 46L512 558 318 750l-46-46L467 512 274 318l46-46L512 467l194-194 46 46L558 512l193 194z</Geometry>
|
<Geometry x:Key="Icon.Error">M512 64C265 64 64 265 64 512s201 448 448 448s448-201 448-448S759 64 512 64zm238 642-46 46L512 558 318 750l-46-46L467 512 274 318l46-46L512 467l194-194 46 46L558 512l193 194z</Geometry>
|
||||||
<Geometry x:Key="Icon.Clean">M797 829a49 49 0 1049 49 49 49 0 00-49-49zm147-114A49 49 0 10992 764a49 49 0 00-49-49zM928 861a49 49 0 1049 49A49 49 0 00928 861zm-5-586L992 205 851 64l-71 71a67 67 0 00-94 0l235 235a67 67 0 000-94zm-853 128a32 32 0 00-32 50 1291 1291 0 0075 112L288 552c20 0 25 21 8 37l-93 86a1282 1282 0 00120 114l100-32c19-6 28 15 14 34l-40 55c26 19 53 36 82 53a89 89 0 00115-20 1391 1391 0 00256-485l-188-188s-306 224-595 198z</Geometry>
|
<Geometry x:Key="Icon.Clean">M797 829a49 49 0 1049 49 49 49 0 00-49-49zm147-114A49 49 0 10992 764a49 49 0 00-49-49zM928 861a49 49 0 1049 49A49 49 0 00928 861zm-5-586L992 205 851 64l-71 71a67 67 0 00-94 0l235 235a67 67 0 000-94zm-853 128a32 32 0 00-32 50 1291 1291 0 0075 112L288 552c20 0 25 21 8 37l-93 86a1282 1282 0 00120 114l100-32c19-6 28 15 14 34l-40 55c26 19 53 36 82 53a89 89 0 00115-20 1391 1391 0 00256-485l-188-188s-306 224-595 198z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.List">M0 33h1024v160H0zM0 432h1024v160H0zM0 831h1024v160H0z</Geometry>
|
<Geometry x:Key="Icon.List">M0 33h1024v160H0zM0 432h1024v160H0zM0 831h1024v160H0z</Geometry>
|
||||||
<Geometry x:Key="Icon.Tree">M1024 610v-224H640v48H256V224h128V0H0v224h128v752h512v48h384V800H640v48H256V562h384v48z</Geometry>
|
<Geometry x:Key="Icon.Tree">M1024 610v-224H640v48H256V224h128V0H0v224h128v752h512v48h384V800H640v48H256V562h384v48z</Geometry>
|
||||||
<Geometry x:Key="Icon.Grid">M30 271l241 0 0-241-241 0 0 241zM392 271l241 0 0-241-241 0 0 241zM753 30l0 241 241 0 0-241-241 0zM30 632l241 0 0-241-241 0 0 241zM392 632l241 0 0-241-241 0 0 241zM753 632l241 0 0-241-241 0 0 241zM30 994l241 0 0-241-241 0 0 241zM392 994l241 0 0-241-241 0 0 241zM753 994l241 0 0-241-241 0 0 241z</Geometry>
|
<Geometry x:Key="Icon.Grid">M30 271l241 0 0-241-241 0 0 241zM392 271l241 0 0-241-241 0 0 241zM753 30l0 241 241 0 0-241-241 0zM30 632l241 0 0-241-241 0 0 241zM392 632l241 0 0-241-241 0 0 241zM753 632l241 0 0-241-241 0 0 241zM30 994l241 0 0-241-241 0 0 241zM392 994l241 0 0-241-241 0 0 241zM753 994l241 0 0-241-241 0 0 241z</Geometry>
|
||||||
<Geometry x:Key="Icon.Down">M509 546l271-271 91 91-348 349-1-1-13 13-363-361 91-91z</Geometry>
|
<Geometry x:Key="Icon.Down">M509 546l271-271 91 91-348 349-1-1-13 13-363-361 91-91z</Geometry>
|
||||||
<Geometry x:Key="Icon.DoubleDown">M256 224l0 115L512 544l256-205 0-115-256 205L256 224zM512 685l-256-205L256 595 512 800 768 595l0-115L512 685z</Geometry>
|
<Geometry x:Key="Icon.DoubleDown">M256 224l0 115L512 544l256-205 0-115-256 205L256 224zM512 685l-256-205L256 595 512 800 768 595l0-115L512 685z</Geometry>
|
||||||
<Geometry x:Key="Icon.Up">M170 831l343-342L855 831l105-105-448-448L64 726 170 831z</Geometry>
|
<Geometry x:Key="Icon.Up">M170 831l343-342L855 831l105-105-448-448L64 726 170 831z</Geometry>
|
||||||
<Geometry x:Key="Icon.DoubleUp">M768 800V685L512 480 256 685V800l256-205L768 800zM512 339 768 544V429L512 224 256 429V544l256-205z</Geometry>
|
<Geometry x:Key="Icon.DoubleUp">M768 800V685L512 480 256 685V800l256-205L768 800zM512 339 768 544V429L512 224 256 429V544l256-205z</Geometry>
|
||||||
<Geometry x:Key="Icon.Orientation">M1231 0v372H120V0zM1352 484v56H0v-56zM1147 939H205V737h942v203M1231 1024V652H120V1024z</Geometry>
|
<Geometry x:Key="Icon.Orientation">M1231 0v372H120V0zM1352 484v56H0v-56zM1147 939H205V737h942v203M1231 1024V652H120V1024z</Geometry>
|
||||||
<Geometry x:Key="Icon.ScrollLeft">M75 100 27 51 76 3z</Geometry>
|
<Geometry x:Key="Icon.ScrollLeft">M75 100 27 51 76 3z</Geometry>
|
||||||
<Geometry x:Key="Icon.ScrollRight">M27 3 L 75 51 L 27 100z</Geometry>
|
<Geometry x:Key="Icon.ScrollRight">M27 3 L 75 51 L 27 100z</Geometry>
|
||||||
|
|
||||||
<Geometry x:Key="Icon.Preference">M716.3 383.1c0 38.4-6.5 76-19.4 111.8l-10.7 29.7 229.6 229.5c44.5 44.6 44.5 117.1 0 161.6a113.6 113.6 0 01-80.8 33.5a113.6 113.6 0 01-80.8-33.5L529 694l-32 13a331.6 331.6 0 01-111.9 19.4A333.5 333.5 0 0150 383.1c0-39 6.8-77.2 20-113.6L285 482l194-195-214-210A331 331 0 01383.1 50A333.5 333.5 0 01716.3 383.1zM231.6 31.6l-22.9 9.9a22.2 22.2 0 00-5.9 4.2a19.5 19.5 0 000 27.5l215 215.2L288.4 417.8 77.8 207.1a26 26 0 00-17.2-7.1a22.8 22.8 0 00-21.5 15a400.5 400.5 0 00-7.5 16.6A381.6 381.6 0 000 384c0 211.7 172.2 384 384 384c44.3 0 87.6-7.5 129-22.3L743.1 975.8A163.5 163.5 0 00859.5 1024c43.9 0 85.3-17.1 116.4-48.2a164.8 164.8 0 000-233L745.5 513C760.5 471.5 768 428 768 384C768 172 596 0 384 0c-53 0-104 10.5-152.5 31.5z</Geometry>
|
<Geometry x:Key="Icon.Eye">M520 168C291 168 95 311 16 512c79 201 275 344 504 344 229 0 425-143 504-344-79-201-275-344-504-344zm0 573c-126 0-229-103-229-229s103-229 229-229c126 0 229 103 229 229s-103 229-229 229zm0-367c-76 0-137 62-137 137s62 137 137 137S657 588 657 512s-62-137-137-137z</Geometry>
|
||||||
<Geometry x:Key="Icon.Setting">M928 500a21 21 0 00-19-20L858 472a11 11 0 01-9-9c-1-6-2-13-3-19a11 11 0 015-12l46-25a21 21 0 0010-26l-8-22a21 21 0 00-24-13l-51 10a11 11 0 01-12-6c-3-6-6-11-10-17a11 11 0 011-13l34-39a21 21 0 001-28l-15-18a20 20 0 00-27-4l-45 27a11 11 0 01-13-1c-5-4-10-9-15-12a11 11 0 01-3-12l19-49a21 21 0 00-9-26l-20-12a21 21 0 00-27 6L650 193a9 9 0 01-11 3c-1-1-12-5-20-7a11 11 0 01-7-10l1-52a21 21 0 00-17-22l-23-4a21 21 0 00-24 14L532 164a11 11 0 01-11 7h-20a11 11 0 01-11-7l-17-49a21 21 0 00-24-15l-23 4a21 21 0 00-17 22l1 52a11 11 0 01-8 11c-5 2-15 6-19 7c-4 1-8 0-12-4l-33-40A21 21 0 00313 146l-20 12A21 21 0 00285 184l19 49a11 11 0 01-3 12c-5 4-10 8-15 12a11 11 0 01-13 1L228 231a21 21 0 00-27 4L186 253a21 21 0 001 28L221 320a11 11 0 011 13c-3 5-7 11-10 17a11 11 0 01-12 6l-51-10a21 21 0 00-24 13l-8 22a21 21 0 0010 26l46 25a11 11 0 015 12l0 3c-1 6-2 11-3 16a11 11 0 01-9 9l-51 8A21 21 0 0096 500v23A21 21 0 00114 544l51 8a11 11 0 019 9c1 6 2 13 3 19a11 11 0 01-5 12l-46 25a21 21 0 00-10 26l8 22a21 21 0 0024 13l51-10a11 11 0 0112 6c3 6 6 11 10 17a11 11 0 01-1 13l-34 39a21 21 0 00-1 28l15 18a20 20 0 0027 4l45-27a11 11 0 0113 1c5 4 10 9 15 12a11 11 0 013 12l-19 49a21 21 0 009 26l20 12a21 21 0 0027-6L374 832c3-3 7-5 10-4c7 3 12 5 20 7a11 11 0 018 10l-1 52a21 21 0 0017 22l23 4a21 21 0 0024-14l17-50a11 11 0 0111-7h20a11 11 0 0111 7l17 49a21 21 0 0020 15a19 19 0 004 0l23-4a21 21 0 0017-22l-1-52a11 11 0 018-10c8-3 13-5 18-7l1 0c6-2 9 0 11 3l34 41A21 21 0 00710 878l20-12a21 21 0 009-26l-18-49a11 11 0 013-12c5-4 10-8 15-12a11 11 0 0113-1l45 27a21 21 0 0027-4l15-18a21 21 0 00-1-28l-34-39a11 11 0 01-1-13c3-5 7-11 10-17a11 11 0 0112-6l51 10a21 21 0 0024-13l8-22a21 21 0 00-10-26l-46-25a11 11 0 01-5-12l0-3c1-6 2-11 3-16a11 11 0 019-9l51-8a21 21 0 0018-21v-23zm-565 188a32 32 0 01-51 5a270 270 0 011-363a32 32 0 0151 6l91 161a32 32 0 010 31zM512 782a270 270 0 01-57-6a32 32 0 01-20-47l92-160a32 32 0 0127-16h184a32 32 0 0130 41c-35 109-137 188-257 188zm15-328L436 294a32 32 0 0121-47a268 268 0 0155-6c120 0 222 79 257 188a32 32 0 01-30 41h-184a32 32 0 01-28-16z</Geometry>
|
<Geometry x:Key="Icon.EyeClose">M734 128c-33-19-74-8-93 25l-41 70c-28-6-58-9-90-9-294 0-445 298-445 298s82 149 231 236l-31 54c-19 33-8 74 25 93 33 19 74 8 93-25L759 222C778 189 767 147 734 128zM305 512c0-115 93-208 207-208 14 0 27 1 40 4l-37 64c-1 0-2 0-2 0-77 0-140 63-140 140 0 26 7 51 20 71l-37 64C324 611 305 564 305 512zM771 301 700 423c13 27 20 57 20 89 0 110-84 200-192 208l-51 89c12 1 24 2 36 2 292 0 446-298 446-298S895 388 771 301z</Geometry>
|
||||||
<Geometry x:Key="Icon.Statistics">M296 912H120c-4.4 0-8-3.6-8-8V520c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v384c0 4.4-3.6 8-8 8zM600 912H424c-4.4 0-8-3.6-8-8V121c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v783c0 4.4-3.6 8-8 8zM904 912H728c-4.4 0-8-3.6-8-8V280c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v624c0 4.4-3.6 8-8 8z</Geometry>
|
|
||||||
<Geometry x:Key="Icon.Help">M550 627h-81v-21a142 142 0 0113-64a198 198 0 0152-57a390 390 0 0047-42a56 56 0 0012-34a58 58 0 00-21-45a81 81 0 00-56-19a85 85 0 00-57 20a103 103 0 00-32 59l-82-10a136 136 0 0149-96A172 172 0 01512 276a178 178 0 01123 40a122 122 0 0145 94a103 103 0 01-17 56a366 366 0 01-71 72A136 136 0 00556 576a128 128 0 00-6 51zm-81 120v-89h89v89zM512 64a448 448 0 10448 448A448 448 0 00512 64zm0 832a384 384 0 010-768a389 389 0 01384 384a389 389 0 01-384 384z</Geometry>
|
<Geometry x:Key="Icon.Preference">M716.3 383.1c0 38.4-6.5 76-19.4 111.8l-10.7 29.7 229.6 229.5c44.5 44.6 44.5 117.1 0 161.6a113.6 113.6 0 01-80.8 33.5a113.6 113.6 0 01-80.8-33.5L529 694l-32 13a331.6 331.6 0 01-111.9 19.4A333.5 333.5 0 0150 383.1c0-39 6.8-77.2 20-113.6L285 482l194-195-214-210A331 331 0 01383.1 50A333.5 333.5 0 01716.3 383.1zM231.6 31.6l-22.9 9.9a22.2 22.2 0 00-5.9 4.2a19.5 19.5 0 000 27.5l215 215.2L288.4 417.8 77.8 207.1a26 26 0 00-17.2-7.1a22.8 22.8 0 00-21.5 15a400.5 400.5 0 00-7.5 16.6A381.6 381.6 0 000 384c0 211.7 172.2 384 384 384c44.3 0 87.6-7.5 129-22.3L743.1 975.8A163.5 163.5 0 00859.5 1024c43.9 0 85.3-17.1 116.4-48.2a164.8 164.8 0 000-233L745.5 513C760.5 471.5 768 428 768 384C768 172 596 0 384 0c-53 0-104 10.5-152.5 31.5z</Geometry>
|
||||||
<Geometry x:Key="Icon.Folder">M64 864h896V288h-396a64 64 0 01-57-35L460 160H64v704zm-64 32V128a32 32 0 0132-32h448a32 32 0 0129 18L564 224H992a32 32 0 0132 32v640a32 32 0 01-32 32H32a32 32 0 01-32-32z</Geometry>
|
<Geometry x:Key="Icon.Setting">M928 500a21 21 0 00-19-20L858 472a11 11 0 01-9-9c-1-6-2-13-3-19a11 11 0 015-12l46-25a21 21 0 0010-26l-8-22a21 21 0 00-24-13l-51 10a11 11 0 01-12-6c-3-6-6-11-10-17a11 11 0 011-13l34-39a21 21 0 001-28l-15-18a20 20 0 00-27-4l-45 27a11 11 0 01-13-1c-5-4-10-9-15-12a11 11 0 01-3-12l19-49a21 21 0 00-9-26l-20-12a21 21 0 00-27 6L650 193a9 9 0 01-11 3c-1-1-12-5-20-7a11 11 0 01-7-10l1-52a21 21 0 00-17-22l-23-4a21 21 0 00-24 14L532 164a11 11 0 01-11 7h-20a11 11 0 01-11-7l-17-49a21 21 0 00-24-15l-23 4a21 21 0 00-17 22l1 52a11 11 0 01-8 11c-5 2-15 6-19 7c-4 1-8 0-12-4l-33-40A21 21 0 00313 146l-20 12A21 21 0 00285 184l19 49a11 11 0 01-3 12c-5 4-10 8-15 12a11 11 0 01-13 1L228 231a21 21 0 00-27 4L186 253a21 21 0 001 28L221 320a11 11 0 011 13c-3 5-7 11-10 17a11 11 0 01-12 6l-51-10a21 21 0 00-24 13l-8 22a21 21 0 0010 26l46 25a11 11 0 015 12l0 3c-1 6-2 11-3 16a11 11 0 01-9 9l-51 8A21 21 0 0096 500v23A21 21 0 00114 544l51 8a11 11 0 019 9c1 6 2 13 3 19a11 11 0 01-5 12l-46 25a21 21 0 00-10 26l8 22a21 21 0 0024 13l51-10a11 11 0 0112 6c3 6 6 11 10 17a11 11 0 01-1 13l-34 39a21 21 0 00-1 28l15 18a20 20 0 0027 4l45-27a11 11 0 0113 1c5 4 10 9 15 12a11 11 0 013 12l-19 49a21 21 0 009 26l20 12a21 21 0 0027-6L374 832c3-3 7-5 10-4c7 3 12 5 20 7a11 11 0 018 10l-1 52a21 21 0 0017 22l23 4a21 21 0 0024-14l17-50a11 11 0 0111-7h20a11 11 0 0111 7l17 49a21 21 0 0020 15a19 19 0 004 0l23-4a21 21 0 0017-22l-1-52a11 11 0 018-10c8-3 13-5 18-7l1 0c6-2 9 0 11 3l34 41A21 21 0 00710 878l20-12a21 21 0 009-26l-18-49a11 11 0 013-12c5-4 10-8 15-12a11 11 0 0113-1l45 27a21 21 0 0027-4l15-18a21 21 0 00-1-28l-34-39a11 11 0 01-1-13c3-5 7-11 10-17a11 11 0 0112-6l51 10a21 21 0 0024-13l8-22a21 21 0 00-10-26l-46-25a11 11 0 01-5-12l0-3c1-6 2-11 3-16a11 11 0 019-9l51-8a21 21 0 0018-21v-23zm-565 188a32 32 0 01-51 5a270 270 0 011-363a32 32 0 0151 6l91 161a32 32 0 010 31zM512 782a270 270 0 01-57-6a32 32 0 01-20-47l92-160a32 32 0 0127-16h184a32 32 0 0130 41c-35 109-137 188-257 188zm15-328L436 294a32 32 0 0121-47a268 268 0 0155-6c120 0 222 79 257 188a32 32 0 01-30 41h-184a32 32 0 01-28-16z</Geometry>
|
||||||
<Geometry x:Key="Icon.Folder.Fill">M448 64l128 128h448v768H0V64z</Geometry>
|
<Geometry x:Key="Icon.Statistics">M296 912H120c-4.4 0-8-3.6-8-8V520c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v384c0 4.4-3.6 8-8 8zM600 912H424c-4.4 0-8-3.6-8-8V121c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v783c0 4.4-3.6 8-8 8zM904 912H728c-4.4 0-8-3.6-8-8V280c0-4.4 3.6-8 8-8h176c4.4 0 8 3.6 8 8v624c0 4.4-3.6 8-8 8z</Geometry>
|
||||||
<Geometry x:Key="Icon.Folder.Open">M832 960l192-512H192L0 960zM128 384L0 960V128h288l128 128h416v128z</Geometry>
|
<Geometry x:Key="Icon.Help">M550 627h-81v-21a142 142 0 0113-64a198 198 0 0152-57a390 390 0 0047-42a56 56 0 0012-34a58 58 0 00-21-45a81 81 0 00-56-19a85 85 0 00-57 20a103 103 0 00-32 59l-82-10a136 136 0 0149-96A172 172 0 01512 276a178 178 0 01123 40a122 122 0 0145 94a103 103 0 01-17 56a366 366 0 01-71 72A136 136 0 00556 576a128 128 0 00-6 51zm-81 120v-89h89v89zM512 64a448 448 0 10448 448A448 448 0 00512 64zm0 832a384 384 0 010-768a389 389 0 01384 384a389 389 0 01-384 384z</Geometry>
|
||||||
<Geometry x:Key="Icon.File">M959 320H960v640A64 64 0 01896 1024H192A64 64 0 01128 960V64A64 64 0 01192 0H640v321h320L959 320zM320 544c0 17 14 32 32 32h384A32 32 0 00768 544c0-17-14-32-32-32H352A32 32 0 00320 544zm0 128c0 17 14 32 32 32h384a32 32 0 0032-32c0-17-14-32-32-32H352a32 32 0 00-32 32zm0 128c0 17 14 32 32 32h384a32 32 0 0032-32c0-17-14-32-32-32H352a32 32 0 00-32 32z</Geometry>
|
<Geometry x:Key="Icon.Folder">M64 864h896V288h-396a64 64 0 01-57-35L460 160H64v704zm-64 32V128a32 32 0 0132-32h448a32 32 0 0129 18L564 224H992a32 32 0 0132 32v640a32 32 0 01-32 32H32a32 32 0 01-32-32z</Geometry>
|
||||||
<Geometry x:Key="Icon.Diff">M854 307 611 73c-6-6-14-9-22-9H296c-4 0-8 4-8 8v56c0 4 4 8 8 8h277l219 211V824c0 4 4 8 8 8h56c4 0 8-4 8-8V330c0-9-4-17-10-23zM553 201c-6-6-14-9-23-9H192c-18 0-32 14-32 32v704c0 18 14 32 32 32h512c18 0 32-14 32-32V397c0-9-3-17-9-23L553 201zM568 753c0 4-3 7-8 7h-225c-4 0-8-3-8-7v-42c0-4 3-7 8-7h225c4 0 8 3 8 7v42zm0-220c0 4-3 7-8 7H476v85c0 4-3 7-7 7h-42c-4 0-7-3-7-7V540h-85c-4 0-8-3-8-7v-42c0-4 3-7 8-7H420v-85c0-4 3-7 7-7h42c4 0 7 3 7 7V484h85c4 0 8 3 8 7v42z</Geometry>
|
<Geometry x:Key="Icon.Folder.Fill">M448 64l128 128h448v768H0V64z</Geometry>
|
||||||
<Geometry x:Key="Icon.DiffWith">M683 409v204L1024 308 683 0v191c-413 0-427 526-427 526c117-229 203-307 427-307zm85 492H102V327h153s38-63 114-122H51c-28 0-51 27-51 61v697c0 34 23 61 51 61h768c28 0 51-27 51-61V614l-102 100v187z</Geometry>
|
<Geometry x:Key="Icon.Folder.Open">M832 960l192-512H192L0 960zM128 384L0 960V128h288l128 128h416v128z</Geometry>
|
||||||
<Geometry x:Key="Icon.Filter">M599 425 599 657 425 832 425 425 192 192 832 192Z</Geometry>
|
<Geometry x:Key="Icon.File">M959 320H960v640A64 64 0 01896 1024H192A64 64 0 01128 960V64A64 64 0 01192 0H640v321h320L959 320zM320 544c0 17 14 32 32 32h384A32 32 0 00768 544c0-17-14-32-32-32H352A32 32 0 00320 544zm0 128c0 17 14 32 32 32h384a32 32 0 0032-32c0-17-14-32-32-32H352a32 32 0 00-32 32zm0 128c0 17 14 32 32 32h384a32 32 0 0032-32c0-17-14-32-32-32H352a32 32 0 00-32 32z</Geometry>
|
||||||
<Geometry x:Key="Icon.Binary">M71 1024V0h661L953 219V1024H71zm808-731-220-219H145V951h735V293zM439 512h-220V219h220V512zm-74-219H292v146h74v-146zm0 512h74v73h-220v-73H292v-146H218V585h147v219zm294-366h74V512H512v-73h74v-146H512V219h147v219zm74 439H512V585h220v293zm-74-219h-74v146h74v-146z</Geometry>
|
<Geometry x:Key="Icon.Diff">M854 307 611 73c-6-6-14-9-22-9H296c-4 0-8 4-8 8v56c0 4 4 8 8 8h277l219 211V824c0 4 4 8 8 8h56c4 0 8-4 8-8V330c0-9-4-17-10-23zM553 201c-6-6-14-9-23-9H192c-18 0-32 14-32 32v704c0 18 14 32 32 32h512c18 0 32-14 32-32V397c0-9-3-17-9-23L553 201zM568 753c0 4-3 7-8 7h-225c-4 0-8-3-8-7v-42c0-4 3-7 8-7h225c4 0 8 3 8 7v42zm0-220c0 4-3 7-8 7H476v85c0 4-3 7-7 7h-42c-4 0-7-3-7-7V540h-85c-4 0-8-3-8-7v-42c0-4 3-7 8-7H420v-85c0-4 3-7 7-7h42c4 0 7 3 7 7V484h85c4 0 8 3 8 7v42z</Geometry>
|
||||||
|
<Geometry x:Key="Icon.DiffWith">M683 409v204L1024 308 683 0v191c-413 0-427 526-427 526c117-229 203-307 427-307zm85 492H102V327h153s38-63 114-122H51c-28 0-51 27-51 61v697c0 34 23 61 51 61h768c28 0 51-27 51-61V614l-102 100v187z</Geometry>
|
||||||
<Geometry x:Key="Icon.Fetch">M1024 896v128H0V704h128v192h768V704h128v192zM576 555 811 320 896 405l-384 384-384-384L213 320 448 555V0h128v555z</Geometry>
|
<Geometry x:Key="Icon.Filter">M599 425 599 657 425 832 425 425 192 192 832 192Z</Geometry>
|
||||||
<Geometry x:Key="Icon.Pull">M432 0h160c27 0 48 21 48 48v336h175c36 0 53 43 28 68L539 757c-15 15-40 15-55 0L180 452c-25-25-7-68 28-68H384V48c0-27 21-48 48-48zm592 752v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h293l98 98c40 40 105 40 145 0l98-98H976c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z</Geometry>
|
<Geometry x:Key="Icon.Binary">M71 1024V0h661L953 219V1024H71zm808-731-220-219H145V951h735V293zM439 512h-220V219h220V512zm-74-219H292v146h74v-146zm0 512h74v73h-220v-73H292v-146H218V585h147v219zm294-366h74V512H512v-73h74v-146H512V219h147v219zm74 439H512V585h220v293zm-74-219h-74v146h74v-146z</Geometry>
|
||||||
<Geometry x:Key="Icon.Push">M592 768h-160c-27 0-48-21-48-48V384h-175c-36 0-53-43-28-68L485 11c15-15 40-15 55 0l304 304c25 25 7 68-28 68H640v336c0 27-21 48-48 48zm432-16v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h272v16c0 62 50 112 112 112h160c62 0 112-50 112-112v-16h272c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z</Geometry>
|
|
||||||
<Geometry x:Key="Icon.SaveStash">M961 320 512 577 63 320 512 62l449 258zM512 628 185 442 63 512 512 770 961 512l-123-70L512 628zM512 821 185 634 63 704 512 962l449-258L839 634 512 821z</Geometry>
|
<Geometry x:Key="Icon.Fetch">M1024 896v128H0V704h128v192h768V704h128v192zM576 555 811 320 896 405l-384 384-384-384L213 320 448 555V0h128v555z</Geometry>
|
||||||
<Geometry x:Key="Icon.Apply">M154 256h410v51H154zM154 563h154v51H154zM154 410h307v51H154zM154 973H51V51h819v102l51 51V0H0v1024h154v-51zM870 666v307H563l-51 51h410V614l-51 51zM819 205 205 819v205h205l614-614zM256 973v-102l102 102zm563-461-102-102 51-51 102 102z</Geometry>
|
<Geometry x:Key="Icon.Pull">M432 0h160c27 0 48 21 48 48v336h175c36 0 53 43 28 68L539 757c-15 15-40 15-55 0L180 452c-25-25-7-68 28-68H384V48c0-27 21-48 48-48zm592 752v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h293l98 98c40 40 105 40 145 0l98-98H976c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z</Geometry>
|
||||||
<Geometry x:Key="Icon.Terminal">M144 112h736c18 0 32 14 32 32v736c0 18-14 32-32 32H144c-18 0-32-14-32-32V144c0-18 14-32 32-32zm112 211v72a9 9 0 003 7L386 509 259 615a9 9 0 00-3 7v72a9 9 0 0015 7L493 516a9 9 0 000-14l-222-186a9 9 0 00-15 7zM522 624a10 10 0 00-10 10v60a10 10 0 0010 10h237a10 10 0 0010-10v-60a10 10 0 00-10-10H522z</Geometry>
|
<Geometry x:Key="Icon.Push">M592 768h-160c-27 0-48-21-48-48V384h-175c-36 0-53-43-28-68L485 11c15-15 40-15 55 0l304 304c25 25 7 68-28 68H640v336c0 27-21 48-48 48zm432-16v224c0 27-21 48-48 48H48c-27 0-48-21-48-48V752c0-27 21-48 48-48h272v16c0 62 50 112 112 112h160c62 0 112-50 112-112v-16h272c27 0 48 21 48 48zm-248 176c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40zm128 0c0-22-18-40-40-40s-40 18-40 40s18 40 40 40s40-18 40-40z</Geometry>
|
||||||
<Geometry x:Key="Icon.Flow">M509 556l93 149h124l-80-79 49-50 165 164-165 163-49-50 79-79h-163l-96-153 41-65zm187-395 165 164-165 163-49-50L726 360H530l-136 224H140v-70h215l136-224h236l-80-79 49-50z</Geometry>
|
<Geometry x:Key="Icon.SaveStash">M961 320 512 577 63 320 512 62l449 258zM512 628 185 442 63 512 512 770 961 512l-123-70L512 628zM512 821 185 634 63 704 512 962l449-258L839 634 512 821z</Geometry>
|
||||||
|
<Geometry x:Key="Icon.Apply">M154 256h410v51H154zM154 563h154v51H154zM154 410h307v51H154zM154 973H51V51h819v102l51 51V0H0v1024h154v-51zM870 666v307H563l-51 51h410V614l-51 51zM819 205 205 819v205h205l614-614zM256 973v-102l102 102zm563-461-102-102 51-51 102 102z</Geometry>
|
||||||
<Geometry x:Key="Icon.Commit">M796 471A292 292 0 00512 256a293 293 0 00-284 215H0v144h228A293 293 0 00512 832a291 291 0 00284-217H1024V471h-228M512 688A146 146 0 01366 544A145 145 0 01512 400c80 0 146 63 146 144A146 146 0 01512 688</Geometry>
|
<Geometry x:Key="Icon.Terminal">M144 112h736c18 0 32 14 32 32v736c0 18-14 32-32 32H144c-18 0-32-14-32-32V144c0-18 14-32 32-32zm112 211v72a9 9 0 003 7L386 509 259 615a9 9 0 00-3 7v72a9 9 0 0015 7L493 516a9 9 0 000-14l-222-186a9 9 0 00-15 7zM522 624a10 10 0 00-10 10v60a10 10 0 0010 10h237a10 10 0 0010-10v-60a10 10 0 00-10-10H522z</Geometry>
|
||||||
<Geometry x:Key="Icon.Send">M0 586l404 119 498-410-386 441-2 251 155-205 279 83L1170 37z</Geometry>
|
<Geometry x:Key="Icon.Flow">M509 556l93 149h124l-80-79 49-50 165 164-165 163-49-50 79-79h-163l-96-153 41-65zm187-395 165 164-165 163-49-50L726 360H530l-136 224H140v-70h215l136-224h236l-80-79 49-50z</Geometry>
|
||||||
<Geometry x:Key="Icon.Histories">M24 512A488 488 0 01512 24A488 488 0 011000 512A488 488 0 01512 1000A488 488 0 0124 512zm447-325v327L243 619l51 111 300-138V187H471z</Geometry>
|
|
||||||
<Geometry x:Key="Icon.Stashes">M715 254h-405l-58 57h520zm-492 86v201h578V340zm405 143h-29v-29H425v29h-29v-57h231v57zm-405 295h578V559H223zm174-133h231v57h-29v-29H425v29h-29v-57z</Geometry>
|
<Geometry x:Key="Icon.Commit">M796 471A292 292 0 00512 256a293 293 0 00-284 215H0v144h228A293 293 0 00512 832a291 291 0 00284-217H1024V471h-228M512 688A146 146 0 01366 544A145 145 0 01512 400c80 0 146 63 146 144A146 146 0 01512 688</Geometry>
|
||||||
<Geometry x:Key="Icon.Branch">M869 145a145 145 0 10-289 0c0 56 33 107 83 131c-5 96-77 128-201 175c-52 20-110 42-160 74V276A144 144 0 00242 0a145 145 0 00-145 145c0 58 35 108 84 131v461a144 144 0 00-84 131a145 145 0 10289 0a144 144 0 00-84-131c5-95 77-128 201-175c122-46 274-103 280-287a145 145 0 0085-132zM242 61a83 83 0 110 167a83 83 0 010-167zm0 891a84 84 0 110-167a84 84 0 010 167zM724 228a84 84 0 110-167a84 84 0 010 167z</Geometry>
|
<Geometry x:Key="Icon.Send">M0 586l404 119 498-410-386 441-2 251 155-205 279 83L1170 37z</Geometry>
|
||||||
<Geometry x:Key="Icon.Branch.Add">M896 128h-64V64c0-35-29-64-64-64s-64 29-64 64v64h-64c-35 0-64 29-64 64s29 64 64 64h64v64c0 35 29 64 64 64s64-29 64-64V256h64c35 0 64-29 64-64s-29-64-64-64zm-204 307C673 481 628 512 576 512H448c-47 0-90 13-128 35V372C394 346 448 275 448 192c0-106-86-192-192-192S64 86 64 192c0 83 54 154 128 180v280c-74 26-128 97-128 180c0 106 86 192 192 192s192-86 192-192c0-67-34-125-84-159c22-20 52-33 84-33h128c122 0 223-85 249-199c-19 4-37 7-57 7c-26 0-51-5-76-13zM256 128c35 0 64 29 64 64s-29 64-64 64s-64-29-64-64s29-64 64-64zm0 768c-35 0-64-29-64-64s29-64 64-64s64 29 64 64s-29 64-64 64z</Geometry>
|
<Geometry x:Key="Icon.Histories">M24 512A488 488 0 01512 24A488 488 0 011000 512A488 488 0 01512 1000A488 488 0 0124 512zm447-325v327L243 619l51 111 300-138V187H471z</Geometry>
|
||||||
<Geometry x:Key="Icon.Remote">M902 479v-1c0-133-112-242-250-242c-106 0-196 64-232 154c-28-20-62-32-100-32c-76 0-140 49-160 116c-52 37-86 97-86 165c0 112 90 202 202 202h503c112 0 202-90 202-202c0-65-31-123-79-160z</Geometry>
|
<Geometry x:Key="Icon.Stashes">M715 254h-405l-58 57h520zm-492 86v201h578V340zm405 143h-29v-29H425v29h-29v-57h231v57zm-405 295h578V559H223zm174-133h231v57h-29v-29H425v29h-29v-57z</Geometry>
|
||||||
<Geometry x:Key="Icon.Remote.Add">M364 512h67v108h108v67h-108v108h-67v-108h-108v-67h108v-108zm298-64A107 107 0 01768 555C768 614 720 660 660 660h-108v-54h-108v-108h-94v108h-94c4-21 22-47 44-51l-1-12a75 75 0 0171-75a128 128 0 01239-7a106 106 0 0153-14z</Geometry>
|
<Geometry x:Key="Icon.Branch">M869 145a145 145 0 10-289 0c0 56 33 107 83 131c-5 96-77 128-201 175c-52 20-110 42-160 74V276A144 144 0 00242 0a145 145 0 00-145 145c0 58 35 108 84 131v461a144 144 0 00-84 131a145 145 0 10289 0a144 144 0 00-84-131c5-95 77-128 201-175c122-46 274-103 280-287a145 145 0 0085-132zM242 61a83 83 0 110 167a83 83 0 010-167zm0 891a84 84 0 110-167a84 84 0 010 167zM724 228a84 84 0 110-167a84 84 0 010 167z</Geometry>
|
||||||
<Geometry x:Key="Icon.Tag">M177 156c-22 5-33 17-36 37c-10 57-33 258-13 278l445 445c23 23 61 23 84 0l246-246c23-23 23-61 0-84l-445-445C437 120 231 145 177 156zM331 344c-26 26-69 26-95 0c-26-26-26-69 0-95s69-26 95 0C357 276 357 318 331 344z</Geometry>
|
<Geometry x:Key="Icon.Branch.Add">M896 128h-64V64c0-35-29-64-64-64s-64 29-64 64v64h-64c-35 0-64 29-64 64s29 64 64 64h64v64c0 35 29 64 64 64s64-29 64-64V256h64c35 0 64-29 64-64s-29-64-64-64zm-204 307C673 481 628 512 576 512H448c-47 0-90 13-128 35V372C394 346 448 275 448 192c0-106-86-192-192-192S64 86 64 192c0 83 54 154 128 180v280c-74 26-128 97-128 180c0 106 86 192 192 192s192-86 192-192c0-67-34-125-84-159c22-20 52-33 84-33h128c122 0 223-85 249-199c-19 4-37 7-57 7c-26 0-51-5-76-13zM256 128c35 0 64 29 64 64s-29 64-64 64s-64-29-64-64s29-64 64-64zm0 768c-35 0-64-29-64-64s29-64 64-64s64 29 64 64s-29 64-64 64z</Geometry>
|
||||||
<Geometry x:Key="Icon.Tag.Add">M683 537h-144v-142h-142V283H239a44 44 0 00-41 41v171a56 56 0 0014 34l321 321a41 41 0 0058 0l174-174a41 41 0 000-58zm-341-109a41 41 0 110-58a41 41 0 010 58zM649 284V142h-69v142h-142v68h142v142h69v-142h142v-68h-142z</Geometry>
|
<Geometry x:Key="Icon.Remote">M902 479v-1c0-133-112-242-250-242c-106 0-196 64-232 154c-28-20-62-32-100-32c-76 0-140 49-160 116c-52 37-86 97-86 165c0 112 90 202 202 202h503c112 0 202-90 202-202c0-65-31-123-79-160z</Geometry>
|
||||||
|
<Geometry x:Key="Icon.Remote.Add">M364 512h67v108h108v67h-108v108h-67v-108h-108v-67h108v-108zm298-64A107 107 0 01768 555C768 614 720 660 660 660h-108v-54h-108v-108h-94v108h-94c4-21 22-47 44-51l-1-12a75 75 0 0171-75a128 128 0 01239-7a106 106 0 0153-14z</Geometry>
|
||||||
<Geometry x:Key="Icon.VSCode">M719 85 388 417l-209-165L87 299v427l92 47 210-164L720 939 939 850V171zM186 610V412l104 104zm526 55L514 512l198-153z</Geometry>
|
<Geometry x:Key="Icon.Tag">M177 156c-22 5-33 17-36 37c-10 57-33 258-13 278l445 445c23 23 61 23 84 0l246-246c23-23 23-61 0-84l-445-445C437 120 231 145 177 156zM331 344c-26 26-69 26-95 0c-26-26-26-69 0-95s69-26 95 0C357 276 357 318 331 344z</Geometry>
|
||||||
<Geometry x:Key="Icon.DragDrop">M597 256h85v85h213a43 43 0 0143 43v320L683 555l2 344 95-92L855 939H384a43 43 0 01-43-43v-213H256v-85h85V384a43 43 0 0143-43h213V256zm341 484V896a43 43 0 01-2 13l-84-145L939 740zM171 597v85H85v-85h85zm0-171v85H85v-85h85zm0-171v85H85V256h85zm0-171v85H85V85h85zm171 0v85H256V85h85zm171 0v85h-85V85h85zm171 0v85h-85V85h85z</Geometry>
|
<Geometry x:Key="Icon.Tag.Add">M683 537h-144v-142h-142V283H239a44 44 0 00-41 41v171a56 56 0 0014 34l321 321a41 41 0 0058 0l174-174a41 41 0 000-58zm-341-109a41 41 0 110-58a41 41 0 010 58zM649 284V142h-69v142h-142v68h142v142h69v-142h142v-68h-142z</Geometry>
|
||||||
|
|
||||||
|
<Geometry x:Key="Icon.VSCode">M719 85 388 417l-209-165L87 299v427l92 47 210-164L720 939 939 850V171zM186 610V412l104 104zm526 55L514 512l198-153z</Geometry>
|
||||||
|
<Geometry x:Key="Icon.DragDrop">M597 256h85v85h213a43 43 0 0143 43v320L683 555l2 344 95-92L855 939H384a43 43 0 01-43-43v-213H256v-85h85V384a43 43 0 0143-43h213V256zm341 484V896a43 43 0 01-2 13l-84-145L939 740zM171 597v85H85v-85h85zm0-171v85H85v-85h85zm0-171v85H85V256h85zm0-171v85H85V85h85zm171 0v85H256V85h85zm171 0v85h-85V85h85zm171 0v85h-85V85h85z</Geometry>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
|
@ -433,6 +433,7 @@
|
||||||
<sys:String x:Key="Text.WorkingCopy.CommitAndPush">COMMIT & PUSH</sys:String>
|
<sys:String x:Key="Text.WorkingCopy.CommitAndPush">COMMIT & PUSH</sys:String>
|
||||||
<sys:String x:Key="Text.WorkingCopy.NoCommitHistories">NO RECENT INPUT MESSAGES</sys:String>
|
<sys:String x:Key="Text.WorkingCopy.NoCommitHistories">NO RECENT INPUT MESSAGES</sys:String>
|
||||||
<sys:String x:Key="Text.WorkingCopy.HasCommitHistories">RECENT INPUT MESSAGES</sys:String>
|
<sys:String x:Key="Text.WorkingCopy.HasCommitHistories">RECENT INPUT MESSAGES</sys:String>
|
||||||
|
<sys:String x:Key="Text.WorkingCopy.IncludeUntracked">INCLUDE UNTRACKED FILES</sys:String>
|
||||||
|
|
||||||
<sys:String x:Key="Text.Conflict.CherryPick">Cherry-Pick merge request detected! Press 'Abort' to restore original HEAD</sys:String>
|
<sys:String x:Key="Text.Conflict.CherryPick">Cherry-Pick merge request detected! Press 'Abort' to restore original HEAD</sys:String>
|
||||||
<sys:String x:Key="Text.Conflict.Rebase">Rebase merge request detected! Press 'Abort' to restore original HEAD</sys:String>
|
<sys:String x:Key="Text.Conflict.Rebase">Rebase merge request detected! Press 'Abort' to restore original HEAD</sys:String>
|
||||||
|
|
|
@ -432,6 +432,7 @@
|
||||||
<sys:String x:Key="Text.WorkingCopy.CommitAndPush">提交并推送</sys:String>
|
<sys:String x:Key="Text.WorkingCopy.CommitAndPush">提交并推送</sys:String>
|
||||||
<sys:String x:Key="Text.WorkingCopy.NoCommitHistories">没有提交信息记录</sys:String>
|
<sys:String x:Key="Text.WorkingCopy.NoCommitHistories">没有提交信息记录</sys:String>
|
||||||
<sys:String x:Key="Text.WorkingCopy.HasCommitHistories">最近输入的提交信息</sys:String>
|
<sys:String x:Key="Text.WorkingCopy.HasCommitHistories">最近输入的提交信息</sys:String>
|
||||||
|
<sys:String x:Key="Text.WorkingCopy.IncludeUntracked">显示未跟踪文件</sys:String>
|
||||||
|
|
||||||
<sys:String x:Key="Text.Conflict.CherryPick">检测到挑选提交冲突! </sys:String>
|
<sys:String x:Key="Text.Conflict.CherryPick">检测到挑选提交冲突! </sys:String>
|
||||||
<sys:String x:Key="Text.Conflict.Rebase">检测到变基冲突!</sys:String>
|
<sys:String x:Key="Text.Conflict.Rebase">检测到变基冲突!</sys:String>
|
||||||
|
|
|
@ -1,152 +1,183 @@
|
||||||
<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">
|
||||||
<Style x:Key="Style.ToggleButton.Expender" TargetType="{x:Type ToggleButton}">
|
<Style x:Key="Style.ToggleButton.Expender" TargetType="{x:Type ToggleButton}">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
<Grid Background="{TemplateBinding Background}">
|
<Grid Background="{TemplateBinding Background}">
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<Path
|
<Path
|
||||||
Grid.Column="0"
|
Grid.Column="0"
|
||||||
x:Name="ExpanderIcon"
|
x:Name="ExpanderIcon"
|
||||||
Margin="4,0,0,0"
|
Margin="4,0,0,0"
|
||||||
Width="10" Height="10"
|
Width="10" Height="10"
|
||||||
Style="{DynamicResource Style.Icon}"
|
Style="{DynamicResource Style.Icon}"
|
||||||
Data="{DynamicResource Icon.Down}"
|
Data="{DynamicResource Icon.Down}"
|
||||||
Fill="{DynamicResource Brush.FG2}"
|
Fill="{DynamicResource Brush.FG2}"
|
||||||
RenderTransformOrigin=".5,.5">
|
RenderTransformOrigin=".5,.5">
|
||||||
<Path.RenderTransform>
|
<Path.RenderTransform>
|
||||||
<RotateTransform Angle="270"/>
|
<RotateTransform Angle="270"/>
|
||||||
</Path.RenderTransform>
|
</Path.RenderTransform>
|
||||||
</Path>
|
</Path>
|
||||||
|
|
||||||
<ContentPresenter Grid.Column="1" Margin="0,0,4,0"/>
|
<ContentPresenter Grid.Column="1" Margin="0,0,4,0"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsChecked" Value="True">
|
<Trigger Property="IsChecked" Value="True">
|
||||||
<Setter TargetName="ExpanderIcon" Property="RenderTransform">
|
<Setter TargetName="ExpanderIcon" Property="RenderTransform">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<RotateTransform Angle="0"/>
|
<RotateTransform Angle="0"/>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Style.ToggleButton.Filter" TargetType="{x:Type ToggleButton}">
|
<Style x:Key="Style.ToggleButton.Filter" TargetType="{x:Type ToggleButton}">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
<Grid Background="Transparent">
|
<Grid Background="Transparent">
|
||||||
<Path
|
<Path
|
||||||
x:Name="Icon"
|
x:Name="Icon"
|
||||||
Height="12"
|
Height="12"
|
||||||
Style="{DynamicResource Style.Icon}"
|
Style="{DynamicResource Style.Icon}"
|
||||||
Fill="Transparent"
|
Fill="Transparent"
|
||||||
Stroke="{DynamicResource Brush.FG2}"
|
Stroke="{DynamicResource Brush.FG2}"
|
||||||
StrokeThickness="1"
|
StrokeThickness="1"
|
||||||
Data="{DynamicResource Icon.Filter}"/>
|
Data="{DynamicResource Icon.Filter}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsChecked" Value="True">
|
<Trigger Property="IsChecked" Value="True">
|
||||||
<Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.FG2}"/>
|
<Setter TargetName="Icon" Property="Fill" Value="{DynamicResource Brush.FG2}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<MultiTrigger>
|
<MultiTrigger>
|
||||||
<MultiTrigger.Conditions>
|
<MultiTrigger.Conditions>
|
||||||
<Condition Property="IsChecked" Value="False"/>
|
<Condition Property="IsChecked" Value="False"/>
|
||||||
<Condition Property="IsMouseOver" Value="True"/>
|
<Condition Property="IsMouseOver" Value="True"/>
|
||||||
</MultiTrigger.Conditions>
|
</MultiTrigger.Conditions>
|
||||||
<Setter TargetName="Icon" Property="Opacity" Value=".5"/>
|
<Setter TargetName="Icon" Property="Opacity" Value=".5"/>
|
||||||
</MultiTrigger>
|
</MultiTrigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Style.ToggleButton.SplitDirection" TargetType="{x:Type ToggleButton}">
|
<Style x:Key="Style.ToggleButton.SplitDirection" TargetType="{x:Type ToggleButton}">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
<Setter Property="Opacity" Value=".8"/>
|
<Setter Property="Opacity" Value=".8"/>
|
||||||
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
<Grid Background="Transparent">
|
<Grid Background="Transparent">
|
||||||
<Path
|
<Path
|
||||||
x:Name="Icon"
|
x:Name="Icon"
|
||||||
Style="{DynamicResource Style.Icon}"
|
Style="{DynamicResource Style.Icon}"
|
||||||
Width="{TemplateBinding Width}"
|
Width="{TemplateBinding Width}"
|
||||||
Height="{TemplateBinding Height}"
|
Height="{TemplateBinding Height}"
|
||||||
Fill="{DynamicResource Brush.FG1}"
|
Fill="{DynamicResource Brush.FG1}"
|
||||||
Data="{DynamicResource Icon.Orientation}"
|
Data="{DynamicResource Icon.Orientation}"
|
||||||
RenderTransformOrigin=".5,.5">
|
RenderTransformOrigin=".5,.5">
|
||||||
<Path.RenderTransform>
|
<Path.RenderTransform>
|
||||||
<RotateTransform Angle="270"/>
|
<RotateTransform Angle="270"/>
|
||||||
</Path.RenderTransform>
|
</Path.RenderTransform>
|
||||||
</Path>
|
</Path>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsChecked" Value="True">
|
<Trigger Property="IsChecked" Value="True">
|
||||||
<Setter TargetName="Icon" Property="RenderTransform">
|
<Setter TargetName="Icon" Property="RenderTransform">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<RotateTransform Angle="0"/>
|
<RotateTransform Angle="0"/>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter Property="Opacity" Value="1"/>
|
<Setter Property="Opacity" Value="1"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
<Style x:Key="Style.ToggleButton.MaxOrRestore" TargetType="{x:Type ToggleButton}">
|
<Style x:Key="Style.ToggleButton.MaxOrRestore" TargetType="{x:Type ToggleButton}">
|
||||||
<Setter Property="Background" Value="Transparent"/>
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
<Setter Property="BorderBrush" Value="Transparent"/>
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
<Setter Property="BorderThickness" Value="0"/>
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
|
||||||
<Setter Property="Template">
|
<Setter Property="Template">
|
||||||
<Setter.Value>
|
<Setter.Value>
|
||||||
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
<Grid x:Name="BG" Background="Transparent">
|
<Grid x:Name="BG" Background="Transparent">
|
||||||
<Path
|
<Path
|
||||||
x:Name="Icon"
|
x:Name="Icon"
|
||||||
Width="10"
|
Width="10"
|
||||||
Height="10"
|
Height="10"
|
||||||
Style="{DynamicResource Style.Icon}"
|
Style="{DynamicResource Style.Icon}"
|
||||||
Fill="{DynamicResource Brush.FG1}"
|
Fill="{DynamicResource Brush.FG1}"
|
||||||
Data="{DynamicResource Icon.Maximize}"/>
|
Data="{DynamicResource Icon.Maximize}"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
<ControlTemplate.Triggers>
|
<ControlTemplate.Triggers>
|
||||||
<Trigger Property="IsChecked" Value="True">
|
<Trigger Property="IsChecked" Value="True">
|
||||||
<Setter TargetName="Icon" Property="Data" Value="{DynamicResource Icon.Restore}"/>
|
<Setter TargetName="Icon" Property="Data" Value="{DynamicResource Icon.Restore}"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
<Trigger Property="IsMouseOver" Value="True">
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
<Setter TargetName="BG" Property="Background" Value="#40000000"/>
|
<Setter TargetName="BG" Property="Background" Value="#40000000"/>
|
||||||
</Trigger>
|
</Trigger>
|
||||||
</ControlTemplate.Triggers>
|
</ControlTemplate.Triggers>
|
||||||
</ControlTemplate>
|
</ControlTemplate>
|
||||||
</Setter.Value>
|
</Setter.Value>
|
||||||
</Setter>
|
</Setter>
|
||||||
</Style>
|
</Style>
|
||||||
|
|
||||||
|
<Style x:Key="Style.ToggleButton.Eye" TargetType="{x:Type ToggleButton}">
|
||||||
|
<Setter Property="Background" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderBrush" Value="Transparent"/>
|
||||||
|
<Setter Property="BorderThickness" Value="0"/>
|
||||||
|
<Setter Property="Opacity" Value=".8"/>
|
||||||
|
|
||||||
|
<Setter Property="Template">
|
||||||
|
<Setter.Value>
|
||||||
|
<ControlTemplate TargetType="{x:Type ToggleButton}">
|
||||||
|
<Grid Background="Transparent">
|
||||||
|
<Path
|
||||||
|
x:Name="Icon"
|
||||||
|
Height="14"
|
||||||
|
Style="{DynamicResource Style.Icon}"
|
||||||
|
Fill="{DynamicResource Brush.FG1}"
|
||||||
|
Data="{DynamicResource Icon.EyeClose}"/>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
<ControlTemplate.Triggers>
|
||||||
|
<Trigger Property="IsChecked" Value="True">
|
||||||
|
<Setter TargetName="Icon" Property="Data" Value="{DynamicResource Icon.Eye}"/>
|
||||||
|
</Trigger>
|
||||||
|
<Trigger Property="IsMouseOver" Value="True">
|
||||||
|
<Setter Property="Opacity" Value="1"/>
|
||||||
|
</Trigger>
|
||||||
|
</ControlTemplate.Triggers>
|
||||||
|
</ControlTemplate>
|
||||||
|
</Setter.Value>
|
||||||
|
</Setter>
|
||||||
|
</Style>
|
||||||
</ResourceDictionary>
|
</ResourceDictionary>
|
File diff suppressed because it is too large
Load diff
|
@ -1,253 +1,262 @@
|
||||||
<UserControl x:Class="SourceGit.Views.Widgets.WorkingCopy"
|
<UserControl x:Class="SourceGit.Views.Widgets.WorkingCopy"
|
||||||
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: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"
|
||||||
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
|
xmlns:controls="clr-namespace:SourceGit.Views.Controls"
|
||||||
xmlns:converter="clr-namespace:SourceGit.Views.Converters"
|
xmlns:converter="clr-namespace:SourceGit.Views.Converters"
|
||||||
xmlns:models="clr-namespace:SourceGit.Models"
|
xmlns:models="clr-namespace:SourceGit.Models"
|
||||||
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
|
xmlns:widgets="clr-namespace:SourceGit.Views.Widgets"
|
||||||
xmlns:validations="clr-namespace:SourceGit.Views.Validations"
|
xmlns:validations="clr-namespace:SourceGit.Views.Validations"
|
||||||
mc:Ignorable="d"
|
mc:Ignorable="d"
|
||||||
d:DesignHeight="450" d:DesignWidth="800">
|
d:DesignHeight="450" d:DesignWidth="800">
|
||||||
<UserControl.Resources>
|
<UserControl.Resources>
|
||||||
<converter:BoolToCollapsed x:Key="BoolToCollapsed"/>
|
<converter:BoolToCollapsed x:Key="BoolToCollapsed"/>
|
||||||
</UserControl.Resources>
|
</UserControl.Resources>
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="300" MinWidth="300"/>
|
<ColumnDefinition Width="300" MinWidth="300"/>
|
||||||
<ColumnDefinition Width="1"/>
|
<ColumnDefinition Width="1"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
</Grid.ColumnDefinitions>
|
</Grid.ColumnDefinitions>
|
||||||
|
|
||||||
<!-- Left -->
|
<!-- Left -->
|
||||||
<Grid Grid.Column="0">
|
<Grid Grid.Column="0">
|
||||||
<Grid.RowDefinitions>
|
<Grid.RowDefinitions>
|
||||||
<RowDefinition Height="26"/>
|
<RowDefinition Height="26"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
<RowDefinition Height="26"/>
|
<RowDefinition Height="26"/>
|
||||||
<RowDefinition Height="*"/>
|
<RowDefinition Height="*"/>
|
||||||
</Grid.RowDefinitions>
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
<!-- Unstaged Toolbar -->
|
<!-- Unstaged Toolbar -->
|
||||||
<Border Grid.Row="0" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,0,0,1">
|
<Border Grid.Row="0" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,0,0,1">
|
||||||
<Grid>
|
<Grid>
|
||||||
<Grid.ColumnDefinitions>
|
<Grid.ColumnDefinitions>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="*"/>
|
<ColumnDefinition Width="*"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
</Grid.ColumnDefinitions>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<controls:ChangeDisplaySwitcher
|
|
||||||
Grid.Column="0"
|
<controls:ChangeDisplaySwitcher
|
||||||
x:Name="unstagedMode"
|
Grid.Column="0"
|
||||||
Width="14" Height="14"
|
x:Name="unstagedMode"
|
||||||
Margin="4,0,0,0"
|
Width="14" Height="14"
|
||||||
Mode="{Binding Source={x:Static models:Preference.Instance}, Path=Window.ChangeInUnstaged, Mode=TwoWay}"/>
|
Margin="4,0,0,0"
|
||||||
<TextBlock
|
Mode="{Binding Source={x:Static models:Preference.Instance}, Path=Window.ChangeInUnstaged, Mode=TwoWay}"/>
|
||||||
Grid.Column="1"
|
<TextBlock
|
||||||
Margin="6,0"
|
Grid.Column="1"
|
||||||
Text="{DynamicResource Text.WorkingCopy.Unstaged}"
|
Margin="6,0"
|
||||||
Foreground="{DynamicResource Brush.FG2}"
|
Text="{DynamicResource Text.WorkingCopy.Unstaged}"
|
||||||
FontWeight="Bold"/>
|
Foreground="{DynamicResource Brush.FG2}"
|
||||||
<controls:Loading
|
FontWeight="Bold"/>
|
||||||
Grid.Column="2"
|
<controls:Loading
|
||||||
Width="12" Height="12"
|
Grid.Column="2"
|
||||||
x:Name="iconStaging"
|
Width="12" Height="12"
|
||||||
IsAnimating="{Binding ElementName=unstagedContainer, Path=IsStaging}"
|
x:Name="iconStaging"
|
||||||
Visibility="{Binding ElementName=unstagedContainer, Path=IsStaging, Converter={StaticResource BoolToCollapsed}}"/>
|
IsAnimating="{Binding ElementName=unstagedContainer, Path=IsStaging}"
|
||||||
<controls:IconButton
|
Visibility="{Binding ElementName=unstagedContainer, Path=IsStaging, Converter={StaticResource BoolToCollapsed}}"/>
|
||||||
Grid.Column="4"
|
<ToggleButton
|
||||||
Click="StageSelected"
|
Grid.Column="4"
|
||||||
Width="14" Height="14"
|
Width="14" Height="14"
|
||||||
Margin="4,0"
|
Margin="4,0"
|
||||||
Icon="{StaticResource Icon.Down}"
|
Style="{StaticResource Style.ToggleButton.Eye}"
|
||||||
ToolTip="{DynamicResource Text.WorkingCopy.Unstaged.Stage}"/>
|
ToolTip="{DynamicResource Text.WorkingCopy.IncludeUntracked}"
|
||||||
<controls:IconButton
|
IsChecked="{Binding Source={x:Static models:Preference.Instance}, Path=Git.IncludeUntrackedInWC, Mode=TwoWay}"
|
||||||
Grid.Column="5"
|
Checked="ToggleIncludeUntracked" Unchecked="ToggleIncludeUntracked"/>
|
||||||
Click="StageAll"
|
<controls:IconButton
|
||||||
Width="14" Height="14"
|
Grid.Column="5"
|
||||||
Margin="4,0"
|
Click="StageSelected"
|
||||||
Icon="{StaticResource Icon.DoubleDown}"
|
Width="14" Height="14"
|
||||||
ToolTip="{DynamicResource Text.WorkingCopy.Unstaged.StageAll}"/>
|
Margin="4,0"
|
||||||
</Grid>
|
Icon="{StaticResource Icon.Down}"
|
||||||
</Border>
|
ToolTip="{DynamicResource Text.WorkingCopy.Unstaged.Stage}"/>
|
||||||
|
<controls:IconButton
|
||||||
<!-- Unstaged Changes -->
|
Grid.Column="6"
|
||||||
<Border Grid.Row="1" Background="{DynamicResource Brush.Contents}">
|
Click="StageAll"
|
||||||
<widgets:WorkingCopyChanges
|
Width="14" Height="14"
|
||||||
x:Name="unstagedContainer"
|
Margin="4,0"
|
||||||
IsUnstaged="True"
|
Icon="{StaticResource Icon.DoubleDown}"
|
||||||
Mode="{Binding ElementName=unstagedMode, Path=Mode}"
|
ToolTip="{DynamicResource Text.WorkingCopy.Unstaged.StageAll}"/>
|
||||||
DiffTargetChanged="OnDiffTargetChanged"/>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
|
|
||||||
<!-- Staged Toolbar -->
|
<!-- Unstaged Changes -->
|
||||||
<Border Grid.Row="2" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,1">
|
<Border Grid.Row="1" Background="{DynamicResource Brush.Contents}">
|
||||||
<Grid>
|
<widgets:WorkingCopyChanges
|
||||||
<Grid.ColumnDefinitions>
|
x:Name="unstagedContainer"
|
||||||
<ColumnDefinition Width="Auto"/>
|
IsUnstaged="True"
|
||||||
<ColumnDefinition Width="*"/>
|
Mode="{Binding ElementName=unstagedMode, Path=Mode}"
|
||||||
<ColumnDefinition Width="Auto"/>
|
DiffTargetChanged="OnDiffTargetChanged"/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
</Border>
|
||||||
</Grid.ColumnDefinitions>
|
|
||||||
|
<!-- Staged Toolbar -->
|
||||||
<controls:ChangeDisplaySwitcher
|
<Border Grid.Row="2" BorderBrush="{DynamicResource Brush.Border0}" BorderThickness="0,1">
|
||||||
Grid.Column="0"
|
<Grid>
|
||||||
x:Name="stagedMode"
|
<Grid.ColumnDefinitions>
|
||||||
Width="14" Height="14"
|
<ColumnDefinition Width="Auto"/>
|
||||||
Margin="4,0,0,0"
|
<ColumnDefinition Width="*"/>
|
||||||
Mode="{Binding Source={x:Static models:Preference.Instance}, Path=Window.ChangeInStaged, Mode=TwoWay}"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
<TextBlock
|
<ColumnDefinition Width="Auto"/>
|
||||||
Grid.Column="1"
|
</Grid.ColumnDefinitions>
|
||||||
Margin="6,0"
|
|
||||||
Text="{DynamicResource Text.WorkingCopy.Staged}"
|
<controls:ChangeDisplaySwitcher
|
||||||
Foreground="{DynamicResource Brush.FG2}"
|
Grid.Column="0"
|
||||||
FontWeight="Bold"/>
|
x:Name="stagedMode"
|
||||||
|
Width="14" Height="14"
|
||||||
<controls:IconButton
|
Margin="4,0,0,0"
|
||||||
Grid.Column="2"
|
Mode="{Binding Source={x:Static models:Preference.Instance}, Path=Window.ChangeInStaged, Mode=TwoWay}"/>
|
||||||
Click="UnstageSelected"
|
<TextBlock
|
||||||
Width="14" Height="14"
|
Grid.Column="1"
|
||||||
Margin="4,0"
|
Margin="6,0"
|
||||||
Icon="{StaticResource Icon.Up}"
|
Text="{DynamicResource Text.WorkingCopy.Staged}"
|
||||||
ToolTip="{DynamicResource Text.WorkingCopy.Staged.Unstage}"/>
|
Foreground="{DynamicResource Brush.FG2}"
|
||||||
<controls:IconButton
|
FontWeight="Bold"/>
|
||||||
Grid.Column="3"
|
|
||||||
Click="UnstageAll"
|
<controls:IconButton
|
||||||
Width="14" Height="14"
|
Grid.Column="2"
|
||||||
Margin="4,0"
|
Click="UnstageSelected"
|
||||||
Icon="{StaticResource Icon.DoubleUp}"
|
Width="14" Height="14"
|
||||||
ToolTip="{DynamicResource Text.WorkingCopy.Staged.UnstageAll}"/>
|
Margin="4,0"
|
||||||
</Grid>
|
Icon="{StaticResource Icon.Up}"
|
||||||
</Border>
|
ToolTip="{DynamicResource Text.WorkingCopy.Staged.Unstage}"/>
|
||||||
|
<controls:IconButton
|
||||||
<!-- Staged Changes -->
|
Grid.Column="3"
|
||||||
<Border Grid.Row="3" Background="{DynamicResource Brush.Contents}">
|
Click="UnstageAll"
|
||||||
<widgets:WorkingCopyChanges
|
Width="14" Height="14"
|
||||||
x:Name="stagedContainer"
|
Margin="4,0"
|
||||||
IsUnstaged="False"
|
Icon="{StaticResource Icon.DoubleUp}"
|
||||||
Mode="{Binding ElementName=stagedMode, Path=Mode}"
|
ToolTip="{DynamicResource Text.WorkingCopy.Staged.UnstageAll}"/>
|
||||||
DiffTargetChanged="OnDiffTargetChanged"/>
|
</Grid>
|
||||||
</Border>
|
</Border>
|
||||||
</Grid>
|
|
||||||
|
<!-- Staged Changes -->
|
||||||
<GridSplitter Grid.Column="1" Width="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Background="{DynamicResource Brush.Border0}"/>
|
<Border Grid.Row="3" Background="{DynamicResource Brush.Contents}">
|
||||||
|
<widgets:WorkingCopyChanges
|
||||||
<!-- Right -->
|
x:Name="stagedContainer"
|
||||||
<Grid Grid.Column="2" Margin="4">
|
IsUnstaged="False"
|
||||||
<Grid.RowDefinitions>
|
Mode="{Binding ElementName=stagedMode, Path=Mode}"
|
||||||
<RowDefinition Height="*"/>
|
DiffTargetChanged="OnDiffTargetChanged"/>
|
||||||
<RowDefinition Height="Auto"/>
|
</Border>
|
||||||
<RowDefinition Height="Auto"/>
|
</Grid>
|
||||||
</Grid.RowDefinitions>
|
|
||||||
|
<GridSplitter Grid.Column="1" Width="1" HorizontalAlignment="Center" VerticalAlignment="Stretch" Background="{DynamicResource Brush.Border0}"/>
|
||||||
<!-- Diff viewer -->
|
|
||||||
<widgets:DiffViewer Grid.Row="0" x:Name="diffViewer"/>
|
<!-- Right -->
|
||||||
|
<Grid Grid.Column="2" Margin="4">
|
||||||
<!-- Merge Option Panel -->
|
<Grid.RowDefinitions>
|
||||||
<Grid Grid.Row="0" x:Name="mergePanel" Background="{DynamicResource Brush.Window}" Visibility="Collapsed">
|
<RowDefinition Height="*"/>
|
||||||
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
<RowDefinition Height="Auto"/>
|
||||||
<Path
|
<RowDefinition Height="Auto"/>
|
||||||
Width="64" Height="64"
|
</Grid.RowDefinitions>
|
||||||
Data="{StaticResource Icon.Conflict}"
|
|
||||||
Fill="{DynamicResource Brush.FG2}"/>
|
<!-- Diff viewer -->
|
||||||
<TextBlock
|
<widgets:DiffViewer Grid.Row="0" x:Name="diffViewer"/>
|
||||||
Margin="0,16,0,28"
|
|
||||||
FontSize="20" FontWeight="DemiBold"
|
<!-- Merge Option Panel -->
|
||||||
Text="{DynamicResource Text.WorkingCopy.Conflicts}"
|
<Grid Grid.Row="0" x:Name="mergePanel" Background="{DynamicResource Brush.Window}" Visibility="Collapsed">
|
||||||
Foreground="{DynamicResource Brush.FG2}"
|
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" VerticalAlignment="Center">
|
||||||
HorizontalAlignment="Center"/>
|
<Path
|
||||||
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
Width="64" Height="64"
|
||||||
<Button Click="UseTheirs" Content="{DynamicResource Text.WorkingCopy.UseTheirs}" Height="24" Padding="8,0"/>
|
Data="{StaticResource Icon.Conflict}"
|
||||||
<Button Click="UseMine" Content="{DynamicResource Text.WorkingCopy.UseMine}" Height="24" Margin="8,0" Padding="8,0"/>
|
Fill="{DynamicResource Brush.FG2}"/>
|
||||||
<Button Click="UseMergeTool" Content="{DynamicResource Text.WorkingCopy.OpenMerger}" Height="24" Padding="8,0"/>
|
<TextBlock
|
||||||
</StackPanel>
|
Margin="0,16,0,28"
|
||||||
</StackPanel>
|
FontSize="20" FontWeight="DemiBold"
|
||||||
</Grid>
|
Text="{DynamicResource Text.WorkingCopy.Conflicts}"
|
||||||
|
Foreground="{DynamicResource Brush.FG2}"
|
||||||
<!-- Commit Message -->
|
HorizontalAlignment="Center"/>
|
||||||
<controls:TextEdit
|
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
|
||||||
Grid.Row="1"
|
<Button Click="UseTheirs" Content="{DynamicResource Text.WorkingCopy.UseTheirs}" Height="24" Padding="8,0"/>
|
||||||
x:Name="txtCommitMessage"
|
<Button Click="UseMine" Content="{DynamicResource Text.WorkingCopy.UseMine}" Height="24" Margin="8,0" Padding="8,0"/>
|
||||||
Height="64"
|
<Button Click="UseMergeTool" Content="{DynamicResource Text.WorkingCopy.OpenMerger}" Height="24" Padding="8,0"/>
|
||||||
Margin="0,4" Padding="1"
|
</StackPanel>
|
||||||
AcceptsReturn="True"
|
</StackPanel>
|
||||||
AcceptsTab="True"
|
</Grid>
|
||||||
TextWrapping="Wrap"
|
|
||||||
KeyDown="CommitMessageKeyDown"
|
<!-- Commit Message -->
|
||||||
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
<controls:TextEdit
|
||||||
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
Grid.Row="1"
|
||||||
Placeholder="{DynamicResource Text.WorkingCopy.CommitMessageTip}"
|
x:Name="txtCommitMessage"
|
||||||
PlaceholderBaseline="Top">
|
Height="64"
|
||||||
<TextBox.Text>
|
Margin="0,4" Padding="1"
|
||||||
<Binding ElementName="me" Path="CommitMessage" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
AcceptsReturn="True"
|
||||||
<Binding.ValidationRules>
|
AcceptsTab="True"
|
||||||
<validations:CommitMessage/>
|
TextWrapping="Wrap"
|
||||||
</Binding.ValidationRules>
|
KeyDown="CommitMessageKeyDown"
|
||||||
</Binding>
|
ScrollViewer.HorizontalScrollBarVisibility="Disabled"
|
||||||
</TextBox.Text>
|
ScrollViewer.VerticalScrollBarVisibility="Auto"
|
||||||
</controls:TextEdit>
|
Placeholder="{DynamicResource Text.WorkingCopy.CommitMessageTip}"
|
||||||
|
PlaceholderBaseline="Top">
|
||||||
<!-- Commit Options -->
|
<TextBox.Text>
|
||||||
<Grid Grid.Row="2" Margin="0,0,0,8">
|
<Binding ElementName="me" Path="CommitMessage" Mode="TwoWay" UpdateSourceTrigger="PropertyChanged">
|
||||||
<Grid.ColumnDefinitions>
|
<Binding.ValidationRules>
|
||||||
<ColumnDefinition Width="Auto"/>
|
<validations:CommitMessage/>
|
||||||
<ColumnDefinition Width="Auto"/>
|
</Binding.ValidationRules>
|
||||||
<ColumnDefinition Width="*"/>
|
</Binding>
|
||||||
<ColumnDefinition Width="Auto"/>
|
</TextBox.Text>
|
||||||
<ColumnDefinition Width="Auto"/>
|
</controls:TextEdit>
|
||||||
<ColumnDefinition Width="Auto"/>
|
|
||||||
</Grid.ColumnDefinitions>
|
<!-- Commit Options -->
|
||||||
|
<Grid Grid.Row="2" Margin="0,0,0,8">
|
||||||
<controls:IconButton
|
<Grid.ColumnDefinitions>
|
||||||
Grid.Column="0"
|
<ColumnDefinition Width="Auto"/>
|
||||||
Width="14" Height="14"
|
<ColumnDefinition Width="Auto"/>
|
||||||
Click="OpenCommitMessageRecorder"
|
<ColumnDefinition Width="*"/>
|
||||||
ToolTip="{DynamicResource Text.WorkingCopy.MessageHistories}"
|
<ColumnDefinition Width="Auto"/>
|
||||||
Icon="{StaticResource Icon.List}"
|
<ColumnDefinition Width="Auto"/>
|
||||||
Opacity=".5"/>
|
<ColumnDefinition Width="Auto"/>
|
||||||
|
</Grid.ColumnDefinitions>
|
||||||
<CheckBox
|
|
||||||
Grid.Column="1"
|
<controls:IconButton
|
||||||
x:Name="chkAmend"
|
Grid.Column="0"
|
||||||
Margin="8,0,0,0"
|
Width="14" Height="14"
|
||||||
HorizontalAlignment="Left"
|
Click="OpenCommitMessageRecorder"
|
||||||
Content="{DynamicResource Text.WorkingCopy.Amend}"
|
ToolTip="{DynamicResource Text.WorkingCopy.MessageHistories}"
|
||||||
Checked="StartAmend" Unchecked="EndAmend"/>
|
Icon="{StaticResource Icon.List}"
|
||||||
|
Opacity=".5"/>
|
||||||
<controls:Loading
|
|
||||||
Grid.Column="3"
|
<CheckBox
|
||||||
x:Name="iconCommitting"
|
Grid.Column="1"
|
||||||
Width="18" Height="18"
|
x:Name="chkAmend"
|
||||||
Margin="0,0,8,0"
|
Margin="8,0,0,0"
|
||||||
Visibility="Collapsed"/>
|
HorizontalAlignment="Left"
|
||||||
|
Content="{DynamicResource Text.WorkingCopy.Amend}"
|
||||||
<Button
|
Checked="StartAmend" Unchecked="EndAmend"/>
|
||||||
Grid.Column="4"
|
|
||||||
Height="26"
|
<controls:Loading
|
||||||
Padding="8,0"
|
Grid.Column="3"
|
||||||
Click="Commit"
|
x:Name="iconCommitting"
|
||||||
FontWeight="Bold"
|
Width="18" Height="18"
|
||||||
Background="{DynamicResource Brush.Accent1}"
|
Margin="0,0,8,0"
|
||||||
BorderBrush="{DynamicResource Brush.FG1}"
|
Visibility="Collapsed"/>
|
||||||
Content="{DynamicResource Text.WorkingCopy.Commit}"
|
|
||||||
ToolTip="{DynamicResource Text.WorkingCopy.CommitTip}"/>
|
<Button
|
||||||
|
Grid.Column="4"
|
||||||
<Button
|
Height="26"
|
||||||
Grid.Column="5"
|
Padding="8,0"
|
||||||
x:Name="btnCommitAndPush"
|
Click="Commit"
|
||||||
Height="26"
|
FontWeight="Bold"
|
||||||
Padding="8,0"
|
Background="{DynamicResource Brush.Accent1}"
|
||||||
Click="CommitAndPush"
|
BorderBrush="{DynamicResource Brush.FG1}"
|
||||||
FontWeight="Bold"
|
Content="{DynamicResource Text.WorkingCopy.Commit}"
|
||||||
Content="{DynamicResource Text.WorkingCopy.CommitAndPush}"
|
ToolTip="{DynamicResource Text.WorkingCopy.CommitTip}"/>
|
||||||
Margin="8,0,0,0"/>
|
|
||||||
</Grid>
|
<Button
|
||||||
</Grid>
|
Grid.Column="5"
|
||||||
</Grid>
|
x:Name="btnCommitAndPush"
|
||||||
</UserControl>
|
Height="26"
|
||||||
|
Padding="8,0"
|
||||||
|
Click="CommitAndPush"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Content="{DynamicResource Text.WorkingCopy.CommitAndPush}"
|
||||||
|
Margin="8,0,0,0"/>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</UserControl>
|
||||||
|
|
|
@ -1,367 +1,372 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
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.Controls.Primitives;
|
using System.Windows.Controls.Primitives;
|
||||||
using System.Windows.Input;
|
using System.Windows.Input;
|
||||||
|
|
||||||
namespace SourceGit.Views.Widgets {
|
namespace SourceGit.Views.Widgets {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 工作区
|
/// 工作区
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class WorkingCopy : UserControl {
|
public partial class WorkingCopy : UserControl {
|
||||||
private Models.Repository repo = null;
|
private Models.Repository repo = null;
|
||||||
private bool isLFSEnabled = false;
|
private bool isLFSEnabled = false;
|
||||||
|
|
||||||
public string CommitMessage { get; set; }
|
public string CommitMessage { get; set; }
|
||||||
|
|
||||||
public WorkingCopy(Models.Repository repo) {
|
public WorkingCopy(Models.Repository repo) {
|
||||||
this.repo = repo;
|
this.repo = repo;
|
||||||
this.isLFSEnabled = new Commands.LFS(repo.Path).IsEnabled();
|
this.isLFSEnabled = new Commands.LFS(repo.Path).IsEnabled();
|
||||||
|
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
|
||||||
unstagedContainer.SetRepository(repo.Path);
|
unstagedContainer.SetRepository(repo.Path);
|
||||||
stagedContainer.SetRepository(repo.Path);
|
stagedContainer.SetRepository(repo.Path);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void SetData(List<Models.Change> changes) {
|
public void SetData(List<Models.Change> changes) {
|
||||||
List<Models.Change> unstagedChanges = new List<Models.Change>();
|
List<Models.Change> unstagedChanges = new List<Models.Change>();
|
||||||
List<Models.Change> stagedChanges = new List<Models.Change>();
|
List<Models.Change> stagedChanges = new List<Models.Change>();
|
||||||
|
|
||||||
foreach (var c in changes) {
|
foreach (var c in changes) {
|
||||||
if (c.Index == Models.Change.Status.Modified
|
if (c.Index == Models.Change.Status.Modified
|
||||||
|| c.Index == Models.Change.Status.Added
|
|| c.Index == Models.Change.Status.Added
|
||||||
|| c.Index == Models.Change.Status.Deleted
|
|| c.Index == Models.Change.Status.Deleted
|
||||||
|| c.Index == Models.Change.Status.Renamed) {
|
|| c.Index == Models.Change.Status.Renamed) {
|
||||||
stagedChanges.Add(c);
|
stagedChanges.Add(c);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (c.WorkTree != Models.Change.Status.None) {
|
if (c.WorkTree != Models.Change.Status.None) {
|
||||||
unstagedChanges.Add(c);
|
unstagedChanges.Add(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unstagedContainer.SetData(unstagedChanges);
|
unstagedContainer.SetData(unstagedChanges);
|
||||||
stagedContainer.SetData(stagedChanges);
|
stagedContainer.SetData(stagedChanges);
|
||||||
|
|
||||||
var current = repo.Branches.Find(x => x.IsCurrent);
|
var current = repo.Branches.Find(x => x.IsCurrent);
|
||||||
if (current != null && !string.IsNullOrEmpty(current.Upstream) && chkAmend.IsChecked != true) {
|
if (current != null && !string.IsNullOrEmpty(current.Upstream) && chkAmend.IsChecked != true) {
|
||||||
btnCommitAndPush.Visibility = Visibility.Visible;
|
btnCommitAndPush.Visibility = Visibility.Visible;
|
||||||
} else {
|
} else {
|
||||||
btnCommitAndPush.Visibility = Visibility.Collapsed;
|
btnCommitAndPush.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
var diffTarget = unstagedContainer.DiffTarget;
|
var diffTarget = unstagedContainer.DiffTarget;
|
||||||
if (diffTarget == null) diffTarget = stagedContainer.DiffTarget;
|
if (diffTarget == null) diffTarget = stagedContainer.DiffTarget;
|
||||||
if (diffTarget == null) {
|
if (diffTarget == null) {
|
||||||
mergePanel.Visibility = Visibility.Collapsed;
|
mergePanel.Visibility = Visibility.Collapsed;
|
||||||
diffViewer.Reset();
|
diffViewer.Reset();
|
||||||
} else if (diffTarget.IsConflit) {
|
} else if (diffTarget.IsConflit) {
|
||||||
mergePanel.Visibility = Visibility.Visible;
|
mergePanel.Visibility = Visibility.Visible;
|
||||||
diffViewer.Reset();
|
diffViewer.Reset();
|
||||||
} else {
|
} else {
|
||||||
mergePanel.Visibility = Visibility.Collapsed;
|
mergePanel.Visibility = Visibility.Collapsed;
|
||||||
diffViewer.Reload();
|
diffViewer.Reload();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TryLoadMergeMessage() {
|
public void TryLoadMergeMessage() {
|
||||||
if (string.IsNullOrEmpty(txtCommitMessage.Text)) {
|
if (string.IsNullOrEmpty(txtCommitMessage.Text)) {
|
||||||
var mergeMsgFile = Path.Combine(repo.GitDir, "MERGE_MSG");
|
var mergeMsgFile = Path.Combine(repo.GitDir, "MERGE_MSG");
|
||||||
if (!File.Exists(mergeMsgFile)) return;
|
if (!File.Exists(mergeMsgFile)) return;
|
||||||
|
|
||||||
var content = File.ReadAllText(mergeMsgFile);
|
var content = File.ReadAllText(mergeMsgFile);
|
||||||
txtCommitMessage.Text = content;
|
txtCommitMessage.Text = content;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void ClearMessage() {
|
public void ClearMessage() {
|
||||||
txtCommitMessage.Text = "";
|
txtCommitMessage.Text = "";
|
||||||
Validation.ClearInvalid(txtCommitMessage.GetBindingExpression(TextBox.TextProperty));
|
Validation.ClearInvalid(txtCommitMessage.GetBindingExpression(TextBox.TextProperty));
|
||||||
}
|
}
|
||||||
|
|
||||||
#region STAGE_UNSTAGE
|
public void ToggleIncludeUntracked(object sender, RoutedEventArgs e) {
|
||||||
private void StageSelected(object sender, RoutedEventArgs e) {
|
var watcher = Models.Watcher.Get(repo.Path);
|
||||||
unstagedContainer.StageSelected();
|
if (watcher != null) watcher.RefreshWC();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void StageAll(object sender, RoutedEventArgs e) {
|
#region STAGE_UNSTAGE
|
||||||
unstagedContainer.StageAll();
|
private void StageSelected(object sender, RoutedEventArgs e) {
|
||||||
}
|
unstagedContainer.StageSelected();
|
||||||
|
}
|
||||||
private void UnstageSelected(object sender, RoutedEventArgs e) {
|
|
||||||
stagedContainer.UnstageSelected();
|
private void StageAll(object sender, RoutedEventArgs e) {
|
||||||
}
|
unstagedContainer.StageAll();
|
||||||
|
}
|
||||||
private void UnstageAll(object sender, RoutedEventArgs e) {
|
|
||||||
stagedContainer.UnstageAll();
|
private void UnstageSelected(object sender, RoutedEventArgs e) {
|
||||||
}
|
stagedContainer.UnstageSelected();
|
||||||
|
}
|
||||||
private void OnDiffTargetChanged(object sender, WorkingCopyChanges.DiffTargetChangedEventArgs e) {
|
|
||||||
var container = sender as WorkingCopyChanges;
|
private void UnstageAll(object sender, RoutedEventArgs e) {
|
||||||
if (container == null) return;
|
stagedContainer.UnstageAll();
|
||||||
|
}
|
||||||
if (e.Target == null) {
|
|
||||||
if (e.HasOthers) {
|
private void OnDiffTargetChanged(object sender, WorkingCopyChanges.DiffTargetChangedEventArgs e) {
|
||||||
if (container.IsUnstaged) {
|
var container = sender as WorkingCopyChanges;
|
||||||
stagedContainer.UnselectAll();
|
if (container == null) return;
|
||||||
} else {
|
|
||||||
unstagedContainer.UnselectAll();
|
if (e.Target == null) {
|
||||||
}
|
if (e.HasOthers) {
|
||||||
|
if (container.IsUnstaged) {
|
||||||
mergePanel.Visibility = Visibility.Collapsed;
|
stagedContainer.UnselectAll();
|
||||||
diffViewer.Reset();
|
} else {
|
||||||
}
|
unstagedContainer.UnselectAll();
|
||||||
|
}
|
||||||
return;
|
|
||||||
}
|
mergePanel.Visibility = Visibility.Collapsed;
|
||||||
|
diffViewer.Reset();
|
||||||
if (container.IsUnstaged) {
|
}
|
||||||
stagedContainer.UnselectAll();
|
|
||||||
} else {
|
return;
|
||||||
unstagedContainer.UnselectAll();
|
}
|
||||||
}
|
|
||||||
|
if (container.IsUnstaged) {
|
||||||
var change = e.Target;
|
stagedContainer.UnselectAll();
|
||||||
if (change.IsConflit) {
|
} else {
|
||||||
mergePanel.Visibility = Visibility.Visible;
|
unstagedContainer.UnselectAll();
|
||||||
diffViewer.Reset();
|
}
|
||||||
return;
|
|
||||||
}
|
var change = e.Target;
|
||||||
|
if (change.IsConflit) {
|
||||||
mergePanel.Visibility = Visibility.Collapsed;
|
mergePanel.Visibility = Visibility.Visible;
|
||||||
if (container.IsUnstaged) {
|
diffViewer.Reset();
|
||||||
switch (change.WorkTree) {
|
return;
|
||||||
case Models.Change.Status.Added:
|
}
|
||||||
case Models.Change.Status.Untracked:
|
|
||||||
diffViewer.Diff(repo.Path, new DiffViewer.Option() {
|
mergePanel.Visibility = Visibility.Collapsed;
|
||||||
ExtraArgs = "--no-index",
|
if (container.IsUnstaged) {
|
||||||
Path = change.Path,
|
switch (change.WorkTree) {
|
||||||
OrgPath = "/dev/null",
|
case Models.Change.Status.Added:
|
||||||
UseLFS = isLFSEnabled
|
case Models.Change.Status.Untracked:
|
||||||
});
|
diffViewer.Diff(repo.Path, new DiffViewer.Option() {
|
||||||
break;
|
ExtraArgs = "--no-index",
|
||||||
default:
|
Path = change.Path,
|
||||||
diffViewer.Diff(repo.Path, new DiffViewer.Option() {
|
OrgPath = "/dev/null",
|
||||||
Path = change.Path,
|
UseLFS = isLFSEnabled
|
||||||
OrgPath = change.OriginalPath,
|
});
|
||||||
UseLFS = isLFSEnabled
|
break;
|
||||||
});
|
default:
|
||||||
break;
|
diffViewer.Diff(repo.Path, new DiffViewer.Option() {
|
||||||
}
|
Path = change.Path,
|
||||||
} else {
|
OrgPath = change.OriginalPath,
|
||||||
diffViewer.Diff(repo.Path, new DiffViewer.Option() {
|
UseLFS = isLFSEnabled
|
||||||
ExtraArgs = "--cached",
|
});
|
||||||
Path = change.Path,
|
break;
|
||||||
OrgPath = change.OriginalPath,
|
}
|
||||||
UseLFS = isLFSEnabled
|
} else {
|
||||||
});
|
diffViewer.Diff(repo.Path, new DiffViewer.Option() {
|
||||||
}
|
ExtraArgs = "--cached",
|
||||||
}
|
Path = change.Path,
|
||||||
#endregion
|
OrgPath = change.OriginalPath,
|
||||||
|
UseLFS = isLFSEnabled
|
||||||
#region MERGE
|
});
|
||||||
private async void UseTheirs(object sender, RoutedEventArgs e) {
|
}
|
||||||
var change = unstagedContainer.DiffTarget;
|
}
|
||||||
if (change == null || !change.IsConflit) return;
|
#endregion
|
||||||
|
|
||||||
Models.Watcher.SetEnabled(repo.Path, false);
|
#region MERGE
|
||||||
var succ = await Task.Run(() => new Commands.Checkout(repo.Path).File(change.Path, true));
|
private async void UseTheirs(object sender, RoutedEventArgs e) {
|
||||||
if (succ) {
|
var change = unstagedContainer.DiffTarget;
|
||||||
await Task.Run(() => new Commands.Add(repo.Path, new List<string>() { change.Path }).Exec());
|
if (change == null || !change.IsConflit) return;
|
||||||
}
|
|
||||||
Models.Watcher.SetEnabled(repo.Path, true);
|
Models.Watcher.SetEnabled(repo.Path, false);
|
||||||
|
var succ = await Task.Run(() => new Commands.Checkout(repo.Path).File(change.Path, true));
|
||||||
e.Handled = true;
|
if (succ) {
|
||||||
}
|
await Task.Run(() => new Commands.Add(repo.Path, new List<string>() { change.Path }).Exec());
|
||||||
|
}
|
||||||
private async void UseMine(object sender, RoutedEventArgs e) {
|
Models.Watcher.SetEnabled(repo.Path, true);
|
||||||
var change = unstagedContainer.DiffTarget;
|
|
||||||
if (change == null || !change.IsConflit) return;
|
e.Handled = true;
|
||||||
|
}
|
||||||
Models.Watcher.SetEnabled(repo.Path, false);
|
|
||||||
var succ = await Task.Run(() => new Commands.Checkout(repo.Path).File(change.Path, false));
|
private async void UseMine(object sender, RoutedEventArgs e) {
|
||||||
if (succ) {
|
var change = unstagedContainer.DiffTarget;
|
||||||
await Task.Run(() => new Commands.Add(repo.Path, new List<string>() { change.Path }).Exec());
|
if (change == null || !change.IsConflit) return;
|
||||||
}
|
|
||||||
Models.Watcher.SetEnabled(repo.Path, true);
|
Models.Watcher.SetEnabled(repo.Path, false);
|
||||||
|
var succ = await Task.Run(() => new Commands.Checkout(repo.Path).File(change.Path, false));
|
||||||
e.Handled = true;
|
if (succ) {
|
||||||
}
|
await Task.Run(() => new Commands.Add(repo.Path, new List<string>() { change.Path }).Exec());
|
||||||
|
}
|
||||||
private async void UseMergeTool(object sender, RoutedEventArgs e) {
|
Models.Watcher.SetEnabled(repo.Path, true);
|
||||||
var mergeType = Models.Preference.Instance.MergeTool.Type;
|
|
||||||
var mergeExe = Models.Preference.Instance.MergeTool.Path;
|
e.Handled = true;
|
||||||
|
}
|
||||||
var merger = Models.MergeTool.Supported.Find(x => x.Type == mergeType);
|
|
||||||
if (merger == null || merger.Type == 0 || !File.Exists(mergeExe)) {
|
private async void UseMergeTool(object sender, RoutedEventArgs e) {
|
||||||
Models.Exception.Raise("Invalid merge tool in preference setting!");
|
var mergeType = Models.Preference.Instance.MergeTool.Type;
|
||||||
return;
|
var mergeExe = Models.Preference.Instance.MergeTool.Path;
|
||||||
}
|
|
||||||
|
var merger = Models.MergeTool.Supported.Find(x => x.Type == mergeType);
|
||||||
var change = unstagedContainer.DiffTarget;
|
if (merger == null || merger.Type == 0 || !File.Exists(mergeExe)) {
|
||||||
if (change == null || !change.IsConflit) return;
|
Models.Exception.Raise("Invalid merge tool in preference setting!");
|
||||||
|
return;
|
||||||
var cmd = new Commands.Command();
|
}
|
||||||
cmd.Cwd = repo.Path;
|
|
||||||
cmd.DontRaiseError = true;
|
var change = unstagedContainer.DiffTarget;
|
||||||
cmd.Args = $"-c mergetool.sourcegit.cmd=\"\\\"{mergeExe}\\\" {merger.Cmd}\" ";
|
if (change == null || !change.IsConflit) return;
|
||||||
cmd.Args += "-c mergetool.writeToTemp=true -c mergetool.keepBackup=false -c mergetool.trustExitCode=true ";
|
|
||||||
cmd.Args += $"mergetool --tool=sourcegit {change.Path}";
|
var cmd = new Commands.Command();
|
||||||
|
cmd.Cwd = repo.Path;
|
||||||
await Task.Run(() => cmd.Exec());
|
cmd.DontRaiseError = true;
|
||||||
e.Handled = true;
|
cmd.Args = $"-c mergetool.sourcegit.cmd=\"\\\"{mergeExe}\\\" {merger.Cmd}\" ";
|
||||||
}
|
cmd.Args += "-c mergetool.writeToTemp=true -c mergetool.keepBackup=false -c mergetool.trustExitCode=true ";
|
||||||
#endregion
|
cmd.Args += $"mergetool --tool=sourcegit {change.Path}";
|
||||||
|
|
||||||
#region COMMIT
|
await Task.Run(() => cmd.Exec());
|
||||||
private void OpenCommitMessageRecorder(object sender, RoutedEventArgs e) {
|
e.Handled = true;
|
||||||
var anchor = sender as Button;
|
}
|
||||||
|
#endregion
|
||||||
if (anchor.ContextMenu == null) {
|
|
||||||
anchor.ContextMenu = new ContextMenu();
|
#region COMMIT
|
||||||
anchor.ContextMenu.PlacementTarget = anchor;
|
private void OpenCommitMessageRecorder(object sender, RoutedEventArgs e) {
|
||||||
anchor.ContextMenu.Placement = PlacementMode.Top;
|
var anchor = sender as Button;
|
||||||
anchor.ContextMenu.VerticalOffset = 0;
|
|
||||||
anchor.ContextMenu.StaysOpen = false;
|
if (anchor.ContextMenu == null) {
|
||||||
anchor.ContextMenu.Focusable = true;
|
anchor.ContextMenu = new ContextMenu();
|
||||||
anchor.ContextMenu.MaxWidth = 500;
|
anchor.ContextMenu.PlacementTarget = anchor;
|
||||||
} else {
|
anchor.ContextMenu.Placement = PlacementMode.Top;
|
||||||
anchor.ContextMenu.Items.Clear();
|
anchor.ContextMenu.VerticalOffset = 0;
|
||||||
}
|
anchor.ContextMenu.StaysOpen = false;
|
||||||
|
anchor.ContextMenu.Focusable = true;
|
||||||
if (repo.CommitMessages.Count == 0) {
|
anchor.ContextMenu.MaxWidth = 500;
|
||||||
var tip = new MenuItem();
|
} else {
|
||||||
tip.Header = App.Text("WorkingCopy.NoCommitHistories");
|
anchor.ContextMenu.Items.Clear();
|
||||||
tip.IsEnabled = false;
|
}
|
||||||
anchor.ContextMenu.Items.Add(tip);
|
|
||||||
} else {
|
if (repo.CommitMessages.Count == 0) {
|
||||||
var tip = new MenuItem();
|
var tip = new MenuItem();
|
||||||
tip.Header = App.Text("WorkingCopy.HasCommitHistories");
|
tip.Header = App.Text("WorkingCopy.NoCommitHistories");
|
||||||
tip.IsEnabled = false;
|
tip.IsEnabled = false;
|
||||||
anchor.ContextMenu.Items.Add(tip);
|
anchor.ContextMenu.Items.Add(tip);
|
||||||
anchor.ContextMenu.Items.Add(new Separator());
|
} else {
|
||||||
|
var tip = new MenuItem();
|
||||||
foreach (var one in repo.CommitMessages) {
|
tip.Header = App.Text("WorkingCopy.HasCommitHistories");
|
||||||
var dump = one;
|
tip.IsEnabled = false;
|
||||||
|
anchor.ContextMenu.Items.Add(tip);
|
||||||
var item = new MenuItem();
|
anchor.ContextMenu.Items.Add(new Separator());
|
||||||
item.Header = dump;
|
|
||||||
item.Padding = new Thickness(0);
|
foreach (var one in repo.CommitMessages) {
|
||||||
item.Click += (o, ev) => {
|
var dump = one;
|
||||||
txtCommitMessage.Text = dump;
|
|
||||||
ev.Handled = true;
|
var item = new MenuItem();
|
||||||
};
|
item.Header = dump;
|
||||||
|
item.Padding = new Thickness(0);
|
||||||
anchor.ContextMenu.Items.Add(item);
|
item.Click += (o, ev) => {
|
||||||
}
|
txtCommitMessage.Text = dump;
|
||||||
}
|
ev.Handled = true;
|
||||||
|
};
|
||||||
anchor.ContextMenu.IsOpen = true;
|
|
||||||
e.Handled = true;
|
anchor.ContextMenu.Items.Add(item);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
private void StartAmend(object sender, RoutedEventArgs e) {
|
|
||||||
var commits = new Commands.Commits(repo.Path, "-n 1", false).Result();
|
anchor.ContextMenu.IsOpen = true;
|
||||||
if (commits.Count == 0) {
|
e.Handled = true;
|
||||||
Models.Exception.Raise("No commits to amend!");
|
}
|
||||||
chkAmend.IsChecked = false;
|
|
||||||
return;
|
private void StartAmend(object sender, RoutedEventArgs e) {
|
||||||
}
|
var commits = new Commands.Commits(repo.Path, "-n 1", false).Result();
|
||||||
|
if (commits.Count == 0) {
|
||||||
txtCommitMessage.Text = commits[0].Subject;
|
Models.Exception.Raise("No commits to amend!");
|
||||||
btnCommitAndPush.Visibility = Visibility.Collapsed;
|
chkAmend.IsChecked = false;
|
||||||
e.Handled = true;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EndAmend(object sender, RoutedEventArgs e) {
|
txtCommitMessage.Text = commits[0].Subject;
|
||||||
if (!IsLoaded) return;
|
btnCommitAndPush.Visibility = Visibility.Collapsed;
|
||||||
|
e.Handled = true;
|
||||||
var current = repo.Branches.Find(x => x.IsCurrent);
|
}
|
||||||
if (current != null && !string.IsNullOrEmpty(current.Upstream)) {
|
|
||||||
btnCommitAndPush.Visibility = Visibility.Visible;
|
private void EndAmend(object sender, RoutedEventArgs e) {
|
||||||
} else {
|
if (!IsLoaded) return;
|
||||||
btnCommitAndPush.Visibility = Visibility.Collapsed;
|
|
||||||
}
|
var current = repo.Branches.Find(x => x.IsCurrent);
|
||||||
|
if (current != null && !string.IsNullOrEmpty(current.Upstream)) {
|
||||||
e.Handled = true;
|
btnCommitAndPush.Visibility = Visibility.Visible;
|
||||||
}
|
} else {
|
||||||
|
btnCommitAndPush.Visibility = Visibility.Collapsed;
|
||||||
private async void Commit(object sender, RoutedEventArgs e) {
|
}
|
||||||
var changes = await Task.Run(() => new Commands.LocalChanges(repo.Path).Result());
|
|
||||||
var conflict = changes.Find(x => x.IsConflit);
|
e.Handled = true;
|
||||||
if (conflict != null) {
|
}
|
||||||
Models.Exception.Raise("You have unsolved conflicts in your working copy!");
|
|
||||||
return;
|
private async void Commit(object sender, RoutedEventArgs e) {
|
||||||
}
|
var changes = await Task.Run(() => new Commands.LocalChanges(repo.Path).Result());
|
||||||
|
var conflict = changes.Find(x => x.IsConflit);
|
||||||
if (stagedContainer.Changes.Count == 0) {
|
if (conflict != null) {
|
||||||
Models.Exception.Raise("No files added to commit!");
|
Models.Exception.Raise("You have unsolved conflicts in your working copy!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
txtCommitMessage.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
if (stagedContainer.Changes.Count == 0) {
|
||||||
if (Validation.GetHasError(txtCommitMessage)) return;
|
Models.Exception.Raise("No files added to commit!");
|
||||||
|
return;
|
||||||
repo.PushCommitMessage(CommitMessage);
|
}
|
||||||
iconCommitting.Visibility = Visibility.Visible;
|
|
||||||
iconCommitting.IsAnimating = true;
|
txtCommitMessage.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
if (Validation.GetHasError(txtCommitMessage)) return;
|
||||||
Models.Watcher.SetEnabled(repo.Path, false);
|
|
||||||
var amend = chkAmend.IsChecked == true;
|
repo.PushCommitMessage(CommitMessage);
|
||||||
var succ = await Task.Run(() => new Commands.Commit(repo.Path, CommitMessage, amend).Exec());
|
iconCommitting.Visibility = Visibility.Visible;
|
||||||
if (succ) {
|
iconCommitting.IsAnimating = true;
|
||||||
ClearMessage();
|
|
||||||
if (amend) chkAmend.IsChecked = false;
|
Models.Watcher.SetEnabled(repo.Path, false);
|
||||||
}
|
var amend = chkAmend.IsChecked == true;
|
||||||
|
var succ = await Task.Run(() => new Commands.Commit(repo.Path, CommitMessage, amend).Exec());
|
||||||
iconCommitting.IsAnimating = false;
|
if (succ) {
|
||||||
iconCommitting.Visibility = Visibility.Collapsed;
|
ClearMessage();
|
||||||
Models.Watcher.SetEnabled(repo.Path, true);
|
if (amend) chkAmend.IsChecked = false;
|
||||||
|
}
|
||||||
e.Handled = true;
|
|
||||||
}
|
iconCommitting.IsAnimating = false;
|
||||||
|
iconCommitting.Visibility = Visibility.Collapsed;
|
||||||
private async void CommitAndPush(object sender, RoutedEventArgs e) {
|
Models.Watcher.SetEnabled(repo.Path, true);
|
||||||
var changes = await Task.Run(() => new Commands.LocalChanges(repo.Path).Result());
|
|
||||||
var conflict = changes.Find(x => x.IsConflit);
|
e.Handled = true;
|
||||||
if (conflict != null) {
|
}
|
||||||
Models.Exception.Raise("You have unsolved conflicts in your working copy!");
|
|
||||||
return;
|
private async void CommitAndPush(object sender, RoutedEventArgs e) {
|
||||||
}
|
var changes = await Task.Run(() => new Commands.LocalChanges(repo.Path).Result());
|
||||||
|
var conflict = changes.Find(x => x.IsConflit);
|
||||||
if (stagedContainer.Changes.Count == 0) {
|
if (conflict != null) {
|
||||||
Models.Exception.Raise("No files added to commit!");
|
Models.Exception.Raise("You have unsolved conflicts in your working copy!");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
txtCommitMessage.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
if (stagedContainer.Changes.Count == 0) {
|
||||||
if (Validation.GetHasError(txtCommitMessage)) return;
|
Models.Exception.Raise("No files added to commit!");
|
||||||
|
return;
|
||||||
repo.PushCommitMessage(CommitMessage);
|
}
|
||||||
iconCommitting.Visibility = Visibility.Visible;
|
|
||||||
iconCommitting.IsAnimating = true;
|
txtCommitMessage.GetBindingExpression(TextBox.TextProperty).UpdateSource();
|
||||||
|
if (Validation.GetHasError(txtCommitMessage)) return;
|
||||||
Models.Watcher.SetEnabled(repo.Path, false);
|
|
||||||
var succ = await Task.Run(() => new Commands.Commit(repo.Path, CommitMessage, false).Exec());
|
repo.PushCommitMessage(CommitMessage);
|
||||||
if (succ) {
|
iconCommitting.Visibility = Visibility.Visible;
|
||||||
new Popups.Push(repo, repo.Branches.Find(x => x.IsCurrent)).ShowAndStart();
|
iconCommitting.IsAnimating = true;
|
||||||
ClearMessage();
|
|
||||||
}
|
Models.Watcher.SetEnabled(repo.Path, false);
|
||||||
iconCommitting.IsAnimating = false;
|
var succ = await Task.Run(() => new Commands.Commit(repo.Path, CommitMessage, false).Exec());
|
||||||
iconCommitting.Visibility = Visibility.Collapsed;
|
if (succ) {
|
||||||
Models.Watcher.SetEnabled(repo.Path, true);
|
new Popups.Push(repo, repo.Branches.Find(x => x.IsCurrent)).ShowAndStart();
|
||||||
|
ClearMessage();
|
||||||
e.Handled = true;
|
}
|
||||||
}
|
iconCommitting.IsAnimating = false;
|
||||||
|
iconCommitting.Visibility = Visibility.Collapsed;
|
||||||
private void CommitMessageKeyDown(object sender, KeyEventArgs e) {
|
Models.Watcher.SetEnabled(repo.Path, true);
|
||||||
if (e.Key == Key.Enter && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) {
|
|
||||||
Commit(sender, e);
|
e.Handled = true;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
#endregion
|
private void CommitMessageKeyDown(object sender, KeyEventArgs e) {
|
||||||
}
|
if (e.Key == Key.Enter && (Keyboard.Modifiers & ModifierKeys.Control) == ModifierKeys.Control) {
|
||||||
}
|
Commit(sender, e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue