Browse Source

云平台接口取消加密

登录支持Enter事件
配置文件优化 删除多余配置
代码优化
master
张剑 1 year ago
parent
commit
900da67549
57 changed files with 615 additions and 880 deletions
  1. 214
    84
      .editorconfig
  2. 0
    181
      XHWK.Model/AppModel.cs
  3. 0
    43
      XHWK.Model/EntityBase.cs
  4. 0
    46
      XHWK.Model/Model_TsubjectbookList.cs
  5. 0
    35
      XHWK.Model/Properties/AssemblyInfo.cs
  6. 0
    96
      XHWK.Model/XHWK.Model.csproj
  7. 0
    5
      XHWK.Model/packages.config
  8. 2
    11
      XHWK.WKTool/App.config
  9. 38
    38
      XHWK.WKTool/App.xaml.cs
  10. 2
    2
      XHWK.WKTool/AppUpdateWin.xaml.cs
  11. 6
    11
      XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs
  12. 13
    15
      XHWK.WKTool/DAL/DAL_Upload.cs
  13. 35
    71
      XHWK.WKTool/DAL/XHApi.cs
  14. 1
    1
      XHWK.WKTool/DeviceWindow.xaml.cs
  15. 1
    1
      XHWK.WKTool/JieTuWindow.xaml.cs
  16. 3
    6
      XHWK.WKTool/LoginWindow.xaml
  17. 31
    43
      XHWK.WKTool/MainWindow.xaml.cs
  18. 0
    0
      XHWK.WKTool/Models/ComboBoxBean.cs
  19. 1
    1
      XHWK.WKTool/Models/ModelApp.cs
  20. 1
    1
      XHWK.WKTool/Models/ModelCanvas.cs
  21. 2
    2
      XHWK.WKTool/Models/ModelDirectorList.cs
  22. 21
    9
      XHWK.WKTool/Models/ModelDrawData.cs
  23. 6
    6
      XHWK.WKTool/Models/ModelPage.cs
  24. 1
    1
      XHWK.WKTool/Models/ModelResourceAdd.cs
  25. 1
    1
      XHWK.WKTool/Models/ModelResourceAddTwo.cs
  26. 1
    1
      XHWK.WKTool/Models/ModelScreenshot.cs
  27. 2
    8
      XHWK.WKTool/Models/ModelServiceAddress.cs
  28. 1
    1
      XHWK.WKTool/Models/ModelSignatures.cs
  29. 24
    14
      XHWK.WKTool/Models/ModelTmatrixCode.cs
  30. 54
    0
      XHWK.WKTool/Models/ModelTsubjectbookList.cs
  31. 5
    2
      XHWK.WKTool/Models/ModelUserInfo.cs
  32. 39
    26
      XHWK.WKTool/Models/ModelVideo.cs
  33. 5
    3
      XHWK.WKTool/Models/ModelWKData.cs
  34. 0
    0
      XHWK.WKTool/Models/NotifyModel.cs
  35. 0
    0
      XHWK.WKTool/Models/ResultVo.cs
  36. 0
    0
      XHWK.WKTool/Models/ViewModel.cs
  37. 2
    2
      XHWK.WKTool/ProductVerification.xaml.cs
  38. 7
    11
      XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs
  39. 7
    7
      XHWK.WKTool/UControl/Uc_VideoItem.xaml.cs
  40. 9
    17
      XHWK.WKTool/UploadWindow.xaml.cs
  41. 1
    1
      XHWK.WKTool/Utils/ZAsposeUtil.cs
  42. 2
    2
      XHWK.WKTool/Utils/ZPrintUtils.cs
  43. 12
    12
      XHWK.WKTool/Utils/pen/luobo/LuoBoPenUtil.cs
  44. 22
    6
      XHWK.WKTool/XHWK.WKTool.csproj
  45. 1
    0
      XHWK.WKTool/packages.config
  46. 3
    3
      XHWK.WKTool/system/AutoStartHelper.cs
  47. 3
    3
      XHWK.WKTool/system/BlackboardNew.cs
  48. 2
    2
      XHWK.WKTool/system/DownloadManager.cs
  49. 1
    1
      XHWK.WKTool/system/DownloadService.cs
  50. 6
    6
      XHWK.WKTool/system/FFMpeg.cs
  51. 4
    1
      XHWK.WKTool/system/FileToolsCommon.cs
  52. 3
    3
      XHWK.WKTool/system/ImageHelper.cs
  53. 3
    20
      XHWK.WKTool/system/LogHelper.cs
  54. 1
    1
      XHWK.WKTool/system/PdfTrunImage.cs
  55. 13
    8
      XHWK.WKTool/system/ZHttpUtil.cs
  56. 2
    8
      XHWK.sln
  57. 1
    1
      星火微课/星火微课-测试.iss

+ 214
- 84
.editorconfig View File

1
+root = true
2
+# 如果要从更高级别的目录继承 .editorconfig 设置,请删除以下行
3
+
1
 [*]
4
 [*]
2
 end_of_line = crlf
5
 end_of_line = crlf
3
 charset = utf-8-bom
6
 charset = utf-8-bom
5
 insert_final_newline = true
8
 insert_final_newline = true
6
 tab_width = 4
9
 tab_width = 4
7
 trim_trailing_whitespace = true
10
 trim_trailing_whitespace = true
8
-
9
 resharper_xaml_binding_without_context_not_resolved_highlighting = none
11
 resharper_xaml_binding_without_context_not_resolved_highlighting = none
10
 resharper_xaml_binding_with_context_not_resolved_highlighting = none
12
 resharper_xaml_binding_with_context_not_resolved_highlighting = none
11
 
13
 
12
 # ReSharper properties
14
 # ReSharper properties
13
-resharper_csharp_max_line_length = 400
14
-resharper_csharp_wrap_arguments_style = chop_if_long
15
-resharper_csharp_wrap_before_binary_opsign = true
16
-resharper_csharp_wrap_before_declaration_lpar = true
17
-resharper_csharp_wrap_before_invocation_lpar = true
18
-resharper_csharp_wrap_extends_list_style = chop_if_long
19
-resharper_csharp_wrap_parameters_style = chop_if_long
20
-resharper_indent_preprocessor_if = usual_indent
21
-resharper_indent_preprocessor_other = usual_indent
22
-resharper_keep_existing_declaration_block_arrangement = false
23
-resharper_keep_existing_linebreaks = false
24
-resharper_max_array_initializer_elements_on_line = 1
25
-resharper_max_attribute_length_for_same_line = 2
26
-resharper_max_enum_members_on_line = 1
27
-resharper_max_formal_parameters_on_line = 2
28
-resharper_max_initializer_elements_on_line = 1
29
-resharper_max_invocation_arguments_on_line = 2
30
-resharper_place_field_attribute_on_same_line = if_owner_is_single_line
31
-resharper_wrap_after_declaration_lpar = true
32
-resharper_wrap_after_invocation_lpar = true
33
-resharper_wrap_array_initializer_style = chop_if_long
34
-resharper_wrap_before_declaration_rpar = true
35
-resharper_wrap_before_first_type_parameter_constraint = true
36
-resharper_wrap_before_invocation_rpar = true
37
-resharper_wrap_before_linq_expression = true
38
-resharper_wrap_chained_binary_expressions = chop_if_long
39
-resharper_wrap_chained_binary_patterns = chop_if_long
40
-resharper_wrap_chained_method_calls = chop_if_long
41
-resharper_wrap_enum_declaration = chop_if_long
42
-resharper_wrap_for_stmt_header_style = chop_if_long
43
-resharper_wrap_list_pattern = chop_if_long
44
-resharper_wrap_multiple_declaration_style = chop_if_long
45
-resharper_wrap_switch_expression = chop_if_long
46
-
47
-# Microsoft .NET properties
48
-csharp_preserve_single_line_blocks = true
15
+resharper_apply_on_completion = true
16
+resharper_csharp_max_line_length = 300
17
+resharper_max_array_initializer_elements_on_line = 3
18
+resharper_max_attribute_length_for_same_line = 3
19
+resharper_max_enum_members_on_line = 3
20
+resharper_max_formal_parameters_on_line = 3
21
+resharper_max_initializer_elements_on_line = 3
22
+resharper_max_invocation_arguments_on_line = 3
49
 
23
 
50
-[*.xml]
24
+# c# 文件
25
+[*.cs]
26
+
27
+#### Core EditorConfig 选项 ####
28
+
29
+# 缩进和间距
30
+indent_size = 4
51
 indent_style = space
31
 indent_style = space
32
+tab_width = 4
52
 
33
 
53
-[*.cs]
34
+# 新行首选项
35
+end_of_line = crlf
36
+insert_final_newline = false
37
+
38
+#### .NET 编码约定 ####
39
+
40
+# 组织 Using
41
+dotnet_separate_import_directive_groups = true
54
 dotnet_sort_system_directives_first = true
42
 dotnet_sort_system_directives_first = true
55
-dotnet_style_coalesce_expression = true:suggestion
56
-dotnet_style_collection_initializer = true:suggestion
57
-dotnet_style_explicit_tuple_names = true:suggestion
58
-dotnet_style_null_propagation = true:suggestion
59
-dotnet_style_object_initializer = true:suggestion
60
-dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
61
-dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
62
-dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
63
-dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
64
-dotnet_style_predefined_type_for_locals_parameters_members = true:silent
65
-dotnet_style_predefined_type_for_member_access = true:silent
66
-dotnet_style_prefer_auto_properties = true:silent
43
+file_header_template = 
44
+
45
+# this. 和 Me. 首选项
46
+dotnet_style_qualification_for_event = false
47
+dotnet_style_qualification_for_field = false
48
+dotnet_style_qualification_for_method = false
49
+dotnet_style_qualification_for_property = false
50
+
51
+# 语言关键字与 bcl 类型首选项
52
+dotnet_style_predefined_type_for_locals_parameters_members = true
53
+dotnet_style_predefined_type_for_member_access = true
54
+
55
+# 括号首选项
56
+dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
57
+dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
58
+dotnet_style_parentheses_in_other_operators = never_if_unnecessary
59
+dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
60
+
61
+# 修饰符首选项
62
+dotnet_style_require_accessibility_modifiers = for_non_interface_members
63
+
64
+# 表达式级首选项
65
+dotnet_style_coalesce_expression = true
66
+dotnet_style_collection_initializer = true
67
+dotnet_style_explicit_tuple_names = true
68
+dotnet_style_namespace_match_folder = true
69
+dotnet_style_null_propagation = true
70
+dotnet_style_object_initializer = true
71
+dotnet_style_operator_placement_when_wrapping = beginning_of_line
72
+dotnet_style_prefer_auto_properties = true
73
+dotnet_style_prefer_compound_assignment = true
67
 dotnet_style_prefer_conditional_expression_over_assignment = true
74
 dotnet_style_prefer_conditional_expression_over_assignment = true
68
 dotnet_style_prefer_conditional_expression_over_return = true
75
 dotnet_style_prefer_conditional_expression_over_return = true
69
-dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
70
-dotnet_style_prefer_inferred_tuple_names = true:suggestion
71
-dotnet_style_prefer_is_null_check_over_reference_equality_method = true:silent
72
-dotnet_style_qualification_for_event = false:silent
73
-dotnet_style_qualification_for_field = false:silent
74
-dotnet_style_qualification_for_method = false:silent
75
-dotnet_style_qualification_for_property = false:silent
76
-dotnet_style_readonly_field = true:suggestion
77
-dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
78
-csharp_indent_case_contents = true
79
-csharp_indent_labels = flush_left
80
-csharp_indent_switch_labels = true
76
+dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
77
+dotnet_style_prefer_inferred_anonymous_type_member_names = true
78
+dotnet_style_prefer_inferred_tuple_names = true
79
+dotnet_style_prefer_is_null_check_over_reference_equality_method = true
80
+dotnet_style_prefer_simplified_boolean_expressions = true
81
+dotnet_style_prefer_simplified_interpolation = true
82
+
83
+# 字段首选项
84
+dotnet_style_readonly_field = true:silent
85
+
86
+# 参数首选项
87
+dotnet_code_quality_unused_parameters = all
88
+
89
+# 禁止显示首选项
90
+dotnet_remove_unnecessary_suppression_exclusions = none
91
+
92
+# 新行首选项
93
+dotnet_style_allow_multiple_blank_lines_experimental = false:suggestion
94
+dotnet_style_allow_statement_immediately_after_block_experimental = true
95
+
96
+#### c# 编码约定 ####
97
+
98
+# var 首选项
99
+csharp_style_var_elsewhere = false
100
+csharp_style_var_for_built_in_types = false
101
+csharp_style_var_when_type_is_apparent = false
102
+
103
+# Expression-bodied 成员
104
+csharp_style_expression_bodied_accessors = true
105
+csharp_style_expression_bodied_constructors = false
106
+csharp_style_expression_bodied_indexers = true
107
+csharp_style_expression_bodied_lambdas = true
108
+csharp_style_expression_bodied_local_functions = false
109
+csharp_style_expression_bodied_methods = false
110
+csharp_style_expression_bodied_operators = false
111
+csharp_style_expression_bodied_properties = true
112
+
113
+# 模式匹配首选项
114
+csharp_style_pattern_matching_over_as_with_null_check = true
115
+csharp_style_pattern_matching_over_is_with_cast_check = true
116
+csharp_style_prefer_extended_property_pattern = true
117
+csharp_style_prefer_not_pattern = true
118
+csharp_style_prefer_pattern_matching = true
119
+csharp_style_prefer_switch_expression = true
120
+
121
+# Null 检查首选项
122
+csharp_style_conditional_delegate_call = false
123
+
124
+# 修饰符首选项
125
+csharp_prefer_static_local_function = true:silent
126
+csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
127
+csharp_style_prefer_readonly_struct = true:silent
128
+csharp_style_prefer_readonly_struct_member = true
129
+
130
+# 代码块首选项
131
+csharp_prefer_braces = true
132
+csharp_prefer_simple_using_statement = true
133
+csharp_style_namespace_declarations = block_scoped
134
+csharp_style_prefer_method_group_conversion = true
135
+csharp_style_prefer_top_level_statements = true
136
+
137
+# 表达式级首选项
138
+csharp_prefer_simple_default_expression = true
139
+csharp_style_deconstructed_variable_declaration = true
140
+csharp_style_implicit_object_creation_when_type_is_apparent = true
141
+csharp_style_inlined_variable_declaration = true
142
+csharp_style_prefer_index_operator = true
143
+csharp_style_prefer_local_over_anonymous_function = true
144
+csharp_style_prefer_null_check_over_type_check = true
145
+csharp_style_prefer_range_operator = true
146
+csharp_style_prefer_tuple_swap = true
147
+csharp_style_prefer_utf8_string_literals = true
148
+csharp_style_throw_expression = false
149
+csharp_style_unused_value_assignment_preference = discard_variable
150
+csharp_style_unused_value_expression_statement_preference = discard_variable
151
+
152
+# "using" 指令首选项
153
+csharp_using_directive_placement = inside_namespace
154
+
155
+# 新行首选项
156
+csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
157
+csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
158
+csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
159
+csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
160
+csharp_style_allow_embedded_statements_on_same_line_experimental = true
161
+
162
+#### C# 格式规则 ####
163
+
164
+# 新行首选项
81
 csharp_new_line_before_catch = true
165
 csharp_new_line_before_catch = true
82
 csharp_new_line_before_else = true
166
 csharp_new_line_before_else = true
83
 csharp_new_line_before_finally = true
167
 csharp_new_line_before_finally = true
85
 csharp_new_line_before_members_in_object_initializers = true
169
 csharp_new_line_before_members_in_object_initializers = true
86
 csharp_new_line_before_open_brace = all
170
 csharp_new_line_before_open_brace = all
87
 csharp_new_line_between_query_expression_clauses = true
171
 csharp_new_line_between_query_expression_clauses = true
88
-csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
89
-csharp_prefer_braces = true:silent
90
-csharp_prefer_simple_default_expression = true:suggestion
91
-csharp_preserve_single_line_blocks = true
92
-csharp_preserve_single_line_statements = true
172
+
173
+# 缩进首选项
174
+csharp_indent_block_contents = true
175
+csharp_indent_braces = false
176
+csharp_indent_case_contents = true
177
+csharp_indent_case_contents_when_block = true
178
+csharp_indent_labels = no_change
179
+csharp_indent_switch_labels = true
180
+
181
+# 空格键首选项
93
 csharp_space_after_cast = false
182
 csharp_space_after_cast = false
94
 csharp_space_after_colon_in_inheritance_clause = true
183
 csharp_space_after_colon_in_inheritance_clause = true
184
+csharp_space_after_comma = true
185
+csharp_space_after_dot = false
95
 csharp_space_after_keywords_in_control_flow_statements = true
186
 csharp_space_after_keywords_in_control_flow_statements = true
187
+csharp_space_after_semicolon_in_for_statement = true
96
 csharp_space_around_binary_operators = before_and_after
188
 csharp_space_around_binary_operators = before_and_after
189
+csharp_space_around_declaration_statements = false
97
 csharp_space_before_colon_in_inheritance_clause = true
190
 csharp_space_before_colon_in_inheritance_clause = true
191
+csharp_space_before_comma = false
192
+csharp_space_before_dot = false
193
+csharp_space_before_open_square_brackets = false
194
+csharp_space_before_semicolon_in_for_statement = false
195
+csharp_space_between_empty_square_brackets = false
98
 csharp_space_between_method_call_empty_parameter_list_parentheses = false
196
 csharp_space_between_method_call_empty_parameter_list_parentheses = false
99
 csharp_space_between_method_call_name_and_opening_parenthesis = false
197
 csharp_space_between_method_call_name_and_opening_parenthesis = false
100
 csharp_space_between_method_call_parameter_list_parentheses = false
198
 csharp_space_between_method_call_parameter_list_parentheses = false
101
 csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
199
 csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
200
+csharp_space_between_method_declaration_name_and_open_parenthesis = false
102
 csharp_space_between_method_declaration_parameter_list_parentheses = false
201
 csharp_space_between_method_declaration_parameter_list_parentheses = false
103
 csharp_space_between_parentheses = false
202
 csharp_space_between_parentheses = false
104
-csharp_style_conditional_delegate_call = true:suggestion
105
-csharp_style_deconstructed_variable_declaration = true:suggestion
106
-csharp_style_expression_bodied_accessors = true:silent
107
-csharp_style_expression_bodied_constructors = false:silent
108
-csharp_style_expression_bodied_indexers = true:silent
109
-csharp_style_expression_bodied_methods = false:silent
110
-csharp_style_expression_bodied_operators = false:silent
111
-csharp_style_expression_bodied_properties = true:silent
112
-csharp_style_inlined_variable_declaration = true:suggestion
113
-csharp_style_pattern_local_over_anonymous_function = true:suggestion
114
-csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
115
-csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
116
-csharp_style_throw_expression = true:suggestion
117
-csharp_style_var_elsewhere = true:silent
118
-csharp_style_var_for_built_in_types = true:silent
119
-csharp_style_var_when_type_is_apparent = true:silent
203
+csharp_space_between_square_brackets = false
204
+
205
+# 包装首选项
206
+csharp_preserve_single_line_blocks = true
207
+csharp_preserve_single_line_statements = false
208
+
209
+#### 命名样式 ####
210
+
211
+# 命名规则
212
+
213
+dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
214
+dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
215
+dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
216
+
217
+dotnet_naming_rule.types_should_be_pascal_case.severity = warning
218
+dotnet_naming_rule.types_should_be_pascal_case.symbols = types
219
+dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
220
+
221
+dotnet_naming_rule.method_should_be_pascal_case.severity = warning
222
+dotnet_naming_rule.method_should_be_pascal_case.symbols = method
223
+dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case
224
+
225
+# 符号规范
226
+
227
+dotnet_naming_symbols.interface.applicable_kinds = interface
228
+dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
229
+dotnet_naming_symbols.interface.required_modifiers = 
230
+
231
+dotnet_naming_symbols.method.applicable_kinds = method
232
+dotnet_naming_symbols.method.applicable_accessibilities = *
233
+dotnet_naming_symbols.method.required_modifiers = 
234
+
235
+dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
236
+dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
237
+dotnet_naming_symbols.types.required_modifiers = 
238
+
239
+# 命名样式
240
+
241
+dotnet_naming_style.pascal_case.required_prefix = 
242
+dotnet_naming_style.pascal_case.required_suffix = 
243
+dotnet_naming_style.pascal_case.word_separator = 
244
+dotnet_naming_style.pascal_case.capitalization = pascal_case
245
+
246
+dotnet_naming_style.begins_with_i.required_prefix = I
247
+dotnet_naming_style.begins_with_i.required_suffix = 
248
+dotnet_naming_style.begins_with_i.word_separator = 
249
+dotnet_naming_style.begins_with_i.capitalization = pascal_case

+ 0
- 181
XHWK.Model/AppModel.cs View File

1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
-namespace XHWK.Model
8
-{
9
-    public class AppModel : EntityBase
10
-    {
11
-        public AppModel()
12
-        {
13
-            _Current = this;
14
-        }
15
-
16
-        #region 属性 Current
17
-
18
-        private static AppModel _Current = null;
19
-
20
-        public static AppModel Current => _Current;
21
-
22
-        #endregion 属性 Current
23
-
24
-        #region 属性 MaskLeftWidth
25
-
26
-        private double _MaskLeftWidth = ScreenshotWindow.ScreenWidth;
27
-
28
-        public double MaskLeftWidth
29
-        {
30
-            get => _MaskLeftWidth;
31
-            set
32
-            {
33
-                _MaskLeftWidth = value;
34
-                ShowSizeLeft = value;
35
-                RaisePropertyChanged(() => MaskLeftWidth);
36
-            }
37
-        }
38
-
39
-        #endregion 属性 MaskLeftWidth
40
-
41
-        #region 属性 MaskRightWidth
42
-
43
-        private double _MaskRightWidth = 0;
44
-
45
-        public double MaskRightWidth
46
-        {
47
-            get => _MaskRightWidth;
48
-            set
49
-            {
50
-                _MaskRightWidth = value;
51
-                RaisePropertyChanged(() => MaskRightWidth);
52
-            }
53
-        }
54
-
55
-        #endregion 属性 MaskRightWidth
56
-
57
-        #region 属性 MaskTopWidth
58
-
59
-        private double _MaskTopWidth = 0;
60
-
61
-        public double MaskTopWidth
62
-        {
63
-            get => _MaskTopWidth;
64
-            set
65
-            {
66
-                _MaskTopWidth = value;
67
-                RaisePropertyChanged(() => MaskTopWidth);
68
-            }
69
-        }
70
-
71
-        #endregion 属性 MaskTopWidth
72
-
73
-        #region 属性 MaskTopHeight
74
-
75
-        private double _MaskTopHeight = 0;
76
-
77
-        public double MaskTopHeight
78
-        {
79
-            get => _MaskTopHeight;
80
-            set
81
-            {
82
-                _MaskTopHeight = value;
83
-                ShowSizeTop = MaskTopHeight < 40 ? MaskTopHeight : MaskTopHeight - 40;
84
-                RaisePropertyChanged(() => MaskTopHeight);
85
-            }
86
-        }
87
-
88
-        #endregion 属性 MaskTopHeight
89
-
90
-        #region 属性 MaskBottomHeight
91
-
92
-        private double _MaskBottomHeight = 0;
93
-
94
-        public double MaskBottomHeight
95
-        {
96
-            get => _MaskBottomHeight;
97
-            set
98
-            {
99
-                _MaskBottomHeight = value;
100
-                RaisePropertyChanged(() => MaskBottomHeight);
101
-            }
102
-        }
103
-
104
-        #endregion 属性 MaskBottomHeight
105
-
106
-        #region 属性 ShowSize
107
-
108
-        private string _ShowSize = "0 × 0";
109
-
110
-        public string ShowSize
111
-        {
112
-            get => _ShowSize;
113
-            set
114
-            {
115
-                _ShowSize = value;
116
-                RaisePropertyChanged(() => ShowSize);
117
-            }
118
-        }
119
-
120
-        private static StringBuilder sb = new StringBuilder();
121
-
122
-        public void ChangeShowSize()
123
-        {
124
-            sb = new StringBuilder();
125
-            sb.Append((int)(ScreenshotWindow.Current.MainImage.Width * ScreenshotWindow.ScreenScale));
126
-            sb.Append(" × ");
127
-            sb.Append((int)(ScreenshotWindow.Current.MainImage.Height * ScreenshotWindow.ScreenScale));
128
-            ShowSize = sb.ToString();
129
-        }
130
-
131
-        #endregion 属性 ShowSize
132
-
133
-        #region 属性 ShowSizeLeft
134
-
135
-        private double _ShowSizeLeft = 0;
136
-
137
-        public double ShowSizeLeft
138
-        {
139
-            get => _ShowSizeLeft;
140
-            set
141
-            {
142
-                _ShowSizeLeft = value;
143
-                RaisePropertyChanged(() => ShowSizeLeft);
144
-            }
145
-        }
146
-
147
-        #endregion 属性 ShowSizeLeft
148
-
149
-        #region 属性 ShowSizeTop
150
-
151
-        private double _ShowSizeTop = 0;
152
-
153
-        public double ShowSizeTop
154
-        {
155
-            get => _ShowSizeTop;
156
-            set
157
-            {
158
-                _ShowSizeTop = value;
159
-                RaisePropertyChanged(() => ShowSizeTop);
160
-            }
161
-        }
162
-
163
-        #endregion 属性 ShowSizeTop
164
-
165
-        #region 属性 ShowRGB
166
-
167
-        private string _ShowRGB = string.Empty;
168
-
169
-        public string ShowRGB
170
-        {
171
-            get => _ShowRGB;
172
-            set
173
-            {
174
-                _ShowRGB = value;
175
-                RaisePropertyChanged(() => ShowRGB);
176
-            }
177
-        }
178
-
179
-        #endregion 属性 ShowRGB
180
-    }
181
-}

+ 0
- 43
XHWK.Model/EntityBase.cs View File

1
-using System;
2
-using System.Linq.Expressions;
3
-
4
-namespace XHWK.Model
5
-{
6
-    /// <summary>
7
-    /// singba:20120807
8
-    /// 这个基类只作为INotifyPropertyChanged的实现,不再是Entity的基类
9
-    /// </summary>
10
-    public class EntityBase : System.ComponentModel.INotifyPropertyChanged
11
-    {
12
-        #region INotifyPropertyChanged Members
13
-
14
-        public virtual event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
15
-
16
-        protected virtual void RaisePropertyChanged(string name)
17
-        {
18
-            if (PropertyChanged != null)
19
-            {
20
-                PropertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(name));
21
-            }
22
-        }
23
-
24
-        protected virtual void RaisePropertyChanged<TProperty>(Expression<Func<TProperty>> property)
25
-        {
26
-            LambdaExpression lambda = property;
27
-            MemberExpression memberExpression;
28
-            if (lambda.Body is UnaryExpression)
29
-            {
30
-                UnaryExpression unaryExpression = (UnaryExpression)lambda.Body;
31
-                memberExpression = (MemberExpression)unaryExpression.Operand;
32
-            }
33
-            else
34
-            {
35
-                memberExpression = (MemberExpression)lambda.Body;
36
-            }
37
-
38
-            RaisePropertyChanged(memberExpression.Member.Name);
39
-        }
40
-
41
-        #endregion INotifyPropertyChanged Members
42
-    }
43
-}

+ 0
- 46
XHWK.Model/Model_TsubjectbookList.cs View File

1
-namespace XHWK.Model
2
-{
3
-    public class Model_TsubjectbookList
4
-    {
5
-        private string tbid;
6
-        private string lsbid;
7
-        private string selected;
8
-        private string subjectid;
9
-        private string subjectname;
10
-        private string lsbname;
11
-        private string coverpath;
12
-        private string versionname;
13
-        /// <summary>
14
-        /// 教师教材关系id
15
-        /// </summary>
16
-        public string Tbid { get => tbid; set => tbid = value; }
17
-        /// <summary>
18
-        /// 教材关联关系表id
19
-        /// </summary>
20
-        public string Lsbid { get => lsbid; set => lsbid = value; }
21
-        /// <summary>
22
-        /// 是否选中:0未选中1已选中
23
-        /// </summary>
24
-        public string Selected { get => selected; set => selected = value; }
25
-        /// <summary>
26
-        /// 科目id
27
-        /// </summary>
28
-        public string Subjectid { get => subjectid; set => subjectid = value; }
29
-        /// <summary>
30
-        /// 科目名称
31
-        /// </summary>
32
-        public string Subjectname { get => subjectname; set => subjectname = value; }
33
-        /// <summary>
34
-        /// 册别名称
35
-        /// </summary>
36
-        public string Lsbname { get => lsbname; set => lsbname = value; }
37
-        /// <summary>
38
-        /// 封面图地址
39
-        /// </summary>
40
-        public string Coverpath { get => coverpath; set => coverpath = value; }
41
-        /// <summary>
42
-        /// 版本名称
43
-        /// </summary>
44
-        public string Versionname { get => versionname; set => versionname = value; }
45
-    }
46
-}

+ 0
- 35
XHWK.Model/Properties/AssemblyInfo.cs View File

1
-using System.Reflection;
2
-using System.Runtime.InteropServices;
3
-
4
-// 有关程序集的一般信息由以下
5
-// 控制。更改这些特性值可修改
6
-// 与程序集关联的信息。
7
-[assembly: AssemblyTitle("XHWK.Model")]
8
-[assembly: AssemblyDescription("")]
9
-[assembly: AssemblyConfiguration("")]
10
-[assembly: AssemblyCompany("")]
11
-[assembly: AssemblyProduct("XHWK.Model")]
12
-[assembly: AssemblyCopyright("Copyright ©  2020")]
13
-[assembly: AssemblyTrademark("")]
14
-[assembly: AssemblyCulture("")]
15
-
16
-// 将 ComVisible 设置为 false 会使此程序集中的类型
17
-//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
18
-//请将此类型的 ComVisible 特性设置为 true。
19
-[assembly: ComVisible(false)]
20
-
21
-// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
22
-[assembly: Guid("445a4527-849b-4fa9-aa97-8ed1098d211e")]
23
-
24
-// 程序集的版本信息由下列四个值组成: 
25
-//
26
-//      主版本
27
-//      次版本
28
-//      生成号
29
-//      修订号
30
-//
31
-//可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
32
-//通过使用 "*",如下所示:
33
-// [assembly: AssemblyVersion("1.0.*")]
34
-[assembly: AssemblyVersion("1.1.7.0")]
35
-[assembly: AssemblyFileVersion("1.1.7.0")]

+ 0
- 96
XHWK.Model/XHWK.Model.csproj View File

1
-<?xml version="1.0" encoding="utf-8"?>
2
-<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3
-  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
4
-  <PropertyGroup>
5
-    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
6
-    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
7
-    <ProjectGuid>{445A4527-849B-4FA9-AA97-8ED1098D211E}</ProjectGuid>
8
-    <OutputType>Library</OutputType>
9
-    <AppDesignerFolder>Properties</AppDesignerFolder>
10
-    <RootNamespace>XHWK.Model</RootNamespace>
11
-    <AssemblyName>XHWK.Model</AssemblyName>
12
-    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
13
-    <FileAlignment>512</FileAlignment>
14
-    <Deterministic>true</Deterministic>
15
-  </PropertyGroup>
16
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
17
-    <DebugSymbols>true</DebugSymbols>
18
-    <DebugType>full</DebugType>
19
-    <Optimize>false</Optimize>
20
-    <OutputPath>bin\Debug\</OutputPath>
21
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
22
-    <ErrorReport>prompt</ErrorReport>
23
-    <WarningLevel>4</WarningLevel>
24
-  </PropertyGroup>
25
-  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
26
-    <DebugType>pdbonly</DebugType>
27
-    <Optimize>true</Optimize>
28
-    <OutputPath>bin\Release\</OutputPath>
29
-    <DefineConstants>TRACE</DefineConstants>
30
-    <ErrorReport>prompt</ErrorReport>
31
-    <WarningLevel>4</WarningLevel>
32
-  </PropertyGroup>
33
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
34
-    <DebugSymbols>true</DebugSymbols>
35
-    <OutputPath>bin\x86\Debug\</OutputPath>
36
-    <DefineConstants>DEBUG;TRACE</DefineConstants>
37
-    <DebugType>full</DebugType>
38
-    <PlatformTarget>x86</PlatformTarget>
39
-    <LangVersion>7.3</LangVersion>
40
-    <ErrorReport>prompt</ErrorReport>
41
-  </PropertyGroup>
42
-  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
43
-    <OutputPath>bin\x86\Release\</OutputPath>
44
-    <DefineConstants>TRACE</DefineConstants>
45
-    <Optimize>true</Optimize>
46
-    <DebugType>pdbonly</DebugType>
47
-    <PlatformTarget>x86</PlatformTarget>
48
-    <LangVersion>7.3</LangVersion>
49
-    <ErrorReport>prompt</ErrorReport>
50
-  </PropertyGroup>
51
-  <ItemGroup>
52
-    <Reference Include="Ink, Version=0.5.0.0, Culture=neutral, processorArchitecture=MSIL">
53
-      <HintPath>..\packages\Ink.0.5.0\lib\net451\Ink.dll</HintPath>
54
-    </Reference>
55
-    <Reference Include="NStandard, Version=0.4.15.0, Culture=neutral, processorArchitecture=MSIL">
56
-      <HintPath>..\packages\NStandard.0.4.15\lib\net451\NStandard.dll</HintPath>
57
-    </Reference>
58
-    <Reference Include="PresentationCore" />
59
-    <Reference Include="System" />
60
-    <Reference Include="System.Core" />
61
-    <Reference Include="System.Drawing" />
62
-    <Reference Include="System.Web" />
63
-    <Reference Include="System.Xml.Linq" />
64
-    <Reference Include="System.Data.DataSetExtensions" />
65
-    <Reference Include="Microsoft.CSharp" />
66
-    <Reference Include="System.Data" />
67
-    <Reference Include="System.Net.Http" />
68
-    <Reference Include="System.Xml" />
69
-  </ItemGroup>
70
-  <ItemGroup>
71
-    <Compile Include="ComboBoxBean.cs" />
72
-    <Compile Include="Model_App.cs" />
73
-    <Compile Include="Model_Canvas.cs" />
74
-    <Compile Include="Model_DirectorList.cs" />
75
-    <Compile Include="Model_DrawData.cs" />
76
-    <Compile Include="Model_Page.cs" />
77
-    <Compile Include="Model_ResourceAddTwo.cs" />
78
-    <Compile Include="Model_ResourceAdd.cs" />
79
-    <Compile Include="Model_Screenshot.cs" />
80
-    <Compile Include="Model_ServiceAddress.cs" />
81
-    <Compile Include="Model_Signatures.cs" />
82
-    <Compile Include="Model_TmatrixCode.cs" />
83
-    <Compile Include="Model_TsubjectbookList.cs" />
84
-    <Compile Include="ModelUserInfo.cs" />
85
-    <Compile Include="Model_Video.cs" />
86
-    <Compile Include="Model_WKData.cs" />
87
-    <Compile Include="NotifyModel.cs" />
88
-    <Compile Include="Properties\AssemblyInfo.cs" />
89
-    <Compile Include="ResultVo.cs" />
90
-    <Compile Include="ViewModel.cs" />
91
-  </ItemGroup>
92
-  <ItemGroup>
93
-    <None Include="packages.config" />
94
-  </ItemGroup>
95
-  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
96
-</Project>

+ 0
- 5
XHWK.Model/packages.config View File

1
-<?xml version="1.0" encoding="utf-8"?>
2
-<packages>
3
-  <package id="Ink" version="0.5.0" targetFramework="net452" />
4
-  <package id="NStandard" version="0.4.15" targetFramework="net452" />
5
-</packages>

+ 2
- 11
XHWK.WKTool/App.config View File

7
     <!--0正式 1测试-->
7
     <!--0正式 1测试-->
8
     <add key="IsDebug" value="1" />
8
     <add key="IsDebug" value="1" />
9
     <!--版本号-->
9
     <!--版本号-->
10
-    <add key="VersionCode" value="127" />
11
-    <add key="VersionName" value="3.13.0" />
10
+    <add key="VersionCode" value="128" />
11
+    <add key="VersionName" value="3.13.1" />
12
     <!--皮肤样式 0白 1蓝 2黑色 -->
12
     <!--皮肤样式 0白 1蓝 2黑色 -->
13
     <add key="SkinStyle" value="0" />
13
     <add key="SkinStyle" value="0" />
14
     <!--是否输出视频记录日志:0否-->
14
     <!--是否输出视频记录日志:0否-->
27
     <add key="isRemind" value="" />
27
     <add key="isRemind" value="" />
28
     <!--是否为校外 1是 -->
28
     <!--是否为校外 1是 -->
29
     <add key="IsOutsideSchool" value="1" />
29
     <add key="IsOutsideSchool" value="1" />
30
-    <!--API请求地址-->
31
-    <add key="APIRequestAddress" value="https://schoolapi.xhkjedu.com" />
32
-    <!--文件平台请求地址-->
33
-    <add key="FileRequestAddress" value="https://schoolfile.xhkjedu.com" />
34
-    <!--展示文件服务器请求地址-->
35
-    <add key="SchoolfileRequestAddress" value="https://schoolstatic.xhkjedu.com" />
36
-    <!--认证请求地址-->
37
-    <add key="CertapiRequestAddress" value="https://scapi.xhkjedu.com" />
38
     <!--摄像头位置 1.右上 2.左上 3.右下 4.左下-->
30
     <!--摄像头位置 1.右上 2.左上 3.右下 4.左下-->
39
     <add key="CameraPosition" value="1" />
31
     <add key="CameraPosition" value="1" />
40
     <!--上传每片大小 Mb-->
32
     <!--上传每片大小 Mb-->
41
     <add key="UploadSliceLen" value="1" />
33
     <add key="UploadSliceLen" value="1" />
42
     <!--是否隐藏录屏工具栏 1 隐藏 0不隐藏-->
34
     <!--是否隐藏录屏工具栏 1 隐藏 0不隐藏-->
43
     <add key="IsHideSRTool" value="1" />
35
     <add key="IsHideSRTool" value="1" />
44
-    <add key="ClientSettingsProvider.ServiceUri" value="" />
45
   </appSettings>
36
   </appSettings>
46
   <system.web>
37
   <system.web>
47
     <membership defaultProvider="ClientAuthenticationMembershipProvider">
38
     <membership defaultProvider="ClientAuthenticationMembershipProvider">

+ 38
- 38
XHWK.WKTool/App.xaml.cs View File

42
         /// <summary>
42
         /// <summary>
43
         /// 服务地址
43
         /// 服务地址
44
         /// </summary>
44
         /// </summary>
45
-        public static Model_ServiceAddress ServiceAddress;
45
+        public static ModelServiceAddress ServiceAddress;
46
 
46
 
47
         /// <summary>
47
         /// <summary>
48
         /// 接口地址
48
         /// 接口地址
49
         /// </summary>
49
         /// </summary>
50
-        public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : FileToolsCommon.GetConfigValue("APIRequestAddress");
50
+        public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : "http://schoolapi.xhkjedu.com";
51
 
51
 
52
         /// <summary>
52
         /// <summary>
53
         /// 图片地址
53
         /// 图片地址
54
         /// </summary>
54
         /// </summary>
55
-        public static string uploadUrl = isDebug ? "http://schoolfiletest.xhkjedu.com/" : FileToolsCommon.GetConfigValue("FileRequestAddress");
55
+        public static string uploadUrl = isDebug ? "http://schoolfiletest.xhkjedu.com/" : "http://schoolfile.xhkjedu.com/";
56
 
56
 
57
         /// <summary>
57
         /// <summary>
58
         /// 展示文件
58
         /// 展示文件
59
         /// </summary>
59
         /// </summary>
60
-        public static string showImageUrl = isDebug ? "http://schoolstatictest.xhkjedu.com/static/" : FileToolsCommon.GetConfigValue("SchoolfileRequestAddress") + "/static/";
60
+        public static string showImageUrl = isDebug ? "http://schoolstatictest.xhkjedu.com/static/" : "http://schoolstatic.xhkjedu.com/static/";
61
 
61
 
62
         /// <summary>
62
         /// <summary>
63
         /// 认证接口地址
63
         /// 认证接口地址
64
         /// </summary>
64
         /// </summary>
65
-        public static string certapiUrl = isDebug ? "http://scapitest.xhkjedu.com" : FileToolsCommon.GetConfigValue("CertapiRequestAddress");
65
+        public static string certapiUrl = isDebug ? "http://scapitest.xhkjedu.com" : "http://scapi.xhkjedu.com";
66
 
66
 
67
         #endregion 接口地址
67
         #endregion 接口地址
68
 
68
 
110
         /// <summary>
110
         /// <summary>
111
         /// 全局页面数据变量
111
         /// 全局页面数据变量
112
         /// </summary>
112
         /// </summary>
113
-        public static readonly Model_Page PageContextData = new Model.Model_Page();
113
+        public static readonly ModelPage PageContextData = new Model.ModelPage();
114
 
114
 
115
         /// <summary>
115
         /// <summary>
116
         /// 录屏工具
116
         /// 录屏工具
152
         /// <summary>
152
         /// <summary>
153
         /// 教材列表
153
         /// 教材列表
154
         /// </summary>
154
         /// </summary>
155
-        public static List<Model_TsubjectbookList> TsubjectbookList = null;
155
+        public static List<ModelTsubjectbookList> TsubjectbookList = null;
156
 
156
 
157
         /// <summary>
157
         /// <summary>
158
         /// 章节列表
158
         /// 章节列表
159
         /// </summary>
159
         /// </summary>
160
-        public static List<Model_DirectorList> DirectorList = null;
160
+        public static List<ModelDirectorList> DirectorList = null;
161
 
161
 
162
         /// <summary>
162
         /// <summary>
163
         /// 上传个人空间 入参
163
         /// 上传个人空间 入参
164
         /// </summary>
164
         /// </summary>
165
-        public static Model_ResourceAddTwo ResourceAddTwo = null;
165
+        public static ModelResourceAddTwo ResourceAddTwo = null;
166
 
166
 
167
         /// <summary>
167
         /// <summary>
168
         /// 是否正在上传
168
         /// 是否正在上传
176
         /// <summary>
176
         /// <summary>
177
         /// 用户微课列表模型
177
         /// 用户微课列表模型
178
         /// </summary>
178
         /// </summary>
179
-        public static List<Model_WKData> WKDataList;
179
+        public static List<ModelWkData> WKDataList;
180
 
180
 
181
         /// <summary>
181
         /// <summary>
182
         /// 微课模型
182
         /// 微课模型
183
         /// </summary>
183
         /// </summary>
184
-        public static Model_WKData WKData;
184
+        public static ModelWkData WKData;
185
 
185
 
186
         /// <summary>
186
         /// <summary>
187
         /// 微课视频列表
187
         /// 微课视频列表
188
         /// </summary>
188
         /// </summary>
189
-        public static List<Model_Video> VideoList;
189
+        public static List<ModelVideo> VideoList;
190
 
190
 
191
         /// <summary>
191
         /// <summary>
192
         /// 画板模型
192
         /// 画板模型
193
         /// </summary>
193
         /// </summary>
194
-        public static List<Model_DrawData> PageDrawList = new List<Model_DrawData>();
194
+        public static List<ModelDrawData> PageDrawList = new List<ModelDrawData>();
195
 
195
 
196
         #endregion 微课数据记录
196
         #endregion 微课数据记录
197
 
197
 
319
             try
319
             try
