Skip to content
This repository was archived by the owner on Sep 11, 2023. It is now read-only.

Commit 9f23344

Browse files
committed
(source code) indentation adjustment
1 parent f261ae4 commit 9f23344

21 files changed

+726
-644
lines changed

.editorconfig

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,3 +225,11 @@ dotnet_diagnostic.IDE0046.severity = none
225225

226226
# CS8632: The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
227227
dotnet_diagnostic.CS8632.severity = none
228+
229+
[*.xml]
230+
[*.xaml]
231+
232+
# Indentation and spacing
233+
indent_size = 2
234+
indent_style = space
235+
tab_width = 2

Interop/Updater/UpdateCheck.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
using SPCode.Utils;
2-
using System;
1+
using System;
32
using System.Collections.Generic;
43
using System.Linq;
54
using System.Threading.Tasks;
65
using Octokit;
6+
using SPCode.Utils;
77

88
namespace SPCode.Interop.Updater
99
{

Interop/Updater/UpdateWindow.xaml

Lines changed: 37 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,39 @@
11
<controls:MetroWindow x:Class="SPCode.Interop.Updater.UpdateWindow"
2-
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
3-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5-
Width="650" Height="700" TitleCaps="False" ShowInTaskbar="False"
6-
Background="{DynamicResource WhiteBrush}"
7-
GlowBrush="{DynamicResource AccentColorBrush}"
8-
WindowStartupLocation="CenterOwner" WindowStyle="None"
9-
KeyDown="MetroWindow_KeyDown">
10-
<controls:MetroWindow.Resources>
11-
<ResourceDictionary>
12-
<ResourceDictionary.MergedDictionaries>
13-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
14-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
15-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
16-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
17-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
18-
</ResourceDictionary.MergedDictionaries>
19-
</ResourceDictionary>
20-
</controls:MetroWindow.Resources>
21-
<Grid>
22-
<TextBlock Name="MainLine" VerticalAlignment="Top" Margin="10,0,40,0" FontSize="16" Foreground="{DynamicResource AccentColorBrush}" IsHitTestVisible="False" />
23-
<TextBlock Name="SubLine" VerticalAlignment="Top" Margin="10,25,40,0" FontSize="14" Foreground="{DynamicResource AccentColorBrush}" IsHitTestVisible="False" />
24-
<Button Name="ActionYesButton" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,25,0,0" Width="50" Click="ActionYesButton_Click" />
25-
<Button Name="ActionNoButton" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="69,25,0,0" Width="50" Click="ActionNoButton_Click" />
26-
<FlowDocumentScrollViewer xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
27-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
28-
Name="DescriptionBox"
29-
HorizontalAlignment="Stretch"
30-
VerticalAlignment="Stretch"
31-
Margin="0,55,0,0"
32-
Background="{DynamicResource WhiteBrush}"
33-
Foreground="{DynamicResource BlackBrush}">
34-
</FlowDocumentScrollViewer>
35-
<Button x:Name="ActionGithubButton" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="129,25,0,0" Width="110" Click="ActionGithubButton_Click" />
36-
</Grid>
2+
xmlns:controls="http://metro.mahapps.com/winfx/xaml/controls"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
Width="650" Height="700" TitleCaps="False" ShowInTaskbar="False"
6+
Background="{DynamicResource WhiteBrush}"
7+
GlowBrush="{DynamicResource AccentColorBrush}"
8+
WindowStartupLocation="CenterOwner" WindowStyle="None"
9+
KeyDown="MetroWindow_KeyDown">
10+
11+
<controls:MetroWindow.Resources>
12+
<ResourceDictionary>
13+
<ResourceDictionary.MergedDictionaries>
14+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
15+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
16+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
17+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
18+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
19+
</ResourceDictionary.MergedDictionaries>
20+
</ResourceDictionary>
21+
</controls:MetroWindow.Resources>
22+
<Grid>
23+
<TextBlock Name="MainLine" VerticalAlignment="Top" Margin="10,0,40,0" FontSize="16" Foreground="{DynamicResource AccentColorBrush}" IsHitTestVisible="False" />
24+
<TextBlock Name="SubLine" VerticalAlignment="Top" Margin="10,25,40,0" FontSize="14" Foreground="{DynamicResource AccentColorBrush}" IsHitTestVisible="False" />
25+
<Button Name="ActionYesButton" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="10,25,0,0" Width="50" Click="ActionYesButton_Click" />
26+
<Button Name="ActionNoButton" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="69,25,0,0" Width="50" Click="ActionNoButton_Click" />
27+
28+
<FlowDocumentScrollViewer xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
29+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
30+
Name="DescriptionBox"
31+
HorizontalAlignment="Stretch"
32+
VerticalAlignment="Stretch"
33+
Margin="0,55,0,0"
34+
Background="{DynamicResource WhiteBrush}"
35+
Foreground="{DynamicResource BlackBrush}"/>
36+
37+
<Button x:Name="ActionGithubButton" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="129,25,0,0" Width="110" Click="ActionGithubButton_Click" />
38+
</Grid>
3739
</controls:MetroWindow>

Program.cs

Lines changed: 60 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -54,78 +54,78 @@ public static void Main(string[] args)
5454
try
5555
{
5656
#endif
57-
var splashScreen = new SplashScreen("Resources/Icons/icon256x.png");
58-
splashScreen.Show(false, true);
59-
Environment.CurrentDirectory =
60-
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ??
61-
throw new NullReferenceException();
57+
var splashScreen = new SplashScreen("Resources/Icons/icon256x.png");
58+
splashScreen.Show(false, true);
59+
Environment.CurrentDirectory =
60+
Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) ??
61+
throw new NullReferenceException();
6262
#if !DEBUG
6363
ProfileOptimization.SetProfileRoot(Environment.CurrentDirectory);
6464
ProfileOptimization.StartProfile("Startup.Profile");
6565
#endif
66-
_IsLocalInstallation = Paths.IsLocalInstallation();
67-
UpdateStatus = new UpdateInfo();
68-
OptionsObject = OptionsControl.Load(out var ProgramIsNew);
66+
_IsLocalInstallation = Paths.IsLocalInstallation();
67+
UpdateStatus = new UpdateInfo();
68+
OptionsObject = OptionsControl.Load(out var ProgramIsNew);
6969

70-
if (!File.Exists(Constants.HotkeysFile))
71-
{
72-
HotkeyControl.CreateDefaultHotkeys();
73-
}
74-
else
75-
{
76-
HotkeyControl.CheckAndBufferHotkeys();
77-
}
70+
if (!File.Exists(Constants.HotkeysFile))
71+
{
72+
HotkeyControl.CreateDefaultHotkeys();
73+
}
74+
else
75+
{
76+
HotkeyControl.CheckAndBufferHotkeys();
77+
}
7878

79-
// Delete the default Ctrl+D hotkey to assign manually
80-
AvalonEditCommands.DeleteLine.InputGestures.Clear();
79+
// Delete the default Ctrl+D hotkey to assign manually
80+
AvalonEditCommands.DeleteLine.InputGestures.Clear();
8181

82-
if (OptionsObject.Program_DiscordPresence)
83-
{
84-
// Init Discord RPC
85-
DiscordClient.Initialize();
82+
if (OptionsObject.Program_DiscordPresence)
83+
{
84+
// Init Discord RPC
85+
DiscordClient.Initialize();
8686

87-
// Set default presence
88-
DiscordClient.SetPresence(new RichPresence
87+
// Set default presence
88+
DiscordClient.SetPresence(new RichPresence
89+
{
90+
State = "Idle",
91+
Timestamps = DiscordTime,
92+
Assets = new Assets
93+
{
94+
LargeImageKey = "immagine"
95+
},
96+
Buttons = new Button[]
8997
{
90-
State = "Idle",
91-
Timestamps = DiscordTime,
92-
Assets = new Assets
93-
{
94-
LargeImageKey = "immagine"
95-
},
96-
Buttons = new Button[]
97-
{
9898
new Button() { Label = Constants.GetSPCodeText, Url = Constants.GitHubLatestRelease }
99-
}
100-
});
101-
}
99+
}
100+
});
101+
}
102102

