Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
5aee8ae1b8 | ||
|
|
dfa9a53ab1 | ||
|
|
781155370f | ||
|
|
dd7bf1b4d1 | ||
|
|
b3fe0f2dd1 | ||
|
|
42d728b2ca | ||
|
|
37723963ce | ||
|
|
bcca150aea | ||
|
|
2abd80567a | ||
|
|
104bec5de6 | ||
|
|
9e391cd291 | ||
|
|
3b936a37cb | ||
|
|
9c00cb8176 | ||
|
|
41990092c4 | ||
|
|
a1ec2f84a6 | ||
|
|
7c31cab283 | ||
|
|
7edfcec844 | ||
|
|
339d4cfde5 | ||
|
|
26a7faebe7 | ||
|
|
2b93e8141e | ||
|
|
b64e35a100 | ||
|
|
62cd3c6e33 | ||
|
|
bb334e76cf | ||
|
|
650f89b7cb | ||
|
|
9e5e1415a9 | ||
|
|
55ee496d51 | ||
|
|
f3b17df9c2 | ||
|
|
003037f94a | ||
|
|
b7b4729805 | ||
|
|
e5ce1bd9ca | ||
|
|
eb6ea78c50 | ||
|
|
ec4aa3a9a2 | ||
|
|
a1d566b2e0 | ||
|
|
355d942c6e | ||
|
|
2cfd88d7a1 | ||
|
|
7bd4fca576 | ||
|
|
508b07acc5 | ||
|
|
7d1c20b414 | ||
|
|
f3e377cc2b | ||
|
|
b53c596d0d | ||
|
|
05c1185c2d | ||
|
|
0c24c679ce | ||
|
|
e5a7d89219 | ||
|
|
ec8bd91c8b | ||
|
|
370936c484 | ||
|
|
70a9133f5e |
No files matched your search
@@ -0,0 +1,247 @@
|
|||||||
|
# 如果要从更高级别的目录继承 .editorconfig 设置,请删除以下行
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# c# 文件
|
||||||
|
[*.cs]
|
||||||
|
|
||||||
|
#### Core EditorConfig 选项 ####
|
||||||
|
|
||||||
|
# 缩进和间距
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
# 新行首选项
|
||||||
|
end_of_line = crlf
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
#### .NET 代码操作 ####
|
||||||
|
|
||||||
|
# 类型成员
|
||||||
|
dotnet_hide_advanced_members = false
|
||||||
|
dotnet_member_insertion_location = with_other_members_of_the_same_kind
|
||||||
|
dotnet_property_generation_behavior = prefer_throwing_properties
|
||||||
|
|
||||||
|
# 符号搜索
|
||||||
|
dotnet_search_reference_assemblies = true
|
||||||
|
|
||||||
|
#### .NET 编码约定 ####
|
||||||
|
|
||||||
|
# 组织 Using
|
||||||
|
dotnet_separate_import_directive_groups = false
|
||||||
|
dotnet_sort_system_directives_first = false
|
||||||
|
file_header_template = unset
|
||||||
|
|
||||||
|
# this. 和 Me. 首选项
|
||||||
|
dotnet_style_qualification_for_event = false
|
||||||
|
dotnet_style_qualification_for_field = false
|
||||||
|
dotnet_style_qualification_for_method = false
|
||||||
|
dotnet_style_qualification_for_property = false
|
||||||
|
|
||||||
|
# 语言关键字与 bcl 类型首选项
|
||||||
|
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||||
|
dotnet_style_predefined_type_for_member_access = true
|
||||||
|
|
||||||
|
# 括号首选项
|
||||||
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
||||||
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||||
|
|
||||||
|
# 修饰符首选项
|
||||||
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||||
|
|
||||||
|
# 表达式级首选项
|
||||||
|
dotnet_prefer_system_hash_code = true
|
||||||
|
dotnet_style_coalesce_expression = true
|
||||||
|
dotnet_style_collection_initializer = true
|
||||||
|
dotnet_style_explicit_tuple_names = true
|
||||||
|
dotnet_style_namespace_match_folder = true
|
||||||
|
dotnet_style_null_propagation = true
|
||||||
|
dotnet_style_object_initializer = true
|
||||||
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||||
|
dotnet_style_prefer_auto_properties = true
|
||||||
|
dotnet_style_prefer_collection_expression = when_types_loosely_match
|
||||||
|
dotnet_style_prefer_compound_assignment = true
|
||||||
|
dotnet_style_prefer_conditional_expression_over_assignment = true
|
||||||
|
dotnet_style_prefer_conditional_expression_over_return = true
|
||||||
|
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true
|
||||||
|
dotnet_style_prefer_inferred_tuple_names = true
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
|
||||||
|
dotnet_style_prefer_simplified_boolean_expressions = true
|
||||||
|
dotnet_style_prefer_simplified_interpolation = true
|
||||||
|
|
||||||
|
# 字段首选项
|
||||||
|
dotnet_style_readonly_field = true
|
||||||
|
|
||||||
|
# 参数首选项
|
||||||
|
dotnet_code_quality_unused_parameters = all
|
||||||
|
|
||||||
|
# 禁止显示首选项
|
||||||
|
dotnet_remove_unnecessary_suppression_exclusions = none
|
||||||
|
|
||||||
|
# 新行首选项
|
||||||
|
dotnet_style_allow_multiple_blank_lines_experimental = true
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
||||||
|
|
||||||
|
#### c# 编码约定 ####
|
||||||
|
|
||||||
|
# var 首选项
|
||||||
|
csharp_style_var_elsewhere = false
|
||||||
|
csharp_style_var_for_built_in_types = false
|
||||||
|
csharp_style_var_when_type_is_apparent = false
|
||||||
|
|
||||||
|
# Expression-bodied 成员
|
||||||
|
csharp_style_expression_bodied_accessors = true
|
||||||
|
csharp_style_expression_bodied_constructors = false
|
||||||
|
csharp_style_expression_bodied_indexers = true
|
||||||
|
csharp_style_expression_bodied_lambdas = true
|
||||||
|
csharp_style_expression_bodied_local_functions = false
|
||||||
|
csharp_style_expression_bodied_methods = false
|
||||||
|
csharp_style_expression_bodied_operators = false
|
||||||
|
csharp_style_expression_bodied_properties = true
|
||||||
|
|
||||||
|
# 模式匹配首选项
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true
|
||||||
|
csharp_style_prefer_extended_property_pattern = true
|
||||||
|
csharp_style_prefer_not_pattern = true
|
||||||
|
csharp_style_prefer_pattern_matching = true
|
||||||
|
csharp_style_prefer_switch_expression = true
|
||||||
|
|
||||||
|
# Null 检查首选项
|
||||||
|
csharp_style_conditional_delegate_call = true
|
||||||
|
|
||||||
|
# 修饰符首选项
|
||||||
|
csharp_prefer_static_anonymous_function = true
|
||||||
|
csharp_prefer_static_local_function = true
|
||||||
|
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
|
||||||
|
csharp_style_prefer_readonly_struct = true
|
||||||
|
csharp_style_prefer_readonly_struct_member = true
|
||||||
|
|
||||||
|
# 代码块首选项
|
||||||
|
csharp_prefer_braces = true
|
||||||
|
csharp_prefer_simple_using_statement = true
|
||||||
|
csharp_prefer_system_threading_lock = true
|
||||||
|
csharp_style_namespace_declarations = block_scoped
|
||||||
|
csharp_style_prefer_method_group_conversion = true
|
||||||
|
csharp_style_prefer_primary_constructors = true
|
||||||
|
csharp_style_prefer_simple_property_accessors = true
|
||||||
|
csharp_style_prefer_top_level_statements = true
|
||||||
|
|
||||||
|
# 表达式级首选项
|
||||||
|
csharp_prefer_simple_default_expression = true
|
||||||
|
csharp_style_deconstructed_variable_declaration = true
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true
|
||||||
|
csharp_style_inlined_variable_declaration = true
|
||||||
|
csharp_style_prefer_implicitly_typed_lambda_expression = true
|
||||||
|
csharp_style_prefer_index_operator = true
|
||||||
|
csharp_style_prefer_local_over_anonymous_function = true
|
||||||
|
csharp_style_prefer_null_check_over_type_check = true
|
||||||
|
csharp_style_prefer_range_operator = true
|
||||||
|
csharp_style_prefer_tuple_swap = true
|
||||||
|
csharp_style_prefer_unbound_generic_type_in_nameof = true
|
||||||
|
csharp_style_prefer_utf8_string_literals = true
|
||||||
|
csharp_style_throw_expression = true
|
||||||
|
csharp_style_unused_value_assignment_preference = discard_variable
|
||||||
|
csharp_style_unused_value_expression_statement_preference = discard_variable
|
||||||
|
|
||||||
|
# "using" 指令首选项
|
||||||
|
csharp_using_directive_placement = outside_namespace
|
||||||
|
|
||||||
|
# 新行首选项
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||||
|
|
||||||
|
#### C# 格式规则 ####
|
||||||
|
|
||||||
|
# 新行首选项
|
||||||
|
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 = true
|
||||||
|
|
||||||
|
# 缩进首选项
|
||||||
|
csharp_indent_block_contents = true
|
||||||
|
csharp_indent_braces = false
|
||||||
|
csharp_indent_case_contents = true
|
||||||
|
csharp_indent_case_contents_when_block = true
|
||||||
|
csharp_indent_labels = one_less_than_current
|
||||||
|
csharp_indent_switch_labels = true
|
||||||
|
|
||||||
|
# 空格键首选项
|
||||||
|
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 = false
|
||||||
|
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 = false
|
||||||
|
csharp_space_between_square_brackets = false
|
||||||
|
|
||||||
|
# 包装首选项
|
||||||
|
csharp_preserve_single_line_blocks = true
|
||||||
|
csharp_preserve_single_line_statements = true
|
||||||
|
|
||||||
|
#### 命名样式 ####
|
||||||
|
|
||||||
|
# 命名规则
|
||||||
|
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||||
|
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
# 符号规范
|
||||||
|
|
||||||
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.interface.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.types.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||||
|
|
||||||
|
# 命名样式
|
||||||
|
|
||||||
|
dotnet_naming_style.pascal_case.required_prefix =
|
||||||
|
dotnet_naming_style.pascal_case.required_suffix =
|
||||||
|
dotnet_naming_style.pascal_case.word_separator =
|
||||||
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||||
|
dotnet_naming_style.begins_with_i.required_suffix =
|
||||||
|
dotnet_naming_style.begins_with_i.word_separator =
|
||||||
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
[SYS]
|
||||||
|
COM=COM7
|
||||||
|
Language=zh-CN
|
||||||
|
Protocols=SUNLIGHT_R
|
||||||
@@ -33,7 +33,7 @@
|
|||||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
<PlatformTarget>x64</PlatformTarget>
|
||||||
<DebugSymbols>true</DebugSymbols>
|
<DebugSymbols>true</DebugSymbols>
|
||||||
<DebugType>full</DebugType>
|
<DebugType>full</DebugType>
|
||||||
<Optimize>false</Optimize>
|
<Optimize>false</Optimize>
|
||||||
@@ -80,10 +80,12 @@
|
|||||||
<ErrorReport>prompt</ErrorReport>
|
<ErrorReport>prompt</ErrorReport>
|
||||||
<Prefer32Bit>true</Prefer32Bit>
|
<Prefer32Bit>true</Prefer32Bit>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<PropertyGroup />
|
||||||
|
<PropertyGroup />
|
||||||
|
<PropertyGroup>
|
||||||
|
<ApplicationManifest>app.manifest</ApplicationManifest>
|
||||||
|
</PropertyGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Reference Include="OpenHardwareMonitorLib">
|
|
||||||
<HintPath>DLL\OpenHardwareMonitorLib.dll</HintPath>
|
|
||||||
</Reference>
|
|
||||||
<Reference Include="System" />
|
<Reference Include="System" />
|
||||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||||
<Reference Include="System.Data" />
|
<Reference Include="System.Data" />
|
||||||
@@ -352,6 +354,8 @@
|
|||||||
<LastGenOutput>Resources.zh-TW.Designer.cs</LastGenOutput>
|
<LastGenOutput>Resources.zh-TW.Designer.cs</LastGenOutput>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<Resource Include="Fonts\FontAwesome.otf" />
|
<Resource Include="Fonts\FontAwesome.otf" />
|
||||||
|
<None Include=".editorconfig" />
|
||||||
|
<None Include="app.manifest" />
|
||||||
<None Include="DATA\800COMPUTER.db" />
|
<None Include="DATA\800COMPUTER.db" />
|
||||||
<None Include="DATA\Chart.db" />
|
<None Include="DATA\Chart.db" />
|
||||||
<None Include="DATA\LOG.db" />
|
<None Include="DATA\LOG.db" />
|
||||||
@@ -389,6 +393,7 @@
|
|||||||
<None Include="Fonts\font-awesome-4.7.0\scss\_screen-reader.scss" />
|
<None Include="Fonts\font-awesome-4.7.0\scss\_screen-reader.scss" />
|
||||||
<None Include="Fonts\font-awesome-4.7.0\scss\_stacked.scss" />
|
<None Include="Fonts\font-awesome-4.7.0\scss\_stacked.scss" />
|
||||||
<None Include="Fonts\font-awesome-4.7.0\scss\_variables.scss" />
|
<None Include="Fonts\font-awesome-4.7.0\scss\_variables.scss" />
|
||||||
|
<None Include="Properties\.editorconfig" />
|
||||||
<None Include="Properties\Settings.settings">
|
<None Include="Properties\Settings.settings">
|
||||||
<Generator>SettingsSingleFileGenerator</Generator>
|
<Generator>SettingsSingleFileGenerator</Generator>
|
||||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||||
@@ -452,6 +457,9 @@
|
|||||||
<Content Include="Fonts\font-awesome-4.7.0\css\font-awesome.css" />
|
<Content Include="Fonts\font-awesome-4.7.0\css\font-awesome.css" />
|
||||||
<Content Include="Fonts\font-awesome-4.7.0\css\font-awesome.min.css" />
|
<Content Include="Fonts\font-awesome-4.7.0\css\font-awesome.min.css" />
|
||||||
<Content Include="Fonts\font-awesome-4.7.0\fonts\fontawesome-webfont.svg" />
|
<Content Include="Fonts\font-awesome-4.7.0\fonts\fontawesome-webfont.svg" />
|
||||||
|
<Resource Include="Lmage\00001-1.png" />
|
||||||
|
<Resource Include="Lmage\00002-1.png" />
|
||||||
|
<Resource Include="Lmage\00001.png" />
|
||||||
<Resource Include="Lmage\19002.png" />
|
<Resource Include="Lmage\19002.png" />
|
||||||
<Resource Include="Lmage\19001.png" />
|
<Resource Include="Lmage\19001.png" />
|
||||||
<Resource Include="Lmage\19000.png" />
|
<Resource Include="Lmage\19000.png" />
|
||||||
|
|||||||
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 117 KiB |
|
After Width: | Height: | Size: 1.5 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
@@ -36,7 +36,9 @@ namespace DyeingComputer
|
|||||||
MainWindowViewModel.ViewID = 1;
|
MainWindowViewModel.ViewID = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static SQLiteHelper SQLiteChartAdress = null; //定义数据库
|
||||||
public static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
public static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||||
|
private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
||||||
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
private readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -48,6 +50,9 @@ namespace DyeingComputer
|
|||||||
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
|
||||||
|
SQLiteChartAdress = new SQLiteHelper(ChartAdress); //数据库连接路径
|
||||||
|
SQLiteChartAdress.Open(); //打开数据库
|
||||||
|
|
||||||
bool result_System = SQLiteHelpers.TableExists("System"); //检查表格是否存在(存在返回true)
|
bool result_System = SQLiteHelpers.TableExists("System"); //检查表格是否存在(存在返回true)
|
||||||
bool result_IOName = SQLiteHelpers.TableExists("IOName");
|
bool result_IOName = SQLiteHelpers.TableExists("IOName");
|
||||||
bool result_ProgramName = SQLiteHelpers.TableExists("ProgramName");
|
bool result_ProgramName = SQLiteHelpers.TableExists("ProgramName");
|
||||||
|
|||||||
@@ -0,0 +1,247 @@
|
|||||||
|
# 如果要从更高级别的目录继承 .editorconfig 设置,请删除以下行
|
||||||
|
root = true
|
||||||
|
|
||||||
|
# c# 文件
|
||||||
|
[*.cs]
|
||||||
|
|
||||||
|
#### Core EditorConfig 选项 ####
|
||||||
|
|
||||||
|
# 缩进和间距
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
tab_width = 4
|
||||||
|
|
||||||
|
# 新行首选项
|
||||||
|
end_of_line = crlf
|
||||||
|
insert_final_newline = false
|
||||||
|
|
||||||
|
#### .NET 代码操作 ####
|
||||||
|
|
||||||
|
# 类型成员
|
||||||
|
dotnet_hide_advanced_members = false
|
||||||
|
dotnet_member_insertion_location = with_other_members_of_the_same_kind
|
||||||
|
dotnet_property_generation_behavior = prefer_throwing_properties
|
||||||
|
|
||||||
|
# 符号搜索
|
||||||
|
dotnet_search_reference_assemblies = true
|
||||||
|
|
||||||
|
#### .NET 编码约定 ####
|
||||||
|
|
||||||
|
# 组织 Using
|
||||||
|
dotnet_separate_import_directive_groups = false
|
||||||
|
dotnet_sort_system_directives_first = false
|
||||||
|
file_header_template = unset
|
||||||
|
|
||||||
|
# this. 和 Me. 首选项
|
||||||
|
dotnet_style_qualification_for_event = false
|
||||||
|
dotnet_style_qualification_for_field = false
|
||||||
|
dotnet_style_qualification_for_method = false
|
||||||
|
dotnet_style_qualification_for_property = false
|
||||||
|
|
||||||
|
# 语言关键字与 bcl 类型首选项
|
||||||
|
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||||
|
dotnet_style_predefined_type_for_member_access = true
|
||||||
|
|
||||||
|
# 括号首选项
|
||||||
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
||||||
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||||
|
|
||||||
|
# 修饰符首选项
|
||||||
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||||
|
|
||||||
|
# 表达式级首选项
|
||||||
|
dotnet_prefer_system_hash_code = true
|
||||||
|
dotnet_style_coalesce_expression = true
|
||||||
|
dotnet_style_collection_initializer = true
|
||||||
|
dotnet_style_explicit_tuple_names = true
|
||||||
|
dotnet_style_namespace_match_folder = true
|
||||||
|
dotnet_style_null_propagation = true
|
||||||
|
dotnet_style_object_initializer = true
|
||||||
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||||
|
dotnet_style_prefer_auto_properties = true
|
||||||
|
dotnet_style_prefer_collection_expression = when_types_loosely_match
|
||||||
|
dotnet_style_prefer_compound_assignment = true
|
||||||
|
dotnet_style_prefer_conditional_expression_over_assignment = true
|
||||||
|
dotnet_style_prefer_conditional_expression_over_return = true
|
||||||
|
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true
|
||||||
|
dotnet_style_prefer_inferred_tuple_names = true
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
|
||||||
|
dotnet_style_prefer_simplified_boolean_expressions = true
|
||||||
|
dotnet_style_prefer_simplified_interpolation = true
|
||||||
|
|
||||||
|
# 字段首选项
|
||||||
|
dotnet_style_readonly_field = true
|
||||||
|
|
||||||
|
# 参数首选项
|
||||||
|
dotnet_code_quality_unused_parameters = all
|
||||||
|
|
||||||
|
# 禁止显示首选项
|
||||||
|
dotnet_remove_unnecessary_suppression_exclusions = none
|
||||||
|
|
||||||
|
# 新行首选项
|
||||||
|
dotnet_style_allow_multiple_blank_lines_experimental = true
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
||||||
|
|
||||||
|
#### c# 编码约定 ####
|
||||||
|
|
||||||
|
# var 首选项
|
||||||
|
csharp_style_var_elsewhere = false
|
||||||
|
csharp_style_var_for_built_in_types = false
|
||||||
|
csharp_style_var_when_type_is_apparent = false
|
||||||
|
|
||||||
|
# Expression-bodied 成员
|
||||||
|
csharp_style_expression_bodied_accessors = true
|
||||||
|
csharp_style_expression_bodied_constructors = false
|
||||||
|
csharp_style_expression_bodied_indexers = true
|
||||||
|
csharp_style_expression_bodied_lambdas = true
|
||||||
|
csharp_style_expression_bodied_local_functions = false
|
||||||
|
csharp_style_expression_bodied_methods = false
|
||||||
|
csharp_style_expression_bodied_operators = false
|
||||||
|
csharp_style_expression_bodied_properties = true
|
||||||
|
|
||||||
|
# 模式匹配首选项
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true
|
||||||
|
csharp_style_prefer_extended_property_pattern = true
|
||||||
|
csharp_style_prefer_not_pattern = true
|
||||||
|
csharp_style_prefer_pattern_matching = true
|
||||||
|
csharp_style_prefer_switch_expression = true
|
||||||
|
|
||||||
|
# Null 检查首选项
|
||||||
|
csharp_style_conditional_delegate_call = true
|
||||||
|
|
||||||
|
# 修饰符首选项
|
||||||
|
csharp_prefer_static_anonymous_function = true
|
||||||
|
csharp_prefer_static_local_function = true
|
||||||
|
csharp_preferred_modifier_order = public,private,protected,internal,file,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,required,volatile,async
|
||||||
|
csharp_style_prefer_readonly_struct = true
|
||||||
|
csharp_style_prefer_readonly_struct_member = true
|
||||||
|
|
||||||
|
# 代码块首选项
|
||||||
|
csharp_prefer_braces = true
|
||||||
|
csharp_prefer_simple_using_statement = true
|
||||||
|
csharp_prefer_system_threading_lock = true
|
||||||
|
csharp_style_namespace_declarations = block_scoped
|
||||||
|
csharp_style_prefer_method_group_conversion = true
|
||||||
|
csharp_style_prefer_primary_constructors = true
|
||||||
|
csharp_style_prefer_simple_property_accessors = true
|
||||||
|
csharp_style_prefer_top_level_statements = true
|
||||||
|
|
||||||
|
# 表达式级首选项
|
||||||
|
csharp_prefer_simple_default_expression = true
|
||||||
|
csharp_style_deconstructed_variable_declaration = true
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true
|
||||||
|
csharp_style_inlined_variable_declaration = true
|
||||||
|
csharp_style_prefer_implicitly_typed_lambda_expression = true
|
||||||
|
csharp_style_prefer_index_operator = true
|
||||||
|
csharp_style_prefer_local_over_anonymous_function = true
|
||||||
|
csharp_style_prefer_null_check_over_type_check = true
|
||||||
|
csharp_style_prefer_range_operator = true
|
||||||
|
csharp_style_prefer_tuple_swap = true
|
||||||
|
csharp_style_prefer_unbound_generic_type_in_nameof = true
|
||||||
|
csharp_style_prefer_utf8_string_literals = true
|
||||||
|
csharp_style_throw_expression = true
|
||||||
|
csharp_style_unused_value_assignment_preference = discard_variable
|
||||||
|
csharp_style_unused_value_expression_statement_preference = discard_variable
|
||||||
|
|
||||||
|
# "using" 指令首选项
|
||||||
|
csharp_using_directive_placement = outside_namespace
|
||||||
|
|
||||||
|
# 新行首选项
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||||
|
|
||||||
|
#### C# 格式规则 ####
|
||||||
|
|
||||||
|
# 新行首选项
|
||||||
|
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 = true
|
||||||
|
|
||||||
|
# 缩进首选项
|
||||||
|
csharp_indent_block_contents = true
|
||||||
|
csharp_indent_braces = false
|
||||||
|
csharp_indent_case_contents = true
|
||||||
|
csharp_indent_case_contents_when_block = true
|
||||||
|
csharp_indent_labels = one_less_than_current
|
||||||
|
csharp_indent_switch_labels = true
|
||||||
|
|
||||||
|
# 空格键首选项
|
||||||
|
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 = false
|
||||||
|
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 = false
|
||||||
|
csharp_space_between_square_brackets = false
|
||||||
|
|
||||||
|
# 包装首选项
|
||||||
|
csharp_preserve_single_line_blocks = true
|
||||||
|
csharp_preserve_single_line_statements = true
|
||||||
|
|
||||||
|
#### 命名样式 ####
|
||||||
|
|
||||||
|
# 命名规则
|
||||||
|
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||||
|
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||||
|
|
||||||
|
# 符号规范
|
||||||
|
|
||||||
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.interface.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.types.required_modifiers =
|
||||||
|
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||||
|
|
||||||
|
# 命名样式
|
||||||
|
|
||||||
|
dotnet_naming_style.pascal_case.required_prefix =
|
||||||
|
dotnet_naming_style.pascal_case.required_suffix =
|
||||||
|
dotnet_naming_style.pascal_case.word_separator =
|
||||||
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||||
|
|
||||||
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||||
|
dotnet_naming_style.begins_with_i.required_suffix =
|
||||||
|
dotnet_naming_style.begins_with_i.word_separator =
|
||||||
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||||
@@ -73,7 +73,7 @@ namespace DyeingComputer.UserClass
|
|||||||
API_LOG.Add("NAME", WorkOrder);
|
API_LOG.Add("NAME", WorkOrder);
|
||||||
API_LOG.Add("ERRID", ERRID);
|
API_LOG.Add("ERRID", ERRID);
|
||||||
API_LOG.Add("MESSAGE", MESSAGE);
|
API_LOG.Add("MESSAGE", MESSAGE);
|
||||||
API_LOG.Add("TIME", Time);
|
API_LOG.Add("TIME", MainWindowViewModel.SYSTime);
|
||||||
LOGDB("ERRLog", API_LOG);//行插入
|
LOGDB("ERRLog", API_LOG);//行插入
|
||||||
API_LOG.Clear();
|
API_LOG.Clear();
|
||||||
}
|
}
|
||||||
@@ -94,16 +94,25 @@ namespace DyeingComputer.UserClass
|
|||||||
if(DBQueue.Count==0) QueueT=false;
|
if(DBQueue.Count==0) QueueT=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void LOGDB()//从队列写入数据库
|
public static void LOGnew()
|
||||||
{
|
{
|
||||||
SQLiteHelpers = new SQLiteHelper(LOGAddress); //数据库连接路径
|
SQLiteHelpers = new SQLiteHelper(LOGAddress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
SQLiteHelpers.Open(); //打开数据库
|
||||||
|
}//
|
||||||
|
public static DataTable LOGSELECT(string select)
|
||||||
|
{
|
||||||
|
var dat = SQLiteHelpers.ExecuteDataSet(select, null);
|
||||||
|
DataTable dt = dat.Tables[0];
|
||||||
|
return dt;
|
||||||
|
}
|
||||||
|
public static void LOGDB()//从队列写入数据库
|
||||||
|
{
|
||||||
while (DBQueue.Count > 0)//信息发送队列
|
while (DBQueue.Count > 0)//信息发送队列
|
||||||
{
|
{
|
||||||
QueueString t = DBQueue.Dequeue();
|
QueueString t = DBQueue.Dequeue();
|
||||||
SQLiteHelpers.InsertData(t.ID, t.DAT);//行插入
|
SQLiteHelpers.InsertData(t.ID, t.DAT);//行插入
|
||||||
}
|
}
|
||||||
SQLiteHelpers.Close(); //关闭连接
|
//SQLiteHelpers.Close(); //关闭连接
|
||||||
QueueT = false;
|
QueueT = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -74,6 +74,7 @@ namespace DyeingComputer.UserClass
|
|||||||
// public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
// public static readonly string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||||
public static async Task Main()
|
public static async Task Main()
|
||||||
{
|
{
|
||||||
|
NetFwManger.AllowPort(7789, "TCP");//开放7790端口
|
||||||
NetFwManger.AllowPort(7790,"TCP");//开放7790端口
|
NetFwManger.AllowPort(7790,"TCP");//开放7790端口
|
||||||
TcpService service = new TcpService();
|
TcpService service = new TcpService();
|
||||||
service.Connecting = (client, e) => { return EasyTask.CompletedTask; };//有客户端正在连接
|
service.Connecting = (client, e) => { return EasyTask.CompletedTask; };//有客户端正在连接
|
||||||
@@ -110,29 +111,23 @@ namespace DyeingComputer.UserClass
|
|||||||
Dictionary<string, object> WorkOrder_dat;
|
Dictionary<string, object> WorkOrder_dat;
|
||||||
WorkOrder_dat = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
|
WorkOrder_dat = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
|
||||||
//WorkOrder_dat.GetValue("WorkOrder");
|
//WorkOrder_dat.GetValue("WorkOrder");
|
||||||
bool dat_w = SQLDATA.WorkOrder(
|
|
||||||
WorkOrder_dat.GetValue("WorkOrder").ToString(),
|
object i = MainWindow.SQLiteHelpers.ExecuteScalar("select * from WorkOrder where WorkOrder = " + WorkOrder_dat.GetValue("WorkOrder").ToString(), null);
|
||||||
WorkOrder_dat.GetValue("ProgramName").ToString(),
|
Dictionary<string, object> Step_new = new Dictionary<string, object>();//缓存函数
|
||||||
WorkOrder_dat.GetValue("StartTime").ToString(),
|
Step_new.Add("WorkOrder", WorkOrder_dat.GetValue("WorkOrder").ToString());
|
||||||
WorkOrder_dat.GetValue("EndTime").ToString(),
|
Step_new.Add("ReDye", WorkOrder_dat.GetValue("ReDye").ToString());
|
||||||
WorkOrder_dat.GetValue("Time").ToString(),
|
if (i != null)
|
||||||
WorkOrder_dat.GetValue("Remark").ToString(),
|
|
||||||
WorkOrder_dat.GetValue("lock").ToString(),
|
|
||||||
WorkOrder_dat.GetValue("State").ToString(),
|
|
||||||
WorkOrder_dat.GetValue("ProgramID").ToString(),
|
|
||||||
WorkOrder_dat.GetValue("color").ToString(),
|
|
||||||
WorkOrder_dat.GetValue("Dyelot").ToString());
|
|
||||||
if (!dat_w)
|
|
||||||
{
|
{
|
||||||
client.SendAsync("SC910" + "[" + MainWindowViewModel.S01 + "]" +
|
client.SendAsync("SC910" + "[" + MainWindowViewModel.S01 + "]" + Step_new.ToJsonString());
|
||||||
WorkOrder_dat.GetValue("WorkOrder").ToString());
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
client.SendAsync("SC810" + "[" + MainWindowViewModel.S01 + "]" +
|
client.SendAsync("SC810" + "[" + MainWindowViewModel.S01 + "]" + Step_new.ToJsonString());
|
||||||
WorkOrder_dat.GetValue("WorkOrder").ToString()); MainWindowViewModel.TX++;
|
MainWindowViewModel.TX++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MainWindow.SQLiteHelpers.InsertData("WorkOrder", WorkOrder_dat);
|
||||||
|
|
||||||
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
@@ -151,15 +146,16 @@ namespace DyeingComputer.UserClass
|
|||||||
DataTable WorkOrder_dat;
|
DataTable WorkOrder_dat;
|
||||||
WorkOrder_dat = SerializeConvert.JsonDeserializeFromString<DataTable>(SYSDAT);
|
WorkOrder_dat = SerializeConvert.JsonDeserializeFromString<DataTable>(SYSDAT);
|
||||||
bool dat_w = SQLDATA.WorkOderStep(WorkOrder_dat);
|
bool dat_w = SQLDATA.WorkOderStep(WorkOrder_dat);
|
||||||
|
Dictionary<string, object> Step_new = new Dictionary<string, object>();//缓存函数
|
||||||
|
Step_new.Add("WorkOrder", WorkOrder_dat.Select().First().Field<object>("WorkOrder"));
|
||||||
|
Step_new.Add("ReDye", WorkOrder_dat.Select().First().Field<object>("ReDye"));
|
||||||
if (!dat_w)
|
if (!dat_w)
|
||||||
{
|
{
|
||||||
client.SendAsync("SC911" + "[" + MainWindowViewModel.S01 + "]" +
|
client.SendAsync("SC911" + "[" + MainWindowViewModel.S01 + "]" + Step_new.ToJsonString());
|
||||||
WorkOrder_dat.Select().First().Field<object>("WorkOrder"));
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
client.SendAsync("SC811" + "[" + MainWindowViewModel.S01 + "]" +
|
client.SendAsync("SC811" + "[" + MainWindowViewModel.S01 + "]" + Step_new.ToJsonString());
|
||||||
WorkOrder_dat.Select().First().Field<object>("WorkOrder"));
|
|
||||||
MainWindowViewModel.TX++;
|
MainWindowViewModel.TX++;
|
||||||
}
|
}
|
||||||
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||||
@@ -180,6 +176,12 @@ namespace DyeingComputer.UserClass
|
|||||||
Dictionary<string, object> WorkOrder_dat;
|
Dictionary<string, object> WorkOrder_dat;
|
||||||
WorkOrder_dat = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
|
WorkOrder_dat = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
|
||||||
MainWindow.SQLiteHelpers.InsertData("WorkorderSet", WorkOrder_dat);//行插入
|
MainWindow.SQLiteHelpers.InsertData("WorkorderSet", WorkOrder_dat);//行插入
|
||||||
|
|
||||||
|
Dictionary<string, object> Step_new = new Dictionary<string, object>();//缓存函数
|
||||||
|
Step_new.Add("WorkOrder", WorkOrder_dat.GetValue("WorkOrder").ToString());
|
||||||
|
Step_new.Add("ReDye", WorkOrder_dat.GetValue("ReDye").ToString());
|
||||||
|
|
||||||
|
client.SendAsync("SC812" + "[" + MainWindowViewModel.S01 + "]" + Step_new.ToJsonString());
|
||||||
MainWindowViewModel.TX++;
|
MainWindowViewModel.TX++;
|
||||||
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||||
}
|
}
|
||||||
@@ -248,7 +250,7 @@ namespace DyeingComputer.UserClass
|
|||||||
dat_821 = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
|
dat_821 = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
|
||||||
if (dat_821.GetValue("INSTRUCTION").ToString() == "START")
|
if (dat_821.GetValue("INSTRUCTION").ToString() == "START")
|
||||||
{
|
{
|
||||||
MainWindowViewModel.Dyelot_dat = MainWindow.SQLiteHelpers.ExecuteDataSet("select * from Dyelot where WorkOrder = '" +
|
MainWindowViewModel.Dyelot_dat = MainWindow.SQLiteHelpers.ExecuteDataSet("select * from Dyelot where ReDye=0 AND WorkOrder = '" +
|
||||||
dat_821.GetValue("WorkOrder").ToString() + "'", null).Tables[0];
|
dat_821.GetValue("WorkOrder").ToString() + "'", null).Tables[0];
|
||||||
var DT_Set = MainWindow.SQLiteHelpers.ExecuteDataSet("select * from WorkOrderSet where WorkOrder = '" +
|
var DT_Set = MainWindow.SQLiteHelpers.ExecuteDataSet("select * from WorkOrderSet where WorkOrder = '" +
|
||||||
dat_821.GetValue("WorkOrder").ToString() + "'", null).Tables[0].Rows[0];
|
dat_821.GetValue("WorkOrder").ToString() + "'", null).Tables[0].Rows[0];
|
||||||
@@ -267,29 +269,61 @@ namespace DyeingComputer.UserClass
|
|||||||
MainWindowViewModel.Updata_dtm("1039", DT_Set.Field<int>("ClothWheel"));
|
MainWindowViewModel.Updata_dtm("1039", DT_Set.Field<int>("ClothWheel"));
|
||||||
MainWindowViewModel.Updata_dtm("1040", DT_Set.Field<int>("ClothWheel"));
|
MainWindowViewModel.Updata_dtm("1040", DT_Set.Field<int>("ClothWheel"));
|
||||||
MainWindowViewModel.Updata_dtm("1041", DT_Set.Field<int>("ClothWheel"));
|
MainWindowViewModel.Updata_dtm("1041", DT_Set.Field<int>("ClothWheel"));
|
||||||
|
DataTable WorkorderSteps = MainWindow.SQLiteHelpers.ExecuteDataSet(
|
||||||
|
"select * from WorkorderSteps where ReDye=0 AND WorkOrder='" + dat_821.GetValue("WorkOrder").ToString() + "'", null).Tables[0]; //读取表写入缓存
|
||||||
|
DataTable Workorder = MainWindow.SQLiteHelpers.ExecuteDataSet(
|
||||||
|
"select * from Workorder where ReDye=0 AND WorkOrder='" + dat_821.GetValue("WorkOrder").ToString() + "'", null).Tables[0]; //读取表写入缓存
|
||||||
|
MainWindowViewModel.ProgramName = Workorder.Rows[0].Field<string>("ProgramName");
|
||||||
|
MainWindowViewModel.WorkNumder = Workorder.Rows[0].Field<string>("WorkOrder");
|
||||||
|
MainWindow.SQLiteHelpers.Delete("RUN", null, null); //删除run信息
|
||||||
|
for (int i = 0; i < WorkorderSteps.Rows.Count; i++)
|
||||||
|
{
|
||||||
|
DataRow dr = WorkorderSteps.Rows[i];//行转
|
||||||
|
|
||||||
|
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dr));//行插入
|
||||||
|
}
|
||||||
|
Dictionary<string, object> updata_temp = new Dictionary<string, object>();//缓存函数
|
||||||
|
updata_temp.Add("State", 205);
|
||||||
|
MainWindow.SQLiteHelpers.Update("WorkOrder", updata_temp, "WorkOrder='" + dat_821.GetValue("WorkOrder").ToString() + "'", null);
|
||||||
|
updata_temp.Clear(); //使用前清缓存
|
||||||
|
updata_temp.Add("RUN", 1);
|
||||||
|
MainWindow.SQLiteHelpers.Update("RUN", updata_temp, "Step=1", null);
|
||||||
|
//SQLiteHelpers.Close(); //关闭连接
|
||||||
|
|
||||||
|
/*触发启动*/
|
||||||
|
string Numder = WorkorderSteps.Select("Step = 1").First().Field<string>("StepID");//
|
||||||
|
double P1 = WorkorderSteps.Select("Step = 1").First().Field<double>("Parameter1");
|
||||||
|
double P2 = WorkorderSteps.Select("Step = 1").First().Field<double>("Parameter2");
|
||||||
|
double P3 = WorkorderSteps.Select("Step = 1").First().Field<double>("Parameter3");
|
||||||
|
double P4 = WorkorderSteps.Select("Step = 1").First().Field<double>("Parameter4");
|
||||||
|
double P5 = WorkorderSteps.Select("Step = 1").First().Field<double>("Parameter5");
|
||||||
|
MainWindowViewModel.RUN_STEPID = Convert.ToInt16(1);//插入步骤号
|
||||||
|
MainWindowViewModel.STEP_START(Numder, Convert.ToDouble(P1), Convert.ToDouble(P2), Convert.ToDouble(P3),
|
||||||
|
Convert.ToDouble(P4), Convert.ToDouble(P5));
|
||||||
|
MainWindowViewModel.WORK_RUN = 2;
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "CentralControl", "START", "STEP = " +
|
||||||
|
MainWindowViewModel.RUN_STEPID + ";StepID=" + Numder + ";P1=" + P1 + ";P2=" + P2 + ";P3=" + P3 + ";P4=" + P4 + ";P5=" + P5);
|
||||||
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
||||||
}
|
}
|
||||||
else if (dat_821.GetValue("INSTRUCTION").ToString() == "STOP")
|
else if (dat_821.GetValue("INSTRUCTION").ToString() == "STOP")
|
||||||
{
|
{
|
||||||
MainWindowViewModel.WORK_RUN = 0;//停止
|
MainWindowViewModel.WORK_RUN = 0;//停止
|
||||||
MainWindowViewModel.DIDETime = 0;
|
MainWindowViewModel.DIDETime = 0;
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "CentralControl", "STOP", MainWindowViewModel.WorkNumder.ToString());
|
||||||
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
||||||
}
|
}//停止
|
||||||
else if (dat_821.GetValue("INSTRUCTION").ToString() == "PAUSE")
|
else if (dat_821.GetValue("INSTRUCTION").ToString() == "PAUSE")
|
||||||
{
|
{
|
||||||
MainWindowViewModel.WORK_RUN = 1;//暂停
|
MainWindowViewModel.WORK_RUN = 1;//暂停
|
||||||
MainWindowViewModel.errTabler.Clear();
|
MainWindowViewModel.errTabler.Clear();
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "CentralControl", "PAUSE", MainWindowViewModel.WorkNumder.ToString());
|
||||||
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
||||||
}
|
}//暂停
|
||||||
else if (dat_821.GetValue("INSTRUCTION").ToString() == "CONTINUE")
|
else if (dat_821.GetValue("INSTRUCTION").ToString() == "CONTINUE")
|
||||||
{
|
{
|
||||||
|
|
||||||
MainWindowViewModel.errTabler.Clear();
|
MainWindowViewModel.errTabler.Clear();
|
||||||
MainWindowViewModel.WORK_RUN = 2;//
|
MainWindowViewModel.WORK_RUN = 2;//PAUSE
|
||||||
//
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "CentralControl", "CONTINUE", MainWindowViewModel.WorkNumder.ToString());
|
||||||
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
client.SendAsync("SC821" + SYSKEY + SYSDAT);
|
||||||
}//运行
|
}//运行
|
||||||
else if (dat_821.GetValue("INSTRUCTION").ToString() == "JUMP")
|
else if (dat_821.GetValue("INSTRUCTION").ToString() == "JUMP")
|
||||||
@@ -298,6 +332,11 @@ namespace DyeingComputer.UserClass
|
|||||||
MainWindowViewModel.STEP_START(dat_821.GetValue("Numder").ToString(), Convert.ToDouble(dat_821.GetValue("P1")),
|
MainWindowViewModel.STEP_START(dat_821.GetValue("Numder").ToString(), Convert.ToDouble(dat_821.GetValue("P1")),
|
||||||
Convert.ToDouble(dat_821.GetValue("P2")), Convert.ToDouble(dat_821.GetValue("P3")),
|
Convert.ToDouble(dat_821.GetValue("P2")), Convert.ToDouble(dat_821.GetValue("P3")),
|
||||||
Convert.ToDouble(dat_821.GetValue("P4")), Convert.ToDouble(dat_821.GetValue("P5")));
|
Convert.ToDouble(dat_821.GetValue("P4")), Convert.ToDouble(dat_821.GetValue("P5")));
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "CentralControl", "JUMP", "STEP = " +
|
||||||
|
MainWindowViewModel.RUN_STEPID + ";"+dat_821.GetValue("Numder").ToString()+";P1="+
|
||||||
|
Convert.ToDouble(dat_821.GetValue("P1")) + ";P2=" + Convert.ToDouble(dat_821.GetValue("P2")) + ";P3=" +
|
||||||
|
Convert.ToDouble(dat_821.GetValue("P3")) + ";P4=" + Convert.ToDouble(dat_821.GetValue("P4")) + ";P5=" +
|
||||||
|
Convert.ToDouble(dat_821.GetValue("P5")));
|
||||||
}//跳步
|
}//跳步
|
||||||
else if (dat_821.GetValue("INSTRUCTION").ToString() == "INSERT")
|
else if (dat_821.GetValue("INSTRUCTION").ToString() == "INSERT")
|
||||||
{
|
{
|
||||||
@@ -325,7 +364,27 @@ namespace DyeingComputer.UserClass
|
|||||||
drtt["Parameter3"] = dat_821.GetValue("Parameter3").ToString();
|
drtt["Parameter3"] = dat_821.GetValue("Parameter3").ToString();
|
||||||
drtt["Parameter4"] = dat_821.GetValue("Parameter4").ToString();
|
drtt["Parameter4"] = dat_821.GetValue("Parameter4").ToString();
|
||||||
drtt["Parameter5"] = dat_821.GetValue("Parameter5").ToString();
|
drtt["Parameter5"] = dat_821.GetValue("Parameter5").ToString();
|
||||||
|
drtt["Parameter1_S1"] = dat_821.GetValue("Parameter1_S1").ToString();
|
||||||
|
drtt["Parameter2_S1"] = dat_821.GetValue("Parameter2_S1").ToString();
|
||||||
|
drtt["Parameter3_S1"] = dat_821.GetValue("Parameter3_S1").ToString();
|
||||||
|
drtt["Parameter4_S1"] = dat_821.GetValue("Parameter4_S1").ToString();
|
||||||
|
drtt["Parameter5_S1"] = dat_821.GetValue("Parameter5_S1").ToString();
|
||||||
|
drtt["Parameter1_S2"] = dat_821.GetValue("Parameter1_S2").ToString();
|
||||||
|
drtt["Parameter2_S2"] = dat_821.GetValue("Parameter2_S2").ToString();
|
||||||
|
drtt["Parameter3_S2"] = dat_821.GetValue("Parameter3_S2").ToString();
|
||||||
|
drtt["Parameter4_S2"] = dat_821.GetValue("Parameter4_S2").ToString();
|
||||||
|
drtt["Parameter5_S2"] = dat_821.GetValue("Parameter5_S2").ToString();
|
||||||
|
drtt["Parameter1_S3"] = dat_821.GetValue("Parameter1_S3").ToString();
|
||||||
|
drtt["Parameter2_S3"] = dat_821.GetValue("Parameter2_S3").ToString();
|
||||||
|
drtt["Parameter3_S3"] = dat_821.GetValue("Parameter3_S3").ToString();
|
||||||
|
drtt["Parameter4_S3"] = dat_821.GetValue("Parameter4_S3").ToString();
|
||||||
|
drtt["Parameter5_S3"] = dat_821.GetValue("Parameter5_S3").ToString();
|
||||||
|
drtt["StepName_S1"] = dat_821.GetValue("StepName_S1").ToString();
|
||||||
|
drtt["StepName_S2"] = dat_821.GetValue("StepName_S2").ToString();
|
||||||
|
drtt["StepName_S3"] = dat_821.GetValue("StepName_S3").ToString();
|
||||||
|
drtt["StepID_S1"] = dat_821.GetValue("StepID_S1").ToString();
|
||||||
|
drtt["StepID_S2"] = dat_821.GetValue("StepID_S2").ToString();
|
||||||
|
drtt["StepID_S3"] = dat_821.GetValue("StepID_S3").ToString();
|
||||||
drtt["RUN"] = "0";
|
drtt["RUN"] = "0";
|
||||||
drtt["DYELOT"] = MainWindowViewModel.WorkNumder;
|
drtt["DYELOT"] = MainWindowViewModel.WorkNumder;
|
||||||
drtt.EndEdit();
|
drtt.EndEdit();
|
||||||
@@ -348,7 +407,7 @@ namespace DyeingComputer.UserClass
|
|||||||
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dt));//行插入
|
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dt));//行插入
|
||||||
}
|
}
|
||||||
//SQLiteHelpers.Close(); //关闭连接
|
//SQLiteHelpers.Close(); //关闭连接
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "CentralControl", "INSERT", drtt.ToJsonString());
|
||||||
client.SendAsync("SC831" + "[" + MainWindowViewModel.S01 + "]" + MainWindowViewModel.dt_TP.ToJsonString());
|
client.SendAsync("SC831" + "[" + MainWindowViewModel.S01 + "]" + MainWindowViewModel.dt_TP.ToJsonString());
|
||||||
MainWindowViewModel.TX++;
|
MainWindowViewModel.TX++;
|
||||||
}//插入
|
}//插入
|
||||||
@@ -366,6 +425,27 @@ namespace DyeingComputer.UserClass
|
|||||||
dr["Parameter3"] = dat_821.GetValue("Parameter3").ToString();
|
dr["Parameter3"] = dat_821.GetValue("Parameter3").ToString();
|
||||||
dr["Parameter4"] = dat_821.GetValue("Parameter4").ToString();
|
dr["Parameter4"] = dat_821.GetValue("Parameter4").ToString();
|
||||||
dr["Parameter5"] = dat_821.GetValue("Parameter5").ToString();
|
dr["Parameter5"] = dat_821.GetValue("Parameter5").ToString();
|
||||||
|
dr["Parameter1_S1"] = dat_821.GetValue("Parameter1_S1").ToString();
|
||||||
|
dr["Parameter2_S1"] = dat_821.GetValue("Parameter2_S1").ToString();
|
||||||
|
dr["Parameter3_S1"] = dat_821.GetValue("Parameter3_S1").ToString();
|
||||||
|
dr["Parameter4_S1"] = dat_821.GetValue("Parameter4_S1").ToString();
|
||||||
|
dr["Parameter5_S1"] = dat_821.GetValue("Parameter5_S1").ToString();
|
||||||
|
dr["Parameter1_S2"] = dat_821.GetValue("Parameter1_S2").ToString();
|
||||||
|
dr["Parameter2_S2"] = dat_821.GetValue("Parameter2_S2").ToString();
|
||||||
|
dr["Parameter3_S2"] = dat_821.GetValue("Parameter3_S2").ToString();
|
||||||
|
dr["Parameter4_S2"] = dat_821.GetValue("Parameter4_S2").ToString();
|
||||||
|
dr["Parameter5_S2"] = dat_821.GetValue("Parameter5_S2").ToString();
|
||||||
|
dr["Parameter1_S3"] = dat_821.GetValue("Parameter1_S3").ToString();
|
||||||
|
dr["Parameter2_S3"] = dat_821.GetValue("Parameter2_S3").ToString();
|
||||||
|
dr["Parameter3_S3"] = dat_821.GetValue("Parameter3_S3").ToString();
|
||||||
|
dr["Parameter4_S3"] = dat_821.GetValue("Parameter4_S3").ToString();
|
||||||
|
dr["Parameter5_S3"] = dat_821.GetValue("Parameter5_S3").ToString();
|
||||||
|
dr["StepName_S1"] = dat_821.GetValue("StepName_S1").ToString();
|
||||||
|
dr["StepName_S2"] = dat_821.GetValue("StepName_S2").ToString();
|
||||||
|
dr["StepName_S3"] = dat_821.GetValue("StepName_S3").ToString();
|
||||||
|
dr["StepID_S1"] = dat_821.GetValue("StepID_S1").ToString();
|
||||||
|
dr["StepID_S2"] = dat_821.GetValue("StepID_S2").ToString();
|
||||||
|
dr["StepID_S3"] = dat_821.GetValue("StepID_S3").ToString();
|
||||||
dr.EndEdit();
|
dr.EndEdit();
|
||||||
|
|
||||||
var _TechnologicalProcessView = Application.Current.Windows.Cast<UserControl>().FirstOrDefault(window => window is TechnologicalProcessView) as TechnologicalProcessView;//跨页面
|
var _TechnologicalProcessView = Application.Current.Windows.Cast<UserControl>().FirstOrDefault(window => window is TechnologicalProcessView) as TechnologicalProcessView;//跨页面
|
||||||
@@ -385,7 +465,7 @@ namespace DyeingComputer.UserClass
|
|||||||
|
|
||||||
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dt));//行插入
|
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dt));//行插入
|
||||||
} //SQLiteHelpers.Close(); //关闭连接
|
} //SQLiteHelpers.Close(); //关闭连接
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "CentralControl", "EDIT", dr.ToJsonString());
|
||||||
client.SendAsync("SC831" + "[" + MainWindowViewModel.S01 + "]" + MainWindowViewModel.dt_TP.ToJsonString());
|
client.SendAsync("SC831" + "[" + MainWindowViewModel.S01 + "]" + MainWindowViewModel.dt_TP.ToJsonString());
|
||||||
MainWindowViewModel.TX++;
|
MainWindowViewModel.TX++;
|
||||||
}//编辑
|
}//编辑
|
||||||
@@ -409,7 +489,7 @@ namespace DyeingComputer.UserClass
|
|||||||
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dt));//行插入
|
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dt));//行插入
|
||||||
}
|
}
|
||||||
//SQLiteHelpers.Close(); //关闭连接
|
//SQLiteHelpers.Close(); //关闭连接
|
||||||
|
APILog.LOGlog(MainWindowViewModel.WorkNumder.ToString(), "CentralControl", "DELETE","ID="+ dat_821.GetValue("ID").ToString());
|
||||||
client.SendAsync("SC831" + "[" + MainWindowViewModel.S01 + "]" + MainWindowViewModel.dt_TP.ToJsonString());
|
client.SendAsync("SC831" + "[" + MainWindowViewModel.S01 + "]" + MainWindowViewModel.dt_TP.ToJsonString());
|
||||||
MainWindowViewModel.TX++;
|
MainWindowViewModel.TX++;
|
||||||
}//删除
|
}//删除
|
||||||
@@ -423,6 +503,23 @@ namespace DyeingComputer.UserClass
|
|||||||
}
|
}
|
||||||
else { client.SendAsync("SC999"); }
|
else { client.SendAsync("SC999"); }
|
||||||
}//启停跳步指令
|
}//启停跳步指令
|
||||||
|
else if (SYSAPI == "SC822")
|
||||||
|
{
|
||||||
|
if (SYSKEY == MainWindowViewModel.SYSKEY)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
DataTable Workorder = MainWindow.SQLiteHelpers.ExecuteDataSet(
|
||||||
|
"select * from Workorder where ReDye=0 AND State='101'AND StartTime >'"+
|
||||||
|
DateTime.Now.AddHours(-1).ToString("yyyy/MM/dd HH:mm:ss") +"'", null).Tables[0]; //读取表写入缓存
|
||||||
|
|
||||||
|
client.SendAsync("SC822" + "[" + MainWindowViewModel.S01 + "]" + Workorder.ToJsonString());
|
||||||
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||||
|
}
|
||||||
|
catch (Exception ex) { client.SendAsync("SC922" + "[" + MainWindowViewModel.S01 + "]" + ex); }
|
||||||
|
}
|
||||||
|
else { client.SendAsync("SC999"); }
|
||||||
|
}//最近可用工艺
|
||||||
else if (SYSAPI == "SC827")
|
else if (SYSAPI == "SC827")
|
||||||
{
|
{
|
||||||
if (SYSKEY == MainWindowViewModel.SYSKEY)
|
if (SYSKEY == MainWindowViewModel.SYSKEY)
|
||||||
@@ -678,58 +775,46 @@ namespace DyeingComputer.UserClass
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
SQLiteHelper SQLiteHelpersLOG = new SQLiteHelper("\\DataBase\\LOG.db"); //数据库连接路径
|
// SQLiteHelper SQLiteHelpersLOG = new SQLiteHelper(Environment.CurrentDirectory+"\\DataBase\\LOG.db"); //数据库连接路径
|
||||||
|
// SQLiteHelpersLOG.Open(); //打开数据库
|
||||||
Dictionary<string, object> dat_859;
|
Dictionary<string, object> dat_859;
|
||||||
dat_859 = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
|
dat_859 = SerializeConvert.JsonDeserializeFromString<Dictionary<string, object>>(SYSDAT);
|
||||||
|
|
||||||
if (dat_859.GetValue("INSTRUCTION").ToString() == "SERVER")
|
if (dat_859.GetValue("INSTRUCTION").ToString() == "SERVER")
|
||||||
{
|
{
|
||||||
//SQLiteHelper SQLiteHelpersLOG = new SQLiteHelper("\\DataBase\\LOG.db"); //数据库连接路径
|
var dt_ = APILog.LOGSELECT("select * from SERVER where TIME >'" +
|
||||||
SQLiteHelpersLOG.Open(); //打开数据库
|
DateTime.Parse(dat_859.GetValue("TIME_S").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "' and TIME <'" +
|
||||||
DataTable dt_ = SQLiteHelpersLOG.ExecuteDataSet("select * from SERVER where TIME >"+
|
DateTime.Parse(dat_859.GetValue("TIME_E").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "'");
|
||||||
DateTime.Parse(dat_859.GetValue("TIME_S").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "TIME <"+
|
|
||||||
DateTime.Parse(dat_859.GetValue("TIME_E").ToString()).ToString("yyyy/MM/dd HH:mm:ss"), null).Tables[0];
|
|
||||||
SQLiteHelpersLOG.Close();//关闭数据库
|
|
||||||
|
|
||||||
client.SendAsync("SC859" + "[" + MainWindowViewModel.S01 + "]" + dt_.ToJsonString());//缓存信息
|
client.SendAsync("SC859" + "[" + MainWindowViewModel.S01 + "]" + dt_.ToJsonString());//缓存信息
|
||||||
|
|
||||||
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||||
}
|
}
|
||||||
else if (dat_859.GetValue("INSTRUCTION").ToString() == "OperationLog")
|
else if (dat_859.GetValue("INSTRUCTION").ToString() == "OperationLog")
|
||||||
{
|
{
|
||||||
//SQLiteHelpers = new SQLiteHelper("\\DataBase\\LOG.db"); //数据库连接路径
|
var dt_ = APILog.LOGSELECT("select * from OperationLog where TIME >'" +
|
||||||
SQLiteHelpersLOG.Open(); //打开数据库
|
DateTime.Parse(dat_859.GetValue("TIME_S").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "' and TIME <'" +
|
||||||
DataTable dt_ = SQLiteHelpersLOG.ExecuteDataSet("select * from OperationLog where TIME >" +
|
DateTime.Parse(dat_859.GetValue("TIME_E").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "'");
|
||||||
DateTime.Parse(dat_859.GetValue("TIME_S").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "TIME <" +
|
|
||||||
DateTime.Parse(dat_859.GetValue("TIME_E").ToString()).ToString("yyyy/MM/dd HH:mm:ss"), null).Tables[0];
|
|
||||||
SQLiteHelpersLOG.Close();//关闭数据库
|
|
||||||
|
|
||||||
client.SendAsync("SC859" + "[" + MainWindowViewModel.S01 + "]" + dt_.ToJsonString());//缓存信息
|
client.SendAsync("SC859" + "[" + MainWindowViewModel.S01 + "]" + dt_.ToJsonString());//缓存信息
|
||||||
|
|
||||||
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||||
}
|
}
|
||||||
else if (dat_859.GetValue("INSTRUCTION").ToString() == "IOLog")
|
else if (dat_859.GetValue("INSTRUCTION").ToString() == "IOLog")
|
||||||
{
|
{
|
||||||
//SQLiteHelpers = new SQLiteHelper("\\DataBase\\LOG.db"); //数据库连接路径
|
var dt_ = APILog.LOGSELECT("select * from IOLog where TIME >'" +
|
||||||
SQLiteHelpersLOG.Open(); //打开数据库
|
DateTime.Parse(dat_859.GetValue("TIME_S").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "' and TIME <'" +
|
||||||
DataTable dt_ = SQLiteHelpersLOG.ExecuteDataSet("select * from IOLog where TIME >" +
|
DateTime.Parse(dat_859.GetValue("TIME_E").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "'");
|
||||||
DateTime.Parse(dat_859.GetValue("TIME_S").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "TIME <" +
|
dt_.Columns.Remove("type");
|
||||||
DateTime.Parse(dat_859.GetValue("TIME_E").ToString()).ToString("yyyy/MM/dd HH:mm:ss"), null).Tables[0];
|
dt_.Columns.Remove("Value");
|
||||||
SQLiteHelpersLOG.Close();//关闭数据库
|
dt_.Columns.Remove("PLC");
|
||||||
|
|
||||||
client.SendAsync("SC859" + "[" + MainWindowViewModel.S01 + "]" + dt_.ToJsonString());//缓存信息
|
client.SendAsync("SC859" + "[" + MainWindowViewModel.S01 + "]" + dt_.ToJsonString());//缓存信息
|
||||||
|
|
||||||
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||||
}
|
}
|
||||||
else if (dat_859.GetValue("INSTRUCTION").ToString() == "ERRLog")
|
else if (dat_859.GetValue("INSTRUCTION").ToString() == "ERRLog")
|
||||||
{
|
{
|
||||||
//SQLiteHelpers = new SQLiteHelper("\\DataBase\\LOG.db"); //数据库连接路径
|
var dt_ = APILog.LOGSELECT("select * from ERRLog where TIME >'" +
|
||||||
SQLiteHelpersLOG.Open(); //打开数据库
|
DateTime.Parse(dat_859.GetValue("TIME_S").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "' and TIME <'" +
|
||||||
DataTable dt_ = SQLiteHelpersLOG.ExecuteDataSet("select * from ERRLog where TIME >" +
|
DateTime.Parse(dat_859.GetValue("TIME_E").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "'");
|
||||||
DateTime.Parse(dat_859.GetValue("TIME_S").ToString()).ToString("yyyy/MM/dd HH:mm:ss") + "TIME <" +
|
|
||||||
DateTime.Parse(dat_859.GetValue("TIME_E").ToString()).ToString("yyyy/MM/dd HH:mm:ss"), null).Tables[0];
|
|
||||||
SQLiteHelpersLOG.Close();//关闭数据库
|
|
||||||
|
|
||||||
client.SendAsync("SC859" + "[" + MainWindowViewModel.S01 + "]" + dt_.ToJsonString());//缓存信息
|
client.SendAsync("SC859" + "[" + MainWindowViewModel.S01 + "]" + dt_.ToJsonString());//缓存信息
|
||||||
|
|
||||||
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
APILog.DBlog(client.IP, SYSKEY, SYSAPI, SYSDAT);//记录指令
|
||||||
@@ -737,7 +822,7 @@ namespace DyeingComputer.UserClass
|
|||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
{
|
{
|
||||||
client.SendAsync("SC959" + "[" + MainWindowViewModel.S01 + "]" + ex);
|
client.SendAsync("SC959" + "[" + MainWindowViewModel.S01 + "]" + ex.Message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else { client.SendAsync("SC999"); }
|
else { client.SendAsync("SC999"); }
|
||||||
@@ -812,16 +897,14 @@ namespace DyeingComputer.UserClass
|
|||||||
};
|
};
|
||||||
|
|
||||||
await service.SetupAsync(new TouchSocketConfig()//载入配置
|
await service.SetupAsync(new TouchSocketConfig()//载入配置
|
||||||
.SetMaxBufferSize(1024 * 1024)
|
.SetMaxBufferSize(1024 * 1024 * 100)
|
||||||
.SetMinBufferSize(1024 * 64)
|
.SetMinBufferSize(1024 * 1024)
|
||||||
.SetListenIPHosts(new IPHost[] { new IPHost("tcp://127.0.0.1:7789"), new IPHost(7790) })//同时监听两个地址
|
.SetListenIPHosts(new IPHost[] { new IPHost(7789), new IPHost(7790) })//同时监听两个地址
|
||||||
.ConfigureContainer(a =>//容器的配置顺序应该在最前面
|
.ConfigureContainer(a =>//容器的配置顺序应该在最前面
|
||||||
{
|
{
|
||||||
//a.AddConsoleLogger();//添加一个控制台日志注入(注意:在maui中控制台日志不可用)
|
|
||||||
})
|
})
|
||||||
.ConfigurePlugins(a =>
|
.ConfigurePlugins(a =>
|
||||||
{
|
{
|
||||||
//a.Add<DifferentProtocolPlugin>();
|
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
await service.StartAsync();//启动
|
await service.StartAsync();//启动
|
||||||
|
|||||||
@@ -17,33 +17,7 @@ namespace DyeingComputer.UserClass
|
|||||||
// private static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
// private static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||||
// private readonly static string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
// private readonly static string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||||
|
|
||||||
//WorkOrder表检查写入
|
|
||||||
public static bool WorkOrder(string WorkOrder, string ProgramName, string StartTime, string EndTime, string Time, string Remark,string lock_,string state,string ProgramID, string color,string dyelot)
|
|
||||||
{
|
|
||||||
// SQLiteHelpers = new SQLiteHelper(DBAddress); //数据库连接路径
|
|
||||||
// SQLiteHelpers.Open(); //打开数据库
|
|
||||||
object i = MainWindow.SQLiteHelpers.ExecuteScalar("select * from WorkOrder where WorkOrder = "+ WorkOrder,null);
|
|
||||||
if (i!=null)
|
|
||||||
{
|
|
||||||
//SQLiteHelpers.Close();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
Dictionary<string, object> WorkOrder_new = new Dictionary<string, object>();//缓存函数
|
|
||||||
WorkOrder_new.Add("WorkOrder", WorkOrder);
|
|
||||||
WorkOrder_new.Add("ProgramName", ProgramName);
|
|
||||||
WorkOrder_new.Add("StartTime", StartTime);
|
|
||||||
WorkOrder_new.Add("EndTime", EndTime);
|
|
||||||
WorkOrder_new.Add("Time", Time);
|
|
||||||
WorkOrder_new.Add("Remark", Remark);
|
|
||||||
WorkOrder_new.Add("lock", Convert.ToInt16(lock_));
|
|
||||||
WorkOrder_new.Add("state", Convert.ToInt16(state));
|
|
||||||
WorkOrder_new.Add("ProgramID", ProgramID);
|
|
||||||
WorkOrder_new.Add("color", color);
|
|
||||||
WorkOrder_new.Add("Dyelot", dyelot);
|
|
||||||
MainWindow.SQLiteHelpers.InsertData("WorkOrder", WorkOrder_new);
|
|
||||||
//SQLiteHelpers.Close();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static bool WorkOderStep(DataTable WorkOrderStep_)
|
public static bool WorkOderStep(DataTable WorkOrderStep_)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -17,13 +17,12 @@
|
|||||||
<Image Width="300" Height="300" gif:ImageBehavior.AnimatedSource="/Lmage/10001.gif"
|
<Image Width="300" Height="300" gif:ImageBehavior.AnimatedSource="/Lmage/10001.gif"
|
||||||
gif:ImageBehavior.RepeatBehavior="Forever" HorizontalAlignment="Left" Canvas.Left="20"
|
gif:ImageBehavior.RepeatBehavior="Forever" HorizontalAlignment="Left" Canvas.Left="20"
|
||||||
Canvas.Top="180" Visibility="Collapsed" x:Name="Swing_"/>
|
Canvas.Top="180" Visibility="Collapsed" x:Name="Swing_"/>
|
||||||
|
|
||||||
<TextBlock x:Name="M_T" HorizontalAlignment="Center" Height="35" Margin="0,208,0,0" TextWrapping="Wrap" Text="C" TextAlignment="Right"
|
<TextBlock x:Name="M_T" HorizontalAlignment="Center" Height="35" Margin="0,208,0,0" TextWrapping="Wrap" Text="C" TextAlignment="Right"
|
||||||
VerticalAlignment="Top" Width="160" FontSize="30" Background="White" Padding="5,0,5,0"/>
|
VerticalAlignment="Top" Width="160" FontSize="30" Background="White" Padding="5,0,5,0"/>
|
||||||
<TextBlock x:Name="M_L" HorizontalAlignment="Center" Height="35" Margin="0,522,0,0" TextWrapping="Wrap" Text="L" TextAlignment="Right"
|
<TextBlock x:Name="M_L" HorizontalAlignment="Center" Height="35" Margin="0,522,0,0" TextWrapping="Wrap" Text="L" TextAlignment="Right"
|
||||||
VerticalAlignment="Top" Width="160" FontSize="30" Background="White" Padding="5,0,5,0"/>
|
VerticalAlignment="Top" Width="160" FontSize="30" Background="White" Padding="5,0,5,0"/>
|
||||||
<Slider Height="30" Width="100" FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="620,0,0,60"/>
|
<Slider x:Name="M_D1" Height="20" Width="100" FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="620,0,0,80"
|
||||||
|
Maximum="100" Minimum="0" ValueChanged="M_D1_ValueChanged"/>
|
||||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="125"
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="125"
|
||||||
Margin="66,550,0,0" >
|
Margin="66,550,0,0" >
|
||||||
<Image MouseLeftButtonDown="ID3020_MouseLeftButtonDown" HorizontalAlignment="Left">
|
<Image MouseLeftButtonDown="ID3020_MouseLeftButtonDown" HorizontalAlignment="Left">
|
||||||
@@ -407,10 +406,25 @@
|
|||||||
VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,535,5,0"/>
|
VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,535,5,0"/>
|
||||||
<TextBlock Text="排冷凝水" FontSize="30" Width="120" TextWrapping="Wrap" Height="35"
|
<TextBlock Text="排冷凝水" FontSize="30" Width="120" TextWrapping="Wrap" Height="35"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,620,5,0"/>
|
VerticalAlignment="Top" HorizontalAlignment="Right" Margin="0,620,5,0"/>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="100" Width="100"
|
||||||
|
Margin="623,630,0,0" >
|
||||||
|
<Image MouseLeftButtonDown="ID3011_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-1.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3011}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3011}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-2.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Width="650" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1100,30,0,0">
|
<Grid Width="650" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1100,30,0,0">
|
||||||
<Image gif:ImageBehavior.AnimatedSource="/Lmage/12500-1.png" HorizontalAlignment="Left" />
|
<Image gif:ImageBehavior.AnimatedSource="/Lmage/12500-1.png" HorizontalAlignment="Left" />
|
||||||
@@ -421,8 +435,8 @@
|
|||||||
<TextBlock x:Name="S1_L" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="L"
|
<TextBlock x:Name="S1_L" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="L"
|
||||||
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||||
Padding="5,0,5,0" Margin="150,165,331,0" />
|
Padding="5,0,5,0" Margin="150,165,331,0" />
|
||||||
<Slider Height="30" Width="100" FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="340,0,0,0"/>
|
<Slider x:Name="S1_D2" Height="20" Width="100" FontSize="30" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,145,51,0"
|
||||||
|
Maximum="100" Minimum="0" ValueChanged="S1_D2_ValueChanged"/>
|
||||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="110"
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="110"
|
||||||
Margin="288,20,0,0">
|
Margin="288,20,0,0">
|
||||||
<Image MouseLeftButtonDown="ID3038_MouseLeftButtonDown" HorizontalAlignment="Left">
|
<Image MouseLeftButtonDown="ID3038_MouseLeftButtonDown" HorizontalAlignment="Left">
|
||||||
@@ -619,7 +633,43 @@
|
|||||||
<TextBlock x:Name="SL1" HorizontalAlignment="Right" Height="35" Margin="0,215,5,0"
|
<TextBlock x:Name="SL1" HorizontalAlignment="Right" Height="35" Margin="0,215,5,0"
|
||||||
Text="000.0%" TextAlignment="Right" VerticalAlignment="Top" Width="105"
|
Text="000.0%" TextAlignment="Right" VerticalAlignment="Top" Width="105"
|
||||||
FontSize="30" Background="White" />
|
FontSize="30" Background="White" />
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="100" Width="100"
|
||||||
|
Margin="339,256,0,0" >
|
||||||
|
<Image MouseLeftButtonDown="ID3035_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-1.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3035}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3035}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-2.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="50" Width="50" Margin="20,10,0,0" >
|
||||||
|
<Image MouseLeftButtonDown="ID3040_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3040}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3040}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
<Grid Width="650" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1100,480,0,0" >
|
<Grid Width="650" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1100,480,0,0" >
|
||||||
@@ -631,8 +681,8 @@
|
|||||||
<TextBlock x:Name="S2_L" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="L"
|
<TextBlock x:Name="S2_L" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="L"
|
||||||
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||||
Padding="5,0,5,0" Margin="150,165,20,0" />
|
Padding="5,0,5,0" Margin="150,165,20,0" />
|
||||||
<Slider Height="30" Width="100" FontSize="30" HorizontalAlignment="Left" VerticalAlignment="Bottom" Margin="340,0,0,0"/>
|
<Slider x:Name="S2_D3" Height="30" Width="100" FontSize="30" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,145,51,0"
|
||||||
|
Maximum="100" Minimum="0" ValueChanged="S2_D3_ValueChanged"/>
|
||||||
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="110"
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="110"
|
||||||
Margin="288,20,0,0">
|
Margin="288,20,0,0">
|
||||||
<Image MouseLeftButtonDown="ID3048_MouseLeftButtonDown" HorizontalAlignment="Left">
|
<Image MouseLeftButtonDown="ID3048_MouseLeftButtonDown" HorizontalAlignment="Left">
|
||||||
@@ -829,61 +879,343 @@
|
|||||||
<TextBlock x:Name="SL2" HorizontalAlignment="Right" Height="35" Margin="0,215,5,0"
|
<TextBlock x:Name="SL2" HorizontalAlignment="Right" Height="35" Margin="0,215,5,0"
|
||||||
Text="000.0%" TextAlignment="Right" VerticalAlignment="Top" Width="105"
|
Text="000.0%" TextAlignment="Right" VerticalAlignment="Top" Width="105"
|
||||||
FontSize="30" Background="White" />
|
FontSize="30" Background="White" />
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="100" Width="100"
|
||||||
|
Margin="339,256,0,0" >
|
||||||
|
<Image MouseLeftButtonDown="ID3045_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-1.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3045}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3045}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-2.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="50" Width="50" Margin="20,10,0,0" >
|
||||||
|
<Image MouseLeftButtonDown="ID3050_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3050}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3050}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
|
</Grid>
|
||||||
|
<Grid Width="650" Height="400" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="1100,960,0,0" Visibility="Collapsed">
|
||||||
|
<Image gif:ImageBehavior.AnimatedSource="/Lmage/12500-1.png" HorizontalAlignment="Left"/>
|
||||||
|
<TextBlock Text="2" FontSize="60" Height="80" Width="50" Foreground="Red" Margin="80,100,0,0" HorizontalAlignment="Left" VerticalAlignment="Top"/>
|
||||||
|
<TextBlock x:Name="S3_T" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="C"
|
||||||
|
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||||
|
Padding="5,0,5,0" Margin="150,100,20,0"/>
|
||||||
|
<TextBlock x:Name="S3_L" HorizontalAlignment="Left" Height="30" TextWrapping="Wrap" Text="L"
|
||||||
|
TextAlignment="Right" VerticalAlignment="Top" Width="100" FontSize="20" Background="White"
|
||||||
|
Padding="5,0,5,0" Margin="150,165,20,0" />
|
||||||
|
<Slider x:Name="S3_D4" Height="30" Width="100" FontSize="30" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,145,51,0"
|
||||||
|
Maximum="100" Minimum="0" ValueChanged="S2_D3_ValueChanged"/>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="110"
|
||||||
|
Margin="288,20,0,0">
|
||||||
|
<Image MouseLeftButtonDown="ID3048_MouseLeftButtonDown" HorizontalAlignment="Left">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3048}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3048}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
<TextBlock Text="回水" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="110" Width="110"
|
||||||
|
Margin="400,20,0,0">
|
||||||
|
<Image MouseLeftButtonDown="ID3046_MouseLeftButtonDown" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Height="74">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3046}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3046}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
<TextBlock Text="入水1" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="110" Width="110"
|
||||||
|
Margin="511,20,0,0">
|
||||||
|
<Image MouseLeftButtonDown="ID3047_MouseLeftButtonDown" HorizontalAlignment="Left" VerticalAlignment="Top" Width="75" Height="74">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3047}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3047}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
<TextBlock Text="入水2" HorizontalAlignment="Right" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="110" Width="125"
|
||||||
|
Margin="88,322,0,0" >
|
||||||
|
<Image MouseLeftButtonDown="ID3054_MouseLeftButtonDown" Height="75"
|
||||||
|
HorizontalAlignment="Right" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="Image">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3054}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3054}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
<TextBlock Text="排水" HorizontalAlignment="Left" FontSize="30" Width="35" TextWrapping="Wrap"/>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="75"
|
||||||
|
Margin="10,204,0,0" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Grid.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
<SkewTransform/>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Grid.RenderTransform>
|
||||||
|
<Image MouseLeftButtonDown="ID3049_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3049}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3049}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="75"
|
||||||
|
Margin="300,155,0,0" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Grid.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
<SkewTransform/>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Grid.RenderTransform>
|
||||||
|
<Image MouseLeftButtonDown="ID3051_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3051}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3051}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="75"
|
||||||
|
Margin="500,253,0,0" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Grid.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
<SkewTransform/>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Grid.RenderTransform>
|
||||||
|
<Image MouseLeftButtonDown="ID3053_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3053}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3053}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="75" Width="75"
|
||||||
|
Margin="250,270,0,0" RenderTransformOrigin="0.5,0.5">
|
||||||
|
<Grid.RenderTransform>
|
||||||
|
<TransformGroup>
|
||||||
|
<ScaleTransform/>
|
||||||
|
<SkewTransform/>
|
||||||
|
<RotateTransform Angle="-90"/>
|
||||||
|
<TranslateTransform/>
|
||||||
|
</TransformGroup>
|
||||||
|
</Grid.RenderTransform>
|
||||||
|
<Image MouseLeftButtonDown="ID3052_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3052}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-0.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3052}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10009-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
<TextBlock Text="加热" FontSize="30" Width="100" TextWrapping="Wrap" Height="35"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="20,280,0,0"/>
|
||||||
|
<TextBlock Text="比例旁通" FontSize="30" Width="150" TextWrapping="Wrap" Height="35"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="480,330,0,0"/>
|
||||||
|
<TextBlock Text="加料阀" FontSize="30" Width="100" TextWrapping="Wrap" Height="35"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="240,340,0,0"/>
|
||||||
|
<TextBlock Text="内循环" FontSize="30" Width="100" TextWrapping="Wrap" Height="35"
|
||||||
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="280,230,0,0"/>
|
||||||
|
<TextBlock x:Name="SL3" HorizontalAlignment="Right" Height="35" Margin="0,215,5,0"
|
||||||
|
Text="000.0%" TextAlignment="Right" VerticalAlignment="Top" Width="105"
|
||||||
|
FontSize="30" Background="White" />
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="100" Width="100"
|
||||||
|
Margin="339,256,0,0" >
|
||||||
|
<Image MouseLeftButtonDown="ID3045_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-1.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3045}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3045}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/10002-2.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
<Grid HorizontalAlignment="Left" VerticalAlignment="Top" Height="50" Width="50" Margin="20,10,0,0" >
|
||||||
|
<Image MouseLeftButtonDown="ID3050_MouseLeftButtonDown"
|
||||||
|
HorizontalAlignment="Center" VerticalAlignment="Top">
|
||||||
|
<Image.Style>
|
||||||
|
<Style TargetType="{x:Type Image}">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001.png"/>
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding ID3050}" Value="false">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
<DataTrigger Binding="{Binding ID3050}" Value="true">
|
||||||
|
<Setter Property="Source" Value="/Lmage/00001-1.png"/>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Image.Style>
|
||||||
|
</Image>
|
||||||
|
</Grid>
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Canvas>
|
</Canvas>
|
||||||
<Grid Width="160" Height="600" HorizontalAlignment="Right" VerticalAlignment="Top" Margin="0,0,0,0" Background="White">
|
<Grid Width="160" Height="400" HorizontalAlignment="Right" VerticalAlignment="Bottom" Margin="0,0,0,0" Background="White">
|
||||||
<Grid Margin="2,2,2,2" Background="Silver">
|
<Grid Margin="2,2,2,2" Background="Silver">
|
||||||
<TextBlock Text="主缸压力" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="主缸压力" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,215,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,5,5,0" />
|
||||||
<TextBlock Text="喷头压力" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="喷头压力" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,255,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,45,5,0" />
|
||||||
<TextBlock Text="压力差" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="压力差" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,295,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,85,5,0" />
|
||||||
<TextBlock Text="喷头流量" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="喷头流量" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,335,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,125,5,0" />
|
||||||
<TextBlock Text="流量计" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="流量计" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,375,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,165,5,0" />
|
||||||
<TextBlock Text="流量计2" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="流量计2" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,415,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,205,5,0" />
|
||||||
<TextBlock Text="空气流量计" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="空气流量计" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,455,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,245,5,0" />
|
||||||
<TextBlock Text="电能" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="电能" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,495,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,285,5,0" />
|
||||||
<TextBlock Text="酸度" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
<TextBlock Text="酸度" FontSize="20" Width="100" TextWrapping="Wrap" Height="25"
|
||||||
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,535,5,0" />
|
VerticalAlignment="Top" HorizontalAlignment="Left" Margin="5,325,5,0" />
|
||||||
<TextBlock x:Name="M1031" HorizontalAlignment="Right" Height="25" Margin="0,215,0,0"
|
<TextBlock x:Name="M1031" HorizontalAlignment="Right" Height="25" Margin="0,5,0,0"
|
||||||
Text="0.0bar" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="0.0bar" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
<TextBlock x:Name="M1032" HorizontalAlignment="Right" Height="25" Margin="0,255,0,0"
|
<TextBlock x:Name="M1032" HorizontalAlignment="Right" Height="25" Margin="0,45,0,0"
|
||||||
Text="0.0bar" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="0.0bar" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
<TextBlock x:Name="M1033" HorizontalAlignment="Right" Height="25" Margin="0,295,0,0"
|
<TextBlock x:Name="M1033" HorizontalAlignment="Right" Height="25" Margin="0,85,0,0"
|
||||||
Text="0.0bar" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="0.0bar" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
<TextBlock x:Name="M1034" HorizontalAlignment="Right" Height="25" Margin="0,335,0,0"
|
<TextBlock x:Name="M1034" HorizontalAlignment="Right" Height="25" Margin="0,125,0,0"
|
||||||
Text="000.0L" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="000.0L" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
<TextBlock x:Name="A4006" HorizontalAlignment="Right" Height="25" Margin="0,375,0,0"
|
<TextBlock x:Name="A4006" HorizontalAlignment="Right" Height="25" Margin="0,165,0,0"
|
||||||
Text="000.0L" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="000.0L" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
<TextBlock x:Name="A4014" HorizontalAlignment="Right" Height="25" Margin="0,415,0,0"
|
<TextBlock x:Name="A4014" HorizontalAlignment="Right" Height="25" Margin="0,205,0,0"
|
||||||
Text="000.0L" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="000.0L" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
<TextBlock x:Name="A4015" HorizontalAlignment="Right" Height="25" Margin="0,455,0,0"
|
<TextBlock x:Name="A4015" HorizontalAlignment="Right" Height="25" Margin="0,245,0,0"
|
||||||
Text="000.0L" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="000.0L" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
<TextBlock x:Name="A4016" HorizontalAlignment="Right" Height="25" Margin="0,495,0,0"
|
<TextBlock x:Name="A4016" HorizontalAlignment="Right" Height="25" Margin="0,285,0,0"
|
||||||
Text="000Kw" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="000Kw" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
<TextBlock x:Name="A4029" HorizontalAlignment="Right" Height="25" Margin="0,535,0,0"
|
<TextBlock x:Name="A4029" HorizontalAlignment="Right" Height="25" Margin="0,325,0,0"
|
||||||
Text="0.0pH" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
Text="0.0pH" TextAlignment="Right" VerticalAlignment="Top" Width="70"
|
||||||
FontSize="20" Background="White" />
|
FontSize="20" Background="White" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ namespace DyeingComputer.View
|
|||||||
CountDown();
|
CountDown();
|
||||||
IOdata();
|
IOdata();
|
||||||
}
|
}
|
||||||
bool _ID3007, _ID3008, _ID3009, _ID3010, _ID3013, _ID3014, _ID3015,
|
bool _ID3007, _ID3008, _ID3009, _ID3010, _ID3011, _ID3013, _ID3014, _ID3015,
|
||||||
_ID3016, _ID3017, _ID3018, _ID3019, _ID3020, _ID3036, _ID3037,
|
_ID3016, _ID3017, _ID3018, _ID3019, _ID3020, _ID3035, _ID3036, _ID3037,
|
||||||
_ID3038, _ID3039, _ID3041, _ID3042, _ID3043, _ID3044, _ID3046,
|
_ID3038, _ID3039, _ID3040, _ID3041, _ID3042, _ID3043, _ID3044, _ID3045, _ID3046,
|
||||||
_ID3047, _ID3048, _ID3049, _ID3051, _ID3052, _ID3053,
|
_ID3047, _ID3048, _ID3049, _ID3050, _ID3051, _ID3052, _ID3053,
|
||||||
_ID3054, _ID3076, _ID3077;
|
_ID3054, _ID3076, _ID3077;
|
||||||
public bool ID3007
|
public bool ID3007
|
||||||
{
|
{
|
||||||
@@ -89,6 +89,15 @@ namespace DyeingComputer.View
|
|||||||
OnPropertyChanged("ID3010");
|
OnPropertyChanged("ID3010");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool ID3011
|
||||||
|
{
|
||||||
|
get => _ID3011;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_ID3011 = value;
|
||||||
|
OnPropertyChanged("ID3011");
|
||||||
|
}
|
||||||
|
}
|
||||||
public bool ID3013
|
public bool ID3013
|
||||||
{
|
{
|
||||||
get => _ID3013;
|
get => _ID3013;
|
||||||
@@ -161,6 +170,15 @@ namespace DyeingComputer.View
|
|||||||
OnPropertyChanged("ID3020");
|
OnPropertyChanged("ID3020");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool ID3035
|
||||||
|
{
|
||||||
|
get => _ID3035;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_ID3035 = value;
|
||||||
|
OnPropertyChanged("ID3035");
|
||||||
|
}
|
||||||
|
}
|
||||||
public bool ID3036
|
public bool ID3036
|
||||||
{
|
{
|
||||||
get => _ID3036;
|
get => _ID3036;
|
||||||
@@ -197,6 +215,15 @@ namespace DyeingComputer.View
|
|||||||
OnPropertyChanged("ID3039");
|
OnPropertyChanged("ID3039");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool ID3040
|
||||||
|
{
|
||||||
|
get => _ID3040;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_ID3040 = value;
|
||||||
|
OnPropertyChanged("ID3040");
|
||||||
|
}
|
||||||
|
}
|
||||||
public bool ID3041
|
public bool ID3041
|
||||||
{
|
{
|
||||||
get => _ID3041;
|
get => _ID3041;
|
||||||
@@ -233,6 +260,15 @@ namespace DyeingComputer.View
|
|||||||
OnPropertyChanged("ID3044");
|
OnPropertyChanged("ID3044");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool ID3045
|
||||||
|
{
|
||||||
|
get => _ID3045;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_ID3045 = value;
|
||||||
|
OnPropertyChanged("ID3045");
|
||||||
|
}
|
||||||
|
}
|
||||||
public bool ID3046
|
public bool ID3046
|
||||||
{
|
{
|
||||||
get => _ID3046;
|
get => _ID3046;
|
||||||
@@ -269,6 +305,15 @@ namespace DyeingComputer.View
|
|||||||
OnPropertyChanged("ID3049");
|
OnPropertyChanged("ID3049");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public bool ID3050
|
||||||
|
{
|
||||||
|
get => _ID3050;
|
||||||
|
set
|
||||||
|
{
|
||||||
|
_ID3050 = value;
|
||||||
|
OnPropertyChanged("ID3050");
|
||||||
|
}
|
||||||
|
}
|
||||||
public bool ID3051
|
public bool ID3051
|
||||||
{
|
{
|
||||||
get => _ID3051;
|
get => _ID3051;
|
||||||
@@ -356,6 +401,20 @@ namespace DyeingComputer.View
|
|||||||
timer1s.Start();
|
timer1s.Start();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void M_D1_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
|
{
|
||||||
|
MainWindowViewModel.Updata_dtm("1020",Convert.ToInt16( M_D1.Value));
|
||||||
|
}
|
||||||
|
private void S1_D2_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
|
{
|
||||||
|
MainWindowViewModel.Updata_dta("5005", Convert.ToInt16(S1_D2.Value * 10));
|
||||||
|
SL1.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5005")) / 1000);//
|
||||||
|
}
|
||||||
|
private void S2_D3_ValueChanged(object sender, RoutedPropertyChangedEventArgs<double> e)
|
||||||
|
{
|
||||||
|
MainWindowViewModel.Updata_dta("5006", Convert.ToInt16(S2_D3.Value * 10));
|
||||||
|
SL2.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5006"))/ 1000);//
|
||||||
|
}
|
||||||
private void ID3007_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void ID3007_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
ID3007 = !ID3007;
|
ID3007 = !ID3007;
|
||||||
@@ -376,6 +435,11 @@ namespace DyeingComputer.View
|
|||||||
ID3010 = !ID3010;
|
ID3010 = !ID3010;
|
||||||
MainWindowViewModel.Updata_dtd("3010", ID3010);
|
MainWindowViewModel.Updata_dtd("3010", ID3010);
|
||||||
}
|
}
|
||||||
|
private void ID3011_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
ID3011 = !ID3011;
|
||||||
|
MainWindowViewModel.Updata_dtd("3011", ID3011);
|
||||||
|
}
|
||||||
private void ID3013_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void ID3013_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
ID3013 = !ID3013;
|
ID3013 = !ID3013;
|
||||||
@@ -416,6 +480,11 @@ namespace DyeingComputer.View
|
|||||||
ID3020 = !ID3020;
|
ID3020 = !ID3020;
|
||||||
MainWindowViewModel.Updata_dtd("3020", ID3020);
|
MainWindowViewModel.Updata_dtd("3020", ID3020);
|
||||||
}
|
}
|
||||||
|
private void ID3035_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
ID3035 = !ID3035;
|
||||||
|
MainWindowViewModel.Updata_dtd("3035", ID3035);
|
||||||
|
}
|
||||||
private void ID3036_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void ID3036_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
ID3036 = !ID3036;
|
ID3036 = !ID3036;
|
||||||
@@ -436,6 +505,11 @@ namespace DyeingComputer.View
|
|||||||
ID3039 = !ID3039;
|
ID3039 = !ID3039;
|
||||||
MainWindowViewModel.Updata_dtd("3039", ID3039);
|
MainWindowViewModel.Updata_dtd("3039", ID3039);
|
||||||
}
|
}
|
||||||
|
private void ID3040_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
ID3040 = !ID3040;
|
||||||
|
MainWindowViewModel.Updata_dtd("3040", ID3040);
|
||||||
|
}
|
||||||
private void ID3041_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void ID3041_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
ID3041 = !ID3041;
|
ID3041 = !ID3041;
|
||||||
@@ -456,6 +530,11 @@ namespace DyeingComputer.View
|
|||||||
ID3044 = !ID3044;
|
ID3044 = !ID3044;
|
||||||
MainWindowViewModel.Updata_dtd("3044", ID3044);
|
MainWindowViewModel.Updata_dtd("3044", ID3044);
|
||||||
}
|
}
|
||||||
|
private void ID3045_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
ID3045 = !ID3045;
|
||||||
|
MainWindowViewModel.Updata_dtd("3045", ID3045);
|
||||||
|
}
|
||||||
private void ID3046_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void ID3046_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
ID3046 = !ID3046;
|
ID3046 = !ID3046;
|
||||||
@@ -476,6 +555,11 @@ namespace DyeingComputer.View
|
|||||||
ID3049 = !ID3049;
|
ID3049 = !ID3049;
|
||||||
MainWindowViewModel.Updata_dtd("3049", ID3049);
|
MainWindowViewModel.Updata_dtd("3049", ID3049);
|
||||||
}
|
}
|
||||||
|
private void ID3050_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
|
{
|
||||||
|
ID3050 = !ID3050;
|
||||||
|
MainWindowViewModel.Updata_dtd("3050", ID3050);
|
||||||
|
}
|
||||||
private void ID3051_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
private void ID3051_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
|
||||||
{
|
{
|
||||||
ID3051 = !ID3051;
|
ID3051 = !ID3051;
|
||||||
@@ -516,15 +600,29 @@ namespace DyeingComputer.View
|
|||||||
S1_L.Text = string.Format("{0:D4}", Convert.ToInt16(MainWindowViewModel.Selet_dtm("1017"))) + "L";//缸1水
|
S1_L.Text = string.Format("{0:D4}", Convert.ToInt16(MainWindowViewModel.Selet_dtm("1017"))) + "L";//缸1水
|
||||||
S2_T.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1013"))) + "°C";//缸2温度
|
S2_T.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1013"))) + "°C";//缸2温度
|
||||||
S2_L.Text = string.Format("{0:D4}", Convert.ToInt16(MainWindowViewModel.Selet_dtm("1018"))) + "L";//缸2水
|
S2_L.Text = string.Format("{0:D4}", Convert.ToInt16(MainWindowViewModel.Selet_dtm("1018"))) + "L";//缸2水
|
||||||
MtH.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5001"))/10);//升温
|
MtH.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5001"))/1000);//升温
|
||||||
Mtl.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5002"))/10);//降温
|
Mtl.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5002"))/1000);//降温
|
||||||
SL1.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5005")) / 10);//
|
SL1.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5005")) / 1000);//
|
||||||
SL2.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5006")) / 10);//
|
SL2.Text = string.Format(" {0:P1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("5006")) / 1000);//
|
||||||
|
M1031.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1031")))+"bar";//
|
||||||
|
M1032.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1032"))) + "bar";//
|
||||||
|
M1033.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1033"))) + "bar";//
|
||||||
|
M1034.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dtm("1034"))) + "L";//
|
||||||
|
A4006.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("4006"))) + "L";//
|
||||||
|
A4014.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("4014"))) + "L";//
|
||||||
|
A4015.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("4015"))) + "L";//
|
||||||
|
A4016.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("4016"))) + "Kw";//
|
||||||
|
A4029.Text = string.Format(" {0:F1}", Convert.ToDouble(MainWindowViewModel.Selet_dta("4029"))) + "pH";//
|
||||||
|
|
||||||
|
M_D1.Value = Convert.ToDouble(MainWindowViewModel.Selet_dta("5003"));//
|
||||||
|
S1_D2.Value = Convert.ToDouble(MainWindowViewModel.Selet_dta("5005")) / 10;//
|
||||||
|
S2_D3.Value = Convert.ToDouble(MainWindowViewModel.Selet_dta("5006")) / 10;//
|
||||||
|
|
||||||
ID3007 = MainWindowViewModel.Selet_dtd("3007");
|
ID3007 = MainWindowViewModel.Selet_dtd("3007");
|
||||||
ID3008 = MainWindowViewModel.Selet_dtd("3008");
|
ID3008 = MainWindowViewModel.Selet_dtd("3008");
|
||||||
ID3009 = MainWindowViewModel.Selet_dtd("3009");
|
ID3009 = MainWindowViewModel.Selet_dtd("3009");
|
||||||
ID3010 = MainWindowViewModel.Selet_dtd("3010");
|
ID3010 = MainWindowViewModel.Selet_dtd("3010");
|
||||||
|
ID3011 = MainWindowViewModel.Selet_dtd("3011");
|
||||||
ID3013 = MainWindowViewModel.Selet_dtd("3013");
|
ID3013 = MainWindowViewModel.Selet_dtd("3013");
|
||||||
ID3014 = MainWindowViewModel.Selet_dtd("3014");
|
ID3014 = MainWindowViewModel.Selet_dtd("3014");
|
||||||
ID3015 = MainWindowViewModel.Selet_dtd("3015");
|
ID3015 = MainWindowViewModel.Selet_dtd("3015");
|
||||||
@@ -533,18 +631,22 @@ namespace DyeingComputer.View
|
|||||||
ID3018 = MainWindowViewModel.Selet_dtd("3018");
|
ID3018 = MainWindowViewModel.Selet_dtd("3018");
|
||||||
ID3019 = MainWindowViewModel.Selet_dtd("3019");
|
ID3019 = MainWindowViewModel.Selet_dtd("3019");
|
||||||
ID3020 = MainWindowViewModel.Selet_dtd("3020");
|
ID3020 = MainWindowViewModel.Selet_dtd("3020");
|
||||||
|
ID3035 = MainWindowViewModel.Selet_dtd("3035");
|
||||||
ID3036 = MainWindowViewModel.Selet_dtd("3036");
|
ID3036 = MainWindowViewModel.Selet_dtd("3036");
|
||||||
ID3037 = MainWindowViewModel.Selet_dtd("3037");
|
ID3037 = MainWindowViewModel.Selet_dtd("3037");
|
||||||
ID3038 = MainWindowViewModel.Selet_dtd("3038");
|
ID3038 = MainWindowViewModel.Selet_dtd("3038");
|
||||||
ID3039 = MainWindowViewModel.Selet_dtd("3039");
|
ID3039 = MainWindowViewModel.Selet_dtd("3039");
|
||||||
|
ID3040 = MainWindowViewModel.Selet_dtd("3040");
|
||||||
ID3041 = MainWindowViewModel.Selet_dtd("3041");
|
ID3041 = MainWindowViewModel.Selet_dtd("3041");
|
||||||
ID3042 = MainWindowViewModel.Selet_dtd("3042");
|
ID3042 = MainWindowViewModel.Selet_dtd("3042");
|
||||||
ID3043 = MainWindowViewModel.Selet_dtd("3043");
|
ID3043 = MainWindowViewModel.Selet_dtd("3043");
|
||||||
ID3044 = MainWindowViewModel.Selet_dtd("3044");
|
ID3044 = MainWindowViewModel.Selet_dtd("3044");
|
||||||
|
ID3045 = MainWindowViewModel.Selet_dtd("3045");
|
||||||
ID3046 = MainWindowViewModel.Selet_dtd("3046");
|
ID3046 = MainWindowViewModel.Selet_dtd("3046");
|
||||||
ID3047 = MainWindowViewModel.Selet_dtd("3047");
|
ID3047 = MainWindowViewModel.Selet_dtd("3047");
|
||||||
ID3048 = MainWindowViewModel.Selet_dtd("3048");
|
ID3048 = MainWindowViewModel.Selet_dtd("3048");
|
||||||
ID3049 = MainWindowViewModel.Selet_dtd("3049");
|
ID3049 = MainWindowViewModel.Selet_dtd("3049");
|
||||||
|
ID3050 = MainWindowViewModel.Selet_dtd("3050");
|
||||||
ID3051 = MainWindowViewModel.Selet_dtd("3051");
|
ID3051 = MainWindowViewModel.Selet_dtd("3051");
|
||||||
ID3052 = MainWindowViewModel.Selet_dtd("3052");
|
ID3052 = MainWindowViewModel.Selet_dtd("3052");
|
||||||
ID3053 = MainWindowViewModel.Selet_dtd("3053");
|
ID3053 = MainWindowViewModel.Selet_dtd("3053");
|
||||||
|
|||||||
@@ -158,10 +158,10 @@ namespace DyeingComputer.View
|
|||||||
dr["StepName"] = e.StepNAME;
|
dr["StepName"] = e.StepNAME;
|
||||||
dr["ParameterName"] = e.PNAME;
|
dr["ParameterName"] = e.PNAME;
|
||||||
dr["Parameter1"] = e.Row_DAT.Field<double>("Parameter1");
|
dr["Parameter1"] = e.Row_DAT.Field<double>("Parameter1");
|
||||||
dr["Parameter2"] = e.Row_DAT.Field<double>("Parameter1");
|
dr["Parameter2"] = e.Row_DAT.Field<double>("Parameter2");
|
||||||
dr["Parameter3"] = e.Row_DAT.Field<double>("Parameter1");
|
dr["Parameter3"] = e.Row_DAT.Field<double>("Parameter3");
|
||||||
dr["Parameter4"] = e.Row_DAT.Field<double>("Parameter1");
|
dr["Parameter4"] = e.Row_DAT.Field<double>("Parameter4");
|
||||||
dr["Parameter5"] = e.Row_DAT.Field<double>("Parameter1");
|
dr["Parameter5"] = e.Row_DAT.Field<double>("Parameter5");
|
||||||
dr["Parameter1_S1"] = e.Row_DAT.Field<double>("Parameter1_S1");
|
dr["Parameter1_S1"] = e.Row_DAT.Field<double>("Parameter1_S1");
|
||||||
dr["Parameter2_S1"] = e.Row_DAT.Field<double>("Parameter2_S1");
|
dr["Parameter2_S1"] = e.Row_DAT.Field<double>("Parameter2_S1");
|
||||||
dr["Parameter3_S1"] = e.Row_DAT.Field<double>("Parameter3_S1");
|
dr["Parameter3_S1"] = e.Row_DAT.Field<double>("Parameter3_S1");
|
||||||
|
|||||||
@@ -429,10 +429,6 @@ namespace DyeingComputer.View
|
|||||||
for (int i = 0; i < a; i++)
|
for (int i = 0; i < a; i++)
|
||||||
{
|
{
|
||||||
DataRow dr = WorkorderSteps.Rows[i];//行转
|
DataRow dr = WorkorderSteps.Rows[i];//行转
|
||||||
dr.BeginEdit(); //添加订单号
|
|
||||||
dr["ProgramID"] = Process_id;
|
|
||||||
dr["Program"] = MainWindowViewModel.ProgramName;
|
|
||||||
dr.EndEdit();
|
|
||||||
|
|
||||||
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dr));//行插入
|
MainWindow.SQLiteHelpers.InsertData("RUN", MainWindow.SQLiteHelpers.ToDictionary(dr));//行插入
|
||||||
}
|
}
|
||||||
@@ -485,17 +481,17 @@ namespace DyeingComputer.View
|
|||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
for (int i = 0; i < dat.Rows.Count; i++)
|
for (int i = 0; i < dat.Rows.Count; i++)
|
||||||
{
|
{
|
||||||
switch (dat.Rows[i][5].ToString())//步骤用时计算
|
switch (dat.Rows[i].Field<string>("StepID"))//步骤用时计算
|
||||||
{
|
{
|
||||||
case "001":
|
case "001":
|
||||||
TT = MSTT;
|
TT = MSTT;
|
||||||
TC = (Double)dat.Rows[i][9];
|
TC = dat.Rows[i].Field<double>("Parameter2");
|
||||||
if (TC > 9.9 || TC < 0.1) TC = 9.9;//计算限制
|
if (TC > 9.9 || TC < 0.1) TC = 9.9;//计算限制
|
||||||
MSTT = (Double)dat.Rows[i][8];
|
MSTT = dat.Rows[i].Field<double>("Parameter1");
|
||||||
TT = Math.Abs(MSTT - TT) / TC * 60;
|
TT = Math.Abs(MSTT - TT) / TC * 60;
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddSeconds(TT).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddSeconds(TT).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddMinutes((Double)dat.Rows[i][12]).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddMinutes(dat.Rows[i].Field<double>("Parameter3")).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "007":
|
case "007":
|
||||||
@@ -507,15 +503,15 @@ namespace DyeingComputer.View
|
|||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "013":
|
case "013":
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddMinutes((Double)dat.Rows[i][10] * (Double)dat.Rows[i][11]).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddMinutes(dat.Rows[i].Field<double>("Parameter3") * dat.Rows[i].Field<double>("Parameter4")).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "015":
|
case "015":
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddMinutes((Double)dat.Rows[i][10]).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddMinutes(dat.Rows[i].Field<double>("Parameter3")).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "017":
|
case "017":
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddMinutes((Double)dat.Rows[i][10]).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddMinutes(dat.Rows[i].Field<double>("Parameter3")).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "020":
|
case "020":
|
||||||
@@ -527,24 +523,24 @@ namespace DyeingComputer.View
|
|||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "031":
|
case "031":
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddMinutes((int)dat.Rows[i][8]).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddMinutes(dat.Rows[i].Field<double>("Parameter1")).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "065":
|
case "065":
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddMinutes((int)dat.Rows[i][10]).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddMinutes(dat.Rows[i].Field<double>("Parameter3")).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "091":
|
case "091":
|
||||||
TT = MSTT;
|
TT = MSTT;
|
||||||
TC = (Double)dat.Rows[i][9];
|
TC = (Double)dat.Rows[i][7];
|
||||||
if (TC > 9.9 || TC < 0.1) TC = 9.9;//计算限制
|
if (TC > 9.9 || TC < 0.1) TC = 9.9;//计算限制
|
||||||
MSTT = (Double)dat.Rows[i][8];
|
MSTT = (Double)dat.Rows[i][6];
|
||||||
TT = Math.Abs(MSTT - TT) / TC * 60;
|
TT = Math.Abs(MSTT - TT) / TC * 60;
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddSeconds(TT).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddSeconds(TT).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
case "093":
|
case "093":
|
||||||
TIMET = Convert.ToDateTime(TIMET).AddMinutes((int)dat.Rows[i][8]).ToString("HH:mm:ss");
|
TIMET = Convert.ToDateTime(TIMET).AddMinutes(dat.Rows[i].Field<double>("Parameter1")).ToString("HH:mm:ss");
|
||||||
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
TEMPTable.Rows.Add(new object[] { TIMET, MSTT });
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -117,19 +117,13 @@ namespace DyeingComputer.ViewModel
|
|||||||
private List<DateTimePoint> STTC_values;
|
private List<DateTimePoint> STTC_values;
|
||||||
private List<DateTimePoint> STLC_values;
|
private List<DateTimePoint> STLC_values;
|
||||||
|
|
||||||
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
|
||||||
private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
|
||||||
DataTable CDB = new DataTable();
|
DataTable CDB = new DataTable();
|
||||||
private int CDB_Count;//长度
|
private int CDB_Count;//长度
|
||||||
|
|
||||||
public CurveDiagramViewModel()
|
public CurveDiagramViewModel()
|
||||||
{
|
{
|
||||||
if (MainWindowViewModel.WorkNumder.ToString() != "----------")
|
CDB = MainWindow.SQLiteChartAdress.ExecuteDataSet("select * from Chart where Time > '" +
|
||||||
{
|
DateTime.Now.AddHours(-6).ToString("yyyy/MM/dd HH:mm:ss") + "'order by Time", null).Tables[0];
|
||||||
SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
|
||||||
CDB = SQLiteHelpers.ExecuteDataSet("select * from Chart where DYELOT = '" + MainWindowViewModel.WorkNumder + "'order by Time", null).Tables[0];
|
|
||||||
SQLiteHelpers.Close();
|
|
||||||
CDB_Count = CDB.Rows.Count;
|
CDB_Count = CDB.Rows.Count;
|
||||||
|
|
||||||
var MTT_items = new List<DateTimePoint>();
|
var MTT_items = new List<DateTimePoint>();
|
||||||
@@ -143,7 +137,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
var STLB_items = new List<DateTimePoint>();
|
var STLB_items = new List<DateTimePoint>();
|
||||||
var STTC_items = new List<DateTimePoint>();
|
var STTC_items = new List<DateTimePoint>();
|
||||||
var STLC_items = new List<DateTimePoint>();
|
var STLC_items = new List<DateTimePoint>();
|
||||||
for (var i = 0; i < CDB_Count; i++)
|
for (var i = 0; i < CDB_Count; i=i+10)
|
||||||
{
|
{
|
||||||
DateTime TIME = Convert.ToDateTime(CDB.Rows[i].Field<string>("Time"));
|
DateTime TIME = Convert.ToDateTime(CDB.Rows[i].Field<string>("Time"));
|
||||||
MTT_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("MTT")));
|
MTT_items.Add(new DateTimePoint(TIME, CDB.Rows[i].Field<double>("MTT")));
|
||||||
@@ -316,4 +310,3 @@ namespace DyeingComputer.ViewModel
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
@@ -109,18 +109,18 @@ namespace DyeingComputer.ViewModel
|
|||||||
private ObservableCollection<DateTimePoint> STTC_values;
|
private ObservableCollection<DateTimePoint> STTC_values;
|
||||||
private ObservableCollection<DateTimePoint> STLC_values;
|
private ObservableCollection<DateTimePoint> STLC_values;
|
||||||
|
|
||||||
private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
// private SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||||
private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
// private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
||||||
public DataTable CDB = new DataTable();
|
public DataTable CDB = new DataTable();
|
||||||
private int CDB_Count;//长度
|
private int CDB_Count;//长度
|
||||||
|
|
||||||
public HistoryRecordsViewModel()
|
public HistoryRecordsViewModel()
|
||||||
{
|
{
|
||||||
string Sys_Time = DateTime.Now.AddDays(-2).ToString("yyyy/MM/dd HH:mm:ss");
|
string Sys_Time = DateTime.Now.AddDays(-2).ToString("yyyy/MM/dd HH:mm:ss");
|
||||||
SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
// SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
// SQLiteHelpers.Open(); //打开数据库
|
||||||
CDB = SQLiteHelpers.ExecuteDataSet("select * from Chart where Time > '" + Sys_Time + "'order by Time", null).Tables[0];
|
CDB = MainWindow.SQLiteChartAdress.ExecuteDataSet("select * from Chart where Time > '" + Sys_Time + "'order by Time", null).Tables[0];
|
||||||
SQLiteHelpers.Close();
|
// SQLiteHelpers.Close();
|
||||||
CDB_Count = CDB.Rows.Count;
|
CDB_Count = CDB.Rows.Count;
|
||||||
|
|
||||||
Chart_View();
|
Chart_View();
|
||||||
@@ -132,10 +132,10 @@ namespace DyeingComputer.ViewModel
|
|||||||
public static string etime;
|
public static string etime;
|
||||||
public void History()
|
public void History()
|
||||||
{
|
{
|
||||||
SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
// SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
||||||
SQLiteHelpers.Open(); //打开数据库
|
// SQLiteHelpers.Open(); //打开数据库
|
||||||
CDB = SQLiteHelpers.ExecuteDataSet("select * from Chart where DYELOT = '" + name + "'order by Time", null).Tables[0];
|
CDB = MainWindow.SQLiteChartAdress.ExecuteDataSet("select * from Chart where DYELOT = '" + name + "'order by Time", null).Tables[0];
|
||||||
SQLiteHelpers.Close();
|
// SQLiteHelpers.Close();
|
||||||
CDB_Count = CDB.Rows.Count;
|
CDB_Count = CDB.Rows.Count;
|
||||||
|
|
||||||
Chart_View();
|
Chart_View();
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ using Newtonsoft.Json.Linq;
|
|||||||
using NModbus;
|
using NModbus;
|
||||||
using NModbus.Serial;
|
using NModbus.Serial;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Collections.Concurrent;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Collections.ObjectModel;
|
using System.Collections.ObjectModel;
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
@@ -35,7 +36,6 @@ using System.Windows.Input;
|
|||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Threading;
|
using System.Windows.Threading;
|
||||||
using TouchSocket.Sockets;
|
using TouchSocket.Sockets;
|
||||||
using OpenHardwareMonitor.Hardware;
|
|
||||||
|
|
||||||
namespace DyeingComputer.ViewModel
|
namespace DyeingComputer.ViewModel
|
||||||
{
|
{
|
||||||
@@ -68,7 +68,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
System.Windows.Media.Brush Status_Black = new SolidColorBrush() { Color = System.Windows.Media.Color.FromArgb(255, 0, 0, 0) };
|
System.Windows.Media.Brush Status_Black = new SolidColorBrush() { Color = System.Windows.Media.Color.FromArgb(255, 0, 0, 0) };
|
||||||
// private static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
// private static SQLiteHelper SQLiteHelpers = null; //定义数据库
|
||||||
//private readonly static string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
//private readonly static string DBAddress = Environment.CurrentDirectory + "\\DataBase\\800COMPUTER.db"; //数据库路径
|
||||||
private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
// private readonly string ChartAdress = Environment.CurrentDirectory + "\\DataBase\\Chart.db"; //数据库路径
|
||||||
private IniFile.IniFiles Configini = new IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "DyeingComputer.ini");
|
private IniFile.IniFiles Configini = new IniFile.IniFiles(Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "DyeingComputer.ini");
|
||||||
private PID pid = new PID();
|
private PID pid = new PID();
|
||||||
public static DataTable errTabler = new DataTable();//错误表
|
public static DataTable errTabler = new DataTable();//错误表
|
||||||
@@ -211,15 +211,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
set { program_Name = value; OnPropertyChanged("Program_Name"); }
|
set { program_Name = value; OnPropertyChanged("Program_Name"); }
|
||||||
}
|
}
|
||||||
|
|
||||||
// 创建 Computer 实例并启用需要的硬件监控
|
|
||||||
Computer computer = new Computer
|
|
||||||
{
|
|
||||||
CPUEnabled = true, // 启用 CPU 监控
|
|
||||||
GPUEnabled = true, // 启用 GPU 监控
|
|
||||||
HDDEnabled = true, // 启用硬盘监控
|
|
||||||
RAMEnabled = true, // 启用内存监控(注意:大多数内存模块无温度传感器:cite[1])
|
|
||||||
MainboardEnabled = true // 启用主板监控
|
|
||||||
};
|
|
||||||
public MainWindowViewModel()
|
public MainWindowViewModel()
|
||||||
{
|
{
|
||||||
SYSKEY = MD5check.MD5Encrypt16(HardwareSN.GetCPUSerialNumber()+HardwareSN.GetBIOSSerialNumber());
|
SYSKEY = MD5check.MD5Encrypt16(HardwareSN.GetCPUSerialNumber()+HardwareSN.GetBIOSSerialNumber());
|
||||||
@@ -229,6 +221,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
WorkNumder = "----------";
|
WorkNumder = "----------";
|
||||||
SYS_SET(); //crbl
|
SYS_SET(); //crbl
|
||||||
SQL_data(); //读数据库
|
SQL_data(); //读数据库
|
||||||
|
APILog.LOGnew();
|
||||||
if(S04!="1") UPort(); //启动串口
|
if(S04!="1") UPort(); //启动串口
|
||||||
if (dt_TP.Rows.Count > 0)
|
if (dt_TP.Rows.Count > 0)
|
||||||
{
|
{
|
||||||
@@ -721,24 +714,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
void Tick_Event_60S()//Tick_Event周期执行事件5S
|
void Tick_Event_60S()//Tick_Event周期执行事件5S
|
||||||
{
|
{
|
||||||
if(Hardware.Count>0) Hardware.Clear();
|
if(Hardware.Count>0) Hardware.Clear();
|
||||||
computer.Open(); // 开始监控
|
|
||||||
|
|
||||||
// 遍历所有硬件设备及其传感器,筛选出温度传感器并读取值
|
|
||||||
foreach (var hardwareItem in computer.Hardware)
|
|
||||||
{
|
|
||||||
hardwareItem.Update(); // 更新硬件信息:cite[2]
|
|
||||||
foreach (var sensor in hardwareItem.Sensors)
|
|
||||||
{
|
|
||||||
// if (sensor.SensorType == SensorType.Temperature && sensor.Value.HasValue)
|
|
||||||
{
|
|
||||||
//Console.WriteLine($"{hardwareItem.Name} - {sensor.Name}: {sensor.Value.Value}°C");
|
|
||||||
// 实际应用中,你可能需要将这里的数据绑定到UI控件或存储起来
|
|
||||||
// Hardware.Add(sensor.Name+":"+sensor.SensorType, sensor.Value.Value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
computer.Close(); // 结束监控:cite[1]
|
|
||||||
}
|
}
|
||||||
void DisTimer_500MS(object sender, EventArgs e)//Tick_Event周期执行事件200MS
|
void DisTimer_500MS(object sender, EventArgs e)//Tick_Event周期执行事件200MS
|
||||||
{
|
{
|
||||||
@@ -778,7 +754,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
|
|
||||||
//SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
//SQLiteHelpers = new SQLiteHelper(ChartAdress); //数据库连接路径
|
||||||
//SQLiteHelpers.Open(); //打开数据库
|
//SQLiteHelpers.Open(); //打开数据库
|
||||||
MainWindow.SQLiteHelpers.InsertData("Chart", Chart_new);// 执行插入
|
MainWindow.SQLiteChartAdress.InsertData("Chart", Chart_new);// 执行插入
|
||||||
//SQLiteHelpers.Close();
|
//SQLiteHelpers.Close();
|
||||||
}//历史记录
|
}//历史记录
|
||||||
|
|
||||||
@@ -850,6 +826,10 @@ namespace DyeingComputer.ViewModel
|
|||||||
STEP_ID = ID;
|
STEP_ID = ID;
|
||||||
switch (ID)
|
switch (ID)
|
||||||
{
|
{
|
||||||
|
case "999":
|
||||||
|
SETP_runtime = true;
|
||||||
|
STEP_finish = false;
|
||||||
|
break;
|
||||||
case "001":
|
case "001":
|
||||||
STEP_P1 = Convert.ToDouble(P1);
|
STEP_P1 = Convert.ToDouble(P1);
|
||||||
STEP_P2 = Convert.ToDouble(P2);
|
STEP_P2 = Convert.ToDouble(P2);
|
||||||
@@ -1052,6 +1032,8 @@ namespace DyeingComputer.ViewModel
|
|||||||
dt_TP = MainWindow.SQLiteHelpers.ExecuteDataSet("select * from RUN", null).Tables[0];
|
dt_TP = MainWindow.SQLiteHelpers.ExecuteDataSet("select * from RUN", null).Tables[0];
|
||||||
//SQLiteHelpers.Close();//关闭数据库
|
//SQLiteHelpers.Close();//关闭数据库
|
||||||
//启动副功能
|
//启动副功能
|
||||||
|
if (STEP_ID != "999")
|
||||||
|
{
|
||||||
STEP_RUN_slave_stop();
|
STEP_RUN_slave_stop();
|
||||||
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
|
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
|
||||||
if (arrRows.First().Field<object>("StepID_S1") != null)
|
if (arrRows.First().Field<object>("StepID_S1") != null)
|
||||||
@@ -1081,6 +1063,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
STEP_P4p3 = (double)arrRows[0]["Parameter4_S3"];
|
STEP_P4p3 = (double)arrRows[0]["Parameter4_S3"];
|
||||||
STEP_P5p3 = (double)arrRows[0]["Parameter5_S3"];
|
STEP_P5p3 = (double)arrRows[0]["Parameter5_S3"];
|
||||||
}
|
}
|
||||||
|
}
|
||||||
User_Button = true;
|
User_Button = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1106,6 +1089,9 @@ namespace DyeingComputer.ViewModel
|
|||||||
{
|
{
|
||||||
switch (STEP_ID)
|
switch (STEP_ID)
|
||||||
{
|
{
|
||||||
|
case "999":
|
||||||
|
Status_Str = Resources.Await+"[Not End]";
|
||||||
|
break;
|
||||||
case "001":
|
case "001":
|
||||||
if (Selet_dtd("3011"))
|
if (Selet_dtd("3011"))
|
||||||
{
|
{
|
||||||
@@ -1158,7 +1144,8 @@ namespace DyeingComputer.ViewModel
|
|||||||
}
|
}
|
||||||
if ((TEMP_co - T) > 5)
|
if ((TEMP_co - T) > 5)
|
||||||
{
|
{
|
||||||
ERRinf.ERRinf_w(errTabler, Status_Str + "[" + Resources.Heats + Resources.LnsufficientPower + "]", "201-1");//写入
|
ERRinf.ERRinf_w(errTabler, Resources.Heats + ":" + Resources.Target + Resources.Temperature + string.Format(" {0:###.#}", STEP_P1) + "°C" +
|
||||||
|
"[" + Resources.Heats + Resources.LnsufficientPower + "]", "201-1");//写入
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -1190,7 +1177,8 @@ namespace DyeingComputer.ViewModel
|
|||||||
}
|
}
|
||||||
if ((T - TEMP_co) > 5)
|
if ((T - TEMP_co) > 5)
|
||||||
{
|
{
|
||||||
ERRinf.ERRinf_w(errTabler, Status_Str + "[" + Resources.Cooling + Resources.LnsufficientPower + "]", "201-2");//写入
|
ERRinf.ERRinf_w(errTabler, Resources.Cooling + ":" + Resources.Target + Resources.Temperature + string.Format(" {0:###.#}", STEP_P1) + "°C" +
|
||||||
|
"[" + Resources.Cooling + Resources.LnsufficientPower + "]", "201-2");//写入
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2419,7 +2407,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
STEP_RUN_slave();//子功能
|
if(STEP_ID!="999") STEP_RUN_slave();//子功能
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -2429,6 +2417,8 @@ namespace DyeingComputer.ViewModel
|
|||||||
STEP_finish = false;
|
STEP_finish = false;
|
||||||
UserCall_OK = false;
|
UserCall_OK = false;
|
||||||
RUN_STEPID = dt_TP.Select("RUN ='1'").First().Field<int>("Step") +1;
|
RUN_STEPID = dt_TP.Select("RUN ='1'").First().Field<int>("Step") +1;
|
||||||
|
try
|
||||||
|
{
|
||||||
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
|
DataRow[] arrRows = dt_TP.Select("STEP ='" + RUN_STEPID + "'");
|
||||||
string T_ID = arrRows[0]["StepID"].ToString();
|
string T_ID = arrRows[0]["StepID"].ToString();
|
||||||
double T_P1 = Convert.ToDouble(arrRows[0]["Parameter1"].ToString());
|
double T_P1 = Convert.ToDouble(arrRows[0]["Parameter1"].ToString());
|
||||||
@@ -2437,35 +2427,13 @@ namespace DyeingComputer.ViewModel
|
|||||||
double T_P4 = Convert.ToDouble(arrRows[0]["Parameter4"].ToString());
|
double T_P4 = Convert.ToDouble(arrRows[0]["Parameter4"].ToString());
|
||||||
double T_P5 = Convert.ToDouble(arrRows[0]["Parameter5"].ToString());
|
double T_P5 = Convert.ToDouble(arrRows[0]["Parameter5"].ToString());
|
||||||
STEP_START(T_ID, T_P1, T_P2, T_P3, T_P4, T_P5);
|
STEP_START(T_ID, T_P1, T_P2, T_P3, T_P4, T_P5);
|
||||||
/* if (arrRows.First().Field<object>("StepID_S1") != null)
|
|
||||||
{
|
|
||||||
STEP_IDp1 = (string)arrRows[0]["StepID_S1"];
|
|
||||||
STEP_P1p1 = (double)arrRows[0]["Parameter1_S1"];
|
|
||||||
STEP_P2p1 = (double)arrRows[0]["Parameter2_S1"];
|
|
||||||
STEP_P3p1 = (double)arrRows[0]["Parameter3_S1"];
|
|
||||||
STEP_P4p1 = (double)arrRows[0]["Parameter4_S1"];
|
|
||||||
STEP_P5p1 = (double)arrRows[0]["Parameter5_S1"];
|
|
||||||
}
|
|
||||||
if (arrRows.First().Field<object>("StepID_S") != null)
|
|
||||||
{
|
|
||||||
STEP_IDp2 = (string)arrRows[0]["StepID_S2"];
|
|
||||||
STEP_P1p2 = (double)arrRows[0]["Parameter1_S2"];
|
|
||||||
STEP_P2p2 = (double)arrRows[0]["Parameter2_S2"];
|
|
||||||
STEP_P3p2 = (double)arrRows[0]["Parameter3_S2"];
|
|
||||||
STEP_P4p2 = (double)arrRows[0]["Parameter4_S2"];
|
|
||||||
STEP_P5p2 = (double)arrRows[0]["Parameter5_S2"];
|
|
||||||
}
|
|
||||||
if (arrRows[0]["StepID_S2"] != null)
|
|
||||||
{
|
|
||||||
STEP_IDp3 = (string)arrRows[0]["StepID_S3"];
|
|
||||||
STEP_P1p3 = (double)arrRows[0]["Parameter1_S3"];
|
|
||||||
STEP_P2p3 = (double)arrRows[0]["Parameter2_S3"];
|
|
||||||
STEP_P3p3 = (double)arrRows[0]["Parameter3_S3"];
|
|
||||||
STEP_P4p3 = (double)arrRows[0]["Parameter4_S3"];
|
|
||||||
STEP_P5p3 = (double)arrRows[0]["Parameter5_S3"];
|
|
||||||
}*/
|
|
||||||
APILog.LOGlog(WorkNumder.ToString(), "Process", "Next", "STEP = " + RUN_STEPID + ";StepID=" +
|
APILog.LOGlog(WorkNumder.ToString(), "Process", "Next", "STEP = " + RUN_STEPID + ";StepID=" +
|
||||||
T_ID + ";P1=" + T_P1 + ";P2=" + T_P2 + ";P3=" + T_P3 + ";P4=" + T_P4 + ";P5=" + T_P5);
|
T_ID + ";P1=" + T_P1 + ";P2=" + T_P2 + ";P3=" + T_P3 + ";P4=" + T_P4 + ";P5=" + T_P5);
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
STEP_START("999", 0, 0, 0, 0, 0);
|
||||||
|
}
|
||||||
if (ViewID == 1) { sys_workSTEPID = RUN_STEPID; } else { sys_workSTEPID = -1; }
|
if (ViewID == 1) { sys_workSTEPID = RUN_STEPID; } else { sys_workSTEPID = -1; }
|
||||||
}
|
}
|
||||||
if (errTabler.Rows.Count == 0)
|
if (errTabler.Rows.Count == 0)
|
||||||
@@ -3391,21 +3359,35 @@ namespace DyeingComputer.ViewModel
|
|||||||
if (PORTOK)
|
if (PORTOK)
|
||||||
{
|
{
|
||||||
await Task.Run(() =>
|
await Task.Run(() =>
|
||||||
|
{
|
||||||
|
while (true)
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (protocols_ == "MODBUS_RTU")
|
if (protocols_ == "MODBUS_RTU")
|
||||||
{
|
{
|
||||||
|
while (_logQueue.Count>0)
|
||||||
|
{
|
||||||
|
QueueS d=_logQueue.Dequeue();
|
||||||
|
master.WriteSingleCoil(slaveId,Convert.ToUInt16(d.ID),d.D_DAT);
|
||||||
|
}
|
||||||
DO = master.ReadCoils(slaveId, 0, DO_L); //读取线圈
|
DO = master.ReadCoils(slaveId, 0, DO_L); //读取线圈
|
||||||
RW = master.ReadHoldingRegisters(slaveId, 0, RW_L); //读取寄存器
|
RW = master.ReadHoldingRegisters(slaveId, 0, RW_L); //读取寄存器
|
||||||
master.WriteMultipleCoils(slaveId, 0, DQ); //写入线圈
|
DQ = master.ReadCoils(slaveId, 0, DQ_L);
|
||||||
|
//master.WriteMultipleCoils(slaveId, 0, DQ); //写入线圈
|
||||||
master.WriteMultipleRegisters(slaveId, 0, DW); //写入寄存器
|
master.WriteMultipleRegisters(slaveId, 0, DW); //写入寄存器
|
||||||
}//MODBUSRTU
|
}//MODBUSRTU
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
while (_logQueue.Count > 0)
|
||||||
|
{
|
||||||
|
QueueS d = _logQueue.Dequeue();
|
||||||
|
master.WriteSingleCoil(slaveId, Convert.ToUInt16(d.ID+02000), d.D_DAT);
|
||||||
|
}
|
||||||
DO = master.ReadCoils(slaveId, 02255, DO_L); //读取线圈
|
DO = master.ReadCoils(slaveId, 02255, DO_L); //读取线圈
|
||||||
RW = master.ReadHoldingRegisters(slaveId, 06000, RW_L); //读取寄存器
|
RW = master.ReadHoldingRegisters(slaveId, 06000, RW_L); //读取寄存器
|
||||||
master.WriteMultipleCoils(slaveId, 02000, DQ); //写入线圈
|
DQ = master.ReadCoils(slaveId, 02000, DQ_L);
|
||||||
|
// master.WriteMultipleCoils(slaveId, 02000, DQ); //写入线圈
|
||||||
master.WriteMultipleRegisters(slaveId, 07000, DW); //写入寄存器
|
master.WriteMultipleRegisters(slaveId, 07000, DW); //写入寄存器
|
||||||
}//SCMODBUSRTU
|
}//SCMODBUSRTU
|
||||||
LINK_OK = true;
|
LINK_OK = true;
|
||||||
@@ -3420,7 +3402,8 @@ namespace DyeingComputer.ViewModel
|
|||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
Port_link();
|
// Port_link();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -3630,10 +3613,10 @@ namespace DyeingComputer.ViewModel
|
|||||||
Updata_dtm("1014", (Convert.ToDouble(Selet_dta("4005")) + MS03) / 10);
|
Updata_dtm("1014", (Convert.ToDouble(Selet_dta("4005")) + MS03) / 10);
|
||||||
Updata_dta("5003", Convert.ToInt16(Selet_dtm("1020")));
|
Updata_dta("5003", Convert.ToInt16(Selet_dtm("1020")));
|
||||||
Updata_dta("5004", Convert.ToInt16(Selet_dtm("1021")));
|
Updata_dta("5004", Convert.ToInt16(Selet_dtm("1021")));
|
||||||
Updata_dta("5005", Convert.ToInt16(Selet_dtm("1022")));
|
// Updata_dta("5005", Convert.ToInt16(Selet_dtm("1022")));
|
||||||
Updata_dta("5006", Convert.ToInt16(Selet_dtm("1023")));
|
// Updata_dta("5006", Convert.ToInt16(Selet_dtm("1023")));
|
||||||
Updata_dta("5007", Convert.ToInt16(Selet_dtm("1024")));
|
// Updata_dta("5007", Convert.ToInt16(Selet_dtm("1024")));
|
||||||
Updata_dta("5008", Convert.ToInt16(Selet_dtm("1041")));
|
Updata_dta("5008", Convert.ToInt16(Selet_dtm("1030")));
|
||||||
Updata_dta("5009", Convert.ToInt16(Selet_dtm("1025")));
|
Updata_dta("5009", Convert.ToInt16(Selet_dtm("1025")));
|
||||||
Updata_dta("5010", Convert.ToInt16(Selet_dtm("1026")));
|
Updata_dta("5010", Convert.ToInt16(Selet_dtm("1026")));
|
||||||
Updata_dta("5011", Convert.ToInt16(Selet_dtm("1027")));
|
Updata_dta("5011", Convert.ToInt16(Selet_dtm("1027")));
|
||||||
@@ -3702,6 +3685,10 @@ namespace DyeingComputer.ViewModel
|
|||||||
, e.Row.Field<string>("ID")
|
, e.Row.Field<string>("ID")
|
||||||
, e.Row.Field<string>("PLC"));
|
, e.Row.Field<string>("PLC"));
|
||||||
}
|
}
|
||||||
|
if (MD < 4000 && MD > 3000)
|
||||||
|
{
|
||||||
|
_logQueue.Enqueue(new QueueS {ID = MD - 3001 ,D_DAT= e.Row.Field<bool>("DIO") });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Exception) { }
|
catch (Exception) { }
|
||||||
}
|
}
|
||||||
@@ -3981,6 +3968,11 @@ namespace DyeingComputer.ViewModel
|
|||||||
public string PLC { get; set; }
|
public string PLC { get; set; }
|
||||||
public string type { get; set; }
|
public string type { get; set; }
|
||||||
}
|
}
|
||||||
|
public class QueueS
|
||||||
|
{
|
||||||
|
public int ID { get; set; }
|
||||||
|
public bool D_DAT { get; set; }
|
||||||
|
}
|
||||||
public class TechnologicalProcess
|
public class TechnologicalProcess
|
||||||
{
|
{
|
||||||
public int RUN { get; set; }
|
public int RUN { get; set; }
|
||||||
@@ -4009,6 +4001,7 @@ namespace DyeingComputer.ViewModel
|
|||||||
public string DYELOT { get; set; }
|
public string DYELOT { get; set; }
|
||||||
public string Remark { get; set; }
|
public string Remark { get; set; }
|
||||||
}
|
}
|
||||||
|
public static Queue<QueueS> _logQueue = new Queue<QueueS>();
|
||||||
public ObservableCollection<T> ToObservableCollection<T>(DataTable dt) where T : class, new()
|
public ObservableCollection<T> ToObservableCollection<T>(DataTable dt) where T : class, new()
|
||||||
{
|
{
|
||||||
Type t = typeof(T);
|
Type t = typeof(T);
|
||||||
|
|||||||
@@ -0,0 +1,79 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||||
|
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
|
||||||
|
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
|
||||||
|
<security>
|
||||||
|
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<!-- UAC 清单选项
|
||||||
|
如果想要更改 Windows 用户帐户控制级别,请使用
|
||||||
|
以下节点之一替换 requestedExecutionLevel 节点。
|
||||||
|
|
||||||
|
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
|
||||||
|
|
||||||
|
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
|
||||||
|
如果你的应用程序需要此虚拟化来实现向后兼容性,则移除此
|
||||||
|
元素。
|
||||||
|
-->
|
||||||
|
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
|
||||||
|
</requestedPrivileges>
|
||||||
|
</security>
|
||||||
|
</trustInfo>
|
||||||
|
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
|
||||||
|
Windows 版本的列表。取消评论适当的元素,
|
||||||
|
Windows 将自动选择最兼容的环境。 -->
|
||||||
|
|
||||||
|
<!-- Windows Vista -->
|
||||||
|
<!--<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />-->
|
||||||
|
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<!--<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />-->
|
||||||
|
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<!--<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />-->
|
||||||
|
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<!--<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />-->
|
||||||
|
|
||||||
|
<!-- Windows 10 -->
|
||||||
|
<!--<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />-->
|
||||||
|
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
|
||||||
|
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI,无需
|
||||||
|
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
|
||||||
|
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
|
||||||
|
|
||||||
|
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
|
||||||
|
<!--
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
|
||||||
|
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
-->
|
||||||
|
|
||||||
|
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
|
||||||
|
<!--
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="*"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
-->
|
||||||
|
|
||||||
|
</assembly>
|
||||||