320
             {
320
             {
321
                 UserInfo = new ModelUserInfo();
321
                 UserInfo = new ModelUserInfo();
322
-                WKDataList = new List<Model_WKData>();
323
-                VideoList = new List<Model_Video>();
322
+                WKDataList = new List<ModelWkData>();
323
+                VideoList = new List<ModelVideo>();
324
 
324
 
325
                 #region 强制以管理员方式运行 修改人:赵耀 修改时间:2020年9月7日
325
                 #region 强制以管理员方式运行 修改人:赵耀 修改时间:2020年9月7日
326
 
326
 
371
             catch (Exception ex)
371
             catch (Exception ex)
372
             {
372
             {
373
                 string errMessage = "【进程】(Main):进程意外关闭。 " + ex.Message;
373
                 string errMessage = "【进程】(Main):进程意外关闭。 " + ex.Message;
374
-                LogHelper.WriteErrLog(errMessage, ex);
374
+                LogHelper.Logerror.Error(errMessage, ex);
375
             }
375
             }
376
         }
376
         }
377
 
377
 
455
         {
455
         {
456
             try
456
             try
457
             {
457
             {
458
-                var exception = e.ExceptionObject as Exception;
459
-                if (exception != null)
458
+                if (e.ExceptionObject is Exception exception)
460
                 {
459
                 {
461
                     HandleException(exception);
460
                     HandleException(exception);
462
                 }
461
                 }
487
         private static void HandleException(Exception ex)
486
         private static void HandleException(Exception ex)
488
         {
487
         {
489
             //记录日志
488
             //记录日志
490
-            LogHelper.WriteErrLog("未捕获异常:" + ex.Message, ex);
489
+            LogHelper.Logerror.Error("未捕获异常:" + ex.Message, ex);
491
             Current.Shutdown();
490
             Current.Shutdown();
492
         }
491
         }
493
 
492
 
508
                 }
507
                 }
509
                 else
508
                 else
510
                 {
509
                 {
511
-                    WKDataList = new List<Model_WKData>();
510
+                    WKDataList = new List<ModelWkData>();
512
                 }
511
                 }
513
                 WKDataList.Add(WKData);
512
                 WKDataList.Add(WKData);
514
                 string wkDateXmlStr = XmlUtilHelper.XmlSerialize(WKDataList);
513
                 string wkDateXmlStr = XmlUtilHelper.XmlSerialize(WKDataList);
515
                 string savePath = FileToolsCommon.GetFileAbsolutePath("/Data/");
514
                 string savePath = FileToolsCommon.GetFileAbsolutePath("/Data/");
516
                 FileToolsCommon.CreateDirectory(savePath);
515
                 FileToolsCommon.CreateDirectory(savePath);
517
-                string saveName = savePath + "WkDate.d";
516
+                string saveName = savePath + "WkDate.xml";
518
                 FileToolsCommon.DeleteFile(saveName);
517
                 FileToolsCommon.DeleteFile(saveName);
519
                 FileToolsCommon.WriteText(saveName, wkDateXmlStr);
518
                 FileToolsCommon.WriteText(saveName, wkDateXmlStr);
520
             }
519
             }
521
             catch (Exception ex)
520
             catch (Exception ex)
522
             {
521
             {
523
-                LogHelper.WriteErrLog("【微课数据保存】(SaveWkData)保存失败:" + ex.Message, ex);
522
+                LogHelper.Logerror.Error("【微课数据保存】(SaveWkData)保存失败:" + ex.Message, ex);
524
             }
523
             }
525
         }
524
         }
526
 
525
 
533
             {
532
             {
534
                 string savePath = FileToolsCommon.GetFileAbsolutePath("/Data/");
533
                 string savePath = FileToolsCommon.GetFileAbsolutePath("/Data/");
535
                 FileToolsCommon.CreateDirectory(savePath);
534
                 FileToolsCommon.CreateDirectory(savePath);
536
-                string saveName = savePath + "WkDate.d";
535
+                string saveName = savePath + "WkDate.xml";
537
                 //文件若存在则读取
536
                 //文件若存在则读取
538
                 if (FileToolsCommon.IsExistFile(saveName))
537
                 if (FileToolsCommon.IsExistFile(saveName))
539
                 {
538
                 {
540
                     string wkDateXmlStr = FileToolsCommon.FileToString(saveName);
539
                     string wkDateXmlStr = FileToolsCommon.FileToString(saveName);
541
-                    WKDataList = XmlUtilHelper.DESerializer<List<Model_WKData>>(wkDateXmlStr);
542
-                    foreach (Model_WKData wklist in WKDataList)
540
+                    WKDataList = XmlUtilHelper.DESerializer<List<ModelWkData>>(wkDateXmlStr);
541
+                    foreach (ModelWkData wklist in WKDataList)
543
                     {
542
                     {
544
                         //移除找不到视频的微课数据
543
                         //移除找不到视频的微课数据
545
                         wklist.VideoList.RemoveAll(x => !FileToolsCommon.IsExistFile(x.VideoPath));
544
                         wklist.VideoList.RemoveAll(x => !FileToolsCommon.IsExistFile(x.VideoPath));
547
                     if (WKDataList.Exists(x => x.WkPath == wkPath))
546
                     if (WKDataList.Exists(x => x.WkPath == wkPath))
548
                     {
547
                     {
549
                         WKData = WKDataList.Find(x => x.WkPath == wkPath);
548
                         WKData = WKDataList.Find(x => x.WkPath == wkPath);
550
-                        VideoList = new List<Model_Video>();
549
+                        VideoList = new List<ModelVideo>();
551
                         WKData.VideoList = WKData.VideoList.Where((x, i) => WKData.VideoList.FindIndex(z => z.FileGuid == x.FileGuid) == i).ToList();
550
                         WKData.VideoList = WKData.VideoList.Where((x, i) => WKData.VideoList.FindIndex(z => z.FileGuid == x.FileGuid) == i).ToList();
552
                         VideoList = WKData.VideoList;
551
                         VideoList = WKData.VideoList;
553
                     }
552
                     }
555
             }
554
             }
556
             catch (Exception ex)
555
             catch (Exception ex)
557
             {
556
             {
558
-                LogHelper.WriteErrLog("【微课数据读取】(ReadWkData)读取失败:" + ex.Message, ex);
557
+                LogHelper.Logerror.Error("【微课数据读取】(ReadWkData)读取失败:" + ex.Message, ex);
559
             }
558
             }
560
         }
559
         }
561
 
560
 
582
             }
581
             }
583
             catch (Exception ex)
582
             catch (Exception ex)
584
             {
583
             {
585
-                LogHelper.WriteErrLog("【画板数据保存】(SaveDraw)保存失败:" + ex.Message, ex);
584
+                LogHelper.Logerror.Error("【画板数据保存】(SaveDraw)保存失败:" + ex.Message, ex);
586
             }
585
             }
587
         }
586
         }
588
 
587
 
593
         {
592
         {
594
             try
593
             try
595
             {
594
             {
596
-                PageDrawList = new List<Model_DrawData>();
595
+                PageDrawList = new List<ModelDrawData>();
597
                 string savePath = WKData.WkPath + "PageData.xml";
596
                 string savePath = WKData.WkPath + "PageData.xml";
598
                 if (FileToolsCommon.IsExistFile(savePath))
597
                 if (FileToolsCommon.IsExistFile(savePath))
599
                 {
598
                 {
600
                     string pageDataXmlStr = FileToolsCommon.FileToString(savePath);
599
                     string pageDataXmlStr = FileToolsCommon.FileToString(savePath);
601
-                    PageDrawList = XmlUtilHelper.DESerializer<List<Model_DrawData>>(pageDataXmlStr);
600
+                    PageDrawList = XmlUtilHelper.DESerializer<List<ModelDrawData>>(pageDataXmlStr);
602
                 }
601
                 }
603
                 else
602
                 else
604
                 {
603
                 {
605
-                    PageDrawList = new List<Model_DrawData>();
604
+                    PageDrawList = new List<ModelDrawData>();
606
                 }
605
                 }
607
             }
606
             }
608
             catch (Exception ex)
607
             catch (Exception ex)
609
             {
608
             {
610
-                LogHelper.WriteErrLog("【画板数据读取】(ReadDraw)读取失败:" + ex.Message, ex);
609
+                LogHelper.Logerror.Error("【画板数据读取】(ReadDraw)读取失败:" + ex.Message, ex);
611
             }
610
             }
612
         }
611
         }
613
 
612
 
629
                 string dateXmlStr = XmlUtilHelper.XmlSerialize(ServiceAddress);
628
                 string dateXmlStr = XmlUtilHelper.XmlSerialize(ServiceAddress);
630
                 string savePath = DataPath;
629
                 string savePath = DataPath;
631
                 FileToolsCommon.CreateDirectory(savePath);
630
                 FileToolsCommon.CreateDirectory(savePath);
632
-                string saveName = savePath + (isDebug ? "ServiceAddress_debug.xml" : "ServiceAddress_release.xml");
631
+                string saveName = savePath + (isDebug ? "ServiceAddressDebug.xml" : "ServiceAddressRelease.xml");
633
                 Console.WriteLine(@"保存路径为:");
632
                 Console.WriteLine(@"保存路径为:");
634
                 FileToolsCommon.DeleteFile(saveName);
633
                 FileToolsCommon.DeleteFile(saveName);
635
                 FileToolsCommon.WriteText(saveName, dateXmlStr);
634
                 FileToolsCommon.WriteText(saveName, dateXmlStr);
636
             }
635
             }
637
             catch (Exception ex)
636
             catch (Exception ex)
638
             {
637
             {
639
-                LogHelper.WriteErrLog("【服务地址存储】(SaveServiceAddressData)保存失败:" + ex.Message, ex);
638
+                LogHelper.Logerror.Error("【服务地址存储】(SaveServiceAddressData)保存失败:" + ex.Message, ex);
640
             }
639
             }
641
         }
640
         }
642
 
641
 
649
             {
648
             {
650
                 string savePath = DataPath;
649
                 string savePath = DataPath;
651
                 FileToolsCommon.CreateDirectory(savePath);
650
                 FileToolsCommon.CreateDirectory(savePath);
652
-                string saveName = savePath + (isDebug ? "ServiceAddress_debug.xml" : "ServiceAddress_release.xml");
651
+                string saveName = savePath + (isDebug ? "ServiceAddressDebug.xml" : "ServiceAddressRelease.xml");
652
+                Console.WriteLine(@"配置文件路径" + saveName);
653
                 //文件若存在则读取
653
                 //文件若存在则读取
654
                 if (FileToolsCommon.IsExistFile(saveName))
654
                 if (FileToolsCommon.IsExistFile(saveName))
655
                 {
655
                 {
656
                     string dateXmlStr = FileToolsCommon.FileToString(saveName);
656
                     string dateXmlStr = FileToolsCommon.FileToString(saveName);
657
-                    ServiceAddress = XmlUtilHelper.DESerializer<Model_ServiceAddress>(dateXmlStr);
657
+                    ServiceAddress = XmlUtilHelper.DESerializer<ModelServiceAddress>(dateXmlStr);
658
                     SwitchAddress();
658
                     SwitchAddress();
659
                 }
659
                 }
660
             }
660
             }
661
             catch (Exception ex)
661
             catch (Exception ex)
662
             {
662
             {
663
-                LogHelper.WriteErrLog("【服务地址读取】(ReadServiceAddressData)读取失败:" + ex.Message, ex);
663
+                LogHelper.Logerror.Error("【服务地址读取】(ReadServiceAddressData)读取失败:" + ex.Message, ex);
664
             }
664
             }
665
         }
665
         }
666
 
666
 
677
             }
677
             }
678
             catch (Exception ex)
678
             catch (Exception ex)
679
             {
679
             {
680
-                LogHelper.WriteErrLog("【服务地址切换】(SwitchAddress)服务复制切换失败,请求地址为空!", ex);
680
+                LogHelper.Logerror.Error("【服务地址切换】(SwitchAddress)服务复制切换失败,请求地址为空!", ex);
681
             }
681
             }
682
         }
682
         }
683
 
683
 

+ 2
- 2
XHWK.WKTool/AppUpdateWin.xaml.cs View File

16
     {
16
     {
17
         private readonly AppUpdatePageModel _pageData = new AppUpdatePageModel();
17
         private readonly AppUpdatePageModel _pageData = new AppUpdatePageModel();
18
 
18
 
19
-        public AppUpdateWin(Model_App app)
19
+        public AppUpdateWin(ModelApp app)
20
         {
20
         {
21
             InitializeComponent();
21
             InitializeComponent();
22
             _pageData.appModel = app;
22
             _pageData.appModel = app;
30
 
30
 
31
         public class AppUpdatePageModel : NotifyModel
31
         public class AppUpdatePageModel : NotifyModel
32
         {
32
         {
33
-            public Model_App appModel { get; set; }
33
+            public ModelApp appModel { get; set; }
34
         }
34
         }
35
 
35
 
36
         private void Button_Click(object sender, RoutedEventArgs e)
36
         private void Button_Click(object sender, RoutedEventArgs e)

+ 6
- 11
XHWK.WKTool/CreateAMicroLessonWindow.xaml.cs View File

249
                     App.ReadWkData(wkpath);
249
                     App.ReadWkData(wkpath);
250
                     if (App.WKData == null)
250
                     if (App.WKData == null)
251
                     {
251
                     {
252
-                        App.WKData = new Model_WKData
253
-                        {
254
-                            WkPath = wkpath,
255
-                            WkName = wkName,
256
-                            WkCreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
257
-                        };
252
+                        App.WKData = new ModelWkData { WkPath = wkpath, WkName = wkName, WkCreateDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") };
258
                     }
253
                     }
259
 
254
 
260
                     try
255
                     try
266
                     }
261
                     }
267
                     catch (Exception ex)
262
                     catch (Exception ex)
268
                     {
263
                     {
269
-                        LogHelper.WriteErrLog("【微课创建课程】文件夹创建删除失败:" + ex.Message, ex);
264
+                        LogHelper.Logerror.Error("【微课创建课程】文件夹创建删除失败:" + ex.Message, ex);
270
                     }
265
                     }
271
 
266
 
272
                     //存储文件
267
                     //存储文件
275
                 }
270
                 }
276
                 catch (Exception ex)
271
                 catch (Exception ex)
277
                 {
272
                 {
278
-                    LogHelper.WriteErrLog("【微课创建课程】读取课堂数据失败:" + ex.Message, ex);
273
+                    LogHelper.Logerror.Error("【微课创建课程】读取课堂数据失败:" + ex.Message, ex);
279
                 }
274
                 }
280
             });
275
             });
281
             if (App.W_XHMicroLessonSystemWindow == null)
276
             if (App.W_XHMicroLessonSystemWindow == null)
318
                 }
313
                 }
319
                 string url = App.apiUrl + "/sapi/apprecord/get_new";
314
                 string url = App.apiUrl + "/sapi/apprecord/get_new";
320
                 string result = ZHttpUtil.PostStr(url, "{}");
315
                 string result = ZHttpUtil.PostStr(url, "{}");
321
-                var resultObj = JsonHelper.JsonToObj<ResultVo<Model_App>>(result);
316
+                var resultObj = JsonHelper.JsonToObj<ResultVo<ModelApp>>(result);
322
                 if (result != null && resultObj.code == 0)
317
                 if (result != null && resultObj.code == 0)
323
                 {
318
                 {
324
                     if (resultObj.obj != null)
319
                     if (resultObj.obj != null)
338
                         }
333
                         }
339
                         catch (Exception ex)
334
                         catch (Exception ex)
340
                         {
335
                         {
341
-                            LogHelper.WriteErrLog("【检查更新】(getNewApp)版本号错误:" + ex.Message, ex);
336
+                            LogHelper.Logerror.Error("【检查更新】(getNewApp)版本号错误:" + ex.Message, ex);
342
                         }
337
                         }
343
                     }
338
                     }
344
                 }
339
                 }
350
         /// </summary>
345
         /// </summary>
351
         /// <param name="app">
346
         /// <param name="app">
352
         /// </param>
347
         /// </param>
353
-        private void AppUpdateShow(Model_App app)
348
+        private void AppUpdateShow(ModelApp app)
354
         {
349
         {
355
             AppUpdateWin win = new AppUpdateWin(app)
350
             AppUpdateWin win = new AppUpdateWin(app)
356
             {
351
             {

+ 13
- 15
XHWK.WKTool/DAL/DAL_Upload.cs View File

57
                     if (jo["code"]?.ToString() == "0")
57
                     if (jo["code"]?.ToString() == "0")
58
                     {
58
                     {
59
                         message = "";
59
                         message = "";
60
-
61
-                        Model.ResultVo<Model_ResourceAddTwo> resultObj =
62
-                            JsonHelper.JsonToObj<Model.ResultVo<Model_ResourceAddTwo>>(jo.ToString());
60
+                        Model.ResultVo<ModelResourceAddTwo> resultObj = JsonHelper.JsonToObj<Model.ResultVo<ModelResourceAddTwo>>(jo.ToString());
63
                         App.ResourceAddTwo = resultObj.obj;
61
                         App.ResourceAddTwo = resultObj.obj;
64
                         //已存在 不允许上传
62
                         //已存在 不允许上传
65
                         return false;
63
                         return false;
80
             }
78
             }
81
 
79
 
82
             string errMessage = "【文件是否存在】(IsUploaded):请求失败。" + message;
80
             string errMessage = "【文件是否存在】(IsUploaded):请求失败。" + message;
83
-            LogHelper.WriteErrLog(errMessage, ex);
81
+            LogHelper.Logerror.Error(errMessage, ex);
84
             return false;
82
             return false;
85
         }
83
         }
86
 
84
 
118
                         message = "无法访问文件服务器,请检查网络或文件服务器地址。";
116
                         message = "无法访问文件服务器,请检查网络或文件服务器地址。";
119
                         return false;
117
                         return false;
120
                     }
118
                     }
121
-                    Model.ResultVo<Model_ResourceAddTwo> resultObj = JsonHelper.JsonToObj<Model.ResultVo<Model_ResourceAddTwo>>(jo.ToString());
122
-                    App.ResourceAddTwo = new Model_ResourceAddTwo();
119
+                    Model.ResultVo<ModelResourceAddTwo> resultObj = JsonHelper.JsonToObj<Model.ResultVo<ModelResourceAddTwo>>(jo.ToString());
120
+                    App.ResourceAddTwo = new ModelResourceAddTwo();
123
                     //0成功,1失败
121
                     //0成功,1失败
124
                     if (resultObj.code == 0 && resultObj.obj != null)
122
                     if (resultObj.code == 0 && resultObj.obj != null)
125
                     {
123
                     {
142
             }
140
             }
143
 
141
 
144
             string errMessage = "【上报合并文件】(ReportFileMerge):请求失败。" + message;
142
             string errMessage = "【上报合并文件】(ReportFileMerge):请求失败。" + message;
145
-            LogHelper.WriteErrLog(errMessage, ex);
143
+            LogHelper.Logerror.Error(errMessage, ex);
146
             return false;
144
             return false;
147
         }
145
         }
148
 
146
 
156
             errMessage = "";
154
             errMessage = "";
157
             try
155
             try
