mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-01 17:24:59 +00:00
cleanup<*>: run vs code cleanup to format codestyle and remove unused references
This commit is contained in:
parent
37559b60d4
commit
2cf7192ec4
41 changed files with 77 additions and 89 deletions
|
@ -41,9 +41,9 @@ namespace SourceGit.Views.Controls {
|
|||
/// 邮件属性定义
|
||||
/// </summary>
|
||||
public static readonly DependencyProperty EmailProperty = DependencyProperty.Register(
|
||||
"Email",
|
||||
"Email",
|
||||
typeof(string),
|
||||
typeof(Avatar),
|
||||
typeof(Avatar),
|
||||
new PropertyMetadata(null, OnEmailChanged));
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace SourceGit.Views.Controls {
|
||||
|
||||
|
|
|
@ -1,8 +1,3 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Media;
|
||||
|
@ -67,7 +62,7 @@ namespace SourceGit.Views.Controls {
|
|||
return;
|
||||
}
|
||||
|
||||
if (!mark.IsNewPage) {
|
||||
if (!mark.IsNewPage) {
|
||||
if (mark.Color == 0) {
|
||||
mark.icon.SetResourceReference(Path.FillProperty, "Brush.FG1");
|
||||
mark.icon.Data = mark.FindResource("Icon.Git") as Geometry;
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace SourceGit.Views.Controls {
|
|||
class ChangeStatusIcon : FrameworkElement {
|
||||
|
||||
public static readonly DependencyProperty ChangeProperty = DependencyProperty.Register(
|
||||
"Change",
|
||||
typeof(Models.Change),
|
||||
typeof(ChangeStatusIcon),
|
||||
"Change",
|
||||
typeof(Models.Change),
|
||||
typeof(ChangeStatusIcon),
|
||||
new PropertyMetadata(null, ForceDirty));
|
||||
|
||||
public Models.Change Change {
|
||||
|
@ -21,9 +21,9 @@ namespace SourceGit.Views.Controls {
|
|||
}
|
||||
|
||||
public static readonly DependencyProperty IsLocalChangeProperty = DependencyProperty.Register(
|
||||
"IsLocalChange",
|
||||
typeof(bool),
|
||||
typeof(ChangeStatusIcon),
|
||||
"IsLocalChange",
|
||||
typeof(bool),
|
||||
typeof(ChangeStatusIcon),
|
||||
new PropertyMetadata(false, ForceDirty));
|
||||
|
||||
public bool IsLocalChange {
|
||||
|
@ -76,7 +76,7 @@ namespace SourceGit.Views.Controls {
|
|||
FlowDirection.LeftToRight,
|
||||
new Typeface(new FontFamily("Microsoft YaHei UI"), FontStyles.Normal, FontWeights.Normal, FontStretches.Normal),
|
||||
icon.Width * 0.8,
|
||||
new SolidColorBrush(Color.FromRgb(241,241,241)),
|
||||
new SolidColorBrush(Color.FromRgb(241, 241, 241)),
|
||||
VisualTreeHelper.GetDpi(icon).PixelsPerDip);
|
||||
|
||||
icon.InvalidateVisual();
|
||||
|
|
|
@ -269,7 +269,7 @@ namespace SourceGit.Views.Controls {
|
|||
dc.DrawEllipse(dotFill, PENS[dot.Color], dot.Center, 3, 3);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private void DrawCurves(DrawingContext dc, double top, double bottom) {
|
||||
foreach (var line in data.Paths) {
|
||||
var last = line.Points[0];
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace SourceGit.Views.Controls {
|
|||
if (result != IntPtr.Zero) {
|
||||
IntPtr pathPtr = Marshal.AllocHGlobal(260 * Marshal.SystemDefaultCharSize);
|
||||
Shell32.SHGetPathFromIDList(result, pathPtr);
|
||||
|
||||
|
||||
if (pathPtr != IntPtr.Zero) {
|
||||
SelectedPath = Marshal.PtrToStringAuto(pathPtr);
|
||||
ok = true;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
using System.Windows;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Media;
|
||||
|
||||
namespace SourceGit.Views.Controls {
|
||||
/// <summary>
|
||||
|
@ -15,9 +15,9 @@ namespace SourceGit.Views.Controls {
|
|||
private static readonly Brush HL_DELETED = new SolidColorBrush(Color.FromArgb(128, 255, 0, 0));
|
||||
|
||||
public static readonly DependencyProperty DataProperty = DependencyProperty.Register(
|
||||
"Data",
|
||||
"Data",
|
||||
typeof(Models.TextChanges.Line),
|
||||
typeof(HighlightableTextBlock),
|
||||
typeof(HighlightableTextBlock),
|
||||
new PropertyMetadata(null, OnContentChanged));
|
||||
|
||||
public Models.TextChanges.Line Data {
|
||||
|
|
|
@ -10,9 +10,9 @@ namespace SourceGit.Views.Controls {
|
|||
public class IconButton : Button {
|
||||
|
||||
public static readonly DependencyProperty IconProperty = DependencyProperty.Register(
|
||||
"Icon",
|
||||
typeof(Geometry),
|
||||
typeof(IconButton),
|
||||
"Icon",
|
||||
typeof(Geometry),
|
||||
typeof(IconButton),
|
||||
new PropertyMetadata(null));
|
||||
|
||||
public Geometry Icon {
|
||||
|
@ -21,9 +21,9 @@ namespace SourceGit.Views.Controls {
|
|||
}
|
||||
|
||||
public static readonly DependencyProperty HoverBackgroundProperty = DependencyProperty.Register(
|
||||
"HoverBackground",
|
||||
typeof(Brush),
|
||||
typeof(IconButton),
|
||||
"HoverBackground",
|
||||
typeof(Brush),
|
||||
typeof(IconButton),
|
||||
new PropertyMetadata(Brushes.Transparent));
|
||||
|
||||
public Brush HoverBackground {
|
||||
|
|
|
@ -14,9 +14,9 @@ namespace SourceGit.Views.Controls {
|
|||
private Path icon = null;
|
||||
|
||||
public static readonly DependencyProperty IsAnimatingProperty = DependencyProperty.Register(
|
||||
"IsAnimating",
|
||||
typeof(bool),
|
||||
typeof(Loading),
|
||||
"IsAnimating",
|
||||
typeof(bool),
|
||||
typeof(Loading),
|
||||
new PropertyMetadata(false, OnIsAnimatingChanged));
|
||||
|
||||
public bool IsAnimating {
|
||||
|
|
|
@ -14,7 +14,7 @@ namespace SourceGit.Views.Controls {
|
|||
|
||||
public static readonly DependencyProperty PlaceholderProperty = DependencyProperty.Register(
|
||||
"Placeholder",
|
||||
typeof(string),
|
||||
typeof(string),
|
||||
typeof(TextEdit),
|
||||
new PropertyMetadata(""));
|
||||
|
||||
|
@ -24,9 +24,9 @@ namespace SourceGit.Views.Controls {
|
|||
}
|
||||
|
||||
public static readonly DependencyProperty PlaceholderBaselineProperty = DependencyProperty.Register(
|
||||
"PlaceholderBaseline",
|
||||
typeof(AlignmentY),
|
||||
typeof(TextEdit),
|
||||
"PlaceholderBaseline",
|
||||
typeof(AlignmentY),
|
||||
typeof(TextEdit),
|
||||
new PropertyMetadata(AlignmentY.Center));
|
||||
|
||||
public AlignmentY PlaceholderBaseline {
|
||||
|
|
|
@ -13,9 +13,9 @@ namespace SourceGit.Views.Controls {
|
|||
/// </summary>
|
||||
public class Tree : TreeView {
|
||||
public static readonly DependencyProperty MultiSelectionProperty = DependencyProperty.Register(
|
||||
"MultiSelection",
|
||||
typeof(bool),
|
||||
typeof(Tree),
|
||||
"MultiSelection",
|
||||
typeof(bool),
|
||||
typeof(Tree),
|
||||
new PropertyMetadata(false));
|
||||
|
||||
public bool MultiSelection {
|
||||
|
@ -90,7 +90,7 @@ namespace SourceGit.Views.Controls {
|
|||
|
||||
protected override void OnItemsSourceChanged(IEnumerable oldValue, IEnumerable newValue) {
|
||||
base.OnItemsSourceChanged(oldValue, newValue);
|
||||
|
||||
|
||||
if (Selected.Count > 0) {
|
||||
Selected.Clear();
|
||||
RaiseEvent(new RoutedEventArgs(SelectionChangedEvent));
|
||||
|
|
|
@ -9,9 +9,9 @@ namespace SourceGit.Views.Controls {
|
|||
public class TreeItem : TreeViewItem {
|
||||
|
||||
public static readonly DependencyProperty IsCheckedProperty = DependencyProperty.Register(
|
||||
"IsChecked",
|
||||
typeof(bool),
|
||||
typeof(TreeItem),
|
||||
"IsChecked",
|
||||
typeof(bool),
|
||||
typeof(TreeItem),
|
||||
new PropertyMetadata(false));
|
||||
|
||||
public bool IsChecked {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue