Skip to content

Commit 66722c2

Browse files
format and fix up
1 parent 33f690a commit 66722c2

35 files changed

Lines changed: 172 additions & 196 deletions
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
using System.Windows;
1+
using System.Windows;
22

33
[assembly: ThemeInfo(
4-
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5-
//(used if a resource is not found in the page,
6-
// or application resource dictionaries)
7-
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8-
//(used if a resource is not found in the page,
9-
// app, or any theme specific resource dictionaries)
4+
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
5+
//(used if a resource is not found in the page,
6+
// or application resource dictionaries)
7+
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
8+
//(used if a resource is not found in the page,
9+
// app, or any theme specific resource dictionaries)
1010
)]

CommonControls.Images/ColorPickerHelper.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ internal static Rectangle GetColorPreview(ColorHsv colorHsv)
2626
{
2727
var rectangle = new Rectangle { Width = 25, Height = 25 };
2828

29-
var col = new Color { A = (byte)colorHsv.A, R = (byte)colorHsv.R, G = (byte)colorHsv.G, B = (byte)colorHsv.B };
29+
var col = new Color
30+
{
31+
A = (byte)colorHsv.A, R = (byte)colorHsv.R, G = (byte)colorHsv.G, B = (byte)colorHsv.B
32+
};
3033
rectangle.Fill = new SolidColorBrush { Color = col };
3134

3235
return rectangle;

CommonControls.Images/ColorPickerMenu.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
<UserControl xmlns:commonImages="clr-namespace:CommonControls.Images"
1+
<!-- ReSharper disable once UnusedType.Global -->
2+
<UserControl xmlns:commonImages="clr-namespace:CommonControls.Images"
23
x:Class="CommonControls.Images.ColorPickerMenu"
34
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
45
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"

CommonControls.Images/ComCtlResources.cs

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,6 @@ namespace CommonControls.Images
1313
/// </summary>
1414
internal static class ComCtlResources
1515
{
16-
/// <summary>
17-
/// The global key skip text controls (const). Value: "GlobalKeySkipTextControls"
18-
/// </summary>
19-
internal const string GlobalKeySkipTextControls = "GlobalKeySkipTextControls";
20-
21-
/// <summary>
22-
/// The grid exception validate (const). Value: "Grid dimensions and cell sizes must be non-negative and greater than
23-
/// zero.".
24-
/// </summary>
25-
internal const string GridExceptionValidate =
26-
"Grid dimensions and cell sizes must be non-negative and greater than zero.";
27-
28-
/// <summary>
29-
/// The grid exception column (const). Value: "Column width cannot be negative.".
30-
/// </summary>
31-
internal const string GridExceptionColumn = "Column width cannot be negative.";
32-
33-
/// <summary>
34-
/// The grid exception row (const). Value: "Row height cannot be negative.".
35-
/// </summary>
36-
internal const string GridExceptionRow = "Row height cannot be negative.";
37-
38-
/// <summary>
39-
/// The global key attach (const). Value: "Attach".
40-
/// </summary>
41-
internal const string GlobalKeyAttach = "Attach";
42-
43-
/// <summary>
44-
/// The global key command bindings (const). Value: "CommandBindings".
45-
/// </summary>
46-
internal const string GlobalKeyCommandBindings = "CommandBindings";
47-
4816
/// <summary>
4917
/// Error, Color Selection parameters (const). Value: "Error selecting color.".
5018
/// </summary>
@@ -55,11 +23,6 @@ internal static class ComCtlResources
5523
/// </summary>
5624
internal const string ErrorSwitchingColor = "Error switching color.";
5725

58-
/// <summary>
59-
/// The error could not load image (const). Value: "Error could not load Image:".
60-
/// </summary>
61-
internal const string ErrorCouldNotLoadImage = "Error could not load Image:";
62-
6326
/// <summary>
6427
/// The information ardoner null (const). Value: "Adorner was outside of the image control.".
6528
/// </summary>
@@ -74,55 +37,5 @@ internal static class ComCtlResources
7437
/// Error, Color Dictionary initializing parameters (const). Value: "Error initializing color Dictionary "
7538
/// </summary>
7639
internal const string ErrorInitializingColorDictionary = "Error initializing color Dictionary ";
77-
78-
/// <summary>
79-
/// Image add, needed for the Image Name (const). Value: "T".
80-
/// </summary>
81-
internal const string ImageAdd = "T";
82-
83-
/// <summary>
84-
/// The unique Caption Text (const). Value: "Name was not unique".
85-
/// </summary>
86-
internal const string CaptionUnique = "Name was not unique";
87-
88-
/// <summary>
89-
/// The unique Message Text (const). Value: "Name was not unique, but the Property for unique was set.".
90-
/// </summary>
91-
internal const string UniqueMessage = "Name was not unique, but the Property for unique was set.";
92-
93-
/// <summary>
94-
/// The unique Message for start List (const). Value: "Start Entry was not empty but unique was set.".
95-
/// </summary>
96-
internal const string UniqueMessageStart = "Start Entry was not empty but unique was set.";
97-
98-
/// <summary>
99-
/// The Data list Entry (const). Value: "Empty".
100-
/// </summary>
101-
internal const string DataListEntry = "Empty";
102-
103-
/// <summary>
104-
/// The Context Menu Deselect (const). Value: "Deselect".
105-
/// </summary>
106-
internal const string ContextDeselect = "Deselect";
107-
108-
/// <summary>
109-
/// The Context Menu Deselect all (const). Value: "Deselect All".
110-
/// </summary>
111-
internal const string ContextDeselectAll = "Deselect All";
112-
113-
/// <summary>
114-
/// New Item (const). Value: "NewItem".
115-
/// </summary>
116-
internal const string NewItem = "New Item";
117-
118-
/// <summary>
119-
/// The debug timer (const). Value: "Time Tracked end: ".
120-
/// </summary>
121-
internal const string DebugTimer = "Time Tracked end: ";
122-
123-
/// <summary>
124-
/// Separator (const). Value: " , ".
125-
/// </summary>
126-
internal const string Separator = " , ";
12740
}
12841
}