158
             {
156
             {
159
-                Model_Video videoInfo = null;
160
-                foreach (Model_WKData vdata in App.WKDataList)
157
+                ModelVideo videoInfo = null;
158
+                foreach (ModelWkData vdata in App.WKDataList)
161
                 {
159
                 {
162
                     if (vdata.VideoList == null)
160
                     if (vdata.VideoList == null)
163
                     {
161
                     {
164
                         continue;
162
                         continue;
165
                     }
163
                     }
166
-                    foreach (Model_Video videoinfo in vdata.VideoList)
164
+                    foreach (ModelVideo videoinfo in vdata.VideoList)
167
                     {
165
                     {
168
                         if (videoinfo.FileGuid == videoGuid)
166
                         if (videoinfo.FileGuid == videoGuid)
169
                         {
167
                         {
195
             }
193
             }
196
             catch (Exception ex)
194
             catch (Exception ex)
197
             {
195
             {
198
-                LogHelper.WriteErrLog("【视频上传】(UploadVideo)视频上传失败:" + ex.Message, ex);
196
+                LogHelper.Logerror.Error("【视频上传】(UploadVideo)视频上传失败:" + ex.Message, ex);
199
             }
197
             }
200
             return false;
198
             return false;
201
         }
199
         }
210
             errMessage = "";
208
             errMessage = "";
211
             try
209
             try
212
             {
210
             {
213
-                Model_Video videoInfo = null;
214
-                foreach (Model_WKData vdata in App.WKDataList)
211
+                ModelVideo videoInfo = null;
212
+                foreach (ModelWkData vdata in App.WKDataList)
215
                 {
213
                 {
216
                     if (vdata.VideoList == null)
214
                     if (vdata.VideoList == null)
217
                     {
215
                     {
218
                         continue;
216
                         continue;
219
                     }
217
                     }
220
-                    foreach (Model_Video videoinfo in vdata.VideoList)
218
+                    foreach (ModelVideo videoinfo in vdata.VideoList)
221
                     {
219
                     {
222
                         if (videoinfo.FileGuid == videoGuid)
220
                         if (videoinfo.FileGuid == videoGuid)
223
                         {
221
                         {
384
             }
382
             }
385
             catch (Exception ex)
383
             catch (Exception ex)
386
             {
384
             {
387
-                LogHelper.WriteErrLog("【视频上传】(UploadVideo)视频上传失败:" + ex.Message, ex);
385
+                LogHelper.Logerror.Error("【视频上传】(UploadVideo)视频上传失败:" + ex.Message, ex);
388
             }
386
             }
389
             return false;
387
             return false;
390
         }
388
         }

+ 35
- 71
XHWK.WKTool/DAL/XHApi.cs View File

12
 namespace XHWK.WKTool.DAL
12
 namespace XHWK.WKTool.DAL
13
 {
13
 {
14
     using system;
14
     using system;
15
-    using VisioForge.Tools.TagLib;
16
 
15
 
17
     public class XhApi
16
     public class XhApi
18
     {
17
     {
21
         /// </summary>
20
         /// </summary>
22
         /// <returns>
21
         /// <returns>
23
         /// </returns>
22
         /// </returns>
24
-        public int ActivationAdd
25
-        (
26
-            string mac,
27
-            string device,
28
-            string projectcode
29
-        )
23
+        public int ActivationAdd(string mac, string device, string projectcode)
30
         {
24
         {
31
             try
25
             try
32
             {
26
             {
33
                 string url = App.certapiUrl + "/activation/add"; //地址
27
                 string url = App.certapiUrl + "/activation/add"; //地址
34
-                Dictionary<string, object> dic = new Dictionary<string, object>
35
-                {
36
-                    { "mac", mac },
37
-                    { "device", device },
38
-                    { "projectcode", projectcode }
39
-                };
28
+                Dictionary<string, object> dic = new Dictionary<string, object> { { "mac", mac }, { "device", device }, { "projectcode", projectcode } };
40
                 string body = JsonHelper.ToJson(dic);
29
                 string body = JsonHelper.ToJson(dic);
41
-                string xmlDoc = ZHttpUtil.PostStr(url, body);
30
+                string xmlDoc = ZHttpUtil.PostStr(url, body, false);
42
                 if (string.IsNullOrEmpty(xmlDoc))
31
                 if (string.IsNullOrEmpty(xmlDoc))
43
                 {
32
                 {
44
                     App.ServerMsg = "网络异常!";
33
                     App.ServerMsg = "网络异常!";
45
                     return 1;
34
                     return 1;
46
                 }
35
                 }
47
                 JObject obj = JObject.Parse(xmlDoc);
36
                 JObject obj = JObject.Parse(xmlDoc);
48
-                if (obj["code"].ToString().Equals("0"))
37
+                if (obj["code"] != null)
49
                 {
38
                 {
50
-                    App.Signature = obj["obj"]?.ToString();
51
-                    if (!Directory.Exists(App.DataPath))
39
+                    if (obj["code"].ToString().Equals("0"))
52
                     {
40
                     {
53
-                        Directory.CreateDirectory(App.DataPath);
41
+                        App.Signature = obj["obj"]?.ToString();
42
+                        if (!Directory.Exists(App.DataPath))
43
+                        {
44
+                            Directory.CreateDirectory(App.DataPath);
45
+                        }
46
+                        string applicationData = App.DataPath + "signature.txt";
47
+                        System.IO.File.WriteAllText(applicationData, App.Signature, Encoding.Default); //存放签名
48
+                        return 0;
54
                     }
49
                     }
55
-                    string applicationData = App.DataPath + "signature.txt";
56
-                    System.IO.File.WriteAllText
57
-                    (
58
-                        applicationData,
59
-                        App.Signature,
60
-                        Encoding.Default
61
-                    ); //存放签名
62
-                    return 0;
63
-                }
64
-                else
65
-                {
66
                     App.ServerMsg = obj["msg"]?.ToString();
50
                     App.ServerMsg = obj["msg"]?.ToString();
67
                     return Convert.ToInt32(obj["code"].ToString());
51
                     return Convert.ToInt32(obj["code"].ToString());
68
                 }
52
                 }
53
+                return 1;
69
             }
54
             }
70
             catch (Exception ex)
55
             catch (Exception ex)
71
             {
56
             {
72
                 App.ServerMsg = "网络异常!";
57
                 App.ServerMsg = "网络异常!";
73
-                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
58
+                LogHelper.Logerror.Error("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
74
                 return 1;
59
                 return 1;
75
             }
60
             }
76
         }
61
         }
87
                 string url = App.certapiUrl + "/activation/add_history";
72
                 string url = App.certapiUrl + "/activation/add_history";
88
                 Dictionary<string, object> dic = new Dictionary<string, object> { { "sign", App.Signature } };
73
                 Dictionary<string, object> dic = new Dictionary<string, object> { { "sign", App.Signature } };
89
                 string body = JsonHelper.ToJson(dic);
74
                 string body = JsonHelper.ToJson(dic);
90
-                string xmlDoc = ZHttpUtil.PostStr(url, body);
75
+                string xmlDoc = ZHttpUtil.PostStr(url, body, false);
91
                 if (string.IsNullOrEmpty(xmlDoc))
76
                 if (string.IsNullOrEmpty(xmlDoc))
92
                 {
77
                 {
93
                     return 1;
78
                     return 1;
102
             }
87
             }
103
             catch (Exception ex)
88
             catch (Exception ex)
104
             {
89
             {
105
-                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
90
+                LogHelper.Logerror.Error("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
106
                 return 1;
91
                 return 1;
107
             }
92
             }
108
         }
93
         }
114
         /// </returns>
99
         /// </returns>
115
         public int Login(string loginname, string loginpwd)
100
         public int Login(string loginname, string loginpwd)
116
         {
101
         {
117
-            Console.WriteLine(FileToolsCommon.GetConfigValue("APIRequestAddress"));
118
             string url = App.apiUrl + "/suser/user/login"; //地址
102
             string url = App.apiUrl + "/suser/user/login"; //地址
119
 
103
 
120
             //1.193.37.200
104
             //1.193.37.200
161
         public bool DownloadAvatar(string headPortrait, string savePath)
145
         public bool DownloadAvatar(string headPortrait, string savePath)
162
         {
146
         {
163
             string url = App.showImageUrl + headPortrait;
147
             string url = App.showImageUrl + headPortrait;
164
-            bool result = ZHttpUtil.GetDataGetHtml
165
-            (
166
-                url,
167
-                savePath,
168
-                ""
169
-            );
148
+            bool result = ZHttpUtil.GetDataGetHtml(url, savePath, "");
170
             return result;
149
             return result;
171
         }
150
         }
172
 
151
 
177
         /// </returns>
156
         /// </returns>
178
         public int TsubjectbookList()
157
         public int TsubjectbookList()
179
         {
158
         {
180
-            App.TsubjectbookList = new List<Model_TsubjectbookList>();
159
+            App.TsubjectbookList = new List<ModelTsubjectbookList>();
181
             try
160
             try
182
             {
161
             {
183
                 string url = App.apiUrl + "/sstudy/tsubjectbook/list"; //地址
162
                 string url = App.apiUrl + "/sstudy/tsubjectbook/list"; //地址
184
                 Dictionary<string, int> dic = new Dictionary<string, int> { { "teacherid", App.UserInfo.Userid } };
163
                 Dictionary<string, int> dic = new Dictionary<string, int> { { "teacherid", App.UserInfo.Userid } };
185
                 string body = JsonHelper.ToJson(dic);
164
                 string body = JsonHelper.ToJson(dic);
186
-                ResultVo<List<Model_TsubjectbookList>> result = ZHttpUtil.PostSignle<ResultVo<List<Model_TsubjectbookList>>>(url, postData: body);
165
+                ResultVo<List<ModelTsubjectbookList>> result = ZHttpUtil.PostSignle<ResultVo<List<ModelTsubjectbookList>>>(url, postData: body);
187
                 if (result != null)
166
                 if (result != null)
188
                 {
167
                 {
189
                     App.ServerMsg = result.msg;
168
                     App.ServerMsg = result.msg;
198
             }
177
             }
199
             catch (Exception ex)
178
             catch (Exception ex)
200
             {
179
             {
201
-                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
180
+                LogHelper.Logerror.Error("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
202
                 return 1;
181
                 return 1;
203
             }
182
             }
204
         }
183
         }
208
         /// </summary>
187
         /// </summary>
209
         /// <returns>
188
         /// <returns>
210
         /// </returns>
189
         /// </returns>
211
-        public int DirectorList
212
-        (
213
-            string lsbid,
214
-            int belong,
215
-            int createid
216
-        )
190
+        public int DirectorList(string lsbid, int belong, int createid)
217
         {
191
         {
218
-            App.DirectorList = new List<Model_DirectorList>();
192
+            App.DirectorList = new List<ModelDirectorList>();
219
             try
193
             try
220
             {
194
             {
221
                 string url = App.apiUrl + "/sstudy/director/list"; //地址
195
                 string url = App.apiUrl + "/sstudy/director/list"; //地址
222
-                Dictionary<string, string> dic = new Dictionary<string, string>
223
-                {
224
-                    { "lsbid", lsbid },
225
-                    { "belong", belong.ToString() },
226
-                    { "createid", createid.ToString() }
227
-                };
196
+                Dictionary<string, string> dic = new Dictionary<string, string> { { "lsbid", lsbid }, { "belong", belong.ToString() }, { "createid", createid.ToString() } };
228
                 string body = JsonHelper.ToJson(dic);
197
                 string body = JsonHelper.ToJson(dic);
229
-                ResultVo<List<Model_DirectorList>> result = ZHttpUtil.PostSignle<ResultVo<List<Model_DirectorList>>>(url, postData: body);
198
+                ResultVo<List<ModelDirectorList>> result = ZHttpUtil.PostSignle<ResultVo<List<ModelDirectorList>>>(url, postData: body);
230
                 if (result != null)
199
                 if (result != null)
231
                 {
200
                 {
232
                     App.ServerMsg = result.msg;
201
                     App.ServerMsg = result.msg;
241
             }
210
             }
242
             catch (Exception ex)
211
             catch (Exception ex)
243
             {
212
             {
244
-                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
213
+                LogHelper.Logerror.Error("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
245
                 return 1;
214
                 return 1;
246
             }
215
             }
247
         }
216
         }
251
         /// </summary>
220
         /// </summary>
252
         /// <returns>
221
         /// <returns>
253
         /// </returns>
222
         /// </returns>
254
-        public int ResourceAdd(Model_ResourceAdd model)
223
+        public int ResourceAdd(ModelResourceAdd model)
255
         {
224
         {
256
-            App.DirectorList = new List<Model_DirectorList>();
225
+            App.DirectorList = new List<ModelDirectorList>();
257
             try
226
             try
258
             {
227
             {
259
                 string url = App.apiUrl + "/sstudy/resource/add"; //地址
228
                 string url = App.apiUrl + "/sstudy/resource/add"; //地址
277
                     //schoolid: 12
246
                     //schoolid: 12
278
                     //suffix: "mp4"
247
                     //suffix: "mp4"
279
                     //uid: 80
248
                     //uid: 80
280
-                    { "converted", model.converted },
281
-                    { "createid", model.createid }
249
+                    { "converted", model.converted }, { "createid", model.createid }
282
                 };
250
                 };
283
-                if (model.directorid != "999999")//章节上传可以不选
251
+                if (model.directorid != "999999") //章节上传可以不选
284
                 {
252
                 {
285
                     dic.Add("directorid", model.directorid);
253
                     dic.Add("directorid", model.directorid);
286
                 }
254
                 }
300
                 dic.Add("schoolid", model.schoolid);
268
                 dic.Add("schoolid", model.schoolid);
301
                 dic.Add("suffix", model.suffix);
269
                 dic.Add("suffix", model.suffix);
302
                 //dic.Add("uid", model.uid);
270
                 //dic.Add("uid", model.uid);
303
-
304
                 string body = JsonHelper.ToJson(dic);
271
                 string body = JsonHelper.ToJson(dic);
305
                 string xmlDoc = ZHttpUtil.PostStr(url, body);
272
                 string xmlDoc = ZHttpUtil.PostStr(url, body);
306
                 JObject obj = JObject.Parse(xmlDoc);
273
                 JObject obj = JObject.Parse(xmlDoc);
310
             catch (Exception ex)
277
             catch (Exception ex)
311
             {
278
             {
312
                 App.ServerMsg = "网络异常!";
279
                 App.ServerMsg = "网络异常!";
313
-                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
280
+                LogHelper.Logerror.Error("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
314
                 return 1;
281
                 return 1;
315
             }
282
             }
316
         }
283
         }
328
             string url = App.certapiUrl + "/school/find_code"; //地址
295
             string url = App.certapiUrl + "/school/find_code"; //地址
329
             Dictionary<string, object> dic = new Dictionary<string, object> { { "schoolcode", schoolcode } };
296
             Dictionary<string, object> dic = new Dictionary<string, object> { { "schoolcode", schoolcode } };
330
             string body = JsonHelper.ToJson(dic);
297
             string body = JsonHelper.ToJson(dic);
331
-            ResultVo<Model_ServiceAddress> result = ZHttpUtil.PostSignle<ResultVo<Model_ServiceAddress>>(url, postData: body);
298
+            ResultVo<ModelServiceAddress> result = ZHttpUtil.PostSignle<ResultVo<ModelServiceAddress>>(url, body, false);
332
             if (result != null)
299
             if (result != null)
333
             {
300
             {
334
                 if (result.code == 0)
301
                 if (result.code == 0)
340
                         App.SaveServiceAddressData();
307
                         App.SaveServiceAddressData();
341
                         return true;
308
                         return true;
342
                     }
309
                     }
343
-                    else
344
-                    {
345
-                        message = "服务地址错误,请输入正确的地址!";
346
-                        return false;
347
-                    }
310
+                    message = "服务地址错误,请输入正确的地址!";
311
+                    return false;
348
                 }
312
                 }
349
                 else
313
                 else
350
                 {
314
                 {
359
             }
323
             }
360
         }
324
         }
361
     }
325
     }
362
-}
326
+}

+ 1
- 1
XHWK.WKTool/DeviceWindow.xaml.cs View File

129
             }
129
             }
130
             catch (Exception ex)
130
             catch (Exception ex)
131
             {
131
             {
132
-                LogHelper.WriteErrLog("【摄像头检测】(DeviceWindow)摄像头不可用:" + ex.Message, ex);
132
+                LogHelper.Logerror.Error("【摄像头检测】(DeviceWindow)摄像头不可用:" + ex.Message, ex);
133
             }
133
             }
134
         }
134
         }
135
 
135
 

+ 1
- 1
XHWK.WKTool/JieTuWindow.xaml.cs View File

264
             App.ImgPath = string.Empty;
264
             App.ImgPath = string.Empty;
265
             string imagePath = Path.Combine(tempPath, time + ".jpg");
265
             string imagePath = Path.Combine(tempPath, time + ".jpg");
266
             App.ImgPath = imagePath;
266
             App.ImgPath = imagePath;
267
-            //LogHelper.WriteInfoLog(imagePath);
267
+            //LogHelper.Loginfo.Info(imagePath);
268
             //this.Close();
268
             //this.Close();
269
             //string imagePath = ImageHelper.GetImagePath(out string serverSavePath);
269
             //string imagePath = ImageHelper.GetImagePath(out string serverSavePath);
270
 
270
 

+ 3
- 6
XHWK.WKTool/LoginWindow.xaml View File

213
                             Content="关闭"
213
                             Content="关闭"
214
                             Cursor="Hand"
214
                             Cursor="Hand"
215
                             FontSize="18"
215
                             FontSize="18"
216
-                            Foreground="#FFFFFF"
217
-                            IsDefault="True" />
216
+                            Foreground="#FFFFFF" />
218
 
217
 
219
                         <Button
218
                         <Button
220
                             x:Name="BtnServiceAddress"
219
                             x:Name="BtnServiceAddress"
351
                             Cursor="Hand"
350
                             Cursor="Hand"
352
                             FontSize="18"
351
                             FontSize="18"
353
                             FontWeight="Bold"
352
                             FontWeight="Bold"
354
-                            Foreground="#FFFFFF"
355
-                            IsDefault="True">
353
+                            Foreground="#FFFFFF">
356
                             <Button.Template>
354
                             <Button.Template>
357
                                 <ControlTemplate TargetType="{x:Type Button}">
355
                                 <ControlTemplate TargetType="{x:Type Button}">
358
                                     <Border
356
                                     <Border
384
                             Cursor="Hand"
382
                             Cursor="Hand"
385
                             FontSize="18"
383
                             FontSize="18"
386
                             FontWeight="Bold"
384
                             FontWeight="Bold"
387
-                            Foreground="#FFFFFF"
388
-                            IsDefault="True">
385
+                            Foreground="#FFFFFF">
389
                             <Button.Template>
386
                             <Button.Template>
390
                                 <ControlTemplate TargetType="{x:Type Button}">
387
                                 <ControlTemplate TargetType="{x:Type Button}">
391
                                     <Border
388
                                     <Border

+ 31
- 43
XHWK.WKTool/MainWindow.xaml.cs View File

64
 
64
 
65
         private System.Windows.Forms.DialogResult _result;
65
         private System.Windows.Forms.DialogResult _result;
66
         private System.Windows.Forms.DialogResult _result2;
66
         private System.Windows.Forms.DialogResult _result2;
67
-        private Model_Video _videoInfo;
67
+        private ModelVideo _videoInfo;
68
 
68
 
69
         //定义委托
69
         //定义委托
70
         public delegate void ChangeTextHandler(string text);
70
         public delegate void ChangeTextHandler(string text);
77
         /// <summary>
77
         /// <summary>
78
         /// 视频模型
78
         /// 视频模型
79
         /// </summary>
79
         /// </summary>
80
-        private List<Model_Video> _modelVideoList;
80
+        private List<ModelVideo> _modelVideoList;
81
 
81
 
82
         #endregion 上传
82
         #endregion 上传
83
 
83
 
114
             DataContext = App.PageContextData;
114
             DataContext = App.PageContextData;
115
 
115
 
116
             //APP.SaveDraw();//画板模型第一页初始化
116
             //APP.SaveDraw();//画板模型第一页初始化
117
-            App.PageDrawList = new List<Model_DrawData>();
118
-            Model_DrawData modelDrawData = new Model_DrawData { PageNum = App.PageContextData.currpage };
117
+            App.PageDrawList = new List<ModelDrawData>();
118
+            ModelDrawData modelDrawData = new ModelDrawData { PageNum = App.PageContextData.currpage };
119
             App.PageDrawList.Add(modelDrawData);
119
             App.PageDrawList.Add(modelDrawData);
120
             Txbv.Text = (App.isDebug ? "测试版" : "正式版") + " v" + FileToolsCommon.GetConfigValue("VersionName");
120
             Txbv.Text = (App.isDebug ? "测试版" : "正式版") + " v" + FileToolsCommon.GetConfigValue("VersionName");
121
             TxbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoType");
121
             TxbStoragePath.Content = FileToolsCommon.GetConfigValue("VideoType");
492
             }
492
             }
493
             catch (Exception ex)
493
             catch (Exception ex)
494
             {
494
             {
495
-                LogHelper.WriteErrLog("XHMicroLessonSystemWindow(设置保存事件报错:)" + ex.Message, ex);
495
+                LogHelper.Logerror.Error("XHMicroLessonSystemWindow(设置保存事件报错:)" + ex.Message, ex);
496
             }
496
             }
497
         }
497
         }
498
 
498
 
696
             ImgPpt.Source = null;
696
             ImgPpt.Source = null;
697
             if (App.PageContextData.pagenum == 1)
697
             if (App.PageContextData.pagenum == 1)
698
             {
698
             {
699
-                App.PageDrawList = new List<Model_DrawData>();
699
+                App.PageDrawList = new List<ModelDrawData>();
700
             }
700
             }
701
             //画板模型增加一页
701
             //画板模型增加一页
702
-            Model_DrawData modelDrawData = new Model_DrawData { PageNum = App.PageContextData.currpage };
702
+            ModelDrawData modelDrawData = new ModelDrawData { PageNum = App.PageContextData.currpage };
703
             App.PageDrawList.Add(modelDrawData);
703
             App.PageDrawList.Add(modelDrawData);
704
             if (_recordType == 0)
704
             if (_recordType == 0)
705
             {
705
             {
739
                         }
739
                         }
740
                         catch (Exception ex)
740
                         catch (Exception ex)
741
                         {
741
                         {
742
-                            LogHelper.WriteErrLog("获取进程失败," + ex.Message, ex);
742
+                            LogHelper.Logerror.Error("获取进程失败," + ex.Message, ex);
743
                         }
743
                         }
744
                         App.SaveWkData();
744
                         App.SaveWkData();
745
                         App.SaveDraw();
745
                         App.SaveDraw();
749
                 }
749
                 }
750
                 catch (Exception ex)
750
                 catch (Exception ex)
751
                 {
751
                 {
752
-                    LogHelper.WriteErrLog("关闭微课失败," + ex.Message, ex);
752
+                    LogHelper.Logerror.Error("关闭微课失败," + ex.Message, ex);
753
                     Close();
753
                     Close();
754
                     Application.Current.Shutdown();
754
                     Application.Current.Shutdown();
755
                     _tmc.TmatrixUninitialize();
755
                     _tmc.TmatrixUninitialize();
1327
             }
1327
             }
1328
             catch (Exception ex)
1328
             catch (Exception ex)
1329
             {
1329
             {
1330
-                LogHelper.WriteErrLog("【导入(BtnImport_Click)" + ex.Message, ex);
1330
+                LogHelper.Logerror.Error("【导入(BtnImport_Click)" + ex.Message, ex);
1331
             }
1331
             }
1332
         }
1332
         }
1333
 
1333
 
1439
                     }
1439
                     }
1440
                     else
1440
                     else
1441
                     {
1441
                     {
1442
-                        Model_DrawData modelDrawData = new Model_DrawData
1443
-                        {
1444
-                            PageImagePath = App.ImgPath,
1445
-                            PdfImagePath = App.ImgPath
1446
-                        };
1442
+                        ModelDrawData modelDrawData = new ModelDrawData { PageImagePath = App.ImgPath, PdfImagePath = App.ImgPath };
1447
                         App.PageDrawList.Add(modelDrawData);
1443
                         App.PageDrawList.Add(modelDrawData);
1448
                     }
1444
                     }
1449
                     if (App.PageDrawList.Count >= App.PageContextData.currpage && !string.IsNullOrWhiteSpace(App.PageDrawList[App.PageContextData.currpage - 1].PageImagePath))
1445
                     if (App.PageDrawList.Count >= App.PageContextData.currpage && !string.IsNullOrWhiteSpace(App.PageDrawList[App.PageContextData.currpage - 1].PageImagePath))