103103

104-
Translations = new TranslationProvider();
105-
Translations.LoadLanguage(OptionsObject.Language, true);
106-
foreach (var arg in args)
104+
Translations = new TranslationProvider();
105+
Translations.LoadLanguage(OptionsObject.Language, true);
106+
foreach (var arg in args)
107+
{
108+
if (arg.ToLowerInvariant() == "-rcck") //ReCreateCryptoKey
107109
{
108-
if (arg.ToLowerInvariant() == "-rcck") //ReCreateCryptoKey
109-
{
110-
OptionsObject.ReCreateCryptoKey();
111-
MakeRCCKAlert();
112-
}
110+
OptionsObject.ReCreateCryptoKey();
111+
MakeRCCKAlert();
113112
}
113+
}
114114

115-
Configs = ConfigLoader.Load();
116-
for (var i = 0; i < Configs.Length; ++i)
115+
Configs = ConfigLoader.Load();
116+
for (var i = 0; i < Configs.Length; ++i)
117+
{
118+
if (Configs[i].Name == OptionsObject.Program_SelectedConfig)
117119
{
118-
if (Configs[i].Name == OptionsObject.Program_SelectedConfig)
119-
{
120-
SelectedConfig = i;
121-
break;
122-
}
120+
SelectedConfig = i;
121+
break;
123122
}
123+
}
124124