CommonControls.Images/ImageZoom.xaml

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
<UserControl
2-
x:Class="CommonControls.Images.ImageZoom"
3-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6-
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7-
xmlns:Imag="clr-namespace:Imaging;assembly=Imaging"
8-
mc:Ignorable="d"
9-
Name="ImgZoom"
10-
d:DesignHeight="450" d:DesignWidth="800">
1+
<!-- ReSharper disable once UnusedType.Global -->
2+
<UserControl
3+
x:Class="CommonControls.Images.ImageZoom"
4+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
5+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
6+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
8+
xmlns:imag="clr-namespace:Imaging;assembly=Imaging"
9+
mc:Ignorable="d"
10+
Name="ImgZoom"
11+
d:DesignHeight="450" d:DesignWidth="800">
1112
<Grid>
1213
<ScrollViewer x:Name="ScrollView" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
1314
<Canvas
@@ -18,17 +19,17 @@
1819
MouseWheel="Canvas_MouseWheel"
1920
MouseRightButtonUp="Canvas_MouseRightButtonUp">
2021
<Canvas VerticalAlignment="Stretch" HorizontalAlignment="Stretch">
21-
<Imag:ImageGif
22+
<imag:ImageGif
2223
Stretch="None"
23-
SnapsToDevicePixels="True"
24-
UseLayoutRounding="True"
25-
Name="BtmImage"
26-
RenderOptions.BitmapScalingMode="NearestNeighbor"
27-
AutoStart="{Binding ElementName=ImgZoom, Path=AutoplayGifImage}">
28-
<Imag:ImageGif.LayoutTransform>
24+
SnapsToDevicePixels="True"
25+
UseLayoutRounding="True"
26+
Name="BtmImage"
27+
RenderOptions.BitmapScalingMode="NearestNeighbor"
28+
AutoStart="{Binding ElementName=ImgZoom, Path=AutoplayGifImage}">
29+
<imag:ImageGif.LayoutTransform>
2930
<ScaleTransform x:Name="Scale" />
30-
</Imag:ImageGif.LayoutTransform>
31-
</Imag:ImageGif>
31+
</imag:ImageGif.LayoutTransform>
32+
</imag:ImageGif>
3233
</Canvas>
3334
</Canvas>
3435
</ScrollViewer>