1597
                                             }
1593
                                             }
1598
                                             else
1594
                                             else
1599
                                             {
1595
                                             {
1600
-                                                Model_DrawData modelDrawData = new Model_DrawData
1596
+                                                ModelDrawData modelDrawData = new ModelDrawData
1601
                                                 {
1597
                                                 {
1602
                                                     PageImagePath = page[i - App.PageContextData.pagenum],
1598
                                                     PageImagePath = page[i - App.PageContextData.pagenum],
1603
                                                     PdfImagePath = page[i - App.PageContextData.pagenum],
1599
                                                     PdfImagePath = page[i - App.PageContextData.pagenum],
1662
                                         MessageWindow.Show("无法访问文件,请检查文件是否有效或解除文件占用!");
1658
                                         MessageWindow.Show("无法访问文件,请检查文件是否有效或解除文件占用!");
1663
                                     }
1659
                                     }
1664
                                 );
1660
                                 );
1665
-                                LogHelper.WriteErrLog("【打开ppt】(OpenDialog PPT)" + ex.Message, ex);
1661
+                                LogHelper.Logerror.Error("【打开ppt】(OpenDialog PPT)" + ex.Message, ex);
1666
                             }
1662
                             }
1667
                         }
1663
                         }
1668
                         else if (type.Contains("typepdf"))
1664
                         else if (type.Contains("typepdf"))
1735
                                             }
1731
                                             }
1736
                                             else
1732
                                             else
1737
                                             {
1733
                                             {
1738
-                                                Model_DrawData modelDrawData = new Model_DrawData
1734
+                                                ModelDrawData modelDrawData = new ModelDrawData
1739
                                                 {
1735
                                                 {
1740
                                                     PageImagePath = page[i - App.PageContextData.pagenum],
1736
                                                     PageImagePath = page[i - App.PageContextData.pagenum],
1741
                                                     PdfImagePath = page[i - App.PageContextData.pagenum],
1737
                                                     PdfImagePath = page[i - App.PageContextData.pagenum],
1787
                                         MessageWindow.Show(ex.Message);
1783
                                         MessageWindow.Show(ex.Message);
1788
                                     }
1784
                                     }
1789
                                 );
1785
                                 );
1790
-                                LogHelper.WriteErrLog("【打开pdf】(OpenDialog pdf)" + ex.Message, ex);
1786
+                                LogHelper.Logerror.Error("【打开pdf】(OpenDialog pdf)" + ex.Message, ex);
1791
                             }
1787
                             }
1792
                         }
1788
                         }
1793
                         else if (imagelist.Contains(filesuff)) //导入图片
1789
                         else if (imagelist.Contains(filesuff)) //导入图片
1841
                                     }
1837
                                     }
1842
                                     else
1838
                                     else
1843
                                     {
1839
                                     {
1844
-                                        Model_DrawData modelDrawData = new Model_DrawData
1845
-                                        {
1846
-                                            PageImagePath = App.ImgPath,
1847
-                                            PdfImagePath = App.ImgPath
1848
-                                        };
1840
+                                        ModelDrawData modelDrawData = new ModelDrawData { PageImagePath = App.ImgPath, PdfImagePath = App.ImgPath };
1849
                                         App.PageDrawList.Add(modelDrawData);
1841
                                         App.PageDrawList.Add(modelDrawData);
1850
                                     }
1842
                                     }
1851
                                     if (App.PageDrawList.Count >= App.PageContextData.currpage && !string.IsNullOrWhiteSpace(App.PageDrawList[App.PageContextData.currpage - 1].PageImagePath))
1843
                                     if (App.PageDrawList.Count >= App.PageContextData.currpage && !string.IsNullOrWhiteSpace(App.PageDrawList[App.PageContextData.currpage - 1].PageImagePath))
1912
                                             }
1904
                                             }
1913
                                             else
1905
                                             else
1914
                                             {
1906
                                             {
1915
-                                                Model_DrawData modelDrawData = new Model_DrawData
1907
+                                                ModelDrawData modelDrawData = new ModelDrawData
1916
                                                 {
1908
                                                 {
1917
                                                     PageImagePath = page[i - App.PageContextData.pagenum],
1909
                                                     PageImagePath = page[i - App.PageContextData.pagenum],
1918
                                                     PdfImagePath = page[i - App.PageContextData.pagenum],
1910
                                                     PdfImagePath = page[i - App.PageContextData.pagenum],
1964
                                         MessageWindow.Show("无法访问文件,请检查文件是否有效或解除文件占用!");
1956
                                         MessageWindow.Show("无法访问文件,请检查文件是否有效或解除文件占用!");
1965
                                     }
1957
                                     }
1966
                                 );
1958
                                 );
1967
-                                LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
1959
+                                LogHelper.Logerror.Error("【XHMicroLessonSystemWindow】(OpenDialog 导入文档)" + ex.Message, ex);
1968
                             }
1960
                             }
1969
                         }
1961
                         }
1970
                     }
1962
                     }
2053
         {
2045
         {
2054
             try
2046
             try
2055
             {
2047
             {
2056
-                _modelVideoList = new List<Model_Video>();
2057
-                foreach (Model_WKData vdata in App.WKDataList)
2048
+                _modelVideoList = new List<ModelVideo>();
2049
+                foreach (ModelWkData vdata in App.WKDataList)
2058
                 {
2050
                 {
2059
                     #region 计时器初始化
2051
                     #region 计时器初始化
2060
 
2052
 
2062
                     {
2054
                     {
2063
                         continue;
2055
                         continue;
2064
                     }
2056
                     }
2065
-                    foreach (Model_Video videoinfo in vdata.VideoList)
2057
+                    foreach (ModelVideo videoinfo in vdata.VideoList)
2066
                     {
2058
                     {
2067
                         try
2059
                         try
2068
                         {
2060
                         {
2079
                         }
2071
                         }
2080
                         catch (Exception ex)
2072
                         catch (Exception ex)
2081
                         {
2073
                         {
2082
-                            LogHelper.WriteErrLog("【加载视频列表】(LoadingVideoList)" + ex.Message, ex);
2074
+                            LogHelper.Logerror.Error("【加载视频列表】(LoadingVideoList)" + ex.Message, ex);
2083
                         }
2075
                         }
2084
                     }
2076
                     }
2085
 
2077
 
2093
             }
2085
             }
2094
             catch (Exception ex)
2086
             catch (Exception ex)
2095
             {
2087
             {
2096
-                LogHelper.WriteErrLog("【加载视频列表】(LoadingVideoList)" + ex.Message, ex);
2088
+                LogHelper.Logerror.Error("【加载视频列表】(LoadingVideoList)" + ex.Message, ex);
2097
             }
2089
             }
2098
         }
2090
         }
2099
 
2091
 
2771
                         }
2763
                         }
2772
                         catch (Exception ex)
2764
                         catch (Exception ex)
2773
                         {
2765
                         {
2774
-                            LogHelper.WriteErrLog("录制生成缩略图", ex);
2766
+                            LogHelper.Logerror.Error("录制生成缩略图", ex);
2775
                         }
2767
                         }
2776
                         if (!App.VideoList.Exists(x => x.FileGuid == _videoInfo.FileGuid) || !App.VideoList.Exists(x => x.VideoPath == _videoInfo.VideoPath))
2768
                         if (!App.VideoList.Exists(x => x.FileGuid == _videoInfo.FileGuid) || !App.VideoList.Exists(x => x.VideoPath == _videoInfo.VideoPath))
2777
                         {
2769
                         {
2786
                         }
2778
                         }
2787
                         catch (Exception ex)
2779
                         catch (Exception ex)
2788
                         {
2780
                         {
2789
-                            LogHelper.WriteErrLog("删除录制临时文件", ex);
2781
+                            LogHelper.Logerror.Error("删除录制临时文件", ex);
2790
                         }
2782
                         }
2791
                     }
2783
                     }
2792
                     catch (Exception ex)
2784
                     catch (Exception ex)
2842
             }
2834
             }
2843
             catch (Exception ex)
2835
             catch (Exception ex)
2844
             {
2836
             {
2845
-                LogHelper.WriteErrLog("【录制】(Timer_Elapsed)生成图片错误:" + ex.Message, ex);
2837
+                LogHelper.Logerror.Error("【录制】(Timer_Elapsed)生成图片错误:" + ex.Message, ex);
2846
             }
2838
             }
2847
         }
2839
         }
2848
 
2840
 
2858
                 {
2850
                 {
2859
                     //电子版切换笔模式
2851
                     //电子版切换笔模式
2860
                     _luoBoPenUtil.lb_device_hand();
2852
                     _luoBoPenUtil.lb_device_hand();
2861
-                    _videoInfo = new Model_Video
2862
-                    {
2863
-                        VideoType = (Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType")),
2864
-                        WkType = Enum_WKVidetype.RecordingLessons
2865
-                    };
2853
+                    _videoInfo = new ModelVideo { VideoType = (EnumVideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType")), WkType = EnumWkVidetype.RecordingLessons };
2866
                     FileToolsCommon.DeleteDirectory(App.WKData.WkPath + "temp/");
2854
                     FileToolsCommon.DeleteDirectory(App.WKData.WkPath + "temp/");
2867
                     FileToolsCommon.CreateDirectory(App.WKData.WkPath);
2855
                     FileToolsCommon.CreateDirectory(App.WKData.WkPath);
2868
                     _videoSavePathName = App.WKData.WkPath + App.WKData.WkName + "_录制." + _videoInfo.VideoType.ToString();
2856
                     _videoSavePathName = App.WKData.WkPath + App.WKData.WkName + "_录制." + _videoInfo.VideoType.ToString();
3542
                 if (keyCheckResult.Substring(0, 1) == "1")
3530
                 if (keyCheckResult.Substring(0, 1) == "1")
3543
                 {
3531
                 {
3544
                     MessageWindow.Show("打印服务授权过期,请联系厂家更换授权!");
3532
                     MessageWindow.Show("打印服务授权过期,请联系厂家更换授权!");
3545
-                    LogHelper.WriteErrLog("打印服务授权过期:" + keyCheckResult, null);
3533
+                    LogHelper.Logerror.Error("打印服务授权过期:" + keyCheckResult, null);
3546
                     _gbInitDone = false;
3534
                     _gbInitDone = false;
3547
                 }
3535
                 }
3548
             }
3536
             }
3549
             catch (Exception ex)
3537
             catch (Exception ex)
3550
             {
3538
             {
3551
-                LogHelper.WriteErrLog("打印服务授权失败:" + ex.Message, ex);
3539
+                LogHelper.Logerror.Error("打印服务授权失败:" + ex.Message, ex);
3552
                 MessageWindow.Show("打印服务授权失败,请联系厂家!");
3540
                 MessageWindow.Show("打印服务授权失败,请联系厂家!");
3553
                 _gbInitDone = false;
3541
                 _gbInitDone = false;
3554
             }
3542
             }
3688
             }
3676
             }
3689
             catch (Exception ex)
3677
             catch (Exception ex)
3690
             {
3678
             {
3691
-                LogHelper.WriteErrLog("【截图合成】(MergerImg)图片合成失败:" + ex.Message, ex);
3679
+                LogHelper.Logerror.Error("【截图合成】(MergerImg)图片合成失败:" + ex.Message, ex);
3692
                 return false;
3680
                 return false;
3693
             }
3681
             }
3694
         }
3682
         }
3829
                         MessageWindow.Show(ex.Message);
3817
                         MessageWindow.Show(ex.Message);
3830
                     }
3818
                     }
3831
                 );
3819
                 );
3832
-                LogHelper.WriteErrLog("打印转换PDF失败,原因:" + ex.Message, ex);
3820
+                LogHelper.Logerror.Error("打印转换PDF失败,原因:" + ex.Message, ex);
3833
             }
3821
             }
3834
             //PDF位置
3822
             //PDF位置
3835
             string sourcePath = printModel.filepath;
3823
             string sourcePath = printModel.filepath;

XHWK.Model/ComboBoxBean.cs → XHWK.WKTool/Models/ComboBoxBean.cs View File


XHWK.Model/Model_App.cs → XHWK.WKTool/Models/ModelApp.cs View File

1
 namespace XHWK.Model
1
 namespace XHWK.Model
