Skip to content

Commit

Permalink
Merge pull request #6 from mcrossley/master
Browse files Browse the repository at this point in the history
v1.1.0
  • Loading branch information
mcrossley authored Jul 29, 2021
2 parents c3b2152 + 61ec93b commit 917aca9
Show file tree
Hide file tree
Showing 8 changed files with 415 additions and 61 deletions.
78 changes: 78 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
[*.cs]
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_labels = one_less_than_current
csharp_indent_switch_labels = true

csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
# csharp_new_line_between_query_expression_clauses = false

# csharp_prefer_braces = true:none
# csharp_prefer_simple_default_expression = true:none
csharp_preserve_single_line_blocks = true
# csharp_preserve_single_line_statements = false
# csharp_space_after_cast = false

csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = do_not_ignore
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_parameter_list_parentheses = false
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
csharp_space_between_method_declaration_name_and_open_parenthesis = false
csharp_space_between_method_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = none
csharp_space_between_square_brackets = false

csharp_style_conditional_delegate_call = false:none
# csharp_style_expression_bodied_accessors = false:error
# csharp_style_expression_bodied_constructors = false:error
csharp_style_expression_bodied_indexers = false:warning
csharp_style_expression_bodied_methods = false:warning
# csharp_style_expression_bodied_operators = false:error
csharp_style_expression_bodied_properties = false:warning
csharp_style_inlined_variable_declaration = false:warning
csharp_style_pattern_matching_over_as_with_null_check = false:none
csharp_style_pattern_matching_over_is_with_cast_check = false:none
csharp_style_throw_expression = false:none
csharp_style_var_elsewhere = true:none
csharp_style_var_for_built_in_types = true:none
csharp_style_var_for_locals = true:suggestion
csharp_style_var_when_type_is_apparent = true:none

dotnet_sort_system_directives_first = true
dotnet_style_coalesce_expression = false:warning
dotnet_style_collection_initializer = true:suggestion
# dotnet_style_explicit_tuple_names = true:error
dotnet_style_null_propagation = false:warning
dotnet_style_object_initializer = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:none
dotnet_style_predefined_type_for_member_access = true:none
dotnet_style_qualification_for_event = false:suggestion
dotnet_style_qualification_for_field = false:suggestion
dotnet_style_qualification_for_method = false:suggestion
dotnet_style_qualification_for_property = false:suggestion

end_of_line = lf
indent_size = 4
indent_style = tab
insert_final_newline = true
tab_width = 4

6 changes: 3 additions & 3 deletions CreateMissing.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
<AssemblyVersion>1.0.2.0</AssemblyVersion>
<FileVersion>1.0.2.0</FileVersion>
<Version>1.0.2</Version>
<AssemblyVersion>1.1.0.0</AssemblyVersion>
<FileVersion>1.1.0.0</FileVersion>
<Version>1.1.0</Version>
<StartupObject>CreateMissing.Program</StartupObject>
<TargetFramework>net452</TargetFramework>
<Authors>Mark Crossley</Authors>
Expand Down
5 changes: 5 additions & 0 deletions CreateMissing.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ VisualStudioVersion = 16.0.31019.35
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CreateMissing", "CreateMissing.csproj", "{FE1382C9-ACC6-4DF3-B894-3AD411FAF076}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{19207AAE-C219-46BA-8521-7C0C6AD0765E}"
ProjectSection(SolutionItems) = preProject
.editorconfig = .editorconfig
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
12 changes: 11 additions & 1 deletion Cumulus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ class Cumulus
public double NOAAheatingthreshold;
public double NOAAcoolingthreshold;

public int ChillHourSeasonStart;
public double ChillHourThreshold;

private StationOptions StationOptions = new StationOptions();
internal StationUnits Units = new StationUnits();
private int[] WindDPlaceDefaults = { 1, 0, 0, 0 }; // m/s, mph, km/h, knots
Expand Down Expand Up @@ -126,7 +129,14 @@ private void ReadIniFile()
NOAAcoolingthreshold = Units.Temp == 0 ? 18.3 : 65;
}


ChillHourSeasonStart = ini.GetValue("Station", "ChillHourSeasonStart", 10);
if (ChillHourSeasonStart < 1 || ChillHourSeasonStart > 12)
ChillHourSeasonStart = 1;
ChillHourThreshold = ini.GetValue("Station", "ChillHourThreshold", -999.0);
if (ChillHourThreshold < -998)
{
ChillHourThreshold = Units.Temp == 0 ? 7 : 45;
}
}

}
Expand Down
Loading

0 comments on commit 917aca9

Please sign in to comment.