CommonControls.Images/ImageZoom.xaml.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -926,6 +926,7 @@ private void Dispose(bool disposing)
926926
private static void SafeExecuteCommand(ICommand? cmd, object? parameter)
927927
{
928928
if (cmd == null) return;
929+
929930
try
930931
{
931932
if (cmd.CanExecute(parameter))

CommonControls.Images/Themes/Generic.xaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,4 +120,4 @@
120120
<!-- Style for ScrollBar -->
121121

122122

123-
</ResourceDictionary>
123+
</ResourceDictionary>

CommonControls/ComCtlResources.cs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -45,36 +45,11 @@ internal static class ComCtlResources
4545
/// </summary>
4646
internal const string GlobalKeyCommandBindings = "CommandBindings";
4747

48-
/// <summary>
49-
/// Error, Color Selection parameters (const). Value: "Error selecting color.".
50-
/// </summary>
51-
internal const string ErrorColorSelection = "Error selecting color.";
52-
53-
/// <summary>
54-
/// Error, Color switching parameters (const). Value:"Error switching color.".
55-
/// </summary>
56-
internal const string ErrorSwitchingColor = "Error switching color.";
57-
5848
/// <summary>
5949
/// The error could not load image (const). Value: "Error could not load Image:".
6050
/// </summary>
6151
internal const string ErrorCouldNotLoadImage = "Error could not load Image:";
6252

63-
/// <summary>
64-
/// The information ardoner null (const). Value: "Adorner was outside of the image control.".
65-
/// </summary>
66-
internal const string InformationArdonerNull = "Adorner was outside of the image control.";
67-
68-
/// <summary>
69-
/// Error, Color Selection initializing parameters (const). Value: "Error initializing color selection control"
70-
/// </summary>
71-
internal const string ErrorInitializingColorSelection = "Error initializing color selection control";
72-
73-
/// <summary>
74-
/// Error, Color Dictionary initializing parameters (const). Value: "Error initializing color Dictionary "
75-
/// </summary>
76-
internal const string ErrorInitializingColorDictionary = "Error initializing color Dictionary ";
77-
7853
/// <summary>
7954
/// Image add, needed for the Image Name (const). Value: "T".
8055
/// </summary>

CommonControls/Thumbnails.xaml.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -570,7 +570,8 @@ private async Task LoadImages()
570570
/// <returns>
571571
/// Load all images async
572572
/// </returns>
573-
private async Task LoadSingleImage(int key, string filePath, Panel exGrid, CancellationToken token, int cellSize,
573+
private async Task LoadSingleImage(int key, string filePath, Panel exGrid, CancellationToken token,
574+
int cellSize,
574575
int thumbWidth)
575576
{
576577
if (token.IsCancellationRequested) return;

CommonExtendedObjectsTests/ResourcesGeneral.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,14 @@ internal static class ResourcesGeneral
1616
/// <summary>
1717
/// The data item one (readonly). Value: new DataItem { Number = 1, GenericText = DataItemOne, Other = 0.0 }.
1818
/// </summary>
19-
internal static readonly XmlItem DataItemOne = new() { Number = 1, GenericText = nameof(DataItemOne), Other = 0.0 };
19+
internal static readonly XmlItem DataItemOne =
20+
new() { Number = 1, GenericText = nameof(DataItemOne), Other = 0.0 };
2021

2122
/// <summary>
2223
/// The data item two (readonly). Value: new DataItem { Number = 1, GenericText = DataItemTwo, Other = 0.1 }.
2324
/// </summary>
24-
internal static readonly XmlItem DataItemTwo = new() { Number = 2, GenericText = nameof(DataItemTwo), Other = 0.1 };
25+
internal static readonly XmlItem DataItemTwo =
26+
new() { Number = 2, GenericText = nameof(DataItemTwo), Other = 0.1 };
2527

2628
/// <summary>
2729
/// The data item three (readonly). Value: new DataItem { Number = 1, GenericText = DataItemThree, Other = 0.2 }.

0 commit comments

Comments
 (0)