2
 {
2
 {
3
-    public class Model_App
3
+    public class ModelApp
4
     {
4
     {
5
         public int versionid { get; set; }
5
         public int versionid { get; set; }
6
 
6
 

XHWK.Model/Model_Canvas.cs → XHWK.WKTool/Models/ModelCanvas.cs View File

1
 namespace XHWK.Model
1
 namespace XHWK.Model
2
 {
2
 {
3
-    public class Model_Canvas : NotifyModel
3
+    public class ModelCanvas : NotifyModel
4
     {
4
     {
5
         private string _name;
5
         private string _name;
6
 
6
 

XHWK.Model/Model_DirectorList.cs → XHWK.WKTool/Models/ModelDirectorList.cs View File

2
 
2
 
3
 namespace XHWK.Model
3
 namespace XHWK.Model
4
 {
4
 {
5
-    public class Model_DirectorList
5
+    public class ModelDirectorList
6
     {
6
     {
7
         /// <summary>
7
         /// <summary>
8
         /// id
8
         /// id
77
         /// <summary>
77
         /// <summary>
78
         /// 子章节
78
         /// 子章节
79
         /// </summary>
79
         /// </summary>
80
-        public List<Model_DirectorList> children { get; set; }
80
+        public List<ModelDirectorList> children { get; set; }
81
 
81
 
82
         /// <summary>
82
         /// <summary>
83
         /// 章节归属级别
83
         /// 章节归属级别

XHWK.Model/Model_DrawData.cs → XHWK.WKTool/Models/ModelDrawData.cs View File

5
     /// <summary>
5
     /// <summary>
6
     /// 画板模型
6
     /// 画板模型
7
     /// </summary>
7
     /// </summary>
8
-    public class Model_DrawData
8
+    public class ModelDrawData
9
     {
9
     {
10
-        private int _PageNum;
10
+        private int _pageNum;
11
         private string _pageCode;
11
         private string _pageCode;
12
         private string _pageImagePath;
12
         private string _pageImagePath;
13
-        private TranslateTransform _ImageLocation = new TranslateTransform(0, 0);
13
+
14
+        private TranslateTransform _imageLocation = new TranslateTransform(0, 0);
15
+
14
         //private ScaleTransform _ImageSize = new ScaleTransform(0, 0);
16
         //private ScaleTransform _ImageSize = new ScaleTransform(0, 0);
15
-        private ScaleTransform _ImageSizes = new ScaleTransform(0, 0);
16
-        private bool _IsImageLocation;
17
+        private ScaleTransform _imageSizes = new ScaleTransform(0, 0);
18
+
19
+        private bool _isImageLocation;
20
+
17
         //private string _PenColor;
21
         //private string _PenColor;
18
         //private int _PenWigth;
22
         //private int _PenWigth;
19
         //private List<PointF> _Handwriting;
23
         //private List<PointF> _Handwriting;
20
         private string _pdfImagePath;
24
         private string _pdfImagePath;
21
         private bool _imgDocumentation;
25
         private bool _imgDocumentation;
22
         private string _type;
26
         private string _type;
27
+
23
         /// <summary>
28
         /// <summary>
24
         /// 页码
29
         /// 页码
25
         /// </summary>
30
         /// </summary>
26
-        public int PageNum { get => _PageNum; set => _PageNum = value; }
31
+        public int PageNum { get => _pageNum; set => _pageNum = value; }
32
+
27
         /// <summary>
33
         /// <summary>
28
         /// 页编号
34
         /// 页编号
29
         /// </summary>
35
         /// </summary>
32
         /// 页面图片路径
38
         /// 页面图片路径
33
         /// </summary>
39
         /// </summary>
34
         public string PageImagePath { get => _pageImagePath; set => _pageImagePath = value; }
40
         public string PageImagePath { get => _pageImagePath; set => _pageImagePath = value; }
41
+
35
         /// <summary>
42
         /// <summary>
36
         /// 图片坐标
43
         /// 图片坐标
37
         /// </summary>
44
         /// </summary>
38
-        public TranslateTransform ImageLocation { get => _ImageLocation; set => _ImageLocation = value; }
45
+        public TranslateTransform ImageLocation { get => _imageLocation; set => _imageLocation = value; }
46
+
39
         ///// <summary>
47
         ///// <summary>
40
         ///// 图片大小
48
         ///// 图片大小
41
         ///// </summary>
49
         ///// </summary>
44
         /// PDF 图片路径
52
         /// PDF 图片路径
45
         /// </summary>
53
         /// </summary>
46
         public string PdfImagePath { get => _pdfImagePath; set => _pdfImagePath = value; }
54
         public string PdfImagePath { get => _pdfImagePath; set => _pdfImagePath = value; }
55
+
47
         /// <summary>
56
         /// <summary>
48
         /// 坐标是否固定
57
         /// 坐标是否固定
49
         /// </summary>
58
         /// </summary>
50
-        public bool IsImageLocation { get => _IsImageLocation; set => _IsImageLocation = value; }
59
+        public bool IsImageLocation { get => _isImageLocation; set => _isImageLocation = value; }
60
+
51
         /// <summary>
61
         /// <summary>
52
         /// true 文档图片  folse 截图图片
62
         /// true 文档图片  folse 截图图片
53
         /// </summary>
63
         /// </summary>
54
         public bool ImgDocumentation { get => _imgDocumentation; set => _imgDocumentation = value; }
64
         public bool ImgDocumentation { get => _imgDocumentation; set => _imgDocumentation = value; }
55
-        public ScaleTransform ImageSizes { get => _ImageSizes; set => _ImageSizes = value; }
65
+
66
+        public ScaleTransform ImageSizes { get => _imageSizes; set => _imageSizes = value; }
67
+
56
         /// <summary>
68
         /// <summary>
57
         /// ppt word
69
         /// ppt word
58
         /// </summary>
70
         /// </summary>

XHWK.Model/Model_Page.cs → XHWK.WKTool/Models/ModelPage.cs View File

2
 
2
 
3
 namespace XHWK.Model
3
 namespace XHWK.Model
4
 {
4
 {
5
-    public class Model_Page : NotifyModel
5
+    public class ModelPage : NotifyModel
6
     {
6
     {
7
-        public ObservableCollection<Model_Canvas> menuList { get; set; }
7
+        public ObservableCollection<ModelCanvas> menuList { get; set; }
8
 
8
 
9
         /// <summary>
9
         /// <summary>
10
         /// 总页码
10
         /// 总页码
11
         /// </summary>
11
         /// </summary>
12
-        private int _pagenum = 0;
12
+        private int _pagenum;
13
 
13
 
14
         /// <summary>
14
         /// <summary>
15
         /// 总页码
15
         /// 总页码
23
         /// <summary>
23
         /// <summary>
24
         /// 当前页 从1开始
24
         /// 当前页 从1开始
25
         /// </summary>
25
         /// </summary>
26
-        private int _currpage = 0;// 从1开始
26
+        private int _currpage; // 从1开始
27
 
27
 
28
         /// <summary>
28
         /// <summary>
29
         /// 当前页 从1开始
29
         /// 当前页 从1开始
34
             set { _currpage = value; OnPropertyChanged("currpage"); }
34
             set { _currpage = value; OnPropertyChanged("currpage"); }
35
         }
35
         }
36
 
36
 
37
-        public Model_Page()
37
+        public ModelPage()
38
         {
38
         {
39
-            menuList = new ObservableCollection<Model_Canvas>();
39
+            menuList = new ObservableCollection<ModelCanvas>();
40
         }
40
         }
41
 
41
 
42
         /// <summary>
42
         /// <summary>

XHWK.Model/Model_ResourceAdd.cs → XHWK.WKTool/Models/ModelResourceAdd.cs View File

1
 namespace XHWK.Model
1
 namespace XHWK.Model
2
 {
2
 {
3
-    public class Model_ResourceAdd
3
+    public class ModelResourceAdd
4
     {
4
     {
5
         //        converted: 0
5
         //        converted: 0
6
         //createid: 80
6
         //createid: 80

XHWK.Model/Model_ResourceAddTwo.cs → XHWK.WKTool/Models/ModelResourceAddTwo.cs View File

1
 namespace XHWK.Model
1
 namespace XHWK.Model
2
 {
2
 {
3
-    public class Model_ResourceAddTwo
3
+    public class ModelResourceAddTwo
4
     {
4
     {
5
         public string videopath { get; set; }
5
         public string videopath { get; set; }
6
         public string coverpath { get; set; }
6
         public string coverpath { get; set; }

XHWK.Model/Model_Screenshot.cs → XHWK.WKTool/Models/ModelScreenshot.cs View File

1
 namespace XHWK.Model
1
 namespace XHWK.Model
2
 {
2
 {
3
-    public class Model_Screenshot
3
+    public class ModelScreenshot
4
     {
4
     {
5
         private string _imgPath;
5
         private string _imgPath;
6
         private int _subscript;
6
         private int _subscript;

XHWK.Model/Model_ServiceAddress.cs → XHWK.WKTool/Models/ModelServiceAddress.cs View File

1
-using System;
2
-using System.Collections.Generic;
3
-using System.Linq;
4
-using System.Text;
5
-using System.Threading.Tasks;
6
-
7
-namespace XHWK.Model
1
+namespace XHWK.Model
8
 {
2
 {
9
     /// <summary>
3
     /// <summary>
10
     /// 服务地址模型
4
     /// 服务地址模型
11
     /// </summary>
5
     /// </summary>
12
-    public class Model_ServiceAddress
6
+    public class ModelServiceAddress
13
     {
7
     {
14
         public string id;
8
         public string id;
15
         public string createname;
9
         public string createname;

XHWK.Model/Model_Signatures.cs → XHWK.WKTool/Models/ModelSignatures.cs View File

1
 namespace XHWK.Model
1
 namespace XHWK.Model
2
 {
2
 {
3
-    public class Model_Signatures
3
+    public class ModelSignatures
4
     {
4
     {
5
 
5
 
6
         /// <summary>
6
         /// <summary>

XHWK.Model/Model_TmatrixCode.cs → XHWK.WKTool/Models/ModelTmatrixCode.cs View File

3
 namespace XHWK.Model
3
 namespace XHWK.Model
4
 {
4
 {
5
     #region 铺码模型
5
     #region 铺码模型
6
+
6
     /// <summary>
7
     /// <summary>
7
     /// TQL铺码模型
8
     /// TQL铺码模型
8
     /// </summary>
9
     /// </summary>
9
-    public class Model_TmatrixCode
10
+    public class ModelTmatrixCode
10
     {
11
     {
11
         /// <summary>
12
         /// <summary>
12
         /// 返回标志
13
         /// 返回标志
44
         /// 铺码文件使用的 bookId
45
         /// 铺码文件使用的 bookId
45
         /// </summary>
46
         /// </summary>
46
         public string bookId { get; set; }
47
         public string bookId { get; set; }
48
+
47
         /// <summary>
49
         /// <summary>
48
         /// 铺码文件的 page 信息
50
         /// 铺码文件的 page 信息
49
         /// </summary>
51
         /// </summary>
50
-        public List<Model_PageInfoItem> pageInfo { get; set; }
51
-
52
+        public List<ModelPageInfoItem> pageInfo { get; set; }
52
     }
53
     }
54
+
53
     /// <summary>
55
     /// <summary>
54
     /// PDF页码对应铺码ID
56
     /// PDF页码对应铺码ID
55
     /// </summary>
57
     /// </summary>
56
-    public class Model_PageInfoItem
58
+    public class ModelPageInfoItem
57
     {
59
     {
58
         /// <summary>
60
         /// <summary>
59
         /// Pdf 文件页码
61
         /// Pdf 文件页码
68
     #endregion
70
     #endregion
69
 
71
 
70
     #region 查询进度
72
     #region 查询进度
73
+
71
     /// <summary>
74
     /// <summary>
72
     /// 进度查询
75
     /// 进度查询
73
     /// </summary>
76
     /// </summary>
74
-    public class Model_ScheduleQuery
77
+    public class ModelScheduleQuery
75
     {
78
     {
76
         /// <summary>
79
         /// <summary>
77
         /// 结果
80
         /// 结果
81
         /// 消息
84
         /// 消息
82
         /// </summary>
85
         /// </summary>
83
         public string message { get; set; }
86
         public string message { get; set; }
87
+
84
         /// <summary>
88
         /// <summary>
85
         /// 进度列表
89
         /// 进度列表
86
         /// </summary>
90
         /// </summary>
87
-        public List<Model_ScheduleQueryState> list { get; set; }
91
+        public List<ModelScheduleQueryState> list { get; set; }
88
     }
92
     }
93
+
89
     /// <summary>
94
     /// <summary>
90
     /// 查询状态
95
     /// 查询状态
91
     /// </summary>
96
     /// </summary>
92
-    public class Model_ScheduleQueryState
97
+    public class ModelScheduleQueryState
93
     {
98
     {
94
         /// <summary>
99
         /// <summary>
95
         /// 铺码 ID
100
         /// 铺码 ID
107
     #endregion
112
     #endregion
108
 
113
 
109
     #region 历史查询
114
     #region 历史查询
115
+
110
     /// <summary>
116
     /// <summary>
111
     /// 历史查询模型
117
     /// 历史查询模型
112
     /// </summary>
118
     /// </summary>
113
-    public class Model_HistoryQuery
119
+    public class ModelHistoryQuery
114
     {
120
     {
115
         /// <summary>
121
         /// <summary>
116
         /// 返回标志
122
         /// 返回标志
120
         /// 返回标志说明
126
         /// 返回标志说明
121
         /// </summary>
127
         /// </summary>
122
         public string message { get; set; }
128
         public string message { get; set; }
129
+
123
         /// <summary>
130
         /// <summary>
124
         /// 历史数据列表数组
131
         /// 历史数据列表数组
125
         /// </summary>
132
         /// </summary>
126
-        public List<Model_HistoryPageList> pageList { get; set; }
133
+        public List<ModelHistoryPageList> pageList { get; set; }
127
     }
134
     }
135
+
128
     /// <summary>
136
     /// <summary>
129
     /// 历史数据列表
137
     /// 历史数据列表
130
     /// </summary>
138
     /// </summary>
131
-    public class Model_HistoryPageList
139
+    public class ModelHistoryPageList
132
     {
140
     {
133
         /// <summary>
141
         /// <summary>
134
         /// 页码 ID
142
         /// 页码 ID
135
         /// </summary>
143
         /// </summary>
136
         public string pageIndex { get; set; }
144
         public string pageIndex { get; set; }
145
+
137
         /// <summary>
146
         /// <summary>
138
         /// 历史数据 pdf 文档详情数组
147
         /// 历史数据 pdf 文档详情数组
139
         /// </summary>
148
         /// </summary>
140
-        public List<Model_HistoryListItem> list { get; set; }
149
+        public List<ModelHistoryListItem> list { get; set; }
141
     }
150
     }
151
+
142
     /// <summary>
152
     /// <summary>
143
     /// 历史信息
153
     /// 历史信息
144
     /// </summary>
154
     /// </summary>
145
-    public class Model_HistoryListItem
155
+    public class ModelHistoryListItem
146
     {
156
     {
147
         /// <summary>
157
         /// <summary>
148
         /// 铺码 ID
158
         /// 铺码 ID
178
         public string url { get; set; }
188
         public string url { get; set; }
179
     }
189
     }
180
     #endregion
190
     #endregion
181
-    public enum Enum_StatetType
191
+
192
+    public enum EnumStatetType
182
     {
193
     {
183
         //1000 操作成功
194
         //1000 操作成功
184
         //1001 打开数据库失败
195
         //1001 打开数据库失败
191
         //1008 接口错误
202
         //1008 接口错误
192
         //1009 UserID 错误
203
         //1009 UserID 错误
193
         //1010 未查到该历史数据
204
         //1010 未查到该历史数据
194
-
195
     }
205
     }
196
 }
206
 }

+ 54
- 0
XHWK.WKTool/Models/ModelTsubjectbookList.cs View File

1
+namespace XHWK.Model
2
+{
3
+    public class ModelTsubjectbookList
4
+    {
5
+        private string _tbid;
6
+        private string _lsbid;
7
+        private string _selected;
8
+        private string _subjectid;
9
+        private string _subjectname;
10
+        private string _lsbname;
11
+        private string _coverpath;
12
+        private string _versionname;
13
+
14
+        /// <summary>
15
+        /// 教师教材关系id
16
+        /// </summary>
17
+        public string Tbid { get => _tbid; set => _tbid = value; }
18
+
19
+        /// <summary>
20
+        /// 教材关联关系表id
21
+        /// </summary>
22
+        public string Lsbid { get => _lsbid; set => _lsbid = value; }
23
+
24
+        /// <summary>
25
+        /// 是否选中:0未选中1已选中
26
+        /// </summary>
27
+        public string Selected { get => _selected; set => _selected = value; }
28
+
29
+        /// <summary>
30
+        /// 科目id
31
+        /// </summary>
32
+        public string Subjectid { get => _subjectid; set => _subjectid = value; }
33
+
34
+        /// <summary>
35
+        /// 科目名称
36
+        /// </summary>
37
+        public string Subjectname { get => _subjectname; set => _subjectname = value; }
38
+
39
+        /// <summary>
40
+        /// 册别名称
41
+        /// </summary>
42
+        public string Lsbname { get => _lsbname; set => _lsbname = value; }
43
+
44
+        /// <summary>
45
+        /// 封面图地址
46
+        /// </summary>
47
+        public string Coverpath { get => _coverpath; set => _coverpath = value; }
48
+
49
+        /// <summary>
50
+        /// 版本名称
51
+        /// </summary>
52
+        public string Versionname { get => _versionname; set => _versionname = value; }
53
+    }
54
+}

XHWK.Model/ModelUserInfo.cs → XHWK.WKTool/Models/ModelUserInfo.cs View File

72
         /// 学校阶段1小学2初中3高中4大学
72
         /// 学校阶段1小学2初中3高中4大学
73
         /// </summary>
73
         /// </summary>
74
         private int _schoollevel;
74
         private int _schoollevel;
75
-        private List<Model_WKData> _wkdata;
75
+
76
+        private List<ModelWkData> _wkdata;
76
         private string _cloudcode;
77
         private string _cloudcode;
77
 
78
 
78
         public int Userid { get => _userid; set => _userid = value; }
79
         public int Userid { get => _userid; set => _userid = value; }
95
         public string Schoolname { get => _schoolname; set => _schoolname = value; }
96
         public string Schoolname { get => _schoolname; set => _schoolname = value; }
96
         public int Schoolstate { get => _schoolstate; set => _schoolstate = value; }
97
         public int Schoolstate { get => _schoolstate; set => _schoolstate = value; }
97
         public int Schoollevel { get => _schoollevel; set => _schoollevel = value; }
98
         public int Schoollevel { get => _schoollevel; set => _schoollevel = value; }
99
+
98
         /// <summary>
100
         /// <summary>
99
         /// 微课列表信息
101
         /// 微课列表信息
100
         /// </summary>
102
         /// </summary>
101
-        public List<Model_WKData> Wkdata { get => _wkdata; set => _wkdata = value; }
103
+        public List<ModelWkData> Wkdata { get => _wkdata; set => _wkdata = value; }
104
+
102
         public string cloudcode { get => _cloudcode; set => _cloudcode = value; }
105
         public string cloudcode { get => _cloudcode; set => _cloudcode = value; }
103
     }
106
     }
104
 }
107
 }

XHWK.Model/Model_Video.cs → XHWK.WKTool/Models/ModelVideo.cs View File

3
     /// <summary>
3
     /// <summary>
4
     /// 视频模型
4
     /// 视频模型
5
     /// </summary>
5
     /// </summary>
6
-    public class Model_Video
6
+    public class ModelVideo
7
     {
7
     {
8
         private string _videoPath;
8
         private string _videoPath;
9
         private string _thumbnailPath;
9
         private string _thumbnailPath;
10
-        private Enum_VideoType _videoType;
11
-        private Enum_WKVidetype _wkType;
12
-        private string _RSTime;
10
+        private EnumVideoType _videoType;
11
+        private EnumWkVidetype _wkType;
12
+        private string _rsTime;
13
         private string _videoSize;
13
         private string _videoSize;
14
         private long _videoSizebyte;
14
         private long _videoSizebyte;
15
-        private bool _IsUpload = false;
16
-        private string _FileGuid;//= System.Guid.NewGuid().ToString()
17
-        private string _FileMD5;
18
-        private string _Savefolder;
19
-        private int _Block;
20
-        private int _Uploaded;
21
-        private long _SliceLen;
15
+        private bool _isUpload;
16
+        private string _fileGuid; //= System.Guid.NewGuid().ToString()
17
+        private string _fileMd5;
18
+        private string _savefolder;
19
+        private int _block;
20
+        private int _uploaded;
21
+        private long _sliceLen;
22
+
22
         /// <summary>
23
         /// <summary>
23
         /// 视频路径
24
         /// 视频路径
24
         /// </summary>
25
         /// </summary>
27
         /// 缩略图路径
28
         /// 缩略图路径
28
         /// </summary>
29
         /// </summary>
29
         public string ThumbnailPath { get => _thumbnailPath; set => _thumbnailPath = value; }
30
         public string ThumbnailPath { get => _thumbnailPath; set => _thumbnailPath = value; }
31
+
30
         /// <summary>
32
         /// <summary>
31
         /// 视频类型
33
         /// 视频类型
32
         /// </summary>
34
         /// </summary>
33
-        public Enum_VideoType VideoType { get => _videoType; set => _videoType = value; }
35
+        public EnumVideoType VideoType { get => _videoType; set => _videoType = value; }
36
+
34
         /// <summary>
37
         /// <summary>
35
         /// 微课类型
38
         /// 微课类型
36
         /// </summary>
39
         /// </summary>
37
-        public Enum_WKVidetype WkType { get => _wkType; set => _wkType = value; }
40
+        public EnumWkVidetype WkType { get => _wkType; set => _wkType = value; }
41
+
38
         /// <summary>
42
         /// <summary>
39
         /// 录制时间
43
         /// 录制时间
40
         /// </summary>
44
         /// </summary>
41
-        public string RSTime { get => _RSTime; set => _RSTime = value; }
45
+        public string RSTime { get => _rsTime; set => _rsTime = value; }
46
+
42
         /// <summary>
47
         /// <summary>
43
         /// 视频大小MB
48
         /// 视频大小MB
44
         /// </summary>
49
         /// </summary>
47
         /// 视频大小字节
52
         /// 视频大小字节
48
         /// </summary>
53
         /// </summary>
49
         public long VideoSizebyte { get => _videoSizebyte; set => _videoSizebyte = value; }
54
         public long VideoSizebyte { get => _videoSizebyte; set => _videoSizebyte = value; }
55
+
50
         /// <summary>
56
         /// <summary>
51
         /// 是否已上传
57
         /// 是否已上传
52
         /// </summary>
58
         /// </summary>
53
-        public bool IsUpload { get => _IsUpload; set => _IsUpload = value; }
59
+        public bool IsUpload { get => _isUpload; set => _isUpload = value; }
60
+
54
         /// <summary>
61
         /// <summary>
55
         /// 文件唯一标示
62
         /// 文件唯一标示
56
         /// </summary>
63
         /// </summary>
57
-        public string FileGuid { get => _FileGuid; set => _FileGuid = value; }
64
+        public string FileGuid { get => _fileGuid; set => _fileGuid = value; }
65
+
58
         /// <summary>
66
         /// <summary>
59
         /// 文件MD5
67
         /// 文件MD5
60
         /// </summary>
68
         /// </summary>
61
-        public string FileMD5 { get => _FileMD5; set => _FileMD5 = value; }
69
+        public string FileMD5 { get => _fileMd5; set => _fileMd5 = value; }
70
+
62
         /// <summary>
71
         /// <summary>
63
         /// 文件保存地址 学校id/resource
72
         /// 文件保存地址 学校id/resource
64
         /// </summary>
73
         /// </summary>
65
-        public string Savefolder { get => _Savefolder; set => _Savefolder = value; }
74
+        public string Savefolder { get => _savefolder; set => _savefolder = value; }
75
+
66
         /// <summary>
76
         /// <summary>
67
         /// 分块 每块最大5M
77
         /// 分块 每块最大5M
68
         /// </summary>
78
         /// </summary>
69
-        public int Block { get => _Block; set => _Block = value; }
79
+        public int Block { get => _block; set => _block = value; }
80
+
70
         /// <summary>
81
         /// <summary>
71
         /// 当前已上传到第几块
82
         /// 当前已上传到第几块
72
         /// </summary>
83
         /// </summary>
73
-        public int Uploaded { get => _Uploaded; set => _Uploaded = value; }
84
+        public int Uploaded { get => _uploaded; set => _uploaded = value; }
85
+
74
         /// <summary>
86
         /// <summary>
75
         /// 视频每片长度
87
         /// 视频每片长度
76
         /// </summary>
88
         /// </summary>
77
-        public long SliceLen { get => _SliceLen; set => _SliceLen = value; }
89
+        public long SliceLen { get => _sliceLen; set => _sliceLen = value; }
78
     }
90
     }
79
 
91
 
80
     /// <summary>
92
     /// <summary>
81
     /// 视频格式类型
93
     /// 视频格式类型
82
     /// </summary>
94
     /// </summary>
83
-    public enum Enum_VideoType
95
+    public enum EnumVideoType
84
     {
96
     {
85
-        MP4 = 1,
86
-        FLV = 2,
87
-        AVI = 3
97
+        Mp4 = 1,
98
+        Flv = 2,
99
+        Avi = 3
88
     }
100
     }
89
 
101
 
90
     /// <summary>
102
     /// <summary>
91
     /// 录制视频类型
103
     /// 录制视频类型
92
     /// </summary>
104
     /// </summary>
93
-    public enum Enum_WKVidetype
105
+    public enum EnumWkVidetype
94
     {
106
     {
95
         /// <summary>
107
         /// <summary>
96
         /// 录屏
108
         /// 录屏
97
         /// </summary>
109
         /// </summary>
98
         RecordingScreen = 1,
110
         RecordingScreen = 1,
111
+
99
         /// <summary>
112
         /// <summary>
100
         /// 录课
113
         /// 录课
101
         /// </summary>
114
         /// </summary>

XHWK.Model/Model_WKData.cs → XHWK.WKTool/Models/ModelWKData.cs View File

2
 
2
 
3
 namespace XHWK.Model
3
 namespace XHWK.Model
4
 {
4
 {
5
-    public class Model_WKData
5
+    public class ModelWkData
6
     {
6
     {
7
         private string _wkName;
7
         private string _wkName;
8
-        private List<Model_Video> _videoList;
8
+        private List<ModelVideo> _videoList;
9
         private string _wkPath;
9
         private string _wkPath;
10
         private string _wkCreateDateTime;
10
         private string _wkCreateDateTime;
11
         private string _drawDataPath;
11
         private string _drawDataPath;
13
         /// 微课名
13
         /// 微课名
14
         /// </summary>
14
         /// </summary>
15
         public string WkName { get => _wkName; set => _wkName = value; }
15
         public string WkName { get => _wkName; set => _wkName = value; }
16
+
16
         /// <summary>
17
         /// <summary>
17
         /// 视频列表
18
         /// 视频列表
18
         /// </summary>
19
         /// </summary>
19
-        public List<Model_Video> VideoList { get => _videoList; set => _videoList = value; }
20
+        public List<ModelVideo> VideoList { get => _videoList; set => _videoList = value; }
21
+
20
         /// <summary>
22
         /// <summary>
21
         /// 微课路径
23
         /// 微课路径
22
         /// </summary>
24
         /// </summary>

XHWK.Model/NotifyModel.cs → XHWK.WKTool/Models/NotifyModel.cs View File


XHWK.Model/ResultVo.cs → XHWK.WKTool/Models/ResultVo.cs View File


XHWK.Model/ViewModel.cs → XHWK.WKTool/Models/ViewModel.cs View File


+ 2
- 2
XHWK.WKTool/ProductVerification.xaml.cs View File

51
                 App.Signature = System.IO.File.ReadAllText(App.DataPath + "signature.txt", Encoding.Default);
51
                 App.Signature = System.IO.File.ReadAllText(App.DataPath + "signature.txt", Encoding.Default);
52
                 string decrypt = DataProvider.TripleDESDecrypt(App.Signature, App.secretKey);
52
                 string decrypt = DataProvider.TripleDESDecrypt(App.Signature, App.secretKey);
53
                 decrypt = decrypt.Replace("\u0001", "").Replace("\u0007", "").Trim();
53
                 decrypt = decrypt.Replace("\u0001", "").Replace("\u0007", "").Trim();
54
-                Model_Signatures msgBean = JsonHelper.JsonToObj<Model_Signatures>(decrypt);
54
+                ModelSignatures msgBean = JsonHelper.JsonToObj<ModelSignatures>(decrypt);
55
                 long currentTimeTimestamp = DataProvider.TimestampTotalSeconds(); //当前时间 时间戳
55
                 long currentTimeTimestamp = DataProvider.TimestampTotalSeconds(); //当前时间 时间戳
56
                 if (msgBean.endtime > currentTimeTimestamp)//条件成立  解析成功 code 在有效期内
56
                 if (msgBean.endtime > currentTimeTimestamp)//条件成立  解析成功 code 在有效期内
57
                 {
57
                 {
88
             }
88
             }
89
             catch (Exception ex) //解析失败 输code  
89
             catch (Exception ex) //解析失败 输code  
90
             {
90
             {
91
-                LogHelper.WriteErrLog("ProductVerification(解析失败)" + ex.Message, ex);
91
+                LogHelper.Logerror.Error("ProductVerification(解析失败)" + ex.Message, ex);
92
                 Dispatcher.Invoke(new Action(() =>
92
                 Dispatcher.Invoke(new Action(() =>
93
                 {
93
                 {
94
                     Hide();
94
                     Hide();

+ 7
- 11
XHWK.WKTool/ScreenRecordingToolbarWindow.xaml.cs View File

48
         /// <summary>
48
         /// <summary>
49
         /// 视频信息
49
         /// 视频信息
50
         /// </summary>
50
         /// </summary>
51
-        private Model_Video _videoInfo;
51
+        private ModelVideo _videoInfo;
52
 
52
 
53
         //声明一个 DrawingAttributes 类型的变量
53
         //声明一个 DrawingAttributes 类型的变量
54
 
54
 
187
         /// </summary>
187
         /// </summary>
188
         private void SetSavePath()
188
         private void SetSavePath()
189
         {
189
         {
190
-            string fileType = ((Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType"))).ToString();
190
+            string fileType = ((EnumVideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType"))).ToString();
191
             FileToolsCommon.CreateDirectory(App.WKData.WkPath);
191
             FileToolsCommon.CreateDirectory(App.WKData.WkPath);
192
             FileToolsCommon.DeleteDirectory(_temppath);
192
             FileToolsCommon.DeleteDirectory(_temppath);
193
             FileToolsCommon.CreateDirectory(_temppath);
193
             FileToolsCommon.CreateDirectory(_temppath);
275
                     );
275
                     );
276
                 }
276
                 }
277
                 _state = State.Loading;
277
                 _state = State.Loading;
278
-                _videoInfo = new Model_Video
279
-                {
280
-                    VideoType = (Enum_VideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType")),
281
-                    WkType = Enum_WKVidetype.RecordingScreen
282
-                };
278
+                _videoInfo = new ModelVideo { VideoType = (EnumVideoType)int.Parse(FileToolsCommon.GetConfigValue("VideoType")), WkType = EnumWkVidetype.RecordingScreen };
283
                 SetSavePath();
279
                 SetSavePath();
284
                 if (App.W_CountdownWindow == null)
280
                 if (App.W_CountdownWindow == null)
285
                 {
281
                 {
503
                         }
499
                         }
504
                         catch (Exception ex)
500
                         catch (Exception ex)
505
                         {
501
                         {
506
-                            LogHelper.WriteErrLog("录屏保存" + ex.Message, ex);
502
+                            LogHelper.Logerror.Error("录屏保存" + ex.Message, ex);
507
                         }
503
                         }
508
                         FileToolsCommon.DeleteDirectory(_temppath);
504
                         FileToolsCommon.DeleteDirectory(_temppath);
509
                     }
505
                     }
597
                 }
593
                 }
598
                 catch (Exception ex)
594
                 catch (Exception ex)
599
                 {
595
                 {
600
-                    LogHelper.WriteErrLog("【批注(PracticeWindow)" + ex.Message, ex);
596
+                    LogHelper.Logerror.Error("【批注(PracticeWindow)" + ex.Message, ex);
601
                 }
597
                 }
602
             }
598
             }
603
         }
599
         }
710
             }
706
             }
711
             catch (Exception ex)
707
             catch (Exception ex)
712
             {
708
             {
713
-                LogHelper.WriteErrLog("【批注(PracticeWindow)" + ex.Message, ex);
709
+                LogHelper.Logerror.Error("【批注(PracticeWindow)" + ex.Message, ex);
714
             }
710
             }
715
 
711
 
716
             //imgCanvas.Source = new BitmapImage(new Uri(imagePath));
712
             //imgCanvas.Source = new BitmapImage(new Uri(imagePath));
864
             }
860
             }
865
             catch (Exception ex)
861
             catch (Exception ex)
866
             {
862
             {
867
-                LogHelper.WriteErrLog("【批注(PracticeWindow)" + ex.Message, ex);
863
+                LogHelper.Logerror.Error("【批注(PracticeWindow)" + ex.Message, ex);
868
             }
864
             }
869
         }
865
         }
870
 
866
 

+ 7
- 7
XHWK.WKTool/UControl/Uc_VideoItem.xaml.cs View File

24
         /// <summary>
24
         /// <summary>
25
         /// 视频模型
25
         /// 视频模型
26
         /// </summary>
26
         /// </summary>
27
-        private Model_Video VideoModel = new Model_Video();
27
+        private ModelVideo VideoModel = new ModelVideo();
28
 
28
 
29
         /// <summary>
29
         /// <summary>
30
         /// 刷新视频列表
30
         /// 刷新视频列表
59
         /// 视频信息
59
         /// 视频信息
60
         /// </summary>
60
         /// </summary>
61
         /// <param name="model_Video"></param>
61
         /// <param name="model_Video"></param>
62
-        public Uc_VideoItem(Model_Video model_Video)
62
+        public Uc_VideoItem(ModelVideo model_Video)
63
         {
63
         {
64
             InitializeComponent();
64
             InitializeComponent();
65
             App.IsUpLoad = false;
65
             App.IsUpLoad = false;
171
         private bool ModifyPathName(string FileGuid, string NewName, out string Errmessage)
171
         private bool ModifyPathName(string FileGuid, string NewName, out string Errmessage)
172
         {
172
         {
173
             Errmessage = "";
173
             Errmessage = "";
174
-            foreach (Model_WKData WKData in App.WKDataList)
174
+            foreach (ModelWkData WKData in App.WKDataList)
175
             {
175
             {
176
                 if (WKData.VideoList.Exists(x => x.FileGuid == FileGuid))
176
                 if (WKData.VideoList.Exists(x => x.FileGuid == FileGuid))
177
                 {
177
                 {
178
-                    Model_Video model_Video = WKData.VideoList.Find(x => x.FileGuid == FileGuid);
178
+                    ModelVideo model_Video = WKData.VideoList.Find(x => x.FileGuid == FileGuid);
179
                     string filePathName = model_Video.VideoPath;
179
                     string filePathName = model_Video.VideoPath;
180
                     string filePath = FileToolsCommon.GetDirectoryName(filePathName);
180
                     string filePath = FileToolsCommon.GetDirectoryName(filePathName);
181
                     string newFilePathName = filePath + NewName;
181
                     string newFilePathName = filePath + NewName;
225
             MessageBoxResult dr = MessageWindow.Show("确定删除该视频?", "提示", MessageBoxButton.OKCancel);
225
             MessageBoxResult dr = MessageWindow.Show("确定删除该视频?", "提示", MessageBoxButton.OKCancel);
226
             if (dr == MessageBoxResult.OK)
226
             if (dr == MessageBoxResult.OK)
227
             {
227
             {
228
-                foreach (Model_WKData wKData in App.WKDataList)
228
+                foreach (ModelWkData wKData in App.WKDataList)
229
                 {
229
                 {
230
                     if (wKData.VideoList == null)
230
                     if (wKData.VideoList == null)
231
                     {
231
                     {
273
             }
273
             }
274
             catch (Exception ex)
274
             catch (Exception ex)
275
             {
275
             {
276
-                LogHelper.WriteErrLog("【视频播放】(BtnVideoPlay_Click)" + ex.Message, ex);
276
+                LogHelper.Logerror.Error("【视频播放】(BtnVideoPlay_Click)" + ex.Message, ex);
277
                 System.Windows.MessageBox.Show(ex.Message);
277
                 System.Windows.MessageBox.Show(ex.Message);
278
                 return;
278
                 return;
279
             }
279
             }
297
             }
297
             }
298
             catch (Exception ex)
298
             catch (Exception ex)
299
             {
299
             {
300
-                LogHelper.WriteErrLog("【视频播放】(BtnVideoPlay_Click)" + ex.Message, ex);
300
+                LogHelper.Logerror.Error("【视频播放】(BtnVideoPlay_Click)" + ex.Message, ex);
301
                 System.Windows.MessageBox.Show(ex.Message);
301
                 System.Windows.MessageBox.Show(ex.Message);
302
                 return;
302
                 return;
303
             }
303
             }

+ 9
- 17
XHWK.WKTool/UploadWindow.xaml.cs View File

159
                     );
159
                     );
160
                     for (int i = 0; i < App.DirectorList.Count; i++)
160
                     for (int i = 0; i < App.DirectorList.Count; i++)
161
                     {
161
                     {
162
-                        Model_DirectorList item = App.DirectorList[i];
162
+                        ModelDirectorList item = App.DirectorList[i];
163
                         pageData.zhangjieList.Add
163
                         pageData.zhangjieList.Add
164
                         (
164
                         (
165
                             new ComboBoxBean()
165
                             new ComboBoxBean()
185
         /// </summary>
185
         /// </summary>
186
         /// <param name="directorList">
186
         /// <param name="directorList">
187
         /// </param>
187
         /// </param>
188
-        private void AddChild(Model_DirectorList directorList)
188
+        private void AddChild(ModelDirectorList directorList)
189
         {
189
         {
190
             if (directorList.children != null && directorList.children.Count > 0)
190
             if (directorList.children != null && directorList.children.Count > 0)
191
             {
191
             {
192
-                foreach (Model_DirectorList child in directorList.children)
192
+                foreach (ModelDirectorList child in directorList.children)
193
                 {
193
                 {
194
-                    pageData.zhangjieList.Add
195
-                    (
196
-                        new ComboBoxBean()
197
-                        {
198
-                            Key = child.directorid,
199
-                            Value = GetSpace(child.directorlevel) + child.directorname,
200
-                            leaf = child.leaf
201
-                        }
202
-                    );
194
+                    pageData.zhangjieList.Add(new ComboBoxBean() { Key = child.directorid, Value = GetSpace(child.directorlevel) + child.directorname, leaf = child.leaf });
203
                     if (child.children != null && child.children.Count > 0)
195
                     if (child.children != null && child.children.Count > 0)
204
                     {
196
                     {
205
                         AddChild(child);
197
                         AddChild(child);
327
                     //schoolid: 12
319
                     //schoolid: 12
328
                     //suffix: "mp4"
320
                     //suffix: "mp4"
329
                     //uid: 80
321
                     //uid: 80
330
-                    Model_ResourceAdd modelResourceAdd = new Model_ResourceAdd();
322
+                    ModelResourceAdd modelResourceAdd = new ModelResourceAdd();
331
                     Dispatcher.Invoke
323
                     Dispatcher.Invoke
332
                     (
324
                     (
333
                         () =>
325
                         () =>
334
                         {
326
                         {
335
-                            modelResourceAdd = new Model_ResourceAdd
327
+                            modelResourceAdd = new ModelResourceAdd
336
                             {
328
                             {
337
                                 converted = 0,
329
                                 converted = 0,
338
                                 createid = App.UserInfo.Userid,
330
                                 createid = App.UserInfo.Userid,
375
                         (
367
                         (
376
                             () =>
368
                             () =>
377
                             {
369
                             {
378
-                                foreach (Model_WKData vdata in App.WKDataList)
370
+                                foreach (ModelWkData vdata in App.WKDataList)
379
                                 {
371
                                 {
380
                                     if (vdata.VideoList == null)
372
                                     if (vdata.VideoList == null)
381
                                     {
373
                                     {
382
                                         continue;
374
                                         continue;
383
                                     }
375
                                     }
384
-                                    foreach (Model_Video videoinfo in vdata.VideoList)
376
+                                    foreach (ModelVideo videoinfo in vdata.VideoList)
385
                                     {
377
                                     {
386
                                         if (videoinfo.FileGuid == _guid)
378
                                         if (videoinfo.FileGuid == _guid)
387
                                         {
379
                                         {
451
                     MessageWindow.Show("无法上传视频,请检查与服务器链接状态!");
443
                     MessageWindow.Show("无法上传视频,请检查与服务器链接状态!");
452
                     App.IsUpLoad = false;
444
                     App.IsUpLoad = false;
453
                     Hide();
445
                     Hide();
454
-                    LogHelper.WriteErrLog("【UploadWindow】(BtnStart_Click)" + ex.Message, ex);
446
+                    LogHelper.Logerror.Error("【UploadWindow】(BtnStart_Click)" + ex.Message, ex);
455
                 });
447
                 });
456
             }
448
             }
457
         }
449
         }

+ 1
- 1
XHWK.WKTool/Utils/ZAsposeUtil.cs View File

67
             catch (Exception ex)
67
             catch (Exception ex)
68
             {
68
             {
69
                 MessageWindow.Show("该文件无法使用!");
69
                 MessageWindow.Show("该文件无法使用!");
70
-                LogHelper.WriteErrLog("【导入方法(ConvertWordToImage)】错误日志:" + ex.Message, ex);
70
+                LogHelper.Logerror.Error("【导入方法(ConvertWordToImage)】错误日志:" + ex.Message, ex);
71
             }
71
             }
72
             return images;
72
             return images;
73
         }
73
         }

+ 2
- 2
XHWK.WKTool/Utils/ZPrintUtils.cs View File

33
             }
33
             }
34
             catch (System.Exception ex)
34
             catch (System.Exception ex)
35
             {
35
             {
36
-                LogHelper.WriteErrLog("添加默认打印机" + ex.Message, ex);
36
+                LogHelper.Logerror.Error("添加默认打印机" + ex.Message, ex);
37
             }
37
             }
38
 
38
 
39
             try
39
             try
48
             }
48
             }
49
             catch (System.Exception ex)
49
             catch (System.Exception ex)
50
             {
50
             {
51
-                LogHelper.WriteErrLog("添加其它打印机" + ex.Message, ex);
51
+                LogHelper.Logerror.Error("添加其它打印机" + ex.Message, ex);
52
             }
52
             }
53
             return fPrinters;
53
             return fPrinters;
54
         }
54
         }

+ 12
- 12
XHWK.WKTool/Utils/pen/luobo/LuoBoPenUtil.cs View File

84
             {
84
             {
85
                 if (modeType == 1)
85
                 if (modeType == 1)
86
                 {
86
                 {
87
-                    LogHelper.WriteInfoLog("当前为笔模式");
87
+                    LogHelper.Loginfo.Info("当前为笔模式");
88
                 }
88
                 }
89
                 else
89
                 else
90
                 {
90
                 {
91
-                    LogHelper.WriteInfoLog("当前为鼠标模式");
91
+                    LogHelper.Loginfo.Info("当前为鼠标模式");
92
                 }
92
                 }
93
             }
93
             }
94
         }
94
         }
186
             {
186
             {
187
                 if (App.IsOutputInfoLog)
187
                 if (App.IsOutputInfoLog)
188
                 {
188
                 {
189
-                    LogHelper.WriteInfoLog("当前为笔模式");
189
+                    LogHelper.Loginfo.Info("当前为笔模式");
190
                 }
190
                 }
191
                 if (!IsPen)
191
                 if (!IsPen)
192
                 {
192
                 {
197
             {
197
             {
198
                 if (App.IsOutputInfoLog)
198
                 if (App.IsOutputInfoLog)
199
                 {
199
                 {
200
-                    LogHelper.WriteInfoLog("当前为鼠标模式");
200
+                    LogHelper.Loginfo.Info("当前为鼠标模式");
201
                 }
201
                 }
202
                 if (IsPen)
202
                 if (IsPen)
203
                 {
203
                 {
225
             }
225
             }
226
             catch (Exception ex)
226
             catch (Exception ex)
227
             {
227
             {
228
-                LogHelper.WriteErrLog("设备初始化失败:" + ex.Message, ex);
228
+                LogHelper.Logerror.Error("设备初始化失败:" + ex.Message, ex);
229
             }
229
             }
230
         }
230
         }
231
 
231
 
244
             {
244
             {
245
                 if (App.IsOutputInfoLog)
245
                 if (App.IsOutputInfoLog)
246
                 {
246
                 {
247
-                    LogHelper.WriteInfoLog
247
+                    LogHelper.Loginfo.Info
248
                     (
248
                     (
249
                         string.Format
249
                         string.Format
250
                         (
250
                         (
297
             int nDeviceCount = robotpenController.GetInstance()._GetDeviceCount();
297
             int nDeviceCount = robotpenController.GetInstance()._GetDeviceCount();
298
             if (App.IsOutputInfoLog)
298
             if (App.IsOutputInfoLog)
299
             {
299
             {
300
-                LogHelper.WriteInfoLog(string.Format("当前有 {0} 个设备", nDeviceCount));
300
+                LogHelper.Loginfo.Info(string.Format("当前有 {0} 个设备", nDeviceCount));
301
             }
301
             }
302
             if (nDeviceCount > 0)
302
             if (nDeviceCount > 0)
303
             {
303
             {
317
                             int nRes = robotpenController.GetInstance()._ConnectOpen();
317
                             int nRes = robotpenController.GetInstance()._ConnectOpen();
318
                             if (nRes != 0)
318
                             if (nRes != 0)
319
                             {
319
                             {
320
-                                //LogHelper.WriteInfoLog(string.Format(@"x={0},y={1},s={2},p={3}", bx, by, bPenStatus, bPress));
321
-                                LogHelper.WriteErrLog("设备自动连接失败,请重新插拔设备或尝试手动连接!", null);
320
+                                //LogHelper.Loginfo.Info(string.Format(@"x={0},y={1},s={2},p={3}", bx, by, bPenStatus, bPress));
321
+                                LogHelper.Logerror.Error("设备自动连接失败,请重新插拔设备或尝试手动连接!", null);
322
                                 usbIsConnected = false;
322
                                 usbIsConnected = false;
323
                                 break;
323
                                 break;
324
                             }
324
                             }
344
                                 }
344
                                 }
345
                                 if (App.IsOutputInfoLog)
345
                                 if (App.IsOutputInfoLog)
346
                                 {
346
                                 {
347
-                                    LogHelper.WriteInfoLog
347
+                                    LogHelper.Loginfo.Info
348
                                     (
348
                                     (
349
                                         string.Format
349
                                         string.Format
350
                                         (
350
                                         (
357
                             }
357
                             }
358
                             catch (Exception ex)
358
                             catch (Exception ex)
359
                             {
359
                             {
360
-                                LogHelper.WriteErrLog("手写板大小获取失败:" + ex.Message, ex);
360
+                                LogHelper.Logerror.Error("手写板大小获取失败:" + ex.Message, ex);
361
                             }
361
                             }
362
                             UpdateDevStatus();
362
                             UpdateDevStatus();
363
                             if (App.IsOutputInfoLog)
363
                             if (App.IsOutputInfoLog)
364
                             {
364
                             {
365
-                                LogHelper.WriteInfoLog(string.Format("设备类型:{0}", deviceType.ToString()));
365
+                                LogHelper.Loginfo.Info(string.Format("设备类型:{0}", deviceType.ToString()));
366
                             }
366
                             }
367
 
367
 
368
                             new Thread(new ThreadStart(new Action(() =>
368
                             new Thread(new ThreadStart(new Action(() =>

+ 22
- 6
XHWK.WKTool/XHWK.WKTool.csproj View File

149
     <Reference Include="NReco.VideoConverter, Version=1.1.4.0, Culture=neutral, PublicKeyToken=395ccb334978a0cd, processorArchitecture=MSIL">
149
     <Reference Include="NReco.VideoConverter, Version=1.1.4.0, Culture=neutral, PublicKeyToken=395ccb334978a0cd, processorArchitecture=MSIL">
150
       <HintPath>..\packages\NReco.VideoConverter.1.1.4\lib\net40\NReco.VideoConverter.dll</HintPath>
150
       <HintPath>..\packages\NReco.VideoConverter.1.1.4\lib\net40\NReco.VideoConverter.dll</HintPath>
151
     </Reference>
151
     </Reference>
152
+    <Reference Include="NStandard, Version=0.4.15.0, Culture=neutral, processorArchitecture=MSIL">
153
+      <HintPath>..\packages\NStandard.0.4.15\lib\net451\NStandard.dll</HintPath>
154
+    </Reference>
152
     <Reference Include="O2S.Components.PDFRender4NET">
155
     <Reference Include="O2S.Components.PDFRender4NET">
153
       <HintPath>..\DLL\O2S.Components.PDFRender4NET.dll</HintPath>
156
       <HintPath>..\DLL\O2S.Components.PDFRender4NET.dll</HintPath>
154
     </Reference>
157
     </Reference>
266
       <DependentUpon>MinToolbar.xaml</DependentUpon>
269
       <DependentUpon>MinToolbar.xaml</DependentUpon>
267
     </Compile>
270
     </Compile>
268
     <Compile Include="Models\AppModel.cs" />
271
     <Compile Include="Models\AppModel.cs" />
272
+    <Compile Include="Models\ComboBoxBean.cs" />
269
     <Compile Include="Models\Direction.cs" />
273
     <Compile Include="Models\Direction.cs" />
270
     <Compile Include="Models\EntityBase.cs" />
274
     <Compile Include="Models\EntityBase.cs" />
271
     <Compile Include="Models\FileDirectoryData.cs" />
275
     <Compile Include="Models\FileDirectoryData.cs" />
272
     <Compile Include="Models\FileDirectoryModel.cs" />
276
     <Compile Include="Models\FileDirectoryModel.cs" />
273
     <Compile Include="Models\Limit.cs" />
277
     <Compile Include="Models\Limit.cs" />
278
+    <Compile Include="Models\ModelUserInfo.cs" />
279
+    <Compile Include="Models\ModelApp.cs" />
280
+    <Compile Include="Models\ModelCanvas.cs" />
281
+    <Compile Include="Models\ModelDirectorList.cs" />
282
+    <Compile Include="Models\ModelDrawData.cs" />
283
+    <Compile Include="Models\ModelPage.cs" />
284
+    <Compile Include="Models\ModelResourceAdd.cs" />
285
+    <Compile Include="Models\ModelResourceAddTwo.cs" />
286
+    <Compile Include="Models\ModelScreenshot.cs" />
287
+    <Compile Include="Models\ModelServiceAddress.cs" />
288
+    <Compile Include="Models\ModelSignatures.cs" />
289
+    <Compile Include="Models\ModelTmatrixCode.cs" />
290
+    <Compile Include="Models\ModelTsubjectbookList.cs" />
291
+    <Compile Include="Models\ModelVideo.cs" />
292
+    <Compile Include="Models\ModelWKData.cs" />
293
+    <Compile Include="Models\NotifyModel.cs" />
274
     <Compile Include="Models\PrintModel.cs" />
294
     <Compile Include="Models\PrintModel.cs" />
295
+    <Compile Include="Models\ResultVo.cs" />
275
     <Compile Include="Models\Tool.cs" />
296
     <Compile Include="Models\Tool.cs" />
276
     <Compile Include="license\MyLicense.cs" />
297
     <Compile Include="license\MyLicense.cs" />
277
     <Compile Include="Models\DownloadInfoModel.cs" />
298
     <Compile Include="Models\DownloadInfoModel.cs" />
299
+    <Compile Include="Models\ViewModel.cs" />
278
     <Compile Include="PracticeWindow.xaml.cs">
300
     <Compile Include="PracticeWindow.xaml.cs">
279
       <DependentUpon>PracticeWindow.xaml</DependentUpon>
301
       <DependentUpon>PracticeWindow.xaml</DependentUpon>
280
     </Compile>
302
     </Compile>
502
   <ItemGroup>
524
   <ItemGroup>
503
     <None Include="App.config" />
525
     <None Include="App.config" />
504
   </ItemGroup>
526
   </ItemGroup>
505
-  <ItemGroup>
506
-    <ProjectReference Include="..\XHWK.Model\XHWK.Model.csproj">
507
-      <Project>{445a4527-849b-4fa9-aa97-8ed1098d211e}</Project>
508
-      <Name>XHWK.Model</Name>
509
-    </ProjectReference>
510
-  </ItemGroup>
511
   <ItemGroup>
527
   <ItemGroup>
512
     <Resource Include="Images\microLessonSystem_0.png" />
528
     <Resource Include="Images\microLessonSystem_0.png" />
513
     <Resource Include="Images\microLessonSystem_1.png" />
529
     <Resource Include="Images\microLessonSystem_1.png" />

+ 1
- 0
XHWK.WKTool/packages.config View File

21
   <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
21
   <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net452" />
22
   <package id="NReco" version="2.0.3.0" targetFramework="net452" />
22
   <package id="NReco" version="2.0.3.0" targetFramework="net452" />
23
   <package id="NReco.VideoConverter" version="1.1.4" targetFramework="net452" />
23
   <package id="NReco.VideoConverter" version="1.1.4" targetFramework="net452" />
24
+  <package id="NStandard" version="0.4.15" targetFramework="net452" />
24
   <package id="System.Management" version="4.7.0" targetFramework="net452" />
25
   <package id="System.Management" version="4.7.0" targetFramework="net452" />
25
   <package id="VisioForge.DotNet.Core.TRIAL" version="12.0.56" targetFramework="net452" />
26
   <package id="VisioForge.DotNet.Core.TRIAL" version="12.0.56" targetFramework="net452" />
26
   <package id="WpfAnimatedGif" version="2.0.0" targetFramework="net452" />
27
   <package id="WpfAnimatedGif" version="2.0.0" targetFramework="net452" />

+ 3
- 3
XHWK.WKTool/system/AutoStartHelper.cs View File

37
             catch (Exception ex)
37
             catch (Exception ex)
38
             {
38
             {
39
                 Message = "设置失败,操作被拒绝:" + ex.Message;
39
                 Message = "设置失败,操作被拒绝:" + ex.Message;
40
-                LogHelper.WriteErrLog(Message, ex);
40
+                LogHelper.Logerror.Error(Message, ex);
41
                 return false;
41
                 return false;
42
             }
42
             }
43
 
43
 
74
             catch (Exception ex)
74
             catch (Exception ex)
75
             {
75
             {
76
                 Message = "设置失败,操作被拒绝:" + ex.Message;
76
                 Message = "设置失败,操作被拒绝:" + ex.Message;
77
-                LogHelper.WriteErrLog(Message, ex);
77
+                LogHelper.Logerror.Error(Message, ex);
78
                 return false;
78
                 return false;
79
             }
79
             }
80
             //if (MessageBox.Show("设置完毕") == DialogResult.OK)
80
             //if (MessageBox.Show("设置完毕") == DialogResult.OK)
103
             catch (Exception ex)
103
             catch (Exception ex)
104
             {
104
             {
105
                 Message = "设置失败,操作被拒绝:" + ex.Message;
105
                 Message = "设置失败,操作被拒绝:" + ex.Message;
106
-                LogHelper.WriteErrLog(Message, ex);
106
+                LogHelper.Logerror.Error(Message, ex);
107
                 return false;
107
                 return false;
108
             }
108
             }
109
 
109
 

+ 3
- 3
XHWK.WKTool/system/BlackboardNew.cs View File

164
                             strokes_page_all.Add(pagetemp);
164
                             strokes_page_all.Add(pagetemp);
165
                         }
165
                         }
166
                     }
166
                     }
167
-                    LogHelper.WriteErrLog("【画板】(Canvas_MouseUp)添加失败,strokes_page_all为0," + ex.Message, ex);
167
+                    LogHelper.Logerror.Error("【画板】(Canvas_MouseUp)添加失败,strokes_page_all为0," + ex.Message, ex);
168
                 }
168
                 }
169
             }
169
             }
170
         }
170
         }
387
                                 strokes_page_all.Add(pagetemp);
387
                                 strokes_page_all.Add(pagetemp);
388
                             }
388
                             }
389
                         }
389
                         }
390
-                        LogHelper.WriteErrLog("【画板】(changepages)添加失败,strokes_page_all为0," + ex.Message, ex);
390
+                        LogHelper.Logerror.Error("【画板】(changepages)添加失败,strokes_page_all为0," + ex.Message, ex);
391
                     }
391
                     }
392
                 }
392
                 }
393
                 stylusPoints = new StylusPointCollection();
393
                 stylusPoints = new StylusPointCollection();
504
         //    }
504
         //    }
505
         //    catch (Exception ex)
505
         //    catch (Exception ex)
506
         //    {
506
         //    {
507
-        //        LogHelper.WriteErrLog("【XHMicroLessonSystemWindow】(changepages)点阵比书写报错:" + ex.Message, ex);
507
+        //        LogHelper.Logerror.Error("【XHMicroLessonSystemWindow】(changepages)点阵比书写报错:" + ex.Message, ex);
508
         //    }
508
         //    }
509
         //}
509
         //}
510
     }
510
     }

+ 2
- 2
XHWK.WKTool/system/DownloadManager.cs View File

157
                     catch (Exception ex)
157
                     catch (Exception ex)
158
                     {
158
                     {
159
                         string ErrMessage = "【下载】(DownloadManager):" + ex.Message;
159
                         string ErrMessage = "【下载】(DownloadManager):" + ex.Message;
160
-                        LogHelper.WriteErrLog(ErrMessage, ex);
160
+                        LogHelper.Logerror.Error(ErrMessage, ex);
161
                         OnDisconnectHandler();
161
                         OnDisconnectHandler();
162
                         return;
162
                         return;
163
                     }
163
                     }
247
                     catch (Exception ex)
247
                     catch (Exception ex)
248
                     {
248
                     {
249
                         string ErrMessage = "【下载】(DownloadManager):" + ex.Message;
249
                         string ErrMessage = "【下载】(DownloadManager):" + ex.Message;
250
-                        LogHelper.WriteErrLog(ErrMessage, ex);
250
+                        LogHelper.Logerror.Error(ErrMessage, ex);
251
                     }
251
                     }
252
                 }
252
                 }
253
             }
253
             }

+ 1
- 1
XHWK.WKTool/system/DownloadService.cs View File

125
                     catch (Exception ex)
125
                     catch (Exception ex)
126
                     {
126
                     {
127
                         string ErrMessage = "【下载】(DownloadService):" + ex.Message;
127
                         string ErrMessage = "【下载】(DownloadService):" + ex.Message;
128
-                        LogHelper.WriteErrLog(ErrMessage, ex);
128
+                        LogHelper.Logerror.Error(ErrMessage, ex);
129
                         OnDisconnectHandler();
129
                         OnDisconnectHandler();
130
                         return;
130
                         return;
131
                     }
131
                     }

+ 6
- 6
XHWK.WKTool/system/FFMpeg.cs View File

165
             }
165
             }
166
             if (OutputVideoLog)
166
             if (OutputVideoLog)
167
             {
167
             {
168
-                LogHelper.WriteInfoLog("【录屏】:" + myProcess.StartInfo.Arguments);
168
+                LogHelper.Loginfo.Info("【录屏】:" + myProcess.StartInfo.Arguments);
169
             }
169
             }
170
             FileToolsCommon.AppendText(_logPath, "【录屏】:" + myProcess.StartInfo.Arguments + "\r\n");
170
             FileToolsCommon.AppendText(_logPath, "【录屏】:" + myProcess.StartInfo.Arguments + "\r\n");
171
             myProcess.StartInfo.UseShellExecute = false; //不使用操作系统外壳程序启动
171
             myProcess.StartInfo.UseShellExecute = false; //不使用操作系统外壳程序启动
188
                 {
188
                 {
189
                     errMessage = ex.Message + " 请关闭杀毒软件或信任此软件后重试!";
189
                     errMessage = ex.Message + " 请关闭杀毒软件或信任此软件后重试!";
190
                 }
190
                 }
191
-                LogHelper.WriteErrLog("【录音】(StartRecordingAudio)" + errMessage, ex);
191
+                LogHelper.Logerror.Error("【录音】(StartRecordingAudio)" + errMessage, ex);
192
                 myProcess.Dispose();
192
                 myProcess.Dispose();
193
                 myProcess = null;
193
                 myProcess = null;
194
                 return false;
194
                 return false;
536
             }
536
             }
537
             catch (Exception ex)
537
             catch (Exception ex)
538
             {
538
             {
539
-                LogHelper.WriteErrLog("【麦克风】麦克风不可用:" + ex.Message, ex);
539
+                LogHelper.Logerror.Error("【麦克风】麦克风不可用:" + ex.Message, ex);
540
                 return false;
540
                 return false;
541
             }
541
             }
542
         }
542
         }
611
             }
611
             }
612
             catch (Exception ex)
612
             catch (Exception ex)
613
             {
613
             {
614
-                LogHelper.WriteErrLog("【麦克风】麦克风不可用:" + ex.Message, ex);
614
+                LogHelper.Logerror.Error("【麦克风】麦克风不可用:" + ex.Message, ex);
615
                 return false;
615
                 return false;
616
             }
616
             }
617
         }
617
         }
655
             }
655
             }
656
             catch (Exception ex)
656
             catch (Exception ex)
657
             {
657
             {
658
-                LogHelper.WriteErrLog("【麦克风】麦克风不可用:" + ex.Message, ex);
658
+                LogHelper.Logerror.Error("【麦克风】麦克风不可用:" + ex.Message, ex);
659
             }
659
             }
660
         }
660
         }
661
 
661
 
704
             }
704
             }
705
             catch (Exception ex)
705
             catch (Exception ex)
706
             {
706
             {
707
-                LogHelper.WriteErrLog("【扬声器】扬声器不可用:" + ex.Message, ex);
707
+                LogHelper.Logerror.Error("【扬声器】扬声器不可用:" + ex.Message, ex);
708
                 return false;
708
                 return false;
709
             }
709
             }
710
         }
710
         }

+ 4
- 1
XHWK.WKTool/system/FileToolsCommon.cs View File

606
                 byte[] buffer = new byte[stream.Length];
606
                 byte[] buffer = new byte[stream.Length];
607
 
607
 
608
                 //读取流  
608
                 //读取流  
609
+                // ReSharper disable once MustUseReturnValue
609
                 stream.Read
610
                 stream.Read
610
                 (
611
                 (
611
                     buffer,
612
                     buffer,
649
             try
650
             try
650
             {
651
             {
651
                 //将文件流读入缓冲区  
652
                 //将文件流读入缓冲区  
653
+                // ReSharper disable once MustUseReturnValue
652
                 fs.Read
654
                 fs.Read
653
                 (
655
                 (
654
                     buffer,
656
                     buffer,
678
         {
680
         {
679
             FileStream stream = new FileStream(filePath, FileMode.Open);
681
             FileStream stream = new FileStream(filePath, FileMode.Open);
680
             byte[] buffer = new byte[length];
682
             byte[] buffer = new byte[length];
681
-            //stream.Position = startIndex;
683
+            // ReSharper disable once MustUseReturnValue
682
             stream.Read
684
             stream.Read
683
             (
685
             (
684
                 buffer,
686
                 buffer,
711
             }
713
             }
712
             byte[] buffer = new byte[length];
714
             byte[] buffer = new byte[length];
713
             stream.Position = startIndex;
715
             stream.Position = startIndex;
716
+            // ReSharper disable once MustUseReturnValue
714
             stream.Read
717
             stream.Read
715
             (
718
             (
716
                 buffer,
719
                 buffer,

+ 3
- 3
XHWK.WKTool/system/ImageHelper.cs View File

132
             }
132
             }
133
             catch (Exception ex)
133
             catch (Exception ex)
134
             {
134
             {
135
-                LogHelper.WriteErrLog("ImageHelper(GetRGB)" + ex.Message, ex);
135
+                LogHelper.Logerror.Error("ImageHelper(GetRGB)" + ex.Message, ex);
136
             }
136
             }
137
 
137
 
138
             return sb.ToString();
138
             return sb.ToString();
187
             }
187
             }
188
             catch (Exception ex)
188
             catch (Exception ex)
189
             {
189
             {
190
-                LogHelper.WriteErrLog("【截图】(GetBitmapSource)截图失败," + ex.Message, ex);
190
+                LogHelper.Logerror.Error("【截图】(GetBitmapSource)截图失败," + ex.Message, ex);
191
                 return false;
191
                 return false;
192
             }
192
             }
193
         }
193
         }
242
             }
242
             }
243
             catch (Exception ex)
243
             catch (Exception ex)
244
             {
244
             {
245
-                LogHelper.WriteErrLog("【截图】(GetBitmapSource)截图失败," + ex.Message, ex);
245
+                LogHelper.Logerror.Error("【截图】(GetBitmapSource)截图失败," + ex.Message, ex);
246
                 return false;
246
                 return false;
247
             }
247
             }
248
         }
248
         }

+ 3
- 20
XHWK.WKTool/system/LogHelper.cs View File

9
 
9
 
10
     public class LogHelper
10
     public class LogHelper
11
     {
11
     {
12
-        public static readonly log4net.ILog loginfo = log4net.LogManager.GetLogger("loginfo");
13
-        public static readonly log4net.ILog logerror = log4net.LogManager.GetLogger("logerror");
12
+        public static readonly log4net.ILog Loginfo = log4net.LogManager.GetLogger("loginfo");
13
+        public static readonly log4net.ILog Logerror = log4net.LogManager.GetLogger("logerror");
14
 
14
 
15
         public static void InitLog4Net()
15
         public static void InitLog4Net()
16
         {
16
         {
17
             var logCfg = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config");
17
             var logCfg = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config");
18
             XmlConfigurator.ConfigureAndWatch(logCfg);
18
             XmlConfigurator.ConfigureAndWatch(logCfg);
19
-            loginfo.Info("日志初始化");
20
-        }
21
-
22
-        public static void WriteInfoLog(string info)
23
-        {
24
-            if (loginfo.IsInfoEnabled)
25
-            {
26
-                loginfo.Info(info);
27
-                Console.WriteLine(info);
28
-            }
29
-        }
30
-
31
-        public static void WriteErrLog(string info, Exception ex)
32
-        {
33
-            if (logerror.IsErrorEnabled)
34
-            {
35
-                logerror.Error("[V " + FileToolsCommon.GetConfigValue("VersionName") + "]" + info, ex);
36
-            }
19
+            Loginfo.Info("日志初始化");
37
         }
20
         }
38
     }
21
     }
39
 }
22
 }

+ 1
- 1
XHWK.WKTool/system/PdfTrunImage.cs View File

78
             }
78
             }
79
             catch (System.Exception ex)
79
             catch (System.Exception ex)
80
             {
80
             {
81
-                LogHelper.WriteErrLog("PDF转图片" +
81
+                LogHelper.Logerror.Error("PDF转图片" +
82
                     "【PdfTrunImage】" + ex.Message, ex);
82
                     "【PdfTrunImage】" + ex.Message, ex);
83
                 images = new List<string>();
83
                 images = new List<string>();
84
                 return images;
84
                 return images;

+ 13
- 8
XHWK.WKTool/system/ZHttpUtil.cs View File

126
         /// 调用Post接口
126
         /// 调用Post接口
127
         ///  </summary>
127
         ///  </summary>
128
         ///  <returns></returns>
128
         ///  <returns></returns>
129
-        public static string PostStr(string url, string postData)
129
+        public static string PostStr(string url, string postData, bool jm = true)
130
         {
130
         {
131
             Stream responseStream = null;
131
             Stream responseStream = null;
132
             try
132
             try
137
                 webRequest.Accept = "text/html,application/xhtml+xml,*/*";
137
                 webRequest.Accept = "text/html,application/xhtml+xml,*/*";
138
                 webRequest.ContentType = "application/json";
138
                 webRequest.ContentType = "application/json";
139
                 string aesPostData = postData;
139
                 string aesPostData = postData;
140
-                if (isSt)
140
+                if (jm)
141
                 {
141
                 {
142
-                    aesPostData = AesHelper.AesEncrypt(postData, "XINGHUOLIAOYUAN7");
142
+                    if (isSt)
143
+                    {
144
+                        aesPostData = AesHelper.AesEncrypt(postData, "XINGHUOLIAOYUAN7");
145
+                    }
146
+                    AddHeader(webRequest);
143
                 }
147
                 }
144
-                AddHeader(webRequest);
145
                 byte[] buffer = encoding.GetBytes(aesPostData);
148
                 byte[] buffer = encoding.GetBytes(aesPostData);
146
                 webRequest.ContentLength = buffer.Length;
149
                 webRequest.ContentLength = buffer.Length;
147
                 webRequest.GetRequestStream()
150
                 webRequest.GetRequestStream()
178
         /// </summary>
181
         /// </summary>
179
         /// <param name="url">请求地址</param>
182
         /// <param name="url">请求地址</param>
180
         /// <param name="postData">传输数据</param>
183
         /// <param name="postData">传输数据</param>
184
+        /// <param name="jm">加密</param>
181
         /// <param name="timeout">超时时间</param>
185
         /// <param name="timeout">超时时间</param>
182
         /// <param name="contentType">媒体格式</param>
186
         /// <param name="contentType">媒体格式</param>
183
         /// <param name="encode">编码</param>
187
         /// <param name="encode">编码</param>
185
         public static T PostSignle<T>
189
         public static T PostSignle<T>
186
         (
190
         (
187
             string url,
191
             string url,
188
-            int timeout = 5000,
189
             string postData = "",
192
             string postData = "",
193
+            bool jm = true,
194
+            int timeout = 5000,
190
             string contentType = "application/json;",
195
             string contentType = "application/json;",
191
             string encode = "UTF-8"
196
             string encode = "UTF-8"
192
         ) where T : class
197
         ) where T : class
195
             {
200
             {
196
                 try
201
                 try
197
                 {
202
                 {
198
-                    string respstr = PostStr(url, postData);
203
+                    string respstr = PostStr(url, postData, jm);
199
                     return JsonHelper.JsonToObj<T>(respstr);
204
                     return JsonHelper.JsonToObj<T>(respstr);
200
                 }
205
                 }
201
                 catch (Exception)
206
                 catch (Exception)
267
             }
272
             }
268
             catch (Exception ex)
273
             catch (Exception ex)
269
             {
274
             {
270
-                LogHelper.WriteErrLog("请求失败(若网络无问题,请重置winsock,解决方法:以管理员方式打开cmd执行 netsh winsock reset 后重启)", ex);
275
+                LogHelper.Logerror.Error("请求失败(若网络无问题,请重置winsock,解决方法:以管理员方式打开cmd执行 netsh winsock reset 后重启)", ex);
271
                 return null;
276
                 return null;
272
             }
277
             }
273
         }
278
         }
443
             }
448
             }
444
             catch (Exception ex)
449
             catch (Exception ex)
445
             {
450
             {
446
-                LogHelper.WriteErrLog("【文件上传】" + ex.Message, ex);
451
+                LogHelper.Logerror.Error("【文件上传】" + ex.Message, ex);
447
                 return null;
452
                 return null;
448
             }
453
             }
449
         }
454
         }

+ 2
- 8
XHWK.sln View File

1
 
1
 
2
 Microsoft Visual Studio Solution File, Format Version 12.00
2
 Microsoft Visual Studio Solution File, Format Version 12.00
3
-# Visual Studio Version 16
4
-VisualStudioVersion = 16.0.30406.217
3
+# Visual Studio Version 17
4
+VisualStudioVersion = 17.6.33829.357
5
 MinimumVisualStudioVersion = 10.0.40219.1
5
 MinimumVisualStudioVersion = 10.0.40219.1
6
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XHWK.Model", "XHWK.Model\XHWK.Model.csproj", "{445A4527-849B-4FA9-AA97-8ED1098D211E}"
7
-EndProject
8
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XHWK.WKTool", "XHWK.WKTool\XHWK.WKTool.csproj", "{57591E23-644E-416D-B1CA-BB04C550130F}"
6
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "XHWK.WKTool", "XHWK.WKTool\XHWK.WKTool.csproj", "{57591E23-644E-416D-B1CA-BB04C550130F}"
9
 EndProject
7
 EndProject
10
 Global
8
 Global
13
 		Release|x86 = Release|x86
11
 		Release|x86 = Release|x86
14
 	EndGlobalSection
12
 	EndGlobalSection
15
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
13
 	GlobalSection(ProjectConfigurationPlatforms) = postSolution
16
-		{445A4527-849B-4FA9-AA97-8ED1098D211E}.Debug|x86.ActiveCfg = Debug|x86
17
-		{445A4527-849B-4FA9-AA97-8ED1098D211E}.Debug|x86.Build.0 = Debug|x86
18
-		{445A4527-849B-4FA9-AA97-8ED1098D211E}.Release|x86.ActiveCfg = Release|x86
19
-		{445A4527-849B-4FA9-AA97-8ED1098D211E}.Release|x86.Build.0 = Release|x86
20
 		{57591E23-644E-416D-B1CA-BB04C550130F}.Debug|x86.ActiveCfg = Debug|x86
14
 		{57591E23-644E-416D-B1CA-BB04C550130F}.Debug|x86.ActiveCfg = Debug|x86
21
 		{57591E23-644E-416D-B1CA-BB04C550130F}.Debug|x86.Build.0 = Debug|x86
15
 		{57591E23-644E-416D-B1CA-BB04C550130F}.Debug|x86.Build.0 = Debug|x86
22
 		{57591E23-644E-416D-B1CA-BB04C550130F}.Release|x86.ActiveCfg = Release|x86
16
 		{57591E23-644E-416D-B1CA-BB04C550130F}.Release|x86.ActiveCfg = Release|x86

+ 1
- 1
星火微课/星火微课-测试.iss View File

3
 
3
 
4
 #define MyAppName "星火微课测试版"  
4
 #define MyAppName "星火微课测试版"  
5
 #define MyAppDir "xhwk_test"
5
 #define MyAppDir "xhwk_test"
6
-#define MyAppVersion "3.13.0"
6
+#define MyAppVersion "3.13.1"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
7
 #define MyAppPublisher "河南星火燎原软件科技有限公司"
8
 #define MyAppURL "http://www.xhkjedu.com/"
8
 #define MyAppURL "http://www.xhkjedu.com/"
9
 #define MySourcePath "D:\Project\CSharp\xh-wkclient\XHWK.WKTool\bin\x86\Debug\"
9
 #define MySourcePath "D:\Project\CSharp\xh-wkclient\XHWK.WKTool\bin\x86\Debug\"

Loading…
Cancel
Save