125-
if (!OptionsObject.Program_UseHardwareAcceleration)
126-
{
127-
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
128-
}
125+
if (!OptionsObject.Program_UseHardwareAcceleration)
126+
{
127+
RenderOptions.ProcessRenderMode = RenderMode.SoftwareOnly;
128+
}
129129
#if !DEBUG
130130
if (ProgramIsNew)
131131
{
@@ -147,9 +147,9 @@ public static void Main(string[] args)
147147
}
148148
}
149149
#endif
150-
MainWindow = new MainWindow(splashScreen);
151-
var pipeServer = new PipeInteropServer(MainWindow);
152-
pipeServer.Start();
150+
MainWindow = new MainWindow(splashScreen);
151+
var pipeServer = new PipeInteropServer(MainWindow);
152+
pipeServer.Start();
153153
#if !DEBUG
154154
}
155155
catch (Exception e)
@@ -174,9 +174,9 @@ public static void Main(string[] args)
174174
Task.Run(UpdateCheck.Check);
175175
}
176176
#endif
177-
app.Startup += App_Startup;
178-
app.Run(MainWindow);
179-
OptionsControl.Save();
177+
app.Startup += App_Startup;
178+
app.Run(MainWindow);
179+
OptionsControl.Save();
180180
#if !DEBUG
181181
}
182182
catch (Exception e)

