Skip to content

Commit

Permalink
code tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonyCorbett committed Nov 10, 2018
1 parent af41666 commit 3b41cc3
Show file tree
Hide file tree
Showing 12 changed files with 30 additions and 48 deletions.
21 changes: 2 additions & 19 deletions OnlyT.AnalogueClock/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,6 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly: ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]


ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly)]
21 changes: 2 additions & 19 deletions OnlyT.CountdownTimer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,6 @@
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

//In order to begin building localizable applications, set
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
//inside a <PropertyGroup>. For example, if you are using US english
//in your source files, set the <UICulture> to en-US. Then uncomment
//the NeutralResourceLanguage attribute below. Update the "en-US" in
//the line below to match the UICulture setting in the project file.

//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]


[assembly:ThemeInfo(
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
//(used if a resource is not found in the page,
// or application resource dictionaries)
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
//(used if a resource is not found in the page,
// app, or any theme specific resource dictionaries)
)]


ResourceDictionaryLocation.None,
ResourceDictionaryLocation.SourceAssembly)]
3 changes: 2 additions & 1 deletion OnlyT.Tests/Mocks/MockTalksScheduleService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,11 @@

internal class MockTalksScheduleService : ITalkScheduleService
{
private List<TalkScheduleItem> _talks;
private readonly int _talkIdStart;
private readonly int _numTalks;

private List<TalkScheduleItem> _talks;

public MockTalksScheduleService(int talkIdStart, int numTalks)
{
_talkIdStart = talkIdStart;
Expand Down
1 change: 0 additions & 1 deletion OnlyT.Tests/TestDateCalcs.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ public class TestDateCalcs
public void TestMondayOfWeekCalc()
{
var monday = new DateTime(2018, 2, 12);

{
var dt = DateUtils.GetMondayOfWeek(monday);
Assert.AreEqual(monday, dt);
Expand Down
1 change: 1 addition & 0 deletions OnlyT.ruleset
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
<Rule Id="SA1028" Action="None" />
<Rule Id="SA1101" Action="None" />
<Rule Id="SA1118" Action="None" />
<Rule Id="SA1306" Action="None" />
<Rule Id="SA1309" Action="None" />
<Rule Id="SA1633" Action="None" />
<Rule Id="SA1652" Action="None" />
Expand Down
6 changes: 5 additions & 1 deletion OnlyT.sln.DotSettings
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=AMPM/@EntryIndexedValue">AMPM</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=advfirewall/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Behaviours/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Calcs/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Colour/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=DISPLAYCONFIG/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=hwnd/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Localised/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=localport/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=mins/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SHOWMINIMIZED/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=SHOWNORMAL/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Snackbar/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=synchronisation/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=urlacl/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
<s:Boolean x:Key="/Default/UserDictionary/Words/=urlacl/@EntryIndexedValue">True</s:Boolean>
<s:Boolean x:Key="/Default/UserDictionary/Words/=WINDOWPLACEMENT/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
5 changes: 5 additions & 0 deletions OnlyT/Utils/NativeMethods.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
namespace OnlyT.Utils
{
#pragma warning disable SA1121 // Use built-in type alias

// ReSharper disable BuiltInTypeReferenceStyle
// ReSharper disable IdentifierTypo
// ReSharper disable StyleCop.SA1602
// ReSharper disable InconsistentNaming
Expand Down Expand Up @@ -175,4 +178,6 @@ public struct SHSTOCKICONINFO
public string szPath;
}
}

#pragma warning restore SA1121 // Use built-in type alias
}
8 changes: 8 additions & 0 deletions OnlyT/Utils/WindowPlacement.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
namespace OnlyT.Utils
{
#pragma warning disable SA1307 // Accessible fields must begin with upper-case letter
#pragma warning disable SA1649 // File name must match first type name
#pragma warning disable SA1310 // Field names must not contain underscore

// ReSharper disable CommentTypo
// ReSharper disable InconsistentNaming
// ReSharper disable StyleCop.SA1307
Expand All @@ -23,6 +27,7 @@
// RECT structure required by WINDOWPLACEMENT structure
[Serializable]
[StructLayout(LayoutKind.Sequential)]

public struct RECT
{
public int Left;
Expand Down Expand Up @@ -159,4 +164,7 @@ private static string GetPlacement(IntPtr windowHandle)
}
}
}
#pragma warning restore SA1310 // Field names must not contain underscore
#pragma warning restore SA1649 // File name must match first type name
#pragma warning restore SA1307 // Accessible fields must begin with upper-case letter
}
3 changes: 1 addition & 2 deletions OnlyT/ViewModel/MainViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
using OnlyT.Services.Snackbar;

namespace OnlyT.ViewModel
{
// ReSharper disable CatchAllClause
Expand All @@ -21,6 +19,7 @@ namespace OnlyT.ViewModel
using Messages;
using Models;
using OnlyT.Services.JwLibrary;
using OnlyT.Services.Snackbar;
using Serilog;
using Services.CommandLine;
using Services.CountdownTimer;
Expand Down
5 changes: 2 additions & 3 deletions OnlyT/ViewModel/SettingsPageViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
using OnlyT.Services.Snackbar;

namespace OnlyT.ViewModel
namespace OnlyT.ViewModel
{
// ReSharper disable CatchAllClause
using System;
Expand All @@ -15,6 +13,7 @@ namespace OnlyT.ViewModel
using GalaSoft.MvvmLight.Messaging;
using Messages;
using Models;
using OnlyT.Services.Snackbar;
using Serilog;
using Services.Bell;
using Services.CountdownTimer;
Expand Down
2 changes: 1 addition & 1 deletion OnlyT/ViewModel/TimerOutputWindowViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public TimerOutputWindowViewModel(IOptionsService optionsService)
Messenger.Default.Register<TimerFrameChangedMessage>(this, OnTimerFrameChanged);
}

public int BorderThickness => _optionsService.Options.TimerFrame? 3 : 0;
public int BorderThickness => _optionsService.Options.TimerFrame ? 3 : 0;

public int BackgroundOpacity => _optionsService.Options.TimerFrame ? 100 : 0;

Expand Down
2 changes: 1 addition & 1 deletion SolutionInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("1.1.0.45")]
[assembly: AssemblyVersion("1.1.0.46")]

0 comments on commit 3b41cc3

Please sign in to comment.