UI/Components/ColorChangeControl/ColorChangeControl.xaml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,29 @@
44
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
55
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
66
mc:Ignorable="d"
7-
d:DesignHeight="105" d:DesignWidth="300">
8-
<UserControl.Resources>
9-
<ResourceDictionary>
10-
<ResourceDictionary.MergedDictionaries>
11-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
12-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
13-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
14-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
15-
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
16-
</ResourceDictionary.MergedDictionaries>
17-
</ResourceDictionary>
18-
</UserControl.Resources>
19-
<Grid>
20-
<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stroke="Black" />
21-
<TextBlock Name="ColorName" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,0,0" />
22-
<TextBox Name="BrushRect" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,5,0" Height="20" Width="150" TextChanged="BrushRect_TextChanged" />
23-
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,30,0,0" Text="R:" IsHitTestVisible="False" />
24-
<Slider Name="RSlider" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="25,30,5,0" Minimum="0" Maximum="255" TickFrequency="8" TickPlacement="BottomRight" AutoToolTipPlacement="TopLeft" ValueChanged="SliderValue_Changed" />
25-
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,55,0,0" Text="G:" IsHitTestVisible="False" />
26-
<Slider Name="GSlider" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="25,55,5,0" Minimum="0" Maximum="255" TickFrequency="8" TickPlacement="BottomRight" AutoToolTipPlacement="TopLeft" ValueChanged="SliderValue_Changed" />
27-
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,80,0,0" Text="B:" IsHitTestVisible="False" />
28-
<Slider Name="BSlider" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="25,80,5,0" Minimum="0" Maximum="255" TickFrequency="8" TickPlacement="BottomRight" AutoToolTipPlacement="TopLeft" ValueChanged="SliderValue_Changed" />
29-
</Grid>
7+
d:DesignHeight="105"
8+
d:DesignWidth="300">
9+
10+
<UserControl.Resources>
11+
<ResourceDictionary>
12+
<ResourceDictionary.MergedDictionaries>
13+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
14+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
15+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Colors.xaml" />
16+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/BaseDark.xaml" />
17+
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Accents/Red.xaml" />
18+
</ResourceDictionary.MergedDictionaries>
19+
</ResourceDictionary>
20+
</UserControl.Resources>
21+
<Grid>
22+
<Rectangle HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Stroke="Black" />
23+
<TextBlock Name="ColorName" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,5,0,0" />
24+
<TextBox Name="BrushRect" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,5,5,0" Height="20" Width="150" TextChanged="BrushRect_TextChanged" />
25+
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,30,0,0" Text="R:" IsHitTestVisible="False" />
26+
<Slider Name="RSlider" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="25,30,5,0" Minimum="0" Maximum="255" TickFrequency="8" TickPlacement="BottomRight" AutoToolTipPlacement="TopLeft" ValueChanged="SliderValue_Changed" />
27+
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,55,0,0" Text="G:" IsHitTestVisible="False" />
28+
<Slider Name="GSlider" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="25,55,5,0" Minimum="0" Maximum="255" TickFrequency="8" TickPlacement="BottomRight" AutoToolTipPlacement="TopLeft" ValueChanged="SliderValue_Changed" />
29+
<TextBlock HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5,80,0,0" Text="B:" IsHitTestVisible="False" />
30+
<Slider Name="BSlider" HorizontalAlignment="Stretch" VerticalAlignment="Top" Margin="25,80,5,0" Minimum="0" Maximum="255" TickFrequency="8" TickPlacement="BottomRight" AutoToolTipPlacement="TopLeft" ValueChanged="SliderValue_Changed" />
31+
</Grid>
3032
</UserControl>

UI/Components/DASMElement/DASMElement.xaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,15 @@
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
77
mc:Ignorable="d"
8-
d:DesignHeight="300" d:DesignWidth="500">
9-
<Grid>
10-
<Grid.ColumnDefinitions>
11-
<ColumnDefinition Width="1*" />
12-
<ColumnDefinition Width="2*" />
13-
</Grid.ColumnDefinitions>
14-
<TreeView Grid.Column="0" Name="treeview_" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,5,0" SelectedItemChanged="Treeview__SelectedItemChanged" />
15-
<GridSplitter Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Stretch" Width="5" Background="LightGray" />
16-
<controls:TextEditor Grid.Column="1" Name="detailbox_" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True" ShowLineNumbers="True" FontFamily="Consolas" Foreground="{DynamicResource BlackColorBrush}" />
17-
</Grid>
8+
d:DesignHeight="300"
9+
d:DesignWidth="500">
10+
<Grid>
11+
<Grid.ColumnDefinitions>
12+
<ColumnDefinition Width="1*" />
13+
<ColumnDefinition Width="2*" />
14+
</Grid.ColumnDefinitions>
15+
<TreeView Grid.Column="0" Name="treeview_" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" Margin="0,0,5,0" SelectedItemChanged="Treeview__SelectedItemChanged" />
16+
<GridSplitter Grid.Column="0" HorizontalAlignment="Right" VerticalAlignment="Stretch" Width="5" Background="LightGray" />
17+
<controls:TextEditor Grid.Column="1" Name="detailbox_" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" IsReadOnly="True" ShowLineNumbers="True" FontFamily="Consolas" Foreground="{DynamicResource BlackColorBrush}" />
18+
</Grid>
1819
</UserControl>

0 commit comments

Comments
 (0)