## 2025-02-08 星期六更新

### MyHouse    V1.0.2502.0801
- *.[新增]适配新版接口。
### SmartHouseAPI    V1.0.2502.0801
- *.[新增]支持Docker部署,支持NAS。
This commit is contained in:
紫林软件 2025-02-08 16:59:53 +08:00
commit f0ff641ed4
619 changed files with 143410 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
Publish/
Res/
**/obj
*.pdb
**/dcu
*.dcu
**/Secure
*/.vs

Binary file not shown.

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>

Binary file not shown.

BIN
Bin/Debug/MyHouse/RaUI.dll Normal file

Binary file not shown.

Binary file not shown.

46205
Bin/Debug/MyHouse/System.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,2 @@
[MyHouse]
hwnd=1384354

View File

@ -0,0 +1,3 @@
<root>
<list id="LastUpdateTime" Value="2025/2/8 16:54:59" />
</root>

127
Bin/混淆_Debug.nrproj Normal file
View File

@ -0,0 +1,127 @@
<Reactor_Project ProjectFormat="2">
<Main_Assembly>Debug\SmartHouseAPI\SmartHouseAPI.exe</Main_Assembly>
<Assembly>
<Filename>Debug\SmartHouseAPI\ryControls.dll</Filename>
</Assembly>
<Assembly>
<Filename>Debug\SmartHouseAPI\ryUpdate.dll</Filename>
</Assembly>
<Assembly>
<Filename>Debug\SmartHouseAPI\MyDb_SQLite.dll</Filename>
</Assembly>
<Assembly>
<Filename>Debug\SmartHouseAPI\MyDb.dll</Filename>
</Assembly>
<General_Settings>
<Automatic_Exception_Handling>true</Automatic_Exception_Handling>
<Application_Compression>true</Application_Compression>
<Show_Loading_Screen>false</Show_Loading_Screen>
<Digital_Certificate_PFX_SPC_File />
<Digital_Certificate_PVK_File />
<Digital_Certificate_PFX_PVK_Password />
<Time_Stamp_URL_SHA1>http://timestamp.verisign.com/scripts/timstamp.dll</Time_Stamp_URL_SHA1>
<Time_Stamp_URL_SHA256>http://sha256timestamp.ws.symantec.com/sha256/timestamp</Time_Stamp_URL_SHA256>
<Embed_Assemblies>false</Embed_Assemblies>
<Enable_Visual_Styles>true</Enable_Visual_Styles>
<Force_Admin_Privileges>false</Force_Admin_Privileges>
<Merge_Assemblies>false</Merge_Assemblies>
<Merge_Assembly_Attributes>true</Merge_Assembly_Attributes>
<Project_Targets_Mono_Framework>false</Project_Targets_Mono_Framework>
<Strong_Name_KeyPair_File />
<Strong_Name_KeyPair_Password />
<Target_File>&lt;AssemblyLocation&gt;\Secure\&lt;AssemblyFileName&gt;</Target_File>
<V3_Mode>true</V3_Mode>
</General_Settings>
<Protection_Settings>
<Anti_ILDASM>true</Anti_ILDASM>
<Inject_Invalid_Metadata>true</Inject_Invalid_Metadata>
<Anti_Tampering>false</Anti_Tampering>
<Control_Flow_Obfuscation>false</Control_Flow_Obfuscation>
<Control_Flow_Obfuscation_Level>9</Control_Flow_Obfuscation_Level>
<Native_EXE_File>true</Native_EXE_File>
<Native_EXE_Embed_Pdb>false</Native_EXE_Embed_Pdb>
<NecroBit>false</NecroBit>
<NecroBit_Reflection_Compatibility_Mode>false</NecroBit_Reflection_Compatibility_Mode>
<Obfuscation>true</Obfuscation>
<Pruning>false</Pruning>
<Create_Mapping_File>false</Create_Mapping_File>
<Exclude_Enums>false</Exclude_Enums>
<Exclude_Events>false</Exclude_Events>
<Exclude_Fields>false</Exclude_Fields>
<Exclude_Methods>false</Exclude_Methods>
<Exclude_Properties>false</Exclude_Properties>
<Exclude_Serializable_Types>false</Exclude_Serializable_Types>
<Exclude_Types>false</Exclude_Types>
<Exclusion_Rules />
<Generate_Short_Strings>false</Generate_Short_Strings>
<Ignore_InternalsVisibleTo>false</Ignore_InternalsVisibleTo>
<Incremental_Obfuscation>false</Incremental_Obfuscation>
<Merge_Namespaces>false</Merge_Namespaces>
<Merge_Namespaces_Namespace />
<Obfuscate_All_Method_Parameters>false</Obfuscate_All_Method_Parameters>
<Obfuscate_Public_Types>false</Obfuscate_Public_Types>
<Use_Unprintable_Characters>false</Use_Unprintable_Characters>
<Pre-JIT_Methods>false</Pre-JIT_Methods>
<Public_Types_Internalization>false</Public_Types_Internalization>
<Resource_Encryption_And_Compression>true</Resource_Encryption_And_Compression>
<String_Encryption>true</String_Encryption>
<String_Encryption_Mode>All</String_Encryption_Mode>
<String_Encryption_InclusionExclusion_List />
<Strong_Name_Removal_Protection>false</Strong_Name_Removal_Protection>
</Protection_Settings>
<Lock_Settings>
<Expire_When_All_Expired>true</Expire_When_All_Expired>
<Inbuilt_Lock_Evaluation_Period_Enabled>false</Inbuilt_Lock_Evaluation_Period_Enabled>
<Inbuilt_Lock_Evaluation_Period_Type>Trial_Days</Inbuilt_Lock_Evaluation_Period_Type>
<Inbuilt_Lock_Evaluation_Period_Time>14</Inbuilt_Lock_Evaluation_Period_Time>
<Inbuilt_Lock_Expiry_Date_Enabled>false</Inbuilt_Lock_Expiry_Date_Enabled>
<Inbuilt_Lock_Expiry_Date>20180503</Inbuilt_Lock_Expiry_Date>
<Inbuilt_Lock_Number_Of_Uses_Enabled>false</Inbuilt_Lock_Number_Of_Uses_Enabled>
<Inbuilt_Lock_Number_Of_Uses>10</Inbuilt_Lock_Number_Of_Uses>
<Inbuilt_Lock_Max_Number_Of_Instances_Enabled>false</Inbuilt_Lock_Max_Number_Of_Instances_Enabled>
<Inbuilt_Lock_Max_Number_Of_Instances>5</Inbuilt_Lock_Max_Number_Of_Instances>
<Run_Another_Process_After_Expiration />
<Run_Without_License_File>true</Run_Without_License_File>
<Shutdown_Process_After_Expiration>true</Shutdown_Process_After_Expiration>
<Static_License_FileName />
</Lock_Settings>
<Dialog_Settings>
<Dialog_Evaluation_Period_Enabled>true</Dialog_Evaluation_Period_Enabled>
<Dialog_Evaluation_Period>You are on day [current_minutes_days] of your [max_minutes_days] day evaluation period. Your trial period is expired! You need to purchase a license to run this software.</Dialog_Evaluation_Period>
<Dialog_Expiry_Date_Enabled>true</Dialog_Expiry_Date_Enabled>
<Dialog_Expiry_Date>Your expiration date is reached! You need to purchase a license file to run this software.</Dialog_Expiry_Date>
<Dialog_Number_Of_Uses_Enabled>true</Dialog_Number_Of_Uses_Enabled>
<Dialog_Number_Of_Uses>You have used this software [current_uses] times out of a maximum of [max_uses]. You have [uses_left] uses left. Your trial period is expired! You need to purchase a license to run this software.</Dialog_Number_Of_Uses>
<Dialog_Max_Number_Of_Instances_Enabled>true</Dialog_Max_Number_Of_Instances_Enabled>
<Dialog_Max_Number_Of_Instances>You can only run maximal [max_processes] instances of this software at the same time.</Dialog_Max_Number_Of_Instances>
<Dialog_License_Not_Found_Enabled>true</Dialog_License_Not_Found_Enabled>
<Dialog_License_Not_Found>This software won't run without a valid license file. Either a valid license file could not be found or your license file is expired.</Dialog_License_Not_Found>
<Dialog_Nag_Screen_Enabled>false</Dialog_Nag_Screen_Enabled>
<Dialog_Nag_Screen>Nag Screen! This message will disappear when a valid license file is installed. You are on day [current_minutes_days] of your [max_minutes_days] day evaluation period. You have [minutes_days_left] days left. You have used this software [current_uses] times out of a maximum of [max_uses]. You have [uses_left] uses left.</Dialog_Nag_Screen>
<Dialog_Nag_Screen_XDays>-1</Dialog_Nag_Screen_XDays>
<Dialog_Box_Interface />
<Dialog_Caption>Lock System</Dialog_Caption>
<Color_Gradient_Begin>255255255</Color_Gradient_Begin>
<Color_Gradient_End>157211252</Color_Gradient_End>
</Dialog_Settings>
<License_Manager_Settings>
<Individual_Licensing_Bahvior>false</Individual_Licensing_Bahvior>
<License_Evaluation_Enabled>false</License_Evaluation_Enabled>
<License_Evaluation_Type>Trial_Days</License_Evaluation_Type>
<License_Evaluation_Time>1</License_Evaluation_Time>
<License_Expiry_Date_Enabled>false</License_Expiry_Date_Enabled>
<License_Expiry_Date>20180503</License_Expiry_Date>
<License_Hardware_Lock_Enabled>false</License_Hardware_Lock_Enabled>
<License_Hardware_BOARD>true</License_Hardware_BOARD>
<License_Hardware_CPU>true</License_Hardware_CPU>
<License_Hardware_HDD>false</License_Hardware_HDD>
<License_Hardware_MAC>true</License_Hardware_MAC>
<License_Hardware_ID>####-####-####-####-####</License_Hardware_ID>
<License_Number_Of_Uses_Enabled>false</License_Number_Of_Uses_Enabled>
<License_Number_Of_Uses>10</License_Number_Of_Uses>
<License_Number_Of_Instances_Enabled>false</License_Number_Of_Instances_Enabled>
<License_Number_Of_Instances>5</License_Number_Of_Instances>
<AdditonalLicenseInformation />
<MasterKey>Hr7YPNVEOuGLGJrWzxt2hKWI0xXn4h31i5nGAghNonQ=|&lt;RSAKeyValue&gt;&lt;Modulus&gt;twxUWoRvbb2N6CMXQL36TBij9G7nxvU6rTULmVnbS1jYTvPQSKohB2o95vJvdlxjw7KBxYhIFqj9yEn5xvD4GVhj8+MEvG4lNqN1e1FErGin9YYYr4dTZHFe73aG5xxoscKZIg3YYdoBp0lgE2xwfaHyYe03M3mbhQx6axyf7Ak=&lt;/Modulus&gt;&lt;Exponent&gt;AQAB&lt;/Exponent&gt;&lt;P&gt;6OP29NbAV7sOKvOFRIeBbnJLh4fOiAjGtqiBlHLyOHt6w1s8N4o4Kr3N2KPVcpj82655KRzRlVDkwQika4eZ9w==&lt;/P&gt;&lt;Q&gt;yTY83K4a/WpcifMvuAFEuM9wVfXtbQUpV0MSSNgCmWcd6G3+GYShmPUW1gWMv+4H59iiPef1pnXvuzPYnQMp/w==&lt;/Q&gt;&lt;DP&gt;J/h4Oi1hda01EUoaZVicbkhPjkNQvyhCcrcZBlF0IR2QRFc0TpP6b9uDqNr1l2WKgGnBgbzge7AWksrY7VuooQ==&lt;/DP&gt;&lt;DQ&gt;PtmhQzFjHts1UqXStwA2bh/lsAQkiJQ/KJG7yWMn1LEAB5Ur9N6X94Y+/tU29NCuSX5Cl2G4OqnGG0yDke/mEw==&lt;/DQ&gt;&lt;InverseQ&gt;jiKqvwfWSUpKybcT3ucAedpT+kKuB/Qs1xJ0Z6bYOE8EsljxGbq8428Cma5rp33WMP6ybq2HwOddm/73ZFZZKQ==&lt;/InverseQ&gt;&lt;D&gt;bYP46/cUW8nvHxXvkZKYL/MGFPZNwaFyq7Jy8BrssxXCxOnmkbMH89HCm2ws99mq7qjcL3yr9LLCs5Re1oHRTQT2Vu2hXuGAGVjvHwYPLWGvcYvIuTWoTEw79m+lh/7CYDxfwzwWL095a8D40OvfHauk7xrXDB+qIsEJ7Gkjh0k=&lt;/D&gt;&lt;/RSAKeyValue&gt;</MasterKey>
</License_Manager_Settings>
</Reactor_Project>

127
Bin/混淆_Release.nrproj Normal file
View File

@ -0,0 +1,127 @@
<Reactor_Project ProjectFormat="2">
<Main_Assembly>Release\SmartHouseAPI\SmartHouseAPI.exe</Main_Assembly>
<Assembly>
<Filename>Release\SmartHouseAPI\ryControls.dll</Filename>
</Assembly>
<Assembly>
<Filename>Release\SmartHouseAPI\ryUpdate.dll</Filename>
</Assembly>
<Assembly>
<Filename>Release\SmartHouseAPI\MyDb_SQLite.dll</Filename>
</Assembly>
<Assembly>
<Filename>Release\SmartHouseAPI\MyDb.dll</Filename>
</Assembly>
<General_Settings>
<Automatic_Exception_Handling>true</Automatic_Exception_Handling>
<Application_Compression>true</Application_Compression>
<Show_Loading_Screen>false</Show_Loading_Screen>
<Digital_Certificate_PFX_SPC_File />
<Digital_Certificate_PVK_File />
<Digital_Certificate_PFX_PVK_Password />
<Time_Stamp_URL_SHA1>http://timestamp.verisign.com/scripts/timstamp.dll</Time_Stamp_URL_SHA1>
<Time_Stamp_URL_SHA256>http://sha256timestamp.ws.symantec.com/sha256/timestamp</Time_Stamp_URL_SHA256>
<Embed_Assemblies>false</Embed_Assemblies>
<Enable_Visual_Styles>true</Enable_Visual_Styles>
<Force_Admin_Privileges>false</Force_Admin_Privileges>
<Merge_Assemblies>false</Merge_Assemblies>
<Merge_Assembly_Attributes>true</Merge_Assembly_Attributes>
<Project_Targets_Mono_Framework>false</Project_Targets_Mono_Framework>
<Strong_Name_KeyPair_File />
<Strong_Name_KeyPair_Password />
<Target_File>&lt;AssemblyLocation&gt;\Secure\&lt;AssemblyFileName&gt;</Target_File>
<V3_Mode>true</V3_Mode>
</General_Settings>
<Protection_Settings>
<Anti_ILDASM>true</Anti_ILDASM>
<Inject_Invalid_Metadata>true</Inject_Invalid_Metadata>
<Anti_Tampering>false</Anti_Tampering>
<Control_Flow_Obfuscation>false</Control_Flow_Obfuscation>
<Control_Flow_Obfuscation_Level>9</Control_Flow_Obfuscation_Level>
<Native_EXE_File>true</Native_EXE_File>
<Native_EXE_Embed_Pdb>false</Native_EXE_Embed_Pdb>
<NecroBit>false</NecroBit>
<NecroBit_Reflection_Compatibility_Mode>false</NecroBit_Reflection_Compatibility_Mode>
<Obfuscation>true</Obfuscation>
<Pruning>false</Pruning>
<Create_Mapping_File>false</Create_Mapping_File>
<Exclude_Enums>false</Exclude_Enums>
<Exclude_Events>false</Exclude_Events>
<Exclude_Fields>false</Exclude_Fields>
<Exclude_Methods>false</Exclude_Methods>
<Exclude_Properties>false</Exclude_Properties>
<Exclude_Serializable_Types>false</Exclude_Serializable_Types>
<Exclude_Types>false</Exclude_Types>
<Exclusion_Rules />
<Generate_Short_Strings>false</Generate_Short_Strings>
<Ignore_InternalsVisibleTo>false</Ignore_InternalsVisibleTo>
<Incremental_Obfuscation>false</Incremental_Obfuscation>
<Merge_Namespaces>false</Merge_Namespaces>
<Merge_Namespaces_Namespace />
<Obfuscate_All_Method_Parameters>false</Obfuscate_All_Method_Parameters>
<Obfuscate_Public_Types>false</Obfuscate_Public_Types>
<Use_Unprintable_Characters>false</Use_Unprintable_Characters>
<Pre-JIT_Methods>false</Pre-JIT_Methods>
<Public_Types_Internalization>false</Public_Types_Internalization>
<Resource_Encryption_And_Compression>true</Resource_Encryption_And_Compression>
<String_Encryption>true</String_Encryption>
<String_Encryption_Mode>All</String_Encryption_Mode>
<String_Encryption_InclusionExclusion_List />
<Strong_Name_Removal_Protection>false</Strong_Name_Removal_Protection>
</Protection_Settings>
<Lock_Settings>
<Expire_When_All_Expired>true</Expire_When_All_Expired>
<Inbuilt_Lock_Evaluation_Period_Enabled>false</Inbuilt_Lock_Evaluation_Period_Enabled>
<Inbuilt_Lock_Evaluation_Period_Type>Trial_Days</Inbuilt_Lock_Evaluation_Period_Type>
<Inbuilt_Lock_Evaluation_Period_Time>14</Inbuilt_Lock_Evaluation_Period_Time>
<Inbuilt_Lock_Expiry_Date_Enabled>false</Inbuilt_Lock_Expiry_Date_Enabled>
<Inbuilt_Lock_Expiry_Date>20180503</Inbuilt_Lock_Expiry_Date>
<Inbuilt_Lock_Number_Of_Uses_Enabled>false</Inbuilt_Lock_Number_Of_Uses_Enabled>
<Inbuilt_Lock_Number_Of_Uses>10</Inbuilt_Lock_Number_Of_Uses>
<Inbuilt_Lock_Max_Number_Of_Instances_Enabled>false</Inbuilt_Lock_Max_Number_Of_Instances_Enabled>
<Inbuilt_Lock_Max_Number_Of_Instances>5</Inbuilt_Lock_Max_Number_Of_Instances>
<Run_Another_Process_After_Expiration />
<Run_Without_License_File>true</Run_Without_License_File>
<Shutdown_Process_After_Expiration>true</Shutdown_Process_After_Expiration>
<Static_License_FileName />
</Lock_Settings>
<Dialog_Settings>
<Dialog_Evaluation_Period_Enabled>true</Dialog_Evaluation_Period_Enabled>
<Dialog_Evaluation_Period>You are on day [current_minutes_days] of your [max_minutes_days] day evaluation period. Your trial period is expired! You need to purchase a license to run this software.</Dialog_Evaluation_Period>
<Dialog_Expiry_Date_Enabled>true</Dialog_Expiry_Date_Enabled>
<Dialog_Expiry_Date>Your expiration date is reached! You need to purchase a license file to run this software.</Dialog_Expiry_Date>
<Dialog_Number_Of_Uses_Enabled>true</Dialog_Number_Of_Uses_Enabled>
<Dialog_Number_Of_Uses>You have used this software [current_uses] times out of a maximum of [max_uses]. You have [uses_left] uses left. Your trial period is expired! You need to purchase a license to run this software.</Dialog_Number_Of_Uses>
<Dialog_Max_Number_Of_Instances_Enabled>true</Dialog_Max_Number_Of_Instances_Enabled>
<Dialog_Max_Number_Of_Instances>You can only run maximal [max_processes] instances of this software at the same time.</Dialog_Max_Number_Of_Instances>
<Dialog_License_Not_Found_Enabled>true</Dialog_License_Not_Found_Enabled>
<Dialog_License_Not_Found>This software won't run without a valid license file. Either a valid license file could not be found or your license file is expired.</Dialog_License_Not_Found>
<Dialog_Nag_Screen_Enabled>false</Dialog_Nag_Screen_Enabled>
<Dialog_Nag_Screen>Nag Screen! This message will disappear when a valid license file is installed. You are on day [current_minutes_days] of your [max_minutes_days] day evaluation period. You have [minutes_days_left] days left. You have used this software [current_uses] times out of a maximum of [max_uses]. You have [uses_left] uses left.</Dialog_Nag_Screen>
<Dialog_Nag_Screen_XDays>-1</Dialog_Nag_Screen_XDays>
<Dialog_Box_Interface />
<Dialog_Caption>Lock System</Dialog_Caption>
<Color_Gradient_Begin>255255255</Color_Gradient_Begin>
<Color_Gradient_End>157211252</Color_Gradient_End>
</Dialog_Settings>
<License_Manager_Settings>
<Individual_Licensing_Bahvior>false</Individual_Licensing_Bahvior>
<License_Evaluation_Enabled>false</License_Evaluation_Enabled>
<License_Evaluation_Type>Trial_Days</License_Evaluation_Type>
<License_Evaluation_Time>1</License_Evaluation_Time>
<License_Expiry_Date_Enabled>false</License_Expiry_Date_Enabled>
<License_Expiry_Date>20180503</License_Expiry_Date>
<License_Hardware_Lock_Enabled>false</License_Hardware_Lock_Enabled>
<License_Hardware_BOARD>true</License_Hardware_BOARD>
<License_Hardware_CPU>true</License_Hardware_CPU>
<License_Hardware_HDD>false</License_Hardware_HDD>
<License_Hardware_MAC>true</License_Hardware_MAC>
<License_Hardware_ID>####-####-####-####-####</License_Hardware_ID>
<License_Number_Of_Uses_Enabled>false</License_Number_Of_Uses_Enabled>
<License_Number_Of_Uses>10</License_Number_Of_Uses>
<License_Number_Of_Instances_Enabled>false</License_Number_Of_Instances_Enabled>
<License_Number_Of_Instances>5</License_Number_Of_Instances>
<AdditonalLicenseInformation />
<MasterKey>Hr7YPNVEOuGLGJrWzxt2hKWI0xXn4h31i5nGAghNonQ=|&lt;RSAKeyValue&gt;&lt;Modulus&gt;twxUWoRvbb2N6CMXQL36TBij9G7nxvU6rTULmVnbS1jYTvPQSKohB2o95vJvdlxjw7KBxYhIFqj9yEn5xvD4GVhj8+MEvG4lNqN1e1FErGin9YYYr4dTZHFe73aG5xxoscKZIg3YYdoBp0lgE2xwfaHyYe03M3mbhQx6axyf7Ak=&lt;/Modulus&gt;&lt;Exponent&gt;AQAB&lt;/Exponent&gt;&lt;P&gt;6OP29NbAV7sOKvOFRIeBbnJLh4fOiAjGtqiBlHLyOHt6w1s8N4o4Kr3N2KPVcpj82655KRzRlVDkwQika4eZ9w==&lt;/P&gt;&lt;Q&gt;yTY83K4a/WpcifMvuAFEuM9wVfXtbQUpV0MSSNgCmWcd6G3+GYShmPUW1gWMv+4H59iiPef1pnXvuzPYnQMp/w==&lt;/Q&gt;&lt;DP&gt;J/h4Oi1hda01EUoaZVicbkhPjkNQvyhCcrcZBlF0IR2QRFc0TpP6b9uDqNr1l2WKgGnBgbzge7AWksrY7VuooQ==&lt;/DP&gt;&lt;DQ&gt;PtmhQzFjHts1UqXStwA2bh/lsAQkiJQ/KJG7yWMn1LEAB5Ur9N6X94Y+/tU29NCuSX5Cl2G4OqnGG0yDke/mEw==&lt;/DQ&gt;&lt;InverseQ&gt;jiKqvwfWSUpKybcT3ucAedpT+kKuB/Qs1xJ0Z6bYOE8EsljxGbq8428Cma5rp33WMP6ybq2HwOddm/73ZFZZKQ==&lt;/InverseQ&gt;&lt;D&gt;bYP46/cUW8nvHxXvkZKYL/MGFPZNwaFyq7Jy8BrssxXCxOnmkbMH89HCm2ws99mq7qjcL3yr9LLCs5Re1oHRTQT2Vu2hXuGAGVjvHwYPLWGvcYvIuTWoTEw79m+lh/7CYDxfwzwWL095a8D40OvfHauk7xrXDB+qIsEJ7Gkjh0k=&lt;/D&gt;&lt;/RSAKeyValue&gt;</MasterKey>
</License_Manager_Settings>
</Reactor_Project>

8
CHANGELOG.md Normal file
View File

@ -0,0 +1,8 @@
## :date:2025-02-08 星期六更新
### MyHouse V1.0.2502.0801
- :cactus:[新增]适配新版接口。
### SmartHouseAPI V1.0.2502.0801
- :cactus:[新增]支持Docker部署,支持NAS。

17
README.md Normal file
View File

@ -0,0 +1,17 @@
# 智能家庭API
#### 针对个人数据管理的API接口集合,部署在docker上供各种app和网页访问。
#### docker部署
1.运行以下命令,创建docker镜像,注意末尾的点
```bash
docker buildx build -t smarthouse_api:latest .
```
2.运行以下命令,保存镜像
```bash
docker save -o myimage.tar smarthouse_api:latest
```

File diff suppressed because one or more lines are too long

190
Source/MyHouse/API/API.cs Normal file
View File

@ -0,0 +1,190 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MyHouse.API
{
public static class API
{
/// <summary>
/// 添加物品日志
/// </summary>
/// <param name="OpName"></param>
/// <param name="OpId"></param>
/// <param name="Des"></param>
/// <param name="AddTime"></param>
/// <returns></returns>
public static bool AddGoodsLogs(string OpName, int OpId, string Des,long AddTime=0)
{
string post_str = "api=AddLogs&id=" + OpId+ "&opName="+ RyWeb.WebDecode.UrlEncode(OpName)+"&Des="+ RyWeb.WebDecode.UrlEncode(Des) + "&AddTime=" + AddTime;
var jsonResult = API.Post("goods.aspx", post_str);
return jsonResult.IsOK;
}
/// <summary>
/// 获取下个还款日
/// </summary>
/// <param name="calcDt">计算时间</param>
/// <param name="BillDate">账单日</param>
/// <param name="RePayDateMode">还款日模式</param>
/// <param name="RePayDate">还款日</param>
/// <returns></returns>
public static DateTime GetNextRepayDate(DateTime calcDt, int BillDate,int RePayDateMode, int RePayDate)
{
int day = calcDt.Day;
int addmonth = 1;
if (RePayDateMode == 0)
{
if (BillDate < RePayDate && (BillDate > day && BillDate != 0)) { addmonth = 0; }
else if (RePayDate > day && BillDate == 0) { addmonth = 0; }
else if (BillDate <= day && BillDate != 0)
{
addmonth = RePayDate > BillDate ? 1 : 2;
}
return calcDt.AddDays(-day + RePayDate).AddMonths(addmonth);
}
else
{
if(BillDate>=day)
{
return calcDt.AddDays(-day + BillDate+RePayDate);
}
else
{
return calcDt.AddDays(-day+ BillDate).AddMonths(1).AddDays(RePayDate);
}
}
}
/// <summary>
/// post数据
/// </summary>
/// <param name="uri"></param>
/// <param name="postdata"></param>
/// <returns></returns>
public static PostResult Post(string group,string api, string postdata)
{
PostResult postResult = new PostResult();
var html = Public_Config.ry_api.Post(Public_Config.Api_Url + group + "/"+ api, postdata, Public_Config.Cookie);
if (html.StatusCode == System.Net.HttpStatusCode.OK)
{
postResult.json.Text = html.Html;
postResult.Result = postResult.json.GetJsonValue(ConstVar.json_Result, 0);
postResult.ResultText = postResult.json.GetJsonValue(ConstVar.json_ResultText, "");
if (postResult.Result == ResultVar.json_UnLogin)
{
postResult.Result = ResultVar.json_UnLogin;
postResult.ResultText = "登陆失败";
}
}
else
{
postResult.Result = -10000;
postResult.ResultText = "服务器异常,请联系管理员";
}
return postResult;
}
public static PostResult Get(string group, string api)
{
PostResult postResult = new PostResult();
var html = Public_Config.ry_api.Get(Public_Config.Api_Url + group + "/" + api, Public_Config.Cookie);
if (html.StatusCode == System.Net.HttpStatusCode.OK)
{
postResult.json.Text = html.Html;
postResult.Result = postResult.json.GetJsonValue(ConstVar.json_Result, 0);
postResult.ResultText = postResult.json.GetJsonValue(ConstVar.json_ResultText, "");
if (postResult.Result == ResultVar.json_UnLogin)
{
postResult.Result = ResultVar.json_UnLogin;
postResult.ResultText = "登陆失败";
}
}
else
{
postResult.Result = -10000;
postResult.ResultText = "服务器异常,请联系管理员";
}
return postResult;
}
/// <summary>
/// post数据
/// </summary>
/// <param name="uri"></param>
/// <param name="postdata"></param>
/// <returns></returns>
public static PostResult Post(string uri, string postdata)
{
PostResult postResult = new PostResult();
var html = Public_Config.ry_api.Post(Public_Config.Api_Url + uri+".aspx",postdata, Public_Config.Cookie);
if (html.StatusCode== System.Net.HttpStatusCode.OK)
{
postResult.json.Text = html.Html;
postResult.Result = postResult.json.GetJsonValue(ConstVar.json_Result, 0);
postResult.ResultText = postResult.json.GetJsonValue(ConstVar.json_ResultText, "");
if (postResult.Result == ResultVar.json_UnLogin)
{
postResult.Result = ResultVar.json_UnLogin;
postResult.ResultText = "登陆失败";
}
}
else
{
postResult.Result = -10000;
postResult.ResultText = "服务器异常,请联系管理员";
}
return postResult;
}
public static void ErrorJson(PostResult result)
{
//if (result == ResultVar.json_UnLogin.ToString())
//{
// if (MessageBox.Show("登陆已失效,是否要重新登陆?", "错误代码:" + result, MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
// {
// FrmLogin frm = new FrmLogin();
// frm.ShowDialog();
// }
//}
//else
//{
MessageBox.Show(result.ResultText, "错误代码:" + result.Result, MessageBoxButtons.OK, MessageBoxIcon.Warning);
//}
}
}
public class PostResult
{
/// <summary>
/// 判断是否成功执行
/// </summary>
public bool IsOK
{
get
{
return Result == ResultVar.json_Success;
}
}
public int Result { get; set; } = 0;
public string ResultText { get; set; } = "";
public Json json { get; set; } = new Json();
public DataTable List
{
get
{
return json.GetJsonValueByTable("datas");
}
}
public string Get(string id, string defValue)
{
return json.GetJsonValue(id, defValue);
}
public int Get(string id, int defValue)
{
return json.GetJsonValue(id, defValue);
}
public long Get(string id, long defValue)
{
return json.GetJsonValue(id, defValue);
}
}
}

View File

@ -0,0 +1,90 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyHouse.API
{
/// <summary>
/// ConstVar 的摘要说明
/// </summary>
public class ConstVar
{
public const string json_Result = "code";
public const string json_ResultText = "ResultText";
/// <summary>
/// 6位校验码目前只启用首位校验码为1
/// </summary>
public const string json_Start = "100000";
/// <summary>
/// 登陆成功的字符串
/// </summary>
public const string Login_Success = "success";
public ConstVar()
{
//
// TODO: 在此处添加构造函数逻辑
//
}
}
public class ResultVar
{
/// <summary>
/// 数据库错误
/// </summary>
public const int json_DbError = -1000;
/// <summary>
/// API未发现
/// </summary>
public const int json_APIUnFound = -1001;
/// <summary>
/// 未登陆
/// </summary>
public const int json_UnLogin = -1002;
/// <summary>
/// 没有权限
/// </summary>
public const int json_UnAuthorized = -1003;
/// <summary>
/// 账号过期
/// </summary>
public const int json_UserOutDate = -1004;
/// <summary>
/// 校验失败
/// </summary>
public const int json_CheckError = -1005;
/// <summary>
/// 结果返回成功
/// </summary>
public const int json_Success =200;
/// <summary>
/// 错误的用户名
/// </summary>
public const int json_UserUnFound = -1;
/// <summary>
/// 数据没发现
/// </summary>
public const int json_DbUnFound = -1;
/// <summary>
/// 错误的密码
/// </summary>
public const int json_ErrorPwd = -2;
/// <summary>
/// 无效的字符串
/// </summary>
public const int json_InvalidStr = -3;
/// <summary>
/// 用户已被禁用
/// </summary>
public const int json_ForbiddenUser = -4;
/// <summary>
/// 用户已存在
/// </summary>
public const int json_UserExist = -5;
/// <summary>
/// 没有发现数据或文件
/// </summary>
public const int json_UnFound = -6;
}
}

240
Source/MyHouse/API/Json.cs Normal file
View File

@ -0,0 +1,240 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using ryCommon;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyHouse.API
{
/// <summary>
/// json 的摘要说明
/// </summary>
public class Json
{
/// <summary>
///
/// </summary>
public JObject jo;
/// <summary>
///
/// </summary>
public Json()
{
jo = new JObject();
}
/// <summary>
///
/// </summary>
/// <param name="_jsonText"></param>
public Json(string _jsonText)
{
if (_jsonText.Length == 0)
{
jo = new JObject(); return;
}
string xx = _jsonText.GetStr("descUrl", "counterApi");
var jsonText = _jsonText.Replace("+new Date,", "'',");
jsonText = jsonText.Replace("!true,", "false,");
if (xx.Length > 0) { jsonText = jsonText.Replace(xx, " :'',\r\n "); }
try
{
if (jsonText.Length == 0)
{ jo = new JObject(); }
else
jo = (JObject)JsonConvert.DeserializeObject(jsonText);
}
catch (Exception)
{
jo = new JObject();
}
}
/// <summary>
/// 获取或设置json文本
/// </summary>
public string Text
{
get { return jo.ToString(); }
set
{
try
{
jo = (JObject)JsonConvert.DeserializeObject(value);
}
catch { }
}
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public string GetJsonValue(string name)
{
if (jo[name] == null) { return ""; }
else
{ return jo[name].ToString(); }
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <param name="defvalue"></param>
/// <returns></returns>
public string GetJsonValue(string name, string defvalue)
{
if (jo[name] == null) { return defvalue; }
else
{ return jo[name].ToString(); }
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <param name="defvalue"></param>
/// <returns></returns>
public bool GetJsonValue(string name, bool defvalue)
{
if (jo[name] == null) { return defvalue; }
else
{
string value = jo[name].ToString().ToLower();
return value == "1" || value == "true";
}
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <param name="defvalue"></param>
/// <returns></returns>
public int GetJsonValue(string name, int defvalue)
{
if (jo[name] == null) { return defvalue; }
else
{ return jo[name].ToInt(defvalue); }
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <param name="defvalue"></param>
/// <returns></returns>
public Int64 GetJsonValue(string name, Int64 defvalue)
{
if (jo[name] == null) { return defvalue; }
else
{ return jo[name].ToInt64(defvalue); }
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <param name="defvalue"></param>
/// <returns></returns>
public decimal GetJsonValue(string name, decimal defvalue)
{
if (jo[name] == null) { return defvalue; }
else
{ return jo[name].ToDecimal(defvalue); }
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <param name="defvalue"></param>
/// <returns></returns>
public double GetJsonValue(string name, double defvalue)
{
if (jo[name] == null) { return defvalue; }
else
{ return jo[name].ToDouble(defvalue); }
}
/// <summary>
///
/// </summary>
/// <param name="name"></param>
/// <returns></returns>
public DataTable GetJsonValueByTable(string name)
{
if (jo[name] == null) { return new DataTable(); }
else
{
try
{
return JsonConvert.DeserializeObject(jo[name].ToString(), typeof(DataTable)) as DataTable;
}
catch { return new DataTable(); }
}
}
/// <summary>
///
/// </summary>
/// <param name="Name"></param>
/// <param name="value"></param>
public void Add(string Name, string value)
{
try
{
jo.Add(Name, value);
}
catch { }
}
/// <summary>
///
/// </summary>
/// <param name="Name"></param>
/// <param name="value"></param>
public void Add(string Name, int value)
{
try
{
jo.Add(Name, value);
}
catch { }
}
/// <summary>
///
/// </summary>
/// <param name="Name"></param>
/// <param name="value"></param>
public void Add(string Name, bool value)
{
try
{
jo.Add(Name, value ? 1 : 0);
}
catch { }
}
/// <summary>
///
/// </summary>
/// <param name="Name"></param>
/// <param name="value"></param>
public void Add(string Name, decimal value)
{
try
{
jo.Add(Name, value);
}
catch { }
}
/// <summary>
///
/// </summary>
/// <param name="Name"></param>
/// <param name="value"></param>
public void Add(string Name, DataTable value)
{
try
{
jo.Add(Name, Newtonsoft.Json.JsonConvert.SerializeObject(value));
}
catch { }
}
}
}

View File

@ -0,0 +1,107 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
namespace MyHouse.API
{
public class WebDav
{
private string _UserName = "";
private string _Password = "";
private string _WebDavUrl = "";
public WebDav(string _WebDavUrl,string _UserName,string _Password)
{
this._UserName = _UserName;
this._Password = _Password;
this._WebDavUrl = _WebDavUrl;
}
public int DelFile(string _WebFileUrl)
{
try
{
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(_WebDavUrl+"/"+_WebFileUrl);
req.Credentials = new NetworkCredential(_UserName, _Password); //验证密码
req.PreAuthenticate = true;
req.Method = "DELETE";
//req.AllowWriteStreamBuffering = true;
req.GetResponse();
return 1;
}
catch { return 0; }
}
public static Image LoadPic(string url)
{
Image image = null;
try
{
WebRequest webreq = WebRequest.Create(url);
WebResponse webres = webreq.GetResponse();
Stream stream = webres.GetResponseStream();
image = Image.FromStream(stream);
stream.Close();
}
catch { }
return image;
}
public int Upload(string _WebFileUrl, string _LocalFile)
{
try
{
System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)WebRequest.Create(_WebDavUrl + "/" + _WebFileUrl); //Http和服务器交互
req.Credentials = new NetworkCredential(_UserName, _Password); //验证密码
req.PreAuthenticate = true;
req.Method = "PUT";//采用PUT方式
req.AllowWriteStreamBuffering = true;
Stream reqStream = req.GetRequestStream();
FileStream rdm = new FileStream(_LocalFile, FileMode.Open); //打开本地文件流
byte[] inData = new byte[4096];
int byteRead = rdm.Read(inData, 0, inData.Length); //二进制读文件
while (byteRead > 0)
{
reqStream.Write(inData, 0, byteRead); //响应流写入
byteRead = rdm.Read(inData, 0, inData.Length);
}
rdm.Close();
reqStream.Close();
req.GetResponse(); //提交
}
catch (Exception e)
{
return 0;
}
return 1; //正确返回
}
//----新建文件夾----
public int CreateDir(string Path)
{
try
{
// Create the HttpWebRequest object.
System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)WebRequest.Create(_WebDavUrl + "/" + Path); //Http和服务器交互
req.Credentials = new NetworkCredential(_UserName, _Password); //验证密码
// Specify the method.
req.Method = "MKCOL";
HttpWebResponse objResponse = (System.Net.HttpWebResponse)req.GetResponse();
// Close the HttpWebResponse object.
objResponse.Close();
return 1;
}
catch (Exception ex)
{
return 0;
}
}
}
}

View File

@ -0,0 +1,30 @@
using ryControls.Interface;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MyHouse.Config
{
public class ImageInfo : IItemInfo
{
/// <summary>
/// -1表示无角标
/// </summary>
public int BadgeImageIndex { get; set; } = -1;
/// <summary>
/// 路径
/// </summary>
public string Path { get; set; } ="";
/// <summary>
/// 网址
/// </summary>
public string Url { get; set; } = "";
/// <summary>
/// 文件图标
/// </summary>
public Image Image { get; set; } = null;
}
}

View File

@ -0,0 +1,144 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using static ryCommonDb.DataProvider;
using static ScintillaNETV2.Style;
namespace MyHouse
{
public static class Itrycn_Db
{
public static string UserId { get; set; } = "zilinsoft";
public static string SQLConnStr = "Server=192.168.3.201;Database=MyHouse;Uid=root;Pwd=LIFENGXIN120120;charset=UTF8;";
public static ryCommonDb.DataProvider.DataProviderType dataType = ryCommonDb.DataProvider.DataProviderType.MySqlDataProvider;
public static IDbInterface CreateDataProvider()
{
return CreateDataProvider(dataType);
}
public static string GetNickName(string UserId)
{
return "紫林";
}
public static string GetLocationIdPath(int ParentId)
{
var jsonResult = API.API.Post("Goods", "GetLocationIdPath", "ParentId="+ ParentId);
if (jsonResult.IsOK)
{
return jsonResult.Get("datas","");
}
return "";
}
public static void SetLocationIdPath(int ParentId)
{
var jsonResult = API.API.Post("Goods", "SetLocationIdPath", "id=" + ParentId);
}
public static IDbInterface CreateDataProvider(DataProviderType dataProviderType)
{
switch (dataProviderType)
{
//case DataProviderType.OdbcDataProvider:
// return new OdbcDataProvider();
//case DataProviderType.OleDbDataProvider:
// return new OleDbDataProvider();
//case DataProviderType.OracleDataProvider:
// return new OracleDataProvider();
case DataProviderType.MySqlDataProvider:
return new MySqlDataProvider();
default:
return null;
}
}
private static void CreateTable(ryCommonDb.DataProvider.DataProviderType dataType, string ConnStr)
{
IDbInterface db = CreateDataProvider(dataType);
if (db.ConnDb(ConnStr) == 1)
{
#region 1
RyQuickSQL mySQL = new RyQuickSQL("test1");
//mySQL.AddField("", "");
mySQL.AddField("addTime", DateTime.Now);
mySQL.AddField("editTime", DateTime.Now);
db.CreateDb(mySQL);
#endregion
//
#region
mySQL.Clear();
mySQL.TableName = "Setting";
mySQL.AddField("name", "");
mySQL.AddField("info", "");
db.CreateDb(mySQL);
#endregion
}
db.Free();
}
/// <summary>
/// 保存设置
/// </summary>
/// <returns>返回大于0的数,表示设置成功,否则表示失败</returns>
private static int SetSetting(string name ,string info)
{
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
if (db.ConnDb(Itrycn_Db.SQLConnStr) == 1)
{
RyQuickSQL mySQL = new RyQuickSQL("Setting");
mySQL.AddField("name", name);
mySQL.AddField("info", info);
var result = db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where name='" + name + "'", mySQL);
if (result == 0)
{
result=db.ExecuteNonQuery(mySQL.GetInsertSQL(), mySQL);
}
return result;
}
db.Free();
return -1000;
}
/// <summary>
///获取设置
/// </summary>
/// <returns></returns>
private static string GetSetting(string name, string defValue)
{
DataProvider mydb = new DataProvider();
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
var result = defValue;
if (db.ConnDb(Itrycn_Db.SQLConnStr) == 1)
{
DataSet ds = db.ReadData("select * from Setting where name='"+ name + "'");
if (mydb.HaveData(ds))
{
DataRow reader = ds.Tables[0].Rows[0];
#region
result = reader["Name"].ToString();
#endregion
}
}
db.Free();
return result;
}
/// <summary>
/// 获取数据库版本
/// </summary>
/// <returns></returns>
public static int GetDbVer()
{
return GetSetting("dbVer","1").ToInt();
}
/// <summary>
/// 设置数据库版本
/// </summary>
/// <returns></returns>
public static int SetDbVer(int DbVer)
{
return SetSetting("dbVer", DbVer.ToString());
}
public static void CreateTable()
{
//CreateTable(dataType, SQLConnStr);
}
}
}

View File

@ -0,0 +1,40 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace MyHouse
{
/// <summary>
/// 配置类,保存在文件中的配置信息(本系统基于乘黄V2架构)
/// </summary>
public static class Public_Config
{
/// <summary>
/// 在点击主窗口关闭按钮时,隐藏窗体(只有开启了托盘图标,本功能才能生效,此时需要通过托盘图标进行关闭)。
/// </summary>
public static bool HideByCloseBtn = false;
public static RyWeb.QuickWeb ry_api = new RyWeb.QuickWeb();
public static string Cookie { get; set; } = "";
//public static string Api_Url { get; set; } = "http://localhost:10002/";
public static string Api_Url { get; set; } = "http://55x.top:18888/";
/// <summary>
/// 可直接访问的网址
/// </summary>
public static string WebDav_VistorUrl = "http://lfx2.top:999/MyHouse/Images";
/// <summary>
/// 需要账号密码访问的网址
/// </summary>
public static string WebDav_Url = "http://lfx2.top:5007/WebDav/MyHouse/Images";
public static string WebDav_UserId = "admin";
public static string WebDav_Pwd = "LIFENGXIN120120";
public static void LoadSetting()
{
ryCommon.Storage Stor = new ryCommon.Storage();
Stor.LoadFromFile(Soft_ConstInfo.UserDataFolder+"\\Setting.dat");
Stor.SelectNodeBySet();
HideByCloseBtn = Stor.GetAttrValue("HideByCloseBtn", false);
//low_count = Stor.GetAttrValue("LowCount", 10);
}
}
}

View File

@ -0,0 +1,74 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyHouse
{
/// <summary>
/// 运行期间存储的变量,不会存储在文件中,只存储内存中.每次启动软件会初始化变量。
/// </summary>
public static class Soft_MemInfo
{
/// <summary>
/// 是否能关闭窗体。
/// 设置本值为false,可以阻止窗口被手动关闭。
/// </summary>
public static bool IsCanCloseForm { get; set; } = true;
}
/// <summary>
/// 配置类,保存在运行期间不会被改变的配置信息(本系统基于乘黄V2架构)
/// 在运行期间请勿改动本类中的变量值。
/// </summary>
public static class Soft_ConstInfo
{
/// <summary>
/// 在线升级配置文件的url
/// </summary>
public const string Update_Url = "http://www.itrycn.com/update/ryWebMon4.xml";
/// <summary>
/// 软件标题
/// </summary>
public const string Soft_Title = "我的家庭";
/// <summary>
/// 软件ID
/// </summary>
public const string Soft_Id = "MyHouse";
/// <summary>
/// 开机启动的参数
/// </summary>
public const string Soft_Pram = "q";
/// <summary>
/// 官网地址
/// </summary>
public const string Soft_Url = "http://www.itrycn.com";
/// <summary>
/// 售后QQ群
/// </summary>
public const string QQ_Qun = "183161992";
/// <summary>
/// 关于界面内容.支持以下变量
/// <para>#softname#:软件名称</para>
/// <para>#ver#:版本号</para>
/// </summary>
public const string AboutText = "#softname# #ver#";
/// <summary>
/// 用户文件夹,该相对路径设置,将在程序启动后转换
/// </summary>
public static string UserDataFolder = @"<app>\UserDb";
/// <summary>
/// 自带配置文件夹,该相对路径设置,将在程序启动后转换
/// </summary>
public static string SysDataFolder = @"<app>\SysDb";
/// <summary>
/// 是否允许显示托盘图标
/// </summary>
public const bool ShowTray = false;
/// <summary>
/// 是否显示捐赠方式
/// </summary>
public static bool DonateVisabled = true;
}
}

View File

@ -0,0 +1,630 @@
namespace MyHouse.DbOp
{
partial class FrmGoodsAdd
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmGoodsAdd));
this.BtnCancel = new ryControls.ButtonEx();
this.BtnOK = new ryControls.ButtonEx();
this.label1 = new System.Windows.Forms.Label();
this.txtName = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.NumCount = new ryControls.NumericUpDownEx();
this.CbbUnit = new ryControls.RyComboBox();
this.label3 = new System.Windows.Forms.Label();
this.TxtDes = new ryControls.TextBoxEx2();
this.label4 = new System.Windows.Forms.Label();
this.DtLocation = new ryControls.DoubleText();
this.TxtGoodsSN = new ryControls.TextBoxEx2();
this.label5 = new System.Windows.Forms.Label();
this.PicLogo = new System.Windows.Forms.PictureBox();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.BtnCapture = new ryControls.ButtonEx();
this.label6 = new System.Windows.Forms.Label();
this.DtOutTime = new ryControls.DateTimePickerEX();
this.groupBox1 = new System.Windows.Forms.GroupBox();
this.ChkTipOn = new System.Windows.Forms.CheckBox();
this.label8 = new System.Windows.Forms.Label();
this.NumTipCount = new ryControls.NumericUpDownEx();
this.iconViewEx1 = new ryControls.IconViewEx();
this.BtnCapture2 = new ryControls.ButtonEx();
this.BtnDel = new ryControls.ButtonEx();
this.label7 = new System.Windows.Forms.Label();
this.NumCleanInterval = new ryControls.NumericUpDownEx();
this.label9 = new System.Windows.Forms.Label();
this.label10 = new System.Windows.Forms.Label();
this.NumChargingInterval = new ryControls.NumericUpDownEx();
this.label11 = new System.Windows.Forms.Label();
this.label12 = new System.Windows.Forms.Label();
this.TxtBarCode = new ryControls.TextBoxEx2();
this.BtnReadBarCode = new ryControls.ButtonEx();
((System.ComponentModel.ISupportInitialize)(this.NumCount)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.PicLogo)).BeginInit();
this.groupBox1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.NumTipCount)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NumCleanInterval)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.NumChargingInterval)).BeginInit();
this.SuspendLayout();
//
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCancel.Location = new System.Drawing.Point(384, 556);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(65, 27);
this.BtnCancel.TabIndex = 5;
this.BtnCancel.Text = "取消";
this.BtnCancel.UseVisualStyleBackColor = true;
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(313, 556);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(65, 27);
this.BtnOK.TabIndex = 4;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(115, 33);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 7;
this.label1.Text = "名称";
//
// txtName
//
this.txtName.BackColor = System.Drawing.Color.White;
this.txtName.EmptyText = "";
this.txtName.Location = new System.Drawing.Point(117, 48);
this.txtName.MaxLength = 999999999;
this.txtName.Multiline = false;
this.txtName.Name = "txtName";
this.txtName.OnlyNumeric = false;
this.txtName.PasswordChar = '\0';
this.txtName.ReadOnly = false;
this.txtName.SelectedText = "";
this.txtName.SelectionLength = 0;
this.txtName.SelectionStart = 0;
this.txtName.Size = new System.Drawing.Size(138, 25);
this.txtName.TabIndex = 6;
this.txtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.txtName.ToolTip = "";
this.txtName.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 75);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 8;
this.label2.Text = "数量";
//
// NumCount
//
this.NumCount.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.NumCount.DecimalPlaces = 2;
this.NumCount.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NumCount.Location = new System.Drawing.Point(9, 90);
this.NumCount.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.NumCount.Minimum = new decimal(new int[] {
100000,
0,
0,
-2147483648});
this.NumCount.Name = "NumCount";
this.NumCount.Size = new System.Drawing.Size(118, 22);
this.NumCount.TabIndex = 9;
this.NumCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// CbbUnit
//
this.CbbUnit.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbUnit.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbUnit.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbUnit.Items.AddRange(new object[] {
"个",
"台",
"双",
"套",
"盒",
"件",
"卷",
"米",
"斤",
"kg",
"瓶",
"提",
"条",
"桶",
"条",
"支",
"只",
"组",
"把",
"包",
"本",
"次",
"袋",
"对",
"份",
"根",
"升",
"块",
"片",
"批",
"扎",
"张",
"辆",
"付"});
this.CbbUnit.Location = new System.Drawing.Point(133, 89);
this.CbbUnit.Name = "CbbUnit";
this.CbbUnit.Size = new System.Drawing.Size(122, 24);
this.CbbUnit.TabIndex = 10;
this.CbbUnit.SelectedIndexChanged += new System.EventHandler(this.CbbUnit_SelectedIndexChanged);
this.CbbUnit.TextChanged += new System.EventHandler(this.CbbUnit_TextChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(8, 418);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 11;
this.label3.Text = "备注";
//
// TxtDes
//
this.TxtDes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtDes.BackColor = System.Drawing.Color.White;
this.TxtDes.EmptyText = "";
this.TxtDes.Location = new System.Drawing.Point(9, 433);
this.TxtDes.MaxLength = 999999999;
this.TxtDes.Multiline = true;
this.TxtDes.Name = "TxtDes";
this.TxtDes.OnlyNumeric = false;
this.TxtDes.PasswordChar = '\0';
this.TxtDes.ReadOnly = false;
this.TxtDes.SelectedText = "";
this.TxtDes.SelectionLength = 0;
this.TxtDes.SelectionStart = 0;
this.TxtDes.Size = new System.Drawing.Size(440, 117);
this.TxtDes.TabIndex = 12;
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtDes.ToolTip = "";
this.TxtDes.WordWrap = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(8, 115);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(53, 12);
this.label4.TabIndex = 13;
this.label4.Text = "所在位置";
//
// DtLocation
//
this.DtLocation.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.DtLocation.Location = new System.Drawing.Point(10, 130);
this.DtLocation.Name = "DtLocation";
this.DtLocation.SelectName = "";
this.DtLocation.Size = new System.Drawing.Size(245, 23);
this.DtLocation.TabIndex = 14;
this.DtLocation.OnSelected += new System.EventHandler(this.DtLocation_OnSelected);
//
// TxtGoodsSN
//
this.TxtGoodsSN.BackColor = System.Drawing.Color.White;
this.TxtGoodsSN.EmptyText = "";
this.TxtGoodsSN.Location = new System.Drawing.Point(9, 47);
this.TxtGoodsSN.MaxLength = 999999999;
this.TxtGoodsSN.Multiline = false;
this.TxtGoodsSN.Name = "TxtGoodsSN";
this.TxtGoodsSN.OnlyNumeric = false;
this.TxtGoodsSN.PasswordChar = '\0';
this.TxtGoodsSN.ReadOnly = false;
this.TxtGoodsSN.SelectedText = "";
this.TxtGoodsSN.SelectionLength = 0;
this.TxtGoodsSN.SelectionStart = 0;
this.TxtGoodsSN.Size = new System.Drawing.Size(102, 26);
this.TxtGoodsSN.TabIndex = 15;
this.TxtGoodsSN.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtGoodsSN.ToolTip = "";
this.TxtGoodsSN.WordWrap = true;
//
// label5
//
this.label5.AutoSize = true;
this.label5.BackColor = System.Drawing.SystemColors.Control;
this.label5.Location = new System.Drawing.Point(8, 32);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 21;
this.label5.Text = "编号";
//
// PicLogo
//
this.PicLogo.Cursor = System.Windows.Forms.Cursors.Hand;
this.PicLogo.Location = new System.Drawing.Point(263, 33);
this.PicLogo.Name = "PicLogo";
this.PicLogo.Size = new System.Drawing.Size(186, 161);
this.PicLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.PicLogo.TabIndex = 22;
this.PicLogo.TabStop = false;
this.PicLogo.Click += new System.EventHandler(this.PicLogo_Click);
//
// openFileDialog1
//
this.openFileDialog1.Filter = "图片文件|*.png;*.jpg;*.bmp;*.jpeg";
//
// BtnCapture
//
this.BtnCapture.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.BtnCapture.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCapture.Location = new System.Drawing.Point(9, 556);
this.BtnCapture.Name = "BtnCapture";
this.BtnCapture.Size = new System.Drawing.Size(65, 27);
this.BtnCapture.TabIndex = 23;
this.BtnCapture.Text = "截图";
this.BtnCapture.UseVisualStyleBackColor = true;
this.BtnCapture.Click += new System.EventHandler(this.BtnCapture_Click);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(8, 156);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(53, 12);
this.label6.TabIndex = 24;
this.label6.Text = "过期时间";
//
// DtOutTime
//
this.DtOutTime.Checked = false;
this.DtOutTime.CustomFormat = "yyyy年MM月dd日 dddd";
this.DtOutTime.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.DtOutTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.DtOutTime.Location = new System.Drawing.Point(9, 171);
this.DtOutTime.Name = "DtOutTime";
this.DtOutTime.ShowCheckBox = true;
this.DtOutTime.Size = new System.Drawing.Size(246, 23);
this.DtOutTime.TabIndex = 25;
//
// groupBox1
//
this.groupBox1.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.groupBox1.Controls.Add(this.ChkTipOn);
this.groupBox1.Controls.Add(this.label8);
this.groupBox1.Controls.Add(this.NumTipCount);
this.groupBox1.Location = new System.Drawing.Point(10, 357);
this.groupBox1.Name = "groupBox1";
this.groupBox1.Size = new System.Drawing.Size(440, 54);
this.groupBox1.TabIndex = 26;
this.groupBox1.TabStop = false;
this.groupBox1.Text = "提醒";
//
// ChkTipOn
//
this.ChkTipOn.AutoSize = true;
this.ChkTipOn.Location = new System.Drawing.Point(17, 22);
this.ChkTipOn.Name = "ChkTipOn";
this.ChkTipOn.Size = new System.Drawing.Size(72, 16);
this.ChkTipOn.TabIndex = 12;
this.ChkTipOn.Text = "数量低于";
this.ChkTipOn.UseVisualStyleBackColor = true;
this.ChkTipOn.CheckedChanged += new System.EventHandler(this.ChkTipOn_CheckedChanged);
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(168, 23);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(53, 12);
this.label8.TabIndex = 11;
this.label8.Text = "进行提醒";
//
// NumTipCount
//
this.NumTipCount.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.NumTipCount.DecimalPlaces = 2;
this.NumTipCount.Enabled = false;
this.NumTipCount.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NumTipCount.Location = new System.Drawing.Point(89, 18);
this.NumTipCount.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.NumTipCount.Name = "NumTipCount";
this.NumTipCount.Size = new System.Drawing.Size(73, 22);
this.NumTipCount.TabIndex = 10;
this.NumTipCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// iconViewEx1
//
this.iconViewEx1.BadgeListImage = ((System.Collections.Generic.List<System.Drawing.Image>)(resources.GetObject("iconViewEx1.BadgeListImage")));
this.iconViewEx1.HideSelection = false;
this.iconViewEx1.Icon = null;
this.iconViewEx1.IconSize = 60;
this.iconViewEx1.IsDrawGridLines = false;
this.iconViewEx1.IsDrawIcon = true;
this.iconViewEx1.Location = new System.Drawing.Point(9, 243);
this.iconViewEx1.MultiSelect = false;
this.iconViewEx1.Name = "iconViewEx1";
this.iconViewEx1.OwnerDraw = true;
this.iconViewEx1.SelectedBorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(229)))), ((int)(((byte)(195)))), ((int)(((byte)(101)))));
this.iconViewEx1.SelectedEndBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(236)))), ((int)(((byte)(181)))));
this.iconViewEx1.SelectedForeColor = System.Drawing.Color.Black;
this.iconViewEx1.SelectedStartBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(251)))), ((int)(((byte)(237)))));
this.iconViewEx1.Size = new System.Drawing.Size(396, 102);
this.iconViewEx1.TabIndex = 27;
this.iconViewEx1.TextHeight = 10;
this.iconViewEx1.TileSize = new System.Drawing.Size(95, 92);
this.iconViewEx1.UseCompatibleStateImageBehavior = false;
this.iconViewEx1.View = System.Windows.Forms.View.Tile;
this.iconViewEx1.DoubleClick += new System.EventHandler(this.iconViewEx1_DoubleClick);
//
// BtnCapture2
//
this.BtnCapture2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCapture2.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCapture2.Location = new System.Drawing.Point(411, 243);
this.BtnCapture2.Name = "BtnCapture2";
this.BtnCapture2.Size = new System.Drawing.Size(38, 27);
this.BtnCapture2.TabIndex = 28;
this.BtnCapture2.Text = "截图";
this.BtnCapture2.UseVisualStyleBackColor = true;
this.BtnCapture2.Click += new System.EventHandler(this.BtnCapture2_Click);
//
// BtnDel
//
this.BtnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnDel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnDel.Location = new System.Drawing.Point(411, 276);
this.BtnDel.Name = "BtnDel";
this.BtnDel.Size = new System.Drawing.Size(38, 27);
this.BtnDel.TabIndex = 29;
this.BtnDel.Text = "删除";
this.BtnDel.UseVisualStyleBackColor = true;
this.BtnDel.Click += new System.EventHandler(this.BtnDel_Click);
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(8, 198);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(53, 12);
this.label7.TabIndex = 30;
this.label7.Text = "清洁周期";
//
// NumCleanInterval
//
this.NumCleanInterval.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.NumCleanInterval.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NumCleanInterval.Location = new System.Drawing.Point(9, 213);
this.NumCleanInterval.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.NumCleanInterval.Name = "NumCleanInterval";
this.NumCleanInterval.Size = new System.Drawing.Size(78, 22);
this.NumCleanInterval.TabIndex = 31;
this.NumCleanInterval.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label9
//
this.label9.AutoSize = true;
this.label9.Location = new System.Drawing.Point(91, 219);
this.label9.Name = "label9";
this.label9.Size = new System.Drawing.Size(17, 12);
this.label9.TabIndex = 32;
this.label9.Text = "天";
//
// label10
//
this.label10.AutoSize = true;
this.label10.Location = new System.Drawing.Point(196, 219);
this.label10.Name = "label10";
this.label10.Size = new System.Drawing.Size(17, 12);
this.label10.TabIndex = 35;
this.label10.Text = "天";
//
// NumChargingInterval
//
this.NumChargingInterval.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.NumChargingInterval.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NumChargingInterval.Location = new System.Drawing.Point(114, 213);
this.NumChargingInterval.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.NumChargingInterval.Name = "NumChargingInterval";
this.NumChargingInterval.Size = new System.Drawing.Size(78, 22);
this.NumChargingInterval.TabIndex = 34;
this.NumChargingInterval.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label11
//
this.label11.AutoSize = true;
this.label11.Location = new System.Drawing.Point(113, 198);
this.label11.Name = "label11";
this.label11.Size = new System.Drawing.Size(53, 12);
this.label11.TabIndex = 33;
this.label11.Text = "充电周期";
//
// label12
//
this.label12.AutoSize = true;
this.label12.Location = new System.Drawing.Point(218, 198);
this.label12.Name = "label12";
this.label12.Size = new System.Drawing.Size(65, 12);
this.label12.TabIndex = 36;
this.label12.Text = "唯一条形码";
//
// TxtBarCode
//
this.TxtBarCode.BackColor = System.Drawing.Color.White;
this.TxtBarCode.EmptyText = "";
this.TxtBarCode.Location = new System.Drawing.Point(219, 213);
this.TxtBarCode.MaxLength = 999999999;
this.TxtBarCode.Multiline = false;
this.TxtBarCode.Name = "TxtBarCode";
this.TxtBarCode.OnlyNumeric = false;
this.TxtBarCode.PasswordChar = '\0';
this.TxtBarCode.ReadOnly = false;
this.TxtBarCode.SelectedText = "";
this.TxtBarCode.SelectionLength = 0;
this.TxtBarCode.SelectionStart = 0;
this.TxtBarCode.Size = new System.Drawing.Size(186, 26);
this.TxtBarCode.TabIndex = 37;
this.TxtBarCode.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtBarCode.ToolTip = "";
this.TxtBarCode.WordWrap = true;
//
// BtnReadBarCode
//
this.BtnReadBarCode.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.BtnReadBarCode.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnReadBarCode.Location = new System.Drawing.Point(411, 213);
this.BtnReadBarCode.Name = "BtnReadBarCode";
this.BtnReadBarCode.Size = new System.Drawing.Size(38, 27);
this.BtnReadBarCode.TabIndex = 38;
this.BtnReadBarCode.Text = "读取";
this.BtnReadBarCode.UseVisualStyleBackColor = true;
this.BtnReadBarCode.Click += new System.EventHandler(this.BtnReadBarCode_Click);
//
// FrmGoodsAdd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(459, 593);
this.Controls.Add(this.BtnReadBarCode);
this.Controls.Add(this.TxtBarCode);
this.Controls.Add(this.label12);
this.Controls.Add(this.label10);
this.Controls.Add(this.NumChargingInterval);
this.Controls.Add(this.label11);
this.Controls.Add(this.label9);
this.Controls.Add(this.NumCleanInterval);
this.Controls.Add(this.label7);
this.Controls.Add(this.BtnDel);
this.Controls.Add(this.BtnCapture2);
this.Controls.Add(this.iconViewEx1);
this.Controls.Add(this.groupBox1);
this.Controls.Add(this.DtOutTime);
this.Controls.Add(this.label6);
this.Controls.Add(this.BtnCapture);
this.Controls.Add(this.PicLogo);
this.Controls.Add(this.label5);
this.Controls.Add(this.TxtGoodsSN);
this.Controls.Add(this.DtLocation);
this.Controls.Add(this.label4);
this.Controls.Add(this.TxtDes);
this.Controls.Add(this.label3);
this.Controls.Add(this.CbbUnit);
this.Controls.Add(this.NumCount);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtName);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Location = new System.Drawing.Point(0, 0);
this.MaximizeBox = false;
this.Name = "FrmGoodsAdd";
this.Resizable = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "新增";
this.Load += new System.EventHandler(this.FrmAdd_Load);
((System.ComponentModel.ISupportInitialize)(this.NumCount)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.PicLogo)).EndInit();
this.groupBox1.ResumeLayout(false);
this.groupBox1.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.NumTipCount)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NumCleanInterval)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.NumChargingInterval)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnCancel;
private ryControls.ButtonEx BtnOK;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 txtName;
private System.Windows.Forms.Label label2;
private ryControls.NumericUpDownEx NumCount;
private ryControls.RyComboBox CbbUnit;
private System.Windows.Forms.Label label3;
private ryControls.TextBoxEx2 TxtDes;
private System.Windows.Forms.Label label4;
private ryControls.DoubleText DtLocation;
private ryControls.TextBoxEx2 TxtGoodsSN;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.PictureBox PicLogo;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private ryControls.ButtonEx BtnCapture;
private System.Windows.Forms.Label label6;
private ryControls.DateTimePickerEX DtOutTime;
private System.Windows.Forms.GroupBox groupBox1;
private System.Windows.Forms.CheckBox ChkTipOn;
private System.Windows.Forms.Label label8;
private ryControls.NumericUpDownEx NumTipCount;
private ryControls.IconViewEx iconViewEx1;
private ryControls.ButtonEx BtnCapture2;
private ryControls.ButtonEx BtnDel;
private System.Windows.Forms.Label label7;
private ryControls.NumericUpDownEx NumCleanInterval;
private System.Windows.Forms.Label label9;
private System.Windows.Forms.Label label10;
private ryControls.NumericUpDownEx NumChargingInterval;
private System.Windows.Forms.Label label11;
private System.Windows.Forms.Label label12;
private ryControls.TextBoxEx2 TxtBarCode;
private ryControls.ButtonEx BtnReadBarCode;
}
}

View File

@ -0,0 +1,339 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Drawing.Imaging;
using System.Linq;
using System.Runtime.Remoting.Contexts;
using System.Security.Cryptography;
using System.Text;
using System.Windows.Forms;
namespace MyHouse.DbOp
{
public partial class FrmGoodsAdd : RySkins.SKinForm
{
public ModalForm mr = null;
public int isAdd = 1;
public string selectId = "-1";
private string last_img = "";
private Dictionary<string, int> last_img2 = new Dictionary<string, int>();
public int LocationId { get; set; } = 0;
public FrmGoodsAdd()
{
InitializeComponent();
TxtGoodsSN.Text = GetNewId();
CbbUnit.SelectedIndex = 0;
}
/// <summary>
/// 修改前
/// </summary>
public string GetNewId()
{
var jsonResult = API.API.Get("Goods", "GetNewGoodsId");
if (jsonResult.IsOK)
{
return jsonResult.Get("datas","");
}
return "";
}
#region
public void GetByAdd()
{
var jsonResult = API.API.Post("Goods", "GetLocation","id="+ LocationId);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count > 0)
{
DataRow reader = data.Rows[0];
DtLocation.selectId = LocationId.ToString();
DtLocation.Text = "【" + reader["SN"].ToString() + "】" + reader["Name"].ToString();
}
}
}
public void GetInfo(string id)
{
selectId = id;
string post_str = "api=GetGoods&id=" + id;
var jsonResult = API.API.Post("Goods", "GetGoods", post_str);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count > 0)
{
DataRow reader = data.Rows[0];
#region
TxtBarCode.Text = reader["BarCode"].ToString();
txtName.Text = reader["Name"].ToString();
NumCount.Value = reader["iCount"].ToDecimal();
if (!CbbUnit.Items.Contains(reader["Unit"].ToString()))
{
CbbUnit.Items.Add(reader["Unit"].ToString());
}
CbbUnit.Text = reader["Unit"].ToString();
TxtDes.Text = reader["Des"].ToString();
NumCleanInterval.Value = reader["CleanInterval"].ToInt();
NumChargingInterval.Value = reader["ChargingInterval"].ToInt();
var OutTime = reader["OutTime"].ToInt64();
if (OutTime == 0) { DtOutTime.Checked = false; }
else
{
DtOutTime.Checked = true;
DtOutTime.Value = OutTime.ToDateTime().AddDays(-1);
}
if (isAdd == 0)
{
TxtGoodsSN.Text = reader["SN"].ToString();
NumCount.Enabled = false;
CbbUnit.Enabled = false;
last_img = reader["img"].ToString();
PicLogo.Image = API.WebDav.LoadPic(Public_Config.WebDav_VistorUrl + "/" + last_img);
var img2 = reader["img2"].ToString().Replace("\r", "").Split('\n');
for (int i = 0; i < img2.Length; i++)
{
if (img2[i].Length == 0) { continue; }
var image_item = API.WebDav.LoadPic(Public_Config.WebDav_VistorUrl + "/" + img2[i]);
if (image_item == null) { continue; }
Config.ImageInfo image = new Config.ImageInfo
{
Image = image_item,
Url = img2[i]
};
last_img2[img2[i]] = 1;
iconViewEx1.Items.Add("").Tag = image;
}
}
else
{ TxtGoodsSN.Text = GetNewId(); selectId = "0"; }
DtLocation.selectId = reader["LocationId"].ToString();
post_str = "api=GetLocation&id=" + reader["LocationId"].ToInt();
jsonResult = API.API.Post("Goods", "GetLocation", post_str);
if (jsonResult.IsOK)
{
DataTable data_loc = jsonResult.List;
if (data_loc.Rows.Count > 0)
{
DataRow row_loc = data_loc.Rows[0];
DtLocation.Text = "【" + row_loc["SN"].ToString() + "】" + row_loc["Name"].ToString();
}
else
{
DtLocation.Text = "";
}
}
else { DtLocation.Text = ""; }
ChkTipOn.Checked = reader["TipOn"].ToBool();
var TipCount = reader["TipCount"].ToDecimal();
if (TipCount < 0) { TipCount = 0; }
NumTipCount.Value = TipCount;
#endregion
}
}
}
private void BtnOK_Click(object sender, EventArgs e)
{
if (txtName.Text.Length == 0)
{
RySkins.Msg.ShowMsg("名称不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
if (DtLocation.selectId.Length==0)
{
RySkins.Msg.ShowMsg("请选择一个存储位置。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
RyQuickSQL mySQL = new RyQuickSQL("Goods");
mySQL.AddField("SN", TxtGoodsSN.Text);
mySQL.AddField("Name", txtName.Text);
mySQL.AddField("BarCode", TxtBarCode.Text);
mySQL.AddField("iCount", NumCount.Value);
mySQL.AddField("Unit", CbbUnit.Text);
mySQL.AddField("LocationId", LocationId);
mySQL.AddField("Des", TxtDes.Text);
mySQL.AddField("img", "");
mySQL.AddField("img2", "");
mySQL.AddField("OutTime", DtOutTime.Checked ? DtOutTime.Value.Date.AddDays(1).ToInt64() : 0);
mySQL.AddField("EditTime", DateTime.Now.ToInt64());
mySQL.AddField("idPath", Itrycn_Db.GetLocationIdPath(DtLocation.selectId.ToInt()));
mySQL.AddField("TipOn", ChkTipOn.Checked ? 1 : 0);
mySQL.AddField("TipCount", NumTipCount.Value);
mySQL.AddField("CleanInterval", NumCleanInterval.Value);
mySQL.AddField("ChargingInterval", NumChargingInterval.Value);
if (isAdd == 0)
{
mySQL.AddField("id", selectId.ToInt());
}
var jsonResult = API.API.Post("Goods", "SaveGoods", mySQL.GetPostData());
if (jsonResult.IsOK)
{
}
API.WebDav webdav = new API.WebDav(Public_Config.WebDav_Url, Public_Config.WebDav_UserId, Public_Config.WebDav_Pwd);
var dt_folder = DateTime.Now.ToString("yyyy-MM");
webdav.CreateDir(dt_folder);
if (select_img.Length >0)
{
if (last_img.Length > 0)
{
webdav.DelFile(last_img);
}
var file_url = dt_folder + "/"+ DateTime.Now.ToString("yyyyMMddHHmmss") + System.IO.Path.GetExtension(select_img);
webdav.Upload(file_url,select_img);
mySQL.AddField("img", file_url);
}
var img2 = "";
Dictionary<string, int> dict_img2 = new Dictionary<string, int>();
for (int i = 0; i < iconViewEx1.Items.Count; i++)
{
var item = (Config.ImageInfo)iconViewEx1.Items[i].Tag;
if(item.Path.Length>0)
{
var file_url = dt_folder + "/" + DateTime.Now.ToString("yyyyMMddHHmmss") +"_"+(i+1)+ System.IO.Path.GetExtension(item.Path);
webdav.Upload(file_url, item.Path);
item.Url = file_url;
}
img2 += item.Url + "\r\n";
dict_img2[item.Url] = 1;
}
foreach (var item in last_img2)
{
if(!dict_img2.ContainsKey(item.Key))
{
webdav.DelFile(item.Key);
}
}
mySQL.AddField("img2", img2.Trim());
mySQL.AddField("editTime", DateTime.Now.ToInt64());
if (isAdd >= 1)
{
mySQL.AddField("AddUser",Itrycn_Db.UserId);
mySQL.AddField("iCount", NumCount.Value);
mySQL.AddField("Unit", CbbUnit.Text);
mySQL.AddField("addTime",DateTime.Now.ToInt64());
}
else
{
//db.ExecuteNonQuery(mySQL.GetUpdateSQL() + " where id=" + selectId,mySQL);
}
ModalForm.SetDialogResult(this, mr, DialogResult.OK);
}
#endregion
private void BtnCancel_Click(object sender, EventArgs e)
{
ModalForm.SetDialogResult(this, mr, DialogResult.Cancel);
}
private void FrmAdd_Load(object sender, EventArgs e)
{
}
private void DtLocation_OnSelected(object sender, EventArgs e)
{
FrmLocationView frm=new FrmLocationView();
frm.IsSelectedMode = true;
if(frm.ShowDialog() == DialogResult.OK)
{
DtLocation.selectId = frm.SelectId.ToString();
DtLocation.SelectName = frm.SelectName;
}
frm.Dispose();
}
private string select_img = "";
private void PicLogo_Click(object sender, EventArgs e)
{
if(openFileDialog1.ShowDialog()==DialogResult.OK)
{
select_img = openFileDialog1.FileName;
PicLogo.Image = RyImage.LoadPic(select_img);
}
}
private void BtnCapture_Click(object sender, EventArgs e)
{
var capture = new ryCommon._SCREEN_CAPTURE.ScreenCapture();
Bitmap m = capture.StartCapture(false);
if (m != null)
{
long tick = DateTime.Now.Ticks;
Random ran = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
string path =Application.StartupPath+@"\UserDb\tmp\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ran.Next(1000, 9999) + ".png";
if (!System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(path)))
{
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path));
}
RyImage.SaveHighQualityImage(m, path);
select_img = path;
PicLogo.Image = RyImage.LoadPic(select_img);
}
}
private void CbbUnit_SelectedIndexChanged(object sender, EventArgs e)
{
label8.Text = CbbUnit.Text + "进行提醒";
}
private void ChkTipOn_CheckedChanged(object sender, EventArgs e)
{
NumTipCount.Enabled = ChkTipOn.Checked;
}
private void CbbUnit_TextChanged(object sender, EventArgs e)
{
label8.Text = CbbUnit.Text + "进行提醒";
}
private void BtnCapture2_Click(object sender, EventArgs e)
{
var capture = new ryCommon._SCREEN_CAPTURE.ScreenCapture();
Bitmap m = capture.StartCapture(false);
if (m != null)
{
long tick = DateTime.Now.Ticks;
Random ran = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
string path = Application.StartupPath + @"\UserDb\tmp\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ran.Next(1000, 9999) + ".png";
if (!System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(path)))
{
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path));
}
RyImage.SaveHighQualityImage(m, path);
Config.ImageInfo image = new Config.ImageInfo();
image.Image = RyImage.LoadPic(path);
image.Path = path;
iconViewEx1.Items.Add("").Tag = image;
}
}
private void BtnDel_Click(object sender, EventArgs e)
{
if (iconViewEx1.SelectedItems.Count == 0) { return; }
iconViewEx1.SelectedItems[0].Remove();
}
private void iconViewEx1_DoubleClick(object sender, EventArgs e)
{
if (iconViewEx1.SelectedItems.Count == 0) { return; }
Config.ImageInfo image= iconViewEx1.SelectedItems[0].Tag as Config.ImageInfo;
OTools.FrmPreview frm = new OTools.FrmPreview();
frm.pictureBox1.Image = image.Image;
frm.ShowDialog();
frm.Dispose();
}
private void BtnReadBarCode_Click(object sender, EventArgs e)
{
string post_str = "api=ReadBarCode";
var jsonResult = API.API.Post("goods.aspx", post_str);
if (jsonResult.IsOK)
{
TxtBarCode.Text = jsonResult.Get("datas", "");
}
}
}
}

View File

@ -0,0 +1,135 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="iconViewEx1.BadgeListImage" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAKABU3lzdGVtLkRyYXdpbmcsIFZlcnNpb249NC4wLjAuMCwgQ3Vs
dHVyZT1uZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iMDNmNWY3ZjExZDUwYTNhXV0sIG1zY29ybGliLCBW
ZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0
ZTA4OQwDAAAAUVN5c3RlbS5EcmF3aW5nLCBWZXJzaW9uPTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwg
UHVibGljS2V5VG9rZW49YjAzZjVmN2YxMWQ1MGEzYQUBAAAAN1N5c3RlbS5Db2xsZWN0aW9ucy5HZW5l
cmljLkxpc3RgMVtbU3lzdGVtLkRyYXdpbmcuSW1hZ2UDAAAABl9pdGVtcwVfc2l6ZQhfdmVyc2lvbgQA
ABZTeXN0ZW0uRHJhd2luZy5JbWFnZVtdAwAAAAgIAgAAAAkEAAAAAAAAAAAAAAAHBAAAAAABAAAAAAAA
AAQUU3lzdGVtLkRyYXdpbmcuSW1hZ2UDAAAACw==
</value>
</data>
</root>

View File

@ -0,0 +1,262 @@
namespace MyHouse.DbOp
{
partial class FrmGoodsEntry
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.BtnCancel = new ryControls.ButtonEx();
this.BtnOK = new ryControls.ButtonEx();
this.label1 = new System.Windows.Forms.Label();
this.txtName = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.NumCount = new ryControls.NumericUpDownEx();
this.label3 = new System.Windows.Forms.Label();
this.TxtDes = new ryControls.TextBoxEx2();
this.TxtUnit = new ryControls.TextBoxEx2();
this.LblState = new System.Windows.Forms.Label();
this.TxtGoodsSN = new ryControls.TextBoxEx2();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.NumCount)).BeginInit();
this.SuspendLayout();
//
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCancel.Location = new System.Drawing.Point(311, 318);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(65, 27);
this.BtnCancel.TabIndex = 5;
this.BtnCancel.Text = "取消";
this.BtnCancel.UseVisualStyleBackColor = true;
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(240, 318);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(65, 27);
this.BtnOK.TabIndex = 4;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(131, 32);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 7;
this.label1.Text = "名称";
//
// txtName
//
this.txtName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.txtName.EmptyText = "";
this.txtName.Location = new System.Drawing.Point(133, 47);
this.txtName.MaxLength = 999999999;
this.txtName.Multiline = false;
this.txtName.Name = "txtName";
this.txtName.OnlyNumeric = false;
this.txtName.PasswordChar = '\0';
this.txtName.ReadOnly = true;
this.txtName.SelectedText = "";
this.txtName.SelectionLength = 0;
this.txtName.SelectionStart = 0;
this.txtName.Size = new System.Drawing.Size(243, 25);
this.txtName.TabIndex = 6;
this.txtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.txtName.ToolTip = "";
this.txtName.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 75);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 8;
this.label2.Text = "数量";
//
// NumCount
//
this.NumCount.BorderStyle = System.Windows.Forms.BorderStyle.None;
this.NumCount.DecimalPlaces = 2;
this.NumCount.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.NumCount.Location = new System.Drawing.Point(9, 90);
this.NumCount.Maximum = new decimal(new int[] {
100000,
0,
0,
0});
this.NumCount.Name = "NumCount";
this.NumCount.Size = new System.Drawing.Size(118, 22);
this.NumCount.TabIndex = 9;
this.NumCount.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.NumCount.ValueChanged += new System.EventHandler(this.NumCount_ValueChanged);
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(8, 115);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 11;
this.label3.Text = "备注";
//
// TxtDes
//
this.TxtDes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtDes.BackColor = System.Drawing.Color.White;
this.TxtDes.EmptyText = "";
this.TxtDes.Location = new System.Drawing.Point(9, 130);
this.TxtDes.MaxLength = 999999999;
this.TxtDes.Multiline = true;
this.TxtDes.Name = "TxtDes";
this.TxtDes.OnlyNumeric = false;
this.TxtDes.PasswordChar = '\0';
this.TxtDes.ReadOnly = false;
this.TxtDes.SelectedText = "";
this.TxtDes.SelectionLength = 0;
this.TxtDes.SelectionStart = 0;
this.TxtDes.Size = new System.Drawing.Size(367, 182);
this.TxtDes.TabIndex = 12;
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtDes.ToolTip = "";
this.TxtDes.WordWrap = true;
//
// TxtUnit
//
this.TxtUnit.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtUnit.EmptyText = "";
this.TxtUnit.Location = new System.Drawing.Point(133, 88);
this.TxtUnit.MaxLength = 999999999;
this.TxtUnit.Multiline = false;
this.TxtUnit.Name = "TxtUnit";
this.TxtUnit.OnlyNumeric = false;
this.TxtUnit.PasswordChar = '\0';
this.TxtUnit.ReadOnly = true;
this.TxtUnit.SelectedText = "";
this.TxtUnit.SelectionLength = 0;
this.TxtUnit.SelectionStart = 0;
this.TxtUnit.Size = new System.Drawing.Size(45, 25);
this.TxtUnit.TabIndex = 13;
this.TxtUnit.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtUnit.ToolTip = "";
this.TxtUnit.WordWrap = true;
//
// LblState
//
this.LblState.AutoSize = true;
this.LblState.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.LblState.Location = new System.Drawing.Point(184, 96);
this.LblState.Name = "LblState";
this.LblState.Size = new System.Drawing.Size(29, 12);
this.LblState.TabIndex = 45;
this.LblState.Text = "持平";
//
// TxtGoodsSN
//
this.TxtGoodsSN.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtGoodsSN.EmptyText = "";
this.TxtGoodsSN.Location = new System.Drawing.Point(9, 47);
this.TxtGoodsSN.MaxLength = 999999999;
this.TxtGoodsSN.Multiline = false;
this.TxtGoodsSN.Name = "TxtGoodsSN";
this.TxtGoodsSN.OnlyNumeric = false;
this.TxtGoodsSN.PasswordChar = '\0';
this.TxtGoodsSN.ReadOnly = true;
this.TxtGoodsSN.SelectedText = "";
this.TxtGoodsSN.SelectionLength = 0;
this.TxtGoodsSN.SelectionStart = 0;
this.TxtGoodsSN.Size = new System.Drawing.Size(118, 25);
this.TxtGoodsSN.TabIndex = 47;
this.TxtGoodsSN.TabStop = false;
this.TxtGoodsSN.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtGoodsSN.ToolTip = "";
this.TxtGoodsSN.WordWrap = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.BackColor = System.Drawing.SystemColors.Control;
this.label4.Location = new System.Drawing.Point(8, 32);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 46;
this.label4.Text = "编号";
//
// FrmGoodsEntry
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(386, 355);
this.Controls.Add(this.TxtGoodsSN);
this.Controls.Add(this.label4);
this.Controls.Add(this.LblState);
this.Controls.Add(this.TxtUnit);
this.Controls.Add(this.TxtDes);
this.Controls.Add(this.label3);
this.Controls.Add(this.NumCount);
this.Controls.Add(this.label2);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtName);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Location = new System.Drawing.Point(0, 0);
this.MaximizeBox = false;
this.Name = "FrmGoodsEntry";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "新增";
this.Load += new System.EventHandler(this.FrmAdd_Load);
((System.ComponentModel.ISupportInitialize)(this.NumCount)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnCancel;
private ryControls.ButtonEx BtnOK;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 txtName;
private System.Windows.Forms.Label label2;
private ryControls.NumericUpDownEx NumCount;
private System.Windows.Forms.Label label3;
private ryControls.TextBoxEx2 TxtDes;
private ryControls.TextBoxEx2 TxtUnit;
private System.Windows.Forms.Label LblState;
private ryControls.TextBoxEx2 TxtGoodsSN;
private System.Windows.Forms.Label label4;
}
}

View File

@ -0,0 +1,92 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyHouse.DbOp
{
public partial class FrmGoodsEntry : RySkins.SKinForm
{
public ModalForm mr = null;
public string tableName = "Goods";
/// <summary>
/// true为入库,false为出库
/// </summary>
public bool IsAdd { get; set; } = true;
public string selectId = "-1";
public FrmGoodsEntry()
{
InitializeComponent();
}
#region
public void GetInfo(string id)
{
selectId = id;
string post_str = "api=GetGoods&id=" + id;
var jsonResult = API.API.Post("Goods", "GetGoods", post_str);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count > 0)
{
DataRow reader = data.Rows[0];
TxtGoodsSN.Text = reader["SN"].ToString();
txtName.Text = reader["Name"].ToString();
TxtUnit.Text = reader["Unit"].ToString();
}
}
}
private void BtnOK_Click(object sender, EventArgs e)
{
var count = NumCount.Value;
if (!IsAdd) { count = -count; }
if (count == 0)
{
MessageBox.Show("数量不能为0。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
string post_str = "api=Entry&sn=" + RyWeb.WebDecode.UrlEncode(TxtGoodsSN.Text)+ "&Count="+NumCount.Value+ "&Des=" + RyWeb.WebDecode.UrlEncode(TxtDes.Text);
var jsonResult = API.API.Post("Goods", "Entry", post_str);
if (jsonResult.IsOK)
{
}
else
{
MessageBox.Show(jsonResult.ResultText, "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
ModalForm.SetDialogResult(this, mr, DialogResult.OK);
}
#endregion
private void BtnCancel_Click(object sender, EventArgs e)
{
ModalForm.SetDialogResult(this, mr, DialogResult.Cancel);
}
private void FrmAdd_Load(object sender, EventArgs e)
{
}
private void NumCount_ValueChanged(object sender, EventArgs e)
{
if (IsAdd)
{
LblState.Text = "增加了 " + NumCount.Value + " " + TxtUnit.Text;
LblState.ForeColor = Color.Blue;
}
else
{
LblState.Text = "减少了 " + NumCount.Value + " " + TxtUnit.Text;
LblState.ForeColor = Color.Red;
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,854 @@
using BrightIdeasSoftware;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace MyHouse.DbOp
{
public partial class FrmGoodsView : RySkins.SKinForm
{
string titleName = "物品";
public FrmGoodsView()
{
InitializeComponent();
OlvLocSNAndName.AspectGetter = delegate (object x) {
var item = ((LocationInfo)x);
return "【"+item.SN+"】"+item.Name;
};
LvLocation.CanExpandGetter = delegate (object x) {
var item = ((LocationInfo)x);
return item.ChildrenCount > 0;
};
LvLocation.ChildrenGetter = delegate (object x) {
var item = ((LocationInfo)x);
var list = LoadLocation(item.Id);
return list;
};
LvLocation.IsSimpleDragSource = true;
LvLocation.IsSimpleDropSink = true;
LvLocation.ModelCanDrop += delegate (object sender, ModelDropEventArgs e) {
e.Effect = DragDropEffects.None;
if(ToolStripMenuItem.Checked)
{
e.InfoMessage = "当前拖动模式已关闭";return;
}
if (e.TargetModel == null)
return;
var TargetModel = (LocationInfo)e.TargetModel;
for (int i = 0; i < e.SourceModels.Count; i++)
{
var item_source = (LocationInfo)e.SourceModels[i];
if (item_source == TargetModel) { return; }
if (item_source.Id == TargetModel.ParentId) { return; }
if (TargetModel.IdPath.IndexOfEx("/"+item_source.Id+"/")>=0) { return; }
}
if (e.TargetModel is LocationInfo)
e.Effect = e.StandardDropActionFromKeys;
else
e.InfoMessage = "无法移动";
};
LvLocation.ModelDropped += delegate (object sender, ModelDropEventArgs e) {
var item_target = ((LocationInfo)e.TargetModel);
var list_source = e.SourceModels;
IDbInterface db = Itrycn_Db.CreateDataProvider(Itrycn_Db.dataType);
List<GoodInfo> list = new List<GoodInfo>();
if (db.ConnDb(Itrycn_Db.SQLConnStr) == 1)
{
for (int i = 0; i < list_source.Count; i++)
{
var item_source = (LocationInfo)list_source[i];
db.ExecuteNonQuery("update Location set ParentId=" + item_target.Id+ " where id=" + item_source.Id);
var ds_loc = db.ReadData("select count(*) from Location where ParentId=" + item_source.ParentId);
if (ds_loc.HaveData())
{
db.ExecuteNonQuery("update Location set ChildrenCount=" + ds_loc.GetFirstRowCellValue() + " where id=" + item_source.ParentId);
}
ds_loc.Dispose();
Itrycn_Db.SetLocationIdPath(item_target.Id);
}
var ds_loc2 = db.ReadData("select count(*) from Location where ParentId=" + item_target.Id);
if (ds_loc2.HaveData())
{
db.ExecuteNonQuery("update Location set ChildrenCount=" + ds_loc2.GetFirstRowCellValue() + " where id=" + item_target.Id);
item_target.ChildrenCount = ds_loc2.GetFirstRowCellValue();
}
else { item_target.ChildrenCount = 0; }
ds_loc2.Dispose();
}
db.Free();
e.RefreshObjects();
};
TreeListView.TreeRenderer treeColumnRenderer = this.LvLocation.TreeColumnRenderer;
treeColumnRenderer.IsShowGlyphs = true;
treeColumnRenderer.UseTriangles = true;
OlvSN.AspectGetter = delegate (object x) { return ((GoodInfo)x).SN; };
OlvName.AspectGetter = delegate (object x) { return ((GoodInfo)x).Name; };
OlvCount.AspectGetter = delegate (object x) { return ((GoodInfo)x).Count; };
OlvCount.AspectToStringConverter = delegate (object row, object x)
{
var item = (GoodInfo)row;
return item.Count + " " + item.Unit;
};
OlvOutTime.AspectGetter = delegate (object x) { return ((GoodInfo)x).OutTimeStr; };
OlvCleanTime.AspectGetter = delegate (object x) { return ((GoodInfo)x).CleanTimeStr; };
OlvChargingTime.AspectGetter = delegate (object x) { return ((GoodInfo)x).ChargingTimeStr; };
this.objectListView1.RowHeight = 48;
this.objectListView1.UseAlternatingBackColors = false;
this.objectListView1.UseHotItem = false;
this.olvColumn1.Renderer = CreateDescribedTaskRenderer();
this.olvColumn1.AspectGetter = delegate (object x) {
var op = (OpInfo)x;
return op.OpTimeStr + " " + op.NickName;
};
LvGoods.FormatRow += LvGoods_FormatRow;
LvLocation.CellToolTipGetter = delegate (OLVColumn column, object x) { return ((LocationInfo)x).Des; };
}
private void LvGoods_FormatRow(object sender, FormatRowEventArgs e)
{
var row = (GoodInfo)e.Model;
if(row.TipOn)
{
if(row.Count<=row.TipCount)
{
e.Item.ForeColor = Color.Red;
}
else
{
e.Item.ForeColor = Color.Black;
}
}
else
{
e.Item.ForeColor = Color.Black;
}
if(row.OutTime>0)
{
if(row.OutTime<=DateTime.Now.AddDays(7).ToInt64())
{
if (row.Count > 0)
{
e.Item.ForeColor = Color.Red;
}
else { e.Item.ForeColor = Color.Gray; ; }
}
}
if (row.Count <= 0)
{ e.Item.ForeColor = Color.Gray; ; }
}
private DescribedTaskRenderer CreateDescribedTaskRenderer()
{
// Let's create an appropriately configured renderer.
DescribedTaskRenderer renderer = new DescribedTaskRenderer();
renderer.DescriptionAspectName = "OpDes";
renderer.UseCustomCheckboxImages = true;
// Change the formatting slightly
renderer.TitleFont = new Font("微软雅黑", 10, FontStyle.Regular);
renderer.TitleColor = Color.Blue;
renderer.DescriptionFont = new Font("Tahoma", 9);
renderer.DescriptionColor = Color.Gray;
renderer.TopSpace = 2;
renderer.TitleDescriptionSpace = 1;
renderer.UseGdiTextRendering = true;
return renderer;
}
#region
private void RySearch1_OnSearch(object sender, EventArgs e)
{
//需要修改此处
ctlMyPage1.RecordCount = 1;
ctlMyPage1.GotoPageIndex(1);
}
private List<LocationInfo> LoadLocation(int ParentId)
{
#region
var list = new List<LocationInfo>();
string post_str = "api=GetLocationByParentId&ParentId=" + ParentId;
var jsonResult = API.API.Post("Goods", "GetLocationByParentId", post_str);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
for (int i = 0; i < data.Rows.Count; i++)
{
DataRow row = data.Rows[i];
list.Add(new LocationInfo()
{
Id = row["id"].ToInt(),
SN = row["SN"].ToString(),
Name = row["Name"].ToString(),
Img = row["img"].ToString(),
Des = row["Des"].ToString(),
IdPath = row["IdPath"].ToString(),
ChildrenCount = row["ChildrenCount"].ToInt(),
ParentId = row["ParentId"].ToInt(),
AddTime = row["AddTime"].ToInt64().ToDateTime()
});
}
}
return list;
#endregion
}
private void LoadLocation()
{
#region
LvLocation.ClearObjects();
var list = new List<LocationInfo>();
//var list=LoadLocation(0);
list.Insert(0,new LocationInfo()
{
Id = 0,
SN = "-",
Name = "所有位置",
ChildrenCount = LoadLocation(0).Count
});
LvLocation.Roots = list;
LvLocation.Expand(list[0]);
#endregion
}
private void CtlMyPage1_OnPageChange(object sender, EventArgs e)
{
#region
var LocationId = 0;
if (LvLocation.SelectedObject != null)
{
var item = (LocationInfo)LvLocation.SelectedObject;
if (item.Id > 0)
{
LocationId = item.Id;
}
}
var LowTip = ChkLowTip.Checked?1:0;
var page_index = ctlMyPage1.GetCurrPageIndex();
if (page_index == 0) { page_index = 1; }
LvGoods.ClearObjects();
List<GoodInfo> list = new List<GoodInfo>();
string post_str = "api=GetGoodsList&name=" + RyWeb.WebDecode.UrlEncode(rySearch1.Text)+ "&page="+ page_index+(page_index==1? "&getpagecount=1&LocationId="+ LocationId+ "&LowTip="+ LowTip : "");
var jsonResult = API.API.Post("Goods", "GetGoodsList", post_str);
if (jsonResult.IsOK)
{
if (page_index == 1)
{
ctlMyPage1.RecordCount = jsonResult.Get("pagecount", 0);
}
DataTable data = jsonResult.List;
for (int i = 0; i < data.Rows.Count; i++)
{
DataRow row = data.Rows[i];
list.Add(new GoodInfo()
{
Id=row["id"].ToInt(),
SN = row["SN"].ToString(),
Name = row["Name"].ToString(),
Count=row["iCount"].ToDouble(),
Unit = row["Unit"].ToString(),
LocationId = row["LocationId"].ToInt(),
Des = row["Des"].ToString(),
TipOn = row["TipOn"].ToBool(),
TipCount = row["TipCount"].ToDouble(),
OutTime = row["OutTime"].ToInt64(),
AddTime = row["AddTime"].ToInt64().ToDateTime(),
CleanInterval = row["CleanInterval"].ToInt(),
CleanTime = row["CleanTime"].ToInt64(),
ChargingInterval = row["ChargingInterval"].ToInt(),
ChargingTime = row["ChargingTime"].ToInt64(),
}) ;
}
}
LvGoods.AddObjects(list);
#endregion
}
private void GetRow(int id, int index)
{
#region
string post_str = "api=GetGoods&id=" +id;
var jsonResult = API.API.Post("Goods", "GetGoods", post_str);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count>0)
{
DataRow row = data.Rows[0];
var item=(GoodInfo) LvGoods.GetModelObject(index);
item.SN = row["SN"].ToString();
item.Name = row["Name"].ToString();
item.Count = row["iCount"].ToDouble();
item.TipOn = row["TipOn"].ToBool();
item.TipCount = row["TipCount"].ToDouble();
item.Unit = row["Unit"].ToString();
item.LocationId = row["LocationId"].ToInt();
item.Des = row["Des"].ToString();
item.OutTime = row["OutTime"].ToInt64();
item.CleanInterval= row["CleanInterval"].ToInt();
item.ChargingInterval = row["ChargingInterval"].ToInt();
item.CleanTime = row["CleanTime"].ToInt64();
item.ChargingTime = row["ChargingTime"].ToInt64();
//添加剩余的项目
//添加完毕
LvGoods.UpdateObject(item);
}
}
#endregion
}
#endregion
private void BtnAdd_Click(object sender, EventArgs e)
{
var LocationId = 0;
if (LvLocation.SelectedObject != null)
{
var item = (LocationInfo)LvLocation.SelectedObject;
if (item.Id > 0)
{
LocationId = item.Id;
}
}
FrmGoodsAdd frm = new FrmGoodsAdd()
{
Text = "添加"+ titleName,
Icon = Icon,
isAdd = 1,
LocationId=LocationId
};
frm.GetByAdd();
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
rySearch1.PerformClick();
}
});
frm.mr.ShowModal();
}
private void BtnEdit_Click(object sender, EventArgs e)
{
if (LvGoods.SelectedObject == null) { return; }
var item = (GoodInfo)LvGoods.SelectedObject;
var selectId = item.Id;
FrmGoodsAdd frm = new FrmGoodsAdd()
{
Text = "修改"+ titleName,
Icon = Icon,
isAdd = 0
};
frm.GetInfo(selectId.ToString());
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
GetRow(selectId, LvGoods.SelectedIndex);
}
});
frm.mr.ShowModal();
}
private void BtnDel_Click(object sender, EventArgs e)
{
if (LvGoods.SelectedObject == null) { MessageBox.Show("请先选择要删除的项。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
var item = (GoodInfo)LvGoods.SelectedObject;
var selectId = item.Id;
if (RySkins.Msg.ShowMsg("确定要删除该项吗?一旦删除将不可恢复。", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
{
return;
}
string post_str = "api=DelGoods&id=" + selectId;
var jsonResult = API.API.Post("Goods", "DelGoods", post_str);
if (jsonResult.IsOK)
{
LvGoods.RemoveObject(item);
}
else
{
API.API.ErrorJson(jsonResult);
}
}
private void FrmView_Load(object sender, EventArgs e)
{
Text = "浏览"+ titleName;
ToolStripMenuItem.Text = "添加"+ titleName;
ToolStripMenuItem.Text = "修改" + titleName;
ToolStripMenuItem.Text = "删除" + titleName;
LoadLocation();
rySearch1.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnAdd.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnEdit.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnDel.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvGoods.SelectedObject == null) { return; }
var item = (GoodInfo)LvGoods.SelectedObject;
var selectId = item.Id;
FrmGoodsAdd frm = new FrmGoodsAdd()
{
Text = "添加" + titleName,
Icon = Icon,
isAdd = 1
};
frm.GetInfo(selectId.ToString());
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
rySearch1.PerformClick();
}
});
frm.mr.ShowModal();
}
private void GetItemUI(int rowindex)
{
int id;
if (LvGoods.GetItemCount() > rowindex && rowindex >= 0)
{
var item =(GoodInfo)LvGoods.GetModelObject(rowindex);
id = item.Id;
TxtGoodsSN.Text = item.SN;
TxtGoodsName.Text = item.Name;
TxtGoodsSN.Tag = id;
TxtUnit.Text = item.Unit;
TxtLocation.Text = "";
BtnLocationImage.Tag = "";
TxtLocation.ToolTip = "";
TxtChargingTime.Text = item.ChargingTimeStr;
TxtCleanTime.Text =item.CleanTimeStr;
TxtCount.Text = item.Count.ToString().Replace(".00","");
Thread th = new Thread(Start);
th.Start();
void Start()
{
string post_str = "api=GetGoods&id=" + id;
var jsonResult = API.API.Post("Goods", "GetGoods", post_str);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
DataRow row = data.Rows[0];
new Thread(GetImage).Start();
void GetImage()
{
var image = API.WebDav.LoadPic(Public_Config.WebDav_VistorUrl + "/" + row["img"].ToString());
this.Invoke(new Action(() =>
{
PicLogo.Image = image;
}));
}
this.Invoke(new Action(() =>
{
TxtDes.Text = row["Des"].ToString();
TxtAddTime.Text = row["AddTime"].ToInt64().ToDateTime().ToString("yyyy-MM-dd dddd HH:mm");
TxtEditTime.Text = row["EditTime"].ToInt64().ToDateTime().ToString("yyyy-MM-dd dddd HH:mm");
}));
post_str = "api=GetLocation&id=" + row["LocationId"].ToInt();
jsonResult = API.API.Post("Goods", "GetLocation", post_str);
if (jsonResult.IsOK)
{
DataTable data_loc = jsonResult.List;
DataRow row_loc = data_loc.Rows[0];
this.Invoke(new Action(() =>
{
TxtLocation.Text = "【" + row_loc["SN"].ToString() + "】" + row_loc["Name"].ToString();
TxtLocation.ToolTip = row_loc["Des"].ToString();
BtnLocationImage.Tag = row_loc["img"].ToString();
}));
}
objectListView1.ClearObjects();
List<OpInfo> list_op = new List<OpInfo>();
post_str = "api=GetLogs&id=" + id;
jsonResult = API.API.Post("Goods", "GetLogs", post_str);
if (jsonResult.IsOK)
{
DataTable data_log = jsonResult.List;
for (int i = 0; i < data_log.Rows.Count; i++)
{
DataRow reader_log = data_log.Rows[i];
string uName = Itrycn_Db.GetNickName(reader_log["UserId"].ToString());
list_op.Add(new OpInfo()
{
Id = reader_log["id"].ToInt(),
OpTime = reader_log["AddTime"].ToInt64().ToDateTime(),
NickName = uName,
OpDes = reader_log["Des"].ToString().Trim()
});
}
objectListView1.AddObjects(list_op);
}
}
}
}
else
{
TxtGoodsName.Text = "";
TxtEditTime.Text = "";
TxtAddTime.Text = "";
TxtGoodsSN.Text = "";
TxtGoodsSN.Tag = 0;
TxtUnit.Text = "";
TxtCount.Text = "";
TxtDes.Text = "";
TxtLocation.Text = "";
BtnLocationImage.Tag = "";
TxtLocation.ToolTip = "";
TxtChargingTime.Text = "";
TxtCleanTime.Text = "";
PicLogo.Image = null;
objectListView1.ClearObjects();
return;
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvGoods.SelectedObject == null) { return; }
var item = (GoodInfo)LvGoods.SelectedObject;
var id = item.Id;
FrmGoodsEntry frm = new FrmGoodsEntry();
frm.Icon = Icon;
frm.Text = "物品出库";
frm.IsAdd = false;
frm.GetInfo(id.ToString());
if (frm.ShowDialog() == DialogResult.OK)
{
var row_index = LvGoods.SelectedIndex;
GetRow(id,row_index);
GetItemUI(row_index);
}
frm.Dispose();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvGoods.SelectedObject == null) { return; }
var item = (GoodInfo)LvGoods.SelectedObject;
var id = item.Id;
FrmGoodsEntry frm = new FrmGoodsEntry();
frm.Icon = Icon;
frm.Text = "物品入库";
frm.IsAdd = true;
frm.GetInfo(id.ToString());
if (frm.ShowDialog() == DialogResult.OK)
{
var row_index = LvGoods.SelectedIndex;
GetRow(id, row_index);
GetItemUI(row_index);
}
frm.Dispose();
}
private void LvGoods_SelectionChanged(object sender, EventArgs e)
{
if (LvGoods.SelectedObject == null) { GetItemUI(-1); return; }
var row_index = LvGoods.SelectedIndex;
GetItemUI(row_index);
}
private void PicLogo_Click(object sender, EventArgs e)
{
OTools.FrmPreview frm=new OTools.FrmPreview();
frm.pictureBox1.Image = PicLogo.Image;
frm.ShowDialog();
frm.Dispose();
}
private void BtnLocationImage_Click(object sender, EventArgs e)
{
OTools.FrmPreview frm = new OTools.FrmPreview();
frm.pictureBox1.Image = API.WebDav.LoadPic(Public_Config.WebDav_VistorUrl + "/" + BtnLocationImage.Tag.ToString());
frm.ShowDialog();
frm.Dispose();
}
private void LvLocation_SelectionChanged(object sender, EventArgs e)
{
if (LvLocation.SelectedObject == null) { return; }
var item = (LocationInfo)LvLocation.SelectedObject;
PicLocLogo.Image = API.WebDav.LoadPic(Public_Config.WebDav_VistorUrl + "/" + item.Img);
rySearch1.PerformClick();
}
private void PicLocLogo_Click(object sender, EventArgs e)
{
OTools.FrmPreview frm = new OTools.FrmPreview();
frm.pictureBox1.Image = PicLocLogo.Image;
frm.ShowDialog();
frm.Dispose();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
LoadLocation();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmLocationView frm=new FrmLocationView();
frm.ShowDialog();
frm.Dispose();
LoadLocation();
}
private void LvLocation_ItemActivate(object sender, EventArgs e)
{
Object model = this.LvLocation.SelectedObject;
if (model != null)
this.LvLocation.ToggleExpansion(model);
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvLocation.SelectedObject == null) { return; }
var item = (LocationInfo)LvLocation.SelectedObject;
var selectId = item.Id;
FrmLocationAdd frm = new FrmLocationAdd()
{
Text = "修改存储位置",
Icon = Icon,
isAdd = 0,
CanEditLoc = false
};
frm.GetInfo(selectId.ToString());
if(frm.ShowDialog() == DialogResult.OK)
{
string post_str = "api=GetLocation&id=" + selectId;
var jsonResult = API.API.Post("Goods", "GetLocation", post_str);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count>0)
{
DataRow row = data.Rows[0];
item.SN = row["SN"].ToString();
item.Name = row["Name"].ToString();
item.Img = row["img"].ToString();
item.Des = row["Des"].ToString();
item.IdPath = row["IdPath"].ToString();
item.ChildrenCount = row["ChildrenCount"].ToInt();
item.ParentId = row["ParentId"].ToInt();
LvLocation.RefreshObject(item);
}
}
}
frm.Dispose();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvLocation.SelectedObject == null) { return; }
var item = (LocationInfo)LvLocation.SelectedObject;
FrmLocationAdd frm = new FrmLocationAdd()
{
Text = "添加存储位置",
Icon = Icon,
isAdd = 1,
ParentId = item.Id
};
frm.GetByAdd();
if (frm.ShowDialog() == DialogResult.OK)
{
try
{
LvLocation.RefreshObject(item);
}
catch { }
}
frm.Dispose();
}
private void ChkLowTip_CheckedChanged(object sender, EventArgs e)
{
rySearch1.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvGoods.SelectedObject == null) { return; }
var item = (GoodInfo)LvGoods.SelectedObject;
FrmSetOpTime frm = new FrmSetOpTime();
frm.TxtGoodsName.Text = "【" + item.SN + "】" + item.Name;
frm.OpId = item.Id;
if(frm.ShowDialog()==DialogResult.OK)
{
GetRow(item.Id, LvGoods.SelectedIndex);
GetItemUI(LvGoods.SelectedIndex);
}
frm.Dispose();
}
private void web地址ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvGoods.SelectedObject == null) { return; }
var item = (GoodInfo)LvGoods.SelectedObject;
RyFiles.CopyToClip("http://lfx88.top:888/ASPNET/MyHouse/ShowGoods.aspx?mode=goodsinfo&sn="+item.SN);
}
}
public class OpInfo
{
public int Id { get; set; }
public DateTime OpTime { get; set; }
public string OpTimeStr
{
get
{
string dt_str = OpTime.ToString("yyyy-MM-dd dddd HH:mm:ss");
if (OpTime.Date == DateTime.Now.Date)
{
dt_str = "今天 " + OpTime.ToString("HH:mm:ss");
}
else if (OpTime.Date.AddDays(1) == DateTime.Now.Date)
{
dt_str = "昨天 " + OpTime.ToString("HH:mm:ss");
}
else if (OpTime.Date.AddDays(2) == DateTime.Now.Date)
{
dt_str = "前天 " + OpTime.ToString("HH:mm:ss");
}
else if (OpTime.Year == DateTime.Now.Year)
{
dt_str = OpTime.ToString("MM-dd dddd HH:mm:ss");
}
return dt_str;
}
}
public string NickName { get; set; }
public string OpDes { get; set; }
}
class GoodInfo
{
/// <summary>
/// id
/// </summary>
public int Id{ get; set; }
/// <summary>
/// 编号
/// </summary>
public string SN { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 数量
/// </summary>
public double Count { get; set; } = 0;
/// <summary>
/// 单位
/// </summary>
public string Unit { get; set; } = "";
/// <summary>
/// 备注
/// </summary>
public string Des { get; set; } = "";
/// <summary>
/// 位置id
/// </summary>
public int LocationId { get; set; } = 0;
/// <summary>
/// 过期时间
/// </summary>
public long OutTime { get; set; } = 0;
/// <summary>
/// 是否开启提醒
/// </summary>
public bool TipOn { get; set; } = false;
/// <summary>
/// 提醒阈值数量
/// </summary>
public double TipCount { get; set; } = 0;
/// <summary>
/// 过期时间字符串
/// </summary>
public string OutTimeStr
{
get {
if (OutTime == 0) { return "不过期"; }
return OutTime.ToDateTime().AddDays(-1).ToString("yyyy-MM-dd dddd");
}
}
/// <summary>
/// 添加时间
/// </summary>
public DateTime AddTime { get; set; }
/// <summary>
/// 添加时间字符串
/// </summary>
public string AddTimeStr
{
get { return AddTime.ToString("yyyy-MM-dd dddd HH:mm:ss"); }
}
/// <summary>
/// 清洁间隔
/// </summary>
public int CleanInterval { get; set; }
/// <summary>
/// 清洁时间
/// </summary>
public long CleanTime { get; set; }
/// <summary>
/// 清洁时间字符串
/// </summary>
public string CleanTimeStr
{
get {
if (CleanInterval == 0) { return ""; }
if (CleanTime == 0) { return "尚未清洁"; }
var dt = CleanTime.ToDateTime().AddDays(CleanInterval);
if (dt < DateTime.Now)
{
return dt.ToString("yyyy-MM-dd dddd") + "(已过期)";
}
else
{
return dt.ToString("yyyy-MM-dd dddd");
}
}
}
/// <summary>
/// 充电间隔
/// </summary>
public int ChargingInterval { get; set; }
/// <summary>
/// 充电时间
/// </summary>
public long ChargingTime { get; set; }
/// <summary>
/// 充电时间字符串
/// </summary>
public string ChargingTimeStr
{
get
{
if (ChargingInterval == 0) { return ""; }
if (ChargingTime == 0) { return "尚未充电"; }
var dt = ChargingTime.ToDateTime().AddDays(ChargingInterval);
if (dt < DateTime.Now)
{
return dt.ToString("yyyy-MM-dd dddd") + "(已过期)";
}
else
{
return dt.ToString("yyyy-MM-dd dddd");
}
}
}
}
}

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>35, 26</value>
</metadata>
<metadata name="MenuLocation.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>200, 26</value>
</metadata>
</root>

View File

@ -0,0 +1,256 @@
namespace MyHouse.DbOp
{
partial class FrmLocationAdd
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.BtnCancel = new ryControls.ButtonEx();
this.BtnOK = new ryControls.ButtonEx();
this.label1 = new System.Windows.Forms.Label();
this.txtName = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.TxtDes = new ryControls.TextBoxEx2();
this.PicLogo = new System.Windows.Forms.PictureBox();
this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog();
this.BtnCapture = new ryControls.ButtonEx();
this.label2 = new System.Windows.Forms.Label();
this.TxtSN = new ryControls.TextBoxEx2();
this.DtLocation = new ryControls.DoubleText();
this.label4 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.PicLogo)).BeginInit();
this.SuspendLayout();
//
// BtnCancel
//
this.BtnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCancel.Location = new System.Drawing.Point(393, 311);
this.BtnCancel.Name = "BtnCancel";
this.BtnCancel.Size = new System.Drawing.Size(65, 27);
this.BtnCancel.TabIndex = 5;
this.BtnCancel.Text = "取消";
this.BtnCancel.UseVisualStyleBackColor = true;
this.BtnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(322, 311);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(65, 27);
this.BtnOK.TabIndex = 4;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(7, 76);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 7;
this.label1.Text = "名称";
//
// txtName
//
this.txtName.BackColor = System.Drawing.Color.White;
this.txtName.EmptyText = "";
this.txtName.Location = new System.Drawing.Point(9, 91);
this.txtName.MaxLength = 999999999;
this.txtName.Multiline = false;
this.txtName.Name = "txtName";
this.txtName.OnlyNumeric = false;
this.txtName.PasswordChar = '\0';
this.txtName.ReadOnly = false;
this.txtName.SelectedText = "";
this.txtName.SelectionLength = 0;
this.txtName.SelectionStart = 0;
this.txtName.Size = new System.Drawing.Size(216, 25);
this.txtName.TabIndex = 6;
this.txtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.txtName.ToolTip = "";
this.txtName.WordWrap = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(7, 164);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(29, 12);
this.label3.TabIndex = 11;
this.label3.Text = "备注";
//
// TxtDes
//
this.TxtDes.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtDes.BackColor = System.Drawing.Color.White;
this.TxtDes.EmptyText = "";
this.TxtDes.Location = new System.Drawing.Point(9, 180);
this.TxtDes.MaxLength = 999999999;
this.TxtDes.Multiline = true;
this.TxtDes.Name = "TxtDes";
this.TxtDes.OnlyNumeric = false;
this.TxtDes.PasswordChar = '\0';
this.TxtDes.ReadOnly = false;
this.TxtDes.SelectedText = "";
this.TxtDes.SelectionLength = 0;
this.TxtDes.SelectionStart = 0;
this.TxtDes.Size = new System.Drawing.Size(216, 125);
this.TxtDes.TabIndex = 12;
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtDes.ToolTip = "";
this.TxtDes.WordWrap = true;
//
// PicLogo
//
this.PicLogo.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.PicLogo.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
this.PicLogo.Cursor = System.Windows.Forms.Cursors.Hand;
this.PicLogo.Location = new System.Drawing.Point(231, 32);
this.PicLogo.Name = "PicLogo";
this.PicLogo.Size = new System.Drawing.Size(227, 273);
this.PicLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.PicLogo.TabIndex = 23;
this.PicLogo.TabStop = false;
this.PicLogo.Click += new System.EventHandler(this.PicLogo_Click);
//
// openFileDialog1
//
this.openFileDialog1.Filter = "图片文件|*.png;*.jpg;*.bmp;*.jpeg";
//
// BtnCapture
//
this.BtnCapture.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.BtnCapture.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnCapture.Location = new System.Drawing.Point(9, 311);
this.BtnCapture.Name = "BtnCapture";
this.BtnCapture.Size = new System.Drawing.Size(65, 27);
this.BtnCapture.TabIndex = 24;
this.BtnCapture.Text = "截图";
this.BtnCapture.UseVisualStyleBackColor = true;
this.BtnCapture.Click += new System.EventHandler(this.BtnCapture_Click);
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(7, 32);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 26;
this.label2.Text = "编号";
//
// TxtSN
//
this.TxtSN.BackColor = System.Drawing.Color.White;
this.TxtSN.EmptyText = "";
this.TxtSN.Location = new System.Drawing.Point(9, 47);
this.TxtSN.MaxLength = 999999999;
this.TxtSN.Multiline = false;
this.TxtSN.Name = "TxtSN";
this.TxtSN.OnlyNumeric = false;
this.TxtSN.PasswordChar = '\0';
this.TxtSN.ReadOnly = false;
this.TxtSN.SelectedText = "";
this.TxtSN.SelectionLength = 0;
this.TxtSN.SelectionStart = 0;
this.TxtSN.Size = new System.Drawing.Size(216, 25);
this.TxtSN.TabIndex = 25;
this.TxtSN.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtSN.ToolTip = "";
this.TxtSN.WordWrap = true;
//
// DtLocation
//
this.DtLocation.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.DtLocation.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.DtLocation.Location = new System.Drawing.Point(9, 135);
this.DtLocation.Name = "DtLocation";
this.DtLocation.SelectName = "";
this.DtLocation.Size = new System.Drawing.Size(216, 23);
this.DtLocation.TabIndex = 28;
this.DtLocation.OnSelected += new System.EventHandler(this.DtLocation_OnSelected);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(7, 120);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(53, 12);
this.label4.TabIndex = 27;
this.label4.Text = "所在位置";
//
// FrmLocationAdd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(468, 348);
this.Controls.Add(this.DtLocation);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtSN);
this.Controls.Add(this.BtnCapture);
this.Controls.Add(this.PicLogo);
this.Controls.Add(this.TxtDes);
this.Controls.Add(this.label3);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtName);
this.Controls.Add(this.BtnCancel);
this.Controls.Add(this.BtnOK);
this.Location = new System.Drawing.Point(0, 0);
this.MaximizeBox = false;
this.Name = "FrmLocationAdd";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "新增";
this.Load += new System.EventHandler(this.FrmAdd_Load);
((System.ComponentModel.ISupportInitialize)(this.PicLogo)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ButtonEx BtnCancel;
private ryControls.ButtonEx BtnOK;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 txtName;
private System.Windows.Forms.Label label3;
private ryControls.TextBoxEx2 TxtDes;
private System.Windows.Forms.PictureBox PicLogo;
private System.Windows.Forms.OpenFileDialog openFileDialog1;
private ryControls.ButtonEx BtnCapture;
private System.Windows.Forms.Label label2;
private ryControls.TextBoxEx2 TxtSN;
private ryControls.DoubleText DtLocation;
private System.Windows.Forms.Label label4;
}
}

View File

@ -0,0 +1,163 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using static ScintillaNETV2.Style;
namespace MyHouse.DbOp
{
public partial class FrmLocationAdd : RySkins.SKinForm
{
public ModalForm mr = null;
public int isAdd = 1;
public string selectId = "-1";
private string last_img = "";
public int ParentId { get; set; } = 0;
private int init_parentId = 0;
public bool CanEditLoc { get; set; } = true;
public FrmLocationAdd()
{
InitializeComponent();
}
#region
public void GetInfo(string id)
{
selectId = id;
var jsonResult = API.API.Post("Goods", "GetLocation","id="+id);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count>0)
{
DataRow reader = data.Rows[0];
#region
TxtSN.Text = reader["SN"].ToString();
txtName.Text = reader["Name"].ToString();
TxtDes.Text = reader["Des"].ToString();
if (isAdd == 0)
{
last_img = reader["img"].ToString();
PicLogo.Image = API.WebDav.LoadPic(Public_Config.WebDav_VistorUrl + "/" + last_img);
}
init_parentId = reader["ParentId"].ToInt();
DtLocation.selectId = reader["ParentId"].ToString();
var ds_parent = API.API.Post("Goods", "GetLocation", "id=" + reader["ParentId"].ToString());
DtLocation.Text = "";
if (ds_parent.IsOK)
{
DataTable data_parent = ds_parent.List;
if(data_parent.Rows.Count>0)
{
DtLocation.Text = "【" + data_parent.Rows[0]["SN"].ToString() + "】" + data_parent.Rows[0]["Name"].ToString();
}
}
DtLocation.Enabled = CanEditLoc;
#endregion
}
}
}
public void GetByAdd()
{
var ds_parent = API.API.Post("Goods", "GetLocation", "id=" + ParentId);
DtLocation.selectId = ParentId.ToString();
DtLocation.Text = "";
if (ds_parent.IsOK)
{
DataTable data_parent = ds_parent.List;
if (data_parent.Rows.Count > 0)
{
DtLocation.Text = "【" + data_parent.Rows[0]["SN"].ToString() + "】" + data_parent.Rows[0]["Name"].ToString();
}
}
}
private void BtnOK_Click(object sender, EventArgs e)
{
if (txtName.Text == "")
{
RySkins.Msg.ShowMsg("名称不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
if (TxtSN.Text == "")
{
RySkins.Msg.ShowMsg("编号不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
var parentId = DtLocation.selectId.ToInt();
RyQuickSQL mySQL = new RyQuickSQL("Location");
mySQL.AddField("SN", TxtSN.Text);
mySQL.AddField("ParentId", parentId);
mySQL.AddField("name", txtName.Text);
mySQL.AddField("img", "");
mySQL.AddField("id", selectId.ToInt());
mySQL.AddField("Des", TxtDes.Text);
var jsonResult = API.API.Post("Goods", "SaveLocation", mySQL.GetPostData());
if (jsonResult.IsOK)
{
}
else
{
RySkins.Msg.ShowMsg(jsonResult.ResultText, "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
ModalForm.SetDialogResult(this, mr, DialogResult.OK);
}
#endregion
private void BtnCancel_Click(object sender, EventArgs e)
{
ModalForm.SetDialogResult(this, mr, DialogResult.Cancel);
}
private void FrmAdd_Load(object sender, EventArgs e)
{
}
private string select_img = "";
private void PicLogo_Click(object sender, EventArgs e)
{
if (openFileDialog1.ShowDialog() == DialogResult.OK)
{
select_img = openFileDialog1.FileName;
PicLogo.Image = RyImage.LoadPic(select_img);
}
}
private void BtnCapture_Click(object sender, EventArgs e)
{
var capture = new ryCommon._SCREEN_CAPTURE.ScreenCapture();
Bitmap m = capture.StartCapture(false);
if (m != null)
{
long tick = DateTime.Now.Ticks;
Random ran = new Random((int)(tick & 0xffffffffL) | (int)(tick >> 32));
string path = Application.StartupPath + @"\UserDb\tmp\" + DateTime.Now.ToString("yyyyMMddHHmmss") + ran.Next(1000, 9999) + ".png";
if (!System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(path)))
{
System.IO.Directory.CreateDirectory(System.IO.Path.GetDirectoryName(path));
}
RyImage.SaveHighQualityImage(m, path);
select_img = path;
PicLogo.Image = RyImage.LoadPic(select_img);
}
}
private void DtLocation_OnSelected(object sender, EventArgs e)
{
FrmLocationView frm = new FrmLocationView();
frm.IsSelectedMode = true;
if (frm.ShowDialog() == DialogResult.OK)
{
DtLocation.selectId = frm.SelectId.ToString();
DtLocation.SelectName = frm.SelectName;
}
frm.Dispose();
}
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="openFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,501 @@
namespace MyHouse.DbOp
{
partial class FrmLocationView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.rySearch1 = new ryControls.rySearch();
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ctlMyPage1 = new MyPage.ctlMyPage();
this.btnDel = new ryControls.ButtonEx();
this.btnEdit = new ryControls.ButtonEx();
this.btnAdd = new ryControls.ButtonEx();
this.LvCbResult = new BrightIdeasSoftware.FastObjectListView();
this.OlvSN = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvDes = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvAddTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.TxtDes = new ryControls.TextBoxEx2();
this.label1 = new System.Windows.Forms.Label();
this.TxtAddTime = new ryControls.TextBoxEx2();
this.label8 = new System.Windows.Forms.Label();
this.TxtEditTime = new ryControls.TextBoxEx2();
this.label7 = new System.Windows.Forms.Label();
this.PicLogo = new System.Windows.Forms.PictureBox();
this.TxtName = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.contextMenuStrip2 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem2 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem3 = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem4 = new System.Windows.Forms.ToolStripMenuItem();
this.contextMenuStrip1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvCbResult)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.PicLogo)).BeginInit();
this.contextMenuStrip2.SuspendLayout();
this.SuspendLayout();
//
// rySearch1
//
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.ButtonRoundBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.EmptyText = "请输入搜索内容";
this.rySearch1.Location = new System.Drawing.Point(12, 30);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(329, 24);
this.rySearch1.TabIndex = 28;
this.rySearch1.OnSearch += new System.EventHandler(this.RySearch1_OnSearch);
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.ToolStripMenuItem,
this.ToolStripMenuItem,
this.ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(161, 92);
//
// 复制并添加数据ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "复制并添加数据ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.ToolStripMenuItem.Text = "复制并添加数据";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 添加数据ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "添加数据ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.ToolStripMenuItem.Text = "添加数据";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 修改数据ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "修改数据ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.ToolStripMenuItem.Text = "修改数据";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 删除数据ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "删除数据ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.ToolStripMenuItem.Text = "删除数据";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// ctlMyPage1
//
this.ctlMyPage1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ctlMyPage1.Location = new System.Drawing.Point(12, 618);
this.ctlMyPage1.Name = "ctlMyPage1";
this.ctlMyPage1.PageSize = 50;
this.ctlMyPage1.RecordCount = 0;
this.ctlMyPage1.Size = new System.Drawing.Size(506, 26);
this.ctlMyPage1.SQLText = "";
this.ctlMyPage1.SQLText2 = "";
this.ctlMyPage1.T_FirstCaption = "首页";
this.ctlMyPage1.T_LastCaption = "末页";
this.ctlMyPage1.T_NextCaption = "下一页";
this.ctlMyPage1.T_Parameters = null;
this.ctlMyPage1.T_PreCaption = "上一页";
this.ctlMyPage1.T_SkipCaption = "跳到";
this.ctlMyPage1.T_TipCaption = "{pageindex}/{pagecount} 页,共 {recordcount} 条记录,每页 {pagesize} 条";
this.ctlMyPage1.TabIndex = 30;
this.ctlMyPage1.OnPageChange += new System.EventHandler(this.CtlMyPage1_OnPageChange);
//
// btnDel
//
this.btnDel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnDel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnDel.Location = new System.Drawing.Point(843, 30);
this.btnDel.Name = "btnDel";
this.btnDel.Size = new System.Drawing.Size(62, 24);
this.btnDel.TabIndex = 40;
this.btnDel.Text = "删除";
this.btnDel.UseVisualStyleBackColor = true;
this.btnDel.Click += new System.EventHandler(this.BtnDel_Click);
//
// btnEdit
//
this.btnEdit.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnEdit.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnEdit.Location = new System.Drawing.Point(775, 30);
this.btnEdit.Name = "btnEdit";
this.btnEdit.Size = new System.Drawing.Size(62, 24);
this.btnEdit.TabIndex = 39;
this.btnEdit.Text = "修改";
this.btnEdit.UseVisualStyleBackColor = true;
this.btnEdit.Click += new System.EventHandler(this.BtnEdit_Click);
//
// btnAdd
//
this.btnAdd.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.btnAdd.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnAdd.Location = new System.Drawing.Point(707, 30);
this.btnAdd.Name = "btnAdd";
this.btnAdd.Size = new System.Drawing.Size(62, 24);
this.btnAdd.TabIndex = 38;
this.btnAdd.Text = "添加";
this.btnAdd.UseVisualStyleBackColor = true;
this.btnAdd.Click += new System.EventHandler(this.BtnAdd_Click);
//
// LvCbResult
//
this.LvCbResult.AllColumns.Add(this.OlvSN);
this.LvCbResult.AllColumns.Add(this.OlvName);
this.LvCbResult.AllColumns.Add(this.OlvDes);
this.LvCbResult.AllColumns.Add(this.OlvAddTime);
this.LvCbResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LvCbResult.CellEditUseWholeCell = false;
this.LvCbResult.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvSN,
this.OlvName,
this.OlvDes,
this.OlvAddTime});
this.LvCbResult.ContextMenuStrip = this.contextMenuStrip1;
this.LvCbResult.Cursor = System.Windows.Forms.Cursors.Default;
this.LvCbResult.EmptyListMsg = "当前列表没有任何项";
this.LvCbResult.FullRowSelect = true;
this.LvCbResult.HideSelection = false;
this.LvCbResult.Location = new System.Drawing.Point(3, 3);
this.LvCbResult.Name = "LvCbResult";
this.LvCbResult.RowHeight = 25;
this.LvCbResult.ShowGroups = false;
this.LvCbResult.ShowItemToolTips = true;
this.LvCbResult.Size = new System.Drawing.Size(622, 549);
this.LvCbResult.TabIndex = 85;
this.LvCbResult.UseCompatibleStateImageBehavior = false;
this.LvCbResult.UseFiltering = true;
this.LvCbResult.View = System.Windows.Forms.View.Details;
this.LvCbResult.VirtualMode = true;
this.LvCbResult.SelectionChanged += new System.EventHandler(this.LvCbResult_SelectionChanged);
this.LvCbResult.DoubleClick += new System.EventHandler(this.LvCbResult_DoubleClick);
//
// OlvSN
//
this.OlvSN.Text = "编号";
//
// OlvName
//
this.OlvName.Text = "名称";
this.OlvName.Width = 170;
//
// OlvDes
//
this.OlvDes.Text = "备注";
this.OlvDes.Width = 200;
//
// OlvAddTime
//
this.OlvAddTime.Text = "时间";
this.OlvAddTime.Width = 170;
//
// splitContainer1
//
this.splitContainer1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.splitContainer1.FixedPanel = System.Windows.Forms.FixedPanel.Panel2;
this.splitContainer1.Location = new System.Drawing.Point(12, 60);
this.splitContainer1.Name = "splitContainer1";
//
// splitContainer1.Panel1
//
this.splitContainer1.Panel1.Controls.Add(this.LvCbResult);
//
// splitContainer1.Panel2
//
this.splitContainer1.Panel2.Controls.Add(this.TxtDes);
this.splitContainer1.Panel2.Controls.Add(this.label1);
this.splitContainer1.Panel2.Controls.Add(this.TxtAddTime);
this.splitContainer1.Panel2.Controls.Add(this.label8);
this.splitContainer1.Panel2.Controls.Add(this.TxtEditTime);
this.splitContainer1.Panel2.Controls.Add(this.label7);
this.splitContainer1.Panel2.Controls.Add(this.PicLogo);
this.splitContainer1.Panel2.Controls.Add(this.TxtName);
this.splitContainer1.Panel2.Controls.Add(this.label2);
this.splitContainer1.Size = new System.Drawing.Size(893, 556);
this.splitContainer1.SplitterDistance = 628;
this.splitContainer1.TabIndex = 86;
//
// TxtDes
//
this.TxtDes.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtDes.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtDes.EmptyText = "";
this.TxtDes.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(175)))), ((int)(((byte)(185)))), ((int)(((byte)(200)))));
this.TxtDes.Location = new System.Drawing.Point(3, 152);
this.TxtDes.MaxLength = 999999999;
this.TxtDes.Multiline = true;
this.TxtDes.Name = "TxtDes";
this.TxtDes.OnlyNumeric = false;
this.TxtDes.PasswordChar = '\0';
this.TxtDes.ReadOnly = true;
this.TxtDes.SelectedText = "";
this.TxtDes.SelectionLength = 0;
this.TxtDes.SelectionStart = 0;
this.TxtDes.Size = new System.Drawing.Size(255, 90);
this.TxtDes.TabIndex = 30;
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtDes.ToolTip = "";
this.TxtDes.WordWrap = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(3, 138);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(29, 12);
this.label1.TabIndex = 29;
this.label1.Text = "备注";
//
// TxtAddTime
//
this.TxtAddTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtAddTime.BackColor = System.Drawing.Color.White;
this.TxtAddTime.EmptyText = "";
this.TxtAddTime.Location = new System.Drawing.Point(3, 109);
this.TxtAddTime.MaxLength = 999999999;
this.TxtAddTime.Multiline = false;
this.TxtAddTime.Name = "TxtAddTime";
this.TxtAddTime.OnlyNumeric = false;
this.TxtAddTime.PasswordChar = '\0';
this.TxtAddTime.ReadOnly = true;
this.TxtAddTime.SelectedText = "";
this.TxtAddTime.SelectionLength = 0;
this.TxtAddTime.SelectionStart = 0;
this.TxtAddTime.Size = new System.Drawing.Size(255, 26);
this.TxtAddTime.TabIndex = 28;
this.TxtAddTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtAddTime.ToolTip = "";
this.TxtAddTime.WordWrap = true;
//
// label8
//
this.label8.AutoSize = true;
this.label8.BackColor = System.Drawing.Color.Transparent;
this.label8.Location = new System.Drawing.Point(3, 93);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(77, 12);
this.label8.TabIndex = 27;
this.label8.Text = "记录添加时间";
//
// TxtEditTime
//
this.TxtEditTime.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtEditTime.BackColor = System.Drawing.Color.White;
this.TxtEditTime.EmptyText = "";
this.TxtEditTime.Location = new System.Drawing.Point(3, 64);
this.TxtEditTime.MaxLength = 999999999;
this.TxtEditTime.Multiline = false;
this.TxtEditTime.Name = "TxtEditTime";
this.TxtEditTime.OnlyNumeric = false;
this.TxtEditTime.PasswordChar = '\0';
this.TxtEditTime.ReadOnly = true;
this.TxtEditTime.SelectedText = "";
this.TxtEditTime.SelectionLength = 0;
this.TxtEditTime.SelectionStart = 0;
this.TxtEditTime.Size = new System.Drawing.Size(255, 26);
this.TxtEditTime.TabIndex = 26;
this.TxtEditTime.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtEditTime.ToolTip = "";
this.TxtEditTime.WordWrap = true;
//
// label7
//
this.label7.AutoSize = true;
this.label7.BackColor = System.Drawing.Color.Transparent;
this.label7.Location = new System.Drawing.Point(3, 49);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(77, 12);
this.label7.TabIndex = 25;
this.label7.Text = "记录更新时间";
//
// PicLogo
//
this.PicLogo.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.PicLogo.Cursor = System.Windows.Forms.Cursors.Hand;
this.PicLogo.Location = new System.Drawing.Point(3, 248);
this.PicLogo.Name = "PicLogo";
this.PicLogo.Size = new System.Drawing.Size(255, 302);
this.PicLogo.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
this.PicLogo.TabIndex = 24;
this.PicLogo.TabStop = false;
this.PicLogo.Click += new System.EventHandler(this.PicLogo_Click);
//
// TxtName
//
this.TxtName.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.TxtName.BackColor = System.Drawing.Color.White;
this.TxtName.EmptyText = "";
this.TxtName.Location = new System.Drawing.Point(3, 20);
this.TxtName.MaxLength = 999999999;
this.TxtName.Multiline = false;
this.TxtName.Name = "TxtName";
this.TxtName.OnlyNumeric = false;
this.TxtName.PasswordChar = '\0';
this.TxtName.ReadOnly = true;
this.TxtName.SelectedText = "";
this.TxtName.SelectionLength = 0;
this.TxtName.SelectionStart = 0;
this.TxtName.Size = new System.Drawing.Size(255, 26);
this.TxtName.TabIndex = 19;
this.TxtName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtName.ToolTip = "";
this.TxtName.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.BackColor = System.Drawing.Color.Transparent;
this.label2.Location = new System.Drawing.Point(3, 5);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 18;
this.label2.Text = "名称";
//
// contextMenuStrip2
//
this.contextMenuStrip2.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.toolStripMenuItem1,
this.toolStripMenuItem2,
this.toolStripMenuItem3,
this.toolStripMenuItem4});
this.contextMenuStrip2.Name = "contextMenuStrip1";
this.contextMenuStrip2.Size = new System.Drawing.Size(181, 114);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem1.Text = "复制并添加数据";
this.toolStripMenuItem1.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// toolStripMenuItem2
//
this.toolStripMenuItem2.Name = "toolStripMenuItem2";
this.toolStripMenuItem2.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem2.Text = "添加数据";
this.toolStripMenuItem2.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// toolStripMenuItem3
//
this.toolStripMenuItem3.Name = "toolStripMenuItem3";
this.toolStripMenuItem3.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem3.Text = "修改数据";
this.toolStripMenuItem3.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// toolStripMenuItem4
//
this.toolStripMenuItem4.Name = "toolStripMenuItem4";
this.toolStripMenuItem4.Size = new System.Drawing.Size(180, 22);
this.toolStripMenuItem4.Text = "删除数据";
this.toolStripMenuItem4.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// FrmLocationView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(917, 648);
this.Controls.Add(this.splitContainer1);
this.Controls.Add(this.btnDel);
this.Controls.Add(this.btnEdit);
this.Controls.Add(this.btnAdd);
this.Controls.Add(this.ctlMyPage1);
this.Controls.Add(this.rySearch1);
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmLocationView";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "浏览";
this.Load += new System.EventHandler(this.FrmView_Load);
this.contextMenuStrip1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LvCbResult)).EndInit();
this.splitContainer1.Panel1.ResumeLayout(false);
this.splitContainer1.Panel2.ResumeLayout(false);
this.splitContainer1.Panel2.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).EndInit();
this.splitContainer1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.PicLogo)).EndInit();
this.contextMenuStrip2.ResumeLayout(false);
this.ResumeLayout(false);
}
#endregion
private ryControls.rySearch rySearch1;
private MyPage.ctlMyPage ctlMyPage1;
private ryControls.ButtonEx btnDel;
private ryControls.ButtonEx btnEdit;
private ryControls.ButtonEx btnAdd;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private BrightIdeasSoftware.FastObjectListView LvCbResult;
private BrightIdeasSoftware.OLVColumn OlvName;
private BrightIdeasSoftware.OLVColumn OlvAddTime;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private BrightIdeasSoftware.OLVColumn OlvDes;
private System.Windows.Forms.SplitContainer splitContainer1;
private ryControls.TextBoxEx2 TxtName;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.PictureBox PicLogo;
private ryControls.TextBoxEx2 TxtDes;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 TxtAddTime;
private System.Windows.Forms.Label label8;
private ryControls.TextBoxEx2 TxtEditTime;
private System.Windows.Forms.Label label7;
private BrightIdeasSoftware.OLVColumn OlvSN;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem2;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem3;
private System.Windows.Forms.ToolStripMenuItem toolStripMenuItem4;
}
}

View File

@ -0,0 +1,300 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyHouse.DbOp
{
public partial class FrmLocationView : RySkins.SKinForm
{
string titleName = "存储位置";
public FrmLocationView()
{
InitializeComponent();
OlvSN.AspectGetter = delegate (object x) { return ((LocationInfo)x).SN; };
OlvName.AspectGetter = delegate (object x) { return ((LocationInfo)x).Name; };
OlvDes.AspectGetter = delegate (object x) { return ((LocationInfo)x).Des; };
OlvAddTime.AspectGetter = delegate (object x) { return ((LocationInfo)x).AddTimeStr; };
}
#region
private void RySearch1_OnSearch(object sender, EventArgs e)
{
ctlMyPage1.RecordCount = 1;
ctlMyPage1.GotoPageIndex(1);
}
private void CtlMyPage1_OnPageChange(object sender, EventArgs e)
{
#region
LvCbResult.ClearObjects();
var page_index = ctlMyPage1.GetCurrPageIndex();
if (page_index == 0) { page_index = 1; }
string post_str = "api=GetLocationList&name=" + RyWeb.WebDecode.UrlEncode(rySearch1.Text) + "&page=" + page_index + (page_index == 1 ? "&getpagecount=1": "");
var jsonResult = API.API.Post("Goods", "GetLocationList", post_str);
if (jsonResult.IsOK)
{
List<LocationInfo> list = new List<LocationInfo>();
if (page_index == 1)
{
ctlMyPage1.RecordCount = jsonResult.Get("pagecount", 0);
}
DataTable data = jsonResult.List;
for (int i = 0; i < data.Rows.Count; i++)
{
DataRow row = data.Rows[i];
list.Add(new LocationInfo()
{
Id = row["id"].ToInt(),
SN = row["SN"].ToString(),
Name = row["Name"].ToString(),
Img = row["img"].ToString(),
Des = row["Des"].ToString(),
AddTime = row["AddTime"].ToInt64().ToDateTime()
});
}
LvCbResult.AddObjects(list);
}
#endregion
}
private void GetRow(int id, int index)
{
#region
var jsonResult = API.API.Post("Goods", "GetLocation", "id=" + id);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count > 0)
{
DataRow row = data.Rows[0];
var item = (LocationInfo)LvCbResult.GetModelObject(index);
item.SN = row["SN"].ToString();
item.Name = row["Name"].ToString();
item.Img = row["img"].ToString();
item.Des = row["Des"].ToString();
//添加剩余的项目
//添加完毕
LvCbResult.UpdateObject(item);
}
}
#endregion
}
#endregion
private void BtnAdd_Click(object sender, EventArgs e)
{
FrmLocationAdd frm = new FrmLocationAdd()
{
Text = "添加"+ titleName,
Icon = Icon,
isAdd = 1
};
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
rySearch1.PerformClick();
}
});
frm.mr.ShowModal();
}
private void BtnEdit_Click(object sender, EventArgs e)
{
if (LvCbResult.SelectedObject == null) { return; }
var item = (LocationInfo)LvCbResult.SelectedObject;
var selectId = item.Id;
FrmLocationAdd frm = new FrmLocationAdd()
{
Text = "修改"+ titleName,
Icon = Icon,
isAdd = 0
};
frm.GetInfo(selectId.ToString());
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
GetRow(selectId, LvCbResult.SelectedIndex);
}
});
frm.mr.ShowModal();
}
private void BtnDel_Click(object sender, EventArgs e)
{
if (LvCbResult.SelectedObject == null) { MessageBox.Show("请先选择要删除的项。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
var item = (LocationInfo)LvCbResult.SelectedObject;
var selectId = item.Id;
if (RySkins.Msg.ShowMsg("确定要删除该项吗?一旦删除将不可恢复。", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
{
return;
}
string post_str = "api=DelLocation&id=" + selectId;
var jsonResult = API.API.Post("Goods", "DelLocation", post_str);
if (jsonResult.IsOK)
{
LvCbResult.RemoveObject(item);
}
else
{
API.API.ErrorJson(jsonResult);
}
}
private void FrmView_Load(object sender, EventArgs e)
{
Text = "浏览"+ titleName;
ToolStripMenuItem.Text = "添加"+ titleName;
ToolStripMenuItem.Text = "修改" + titleName;
ToolStripMenuItem.Text = "删除" + titleName;
rySearch1.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnAdd.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnEdit.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
btnDel.PerformClick();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvCbResult.SelectedObject == null) { return; }
var item = (LocationInfo)LvCbResult.SelectedObject;
var selectId = item.Id;
FrmLocationAdd frm = new FrmLocationAdd()
{
Text = "添加" + titleName,
Icon = Icon,
isAdd = 1
};
frm.GetInfo(selectId.ToString());
frm.mr = new ModalForm(this, frm);
frm.mr.OnDialogResult += new ModalForm.DialogResultHandler((object t, DialogResult dg) => {
if (dg == DialogResult.OK)
{
rySearch1.PerformClick();
}
});
frm.mr.ShowModal();
}
public bool IsSelectedMode { get; set; } = false;
public int SelectId { get; set; } = -1;
public string SelectName { get; set; } = "";
private void LvCbResult_DoubleClick(object sender, EventArgs e)
{
if (!IsSelectedMode) { return; }
if (LvCbResult.SelectedObject == null) { return; }
var item = (LocationInfo)LvCbResult.SelectedObject;
SelectId = item.Id;
SelectName = "【"+item.SN+"】"+ item.Name;
DialogResult = DialogResult.OK;
}
private void GetItemUI(int rowindex)
{
int id;
if (LvCbResult.GetItemCount() > rowindex && rowindex >= 0)
{
var item = (LocationInfo)LvCbResult.GetModelObject(rowindex);
id = item.Id;
TxtName.Text = item.Name;
var jsonResult = API.API.Post("Goods", "GetLocation", "id=" + id);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count > 0)
{
DataRow row = data.Rows[0];
TxtDes.Text = row["Des"].ToString();
TxtAddTime.Text = row["AddTime"].ToInt64().ToDateTime().ToString("yyyy-MM-dd dddd HH:mm");
TxtEditTime.Text = row["EditTime"].ToInt64().ToDateTime().ToString("yyyy-MM-dd dddd HH:mm");
PicLogo.Image = API.WebDav.LoadPic(Public_Config.WebDav_VistorUrl + "/" + row["img"].ToString());
}
}
}
else
{
TxtName.Text = "";
TxtEditTime.Text = "";
TxtAddTime.Text = "";
TxtDes.Text = "";
PicLogo.Image = null;
return;
}
}
private void LvCbResult_SelectionChanged(object sender, EventArgs e)
{
if (LvCbResult.SelectedObject == null) { GetItemUI(-1); return; }
var row_index = LvCbResult.SelectedIndex;
GetItemUI(row_index);
}
private void PicLogo_Click(object sender, EventArgs e)
{
OTools.FrmPreview frm = new OTools.FrmPreview();
frm.pictureBox1.Image = PicLogo.Image;
frm.ShowDialog();
frm.Dispose();
}
}
class LocationInfo
{
/// <summary>
/// id
/// </summary>
public int Id{ get; set; }
/// <summary>
/// 父id
/// </summary>
public int ParentId { get; set; } = 0;
/// <summary>
/// id路径
/// </summary>
public string IdPath { get; set; } = "";
/// <summary>
/// 直系子位置数量
/// </summary>
public int ChildrenCount { get; set; } = 0;
/// <summary>
/// 编号
/// </summary>
public string SN { get; set; }
/// <summary>
/// 名称
/// </summary>
public string Name { get; set; }
/// <summary>
/// 备注
/// </summary>
public string Des { get; set; } = "";
/// <summary>
/// 图片
/// </summary>
public string Img { get; set; } = "";
/// <summary>
/// 添加时间
/// </summary>
public DateTime AddTime { get; set; }
/// <summary>
/// 添加时间字符串
/// </summary>
public string AddTimeStr
{
get { return AddTime.ToString("yyyy-MM-dd dddd HH:mm:ss"); }
}
}
}

View File

@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>50, 46</value>
</metadata>
<metadata name="contextMenuStrip2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>53, 18</value>
</metadata>
</root>

View File

@ -0,0 +1,134 @@
namespace MyHouse.DbOp
{
partial class FrmSetOpTime
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.CbbMode = new ryControls.RyComboBox();
this.dateTimePickerEX1 = new ryControls.DateTimePickerEX();
this.BtnOK = new ryControls.ButtonEx();
this.label5 = new System.Windows.Forms.Label();
this.TxtGoodsName = new ryControls.TextBoxEx2();
this.SuspendLayout();
//
// CbbMode
//
this.CbbMode.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.CbbMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbMode.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.CbbMode.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbMode.FormattingEnabled = true;
this.CbbMode.Items.AddRange(new object[] {
"清洁",
"充电"});
this.CbbMode.Location = new System.Drawing.Point(176, 46);
this.CbbMode.Name = "CbbMode";
this.CbbMode.Size = new System.Drawing.Size(76, 24);
this.CbbMode.TabIndex = 0;
//
// dateTimePickerEX1
//
this.dateTimePickerEX1.CustomFormat = "yyyy年MM月dd日 dddd HH:mm";
this.dateTimePickerEX1.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.dateTimePickerEX1.Location = new System.Drawing.Point(18, 76);
this.dateTimePickerEX1.Name = "dateTimePickerEX1";
this.dateTimePickerEX1.Size = new System.Drawing.Size(234, 21);
this.dateTimePickerEX1.TabIndex = 1;
//
// BtnOK
//
this.BtnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.BtnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnOK.Location = new System.Drawing.Point(187, 111);
this.BtnOK.Name = "BtnOK";
this.BtnOK.Size = new System.Drawing.Size(65, 27);
this.BtnOK.TabIndex = 18;
this.BtnOK.Text = "确定";
this.BtnOK.UseVisualStyleBackColor = true;
this.BtnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// label5
//
this.label5.AutoSize = true;
this.label5.BackColor = System.Drawing.SystemColors.Control;
this.label5.Location = new System.Drawing.Point(16, 31);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(29, 12);
this.label5.TabIndex = 25;
this.label5.Text = "编号";
//
// TxtGoodsName
//
this.TxtGoodsName.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(255)))), ((int)(((byte)(192)))));
this.TxtGoodsName.EmptyText = "";
this.TxtGoodsName.Location = new System.Drawing.Point(17, 46);
this.TxtGoodsName.MaxLength = 999999999;
this.TxtGoodsName.Multiline = false;
this.TxtGoodsName.Name = "TxtGoodsName";
this.TxtGoodsName.OnlyNumeric = false;
this.TxtGoodsName.PasswordChar = '\0';
this.TxtGoodsName.ReadOnly = true;
this.TxtGoodsName.SelectedText = "";
this.TxtGoodsName.SelectionLength = 0;
this.TxtGoodsName.SelectionStart = 0;
this.TxtGoodsName.Size = new System.Drawing.Size(153, 26);
this.TxtGoodsName.TabIndex = 24;
this.TxtGoodsName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtGoodsName.ToolTip = "";
this.TxtGoodsName.WordWrap = true;
//
// FrmSetOpTime
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(266, 152);
this.Controls.Add(this.label5);
this.Controls.Add(this.TxtGoodsName);
this.Controls.Add(this.BtnOK);
this.Controls.Add(this.dateTimePickerEX1);
this.Controls.Add(this.CbbMode);
this.Location = new System.Drawing.Point(0, 0);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmSetOpTime";
this.Resizable = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "设置时间";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.RyComboBox CbbMode;
private ryControls.DateTimePickerEX dateTimePickerEX1;
private ryControls.ButtonEx BtnOK;
private System.Windows.Forms.Label label5;
public ryControls.TextBoxEx2 TxtGoodsName;
}
}

View File

@ -0,0 +1,54 @@
using ryCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MyHouse.DbOp
{
public partial class FrmSetOpTime : RySkins.SKinForm
{
public FrmSetOpTime()
{
InitializeComponent();
CbbMode.SelectedIndex = 0;
dateTimePickerEX1.Value = DateTime.Now;
}
public int OpId { get; set; } = 0;
private void BtnOK_Click(object sender, EventArgs e)
{
switch (MessageBox.Show("是否确认要设置?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Warning, MessageBoxDefaultButton.Button2))
{
case DialogResult.No:
return;
}
var dt = dateTimePickerEX1.Value.ToInt64();
string post_str = "api=SetTime&id=" + OpId;
if(CbbMode.SelectedIndex==0)
{
post_str += "&CleanTime=" + dt;
}
else if(CbbMode.SelectedIndex==1)
{
post_str += "&ChargingTime=" + dt;
}
var jsonResult = API.API.Post("Goods", "SetTime", post_str);
if (jsonResult.IsOK)
{
DialogResult = DialogResult.OK;
//API.API.AddGoodsLogs(CbbMode.Text, OpId, "进行了[" + CbbMode.Text + "]", dateTimePickerEX1.Value.ToInt64());
}
else
{
MessageBox.Show(jsonResult.ResultText, "出错", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
//DialogResult = DialogResult.OK;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

213
Source/MyHouse/FrmAbout.Designer.cs generated Normal file
View File

@ -0,0 +1,213 @@
namespace MyHouse
{
partial class FrmAbout
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmAbout));
this.pnlTopLogo = new System.Windows.Forms.Panel();
this.lblTitle = new System.Windows.Forms.Label();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.lblVisitUrl = new System.Windows.Forms.Label();
this.LblQQ_Qun = new System.Windows.Forms.Label();
this.label4 = new System.Windows.Forms.Label();
this.label5 = new System.Windows.Forms.Label();
this.toolTip1 = new System.Windows.Forms.ToolTip(this.components);
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.label3 = new System.Windows.Forms.Label();
this.label6 = new System.Windows.Forms.Label();
this.pnlTopLogo.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pnlTopLogo
//
this.pnlTopLogo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(125)))), ((int)(((byte)(182)))));
this.pnlTopLogo.Controls.Add(this.lblTitle);
this.pnlTopLogo.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTopLogo.Location = new System.Drawing.Point(1, 27);
this.pnlTopLogo.Name = "pnlTopLogo";
this.pnlTopLogo.Size = new System.Drawing.Size(505, 59);
this.pnlTopLogo.TabIndex = 8;
//
// lblTitle
//
this.lblTitle.AutoSize = true;
this.lblTitle.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTitle.ForeColor = System.Drawing.Color.White;
this.lblTitle.Location = new System.Drawing.Point(12, 22);
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(110, 16);
this.lblTitle.TabIndex = 0;
this.lblTitle.Text = "睿元管理系统";
//
// label1
//
this.label1.AutoSize = true;
this.label1.BackColor = System.Drawing.Color.Transparent;
this.label1.Location = new System.Drawing.Point(13, 99);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(35, 12);
this.label1.TabIndex = 9;
this.label1.Text = "官网:";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(53, 67);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(0, 12);
this.label2.TabIndex = 10;
//
// lblVisitUrl
//
this.lblVisitUrl.AutoSize = true;
this.lblVisitUrl.BackColor = System.Drawing.Color.Transparent;
this.lblVisitUrl.Cursor = System.Windows.Forms.Cursors.Hand;
this.lblVisitUrl.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblVisitUrl.ForeColor = System.Drawing.Color.Blue;
this.lblVisitUrl.Location = new System.Drawing.Point(54, 99);
this.lblVisitUrl.Name = "lblVisitUrl";
this.lblVisitUrl.Size = new System.Drawing.Size(77, 12);
this.lblVisitUrl.TabIndex = 11;
this.lblVisitUrl.Text = "立即访问官网";
this.lblVisitUrl.Click += new System.EventHandler(this.LblVisitUrl_Click);
//
// LblQQ_Qun
//
this.LblQQ_Qun.AutoSize = true;
this.LblQQ_Qun.BackColor = System.Drawing.Color.Transparent;
this.LblQQ_Qun.Cursor = System.Windows.Forms.Cursors.Hand;
this.LblQQ_Qun.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.LblQQ_Qun.ForeColor = System.Drawing.Color.Blue;
this.LblQQ_Qun.Location = new System.Drawing.Point(235, 99);
this.LblQQ_Qun.Name = "LblQQ_Qun";
this.LblQQ_Qun.Size = new System.Drawing.Size(59, 12);
this.LblQQ_Qun.TabIndex = 14;
this.LblQQ_Qun.Text = "183161992";
this.toolTip1.SetToolTip(this.LblQQ_Qun, "点击复制");
this.LblQQ_Qun.Click += new System.EventHandler(this.LblQQ_Qun_Click);
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(234, 67);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(0, 12);
this.label4.TabIndex = 13;
//
// label5
//
this.label5.AutoSize = true;
this.label5.BackColor = System.Drawing.Color.Transparent;
this.label5.Location = new System.Drawing.Point(194, 99);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(35, 12);
this.label5.TabIndex = 12;
this.label5.Text = "QQ群:";
//
// pictureBox1
//
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
this.pictureBox1.Location = new System.Drawing.Point(85, 145);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(319, 174);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox1.TabIndex = 17;
this.pictureBox1.TabStop = false;
//
// label3
//
this.label3.AutoSize = true;
this.label3.BackColor = System.Drawing.Color.Transparent;
this.label3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(64)))), ((int)(((byte)(64)))), ((int)(((byte)(64)))));
this.label3.Location = new System.Drawing.Point(13, 337);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(365, 12);
this.label3.TabIndex = 18;
this.label3.Text = "注:本软件永久免费,您可以任意分发分享本软件,但不得破解本软件";
//
// label6
//
this.label6.AutoSize = true;
this.label6.BackColor = System.Drawing.Color.Transparent;
this.label6.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.label6.Location = new System.Drawing.Point(100, 130);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(285, 12);
this.label6.TabIndex = 19;
this.label6.Text = "支持微信或支付宝进行捐助,您可以捐助任意金额";
//
// FrmAbout
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.Color.White;
this.ClientSize = new System.Drawing.Size(507, 360);
this.Controls.Add(this.label6);
this.Controls.Add(this.label1);
this.Controls.Add(this.lblVisitUrl);
this.Controls.Add(this.label3);
this.Controls.Add(this.LblQQ_Qun);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.label5);
this.Controls.Add(this.label4);
this.Controls.Add(this.label2);
this.Controls.Add(this.pnlTopLogo);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(0, 0);
this.MaximizeBox = false;
this.Name = "FrmAbout";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "关于";
this.Load += new System.EventHandler(this.FrmAbout_Load);
this.pnlTopLogo.ResumeLayout(false);
this.pnlTopLogo.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.Panel pnlTopLogo;
private System.Windows.Forms.Label lblTitle;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private System.Windows.Forms.Label lblVisitUrl;
private System.Windows.Forms.Label LblQQ_Qun;
private System.Windows.Forms.ToolTip toolTip1;
private System.Windows.Forms.Label label4;
private System.Windows.Forms.Label label5;
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.Label label3;
private System.Windows.Forms.Label label6;
}
}

View File

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyHouse
{
public partial class FrmAbout : RySkins.SKinForm
{
public FrmAbout()
{
InitializeComponent();
}
private void FrmAbout_Load(object sender, EventArgs e)
{
lblTitle.Text = Soft_ConstInfo.Soft_Title + " V" + ryCommon.RySoft.VersionStr;
LblQQ_Qun.Text = Soft_ConstInfo.QQ_Qun;
if (Soft_ConstInfo.Soft_Url.Length == 0) { lblVisitUrl.Enabled = false; }
}
private void LblVisitUrl_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.OpenUrl(Soft_ConstInfo.Soft_Url);
}
private void BtnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.OK;
}
private void LblQQ_Qun_Click(object sender, EventArgs e)
{
try
{
Clipboard.SetText(LblQQ_Qun.Text);
MessageBox.Show("已成功复制到剪切板,请复制到QQ搜索。","提示",MessageBoxButtons.OK,MessageBoxIcon.Information);
}
catch { }
}
}
}

1255
Source/MyHouse/FrmAbout.resx Normal file

File diff suppressed because it is too large Load Diff

238
Source/MyHouse/FrmStart.Designer.cs generated Normal file
View File

@ -0,0 +1,238 @@
namespace MyHouse
{
partial class FrmStart
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmStart));
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.MenuTray = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.退ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.chromeTabControl1 = new ryControls.ChromeTabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.BtnGoodsView = new ryControls.ButtonEx();
this.BtnBankCard = new ryControls.ButtonEx();
this.MenuTray.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.chromeTabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
//
// notifyIcon1
//
this.notifyIcon1.ContextMenuStrip = this.MenuTray;
this.notifyIcon1.Visible = true;
this.notifyIcon1.DoubleClick += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// MenuTray
//
this.MenuTray.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.退ToolStripMenuItem});
this.MenuTray.Name = "MenuTray";
this.MenuTray.Size = new System.Drawing.Size(137, 48);
//
// 显示主窗体ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "显示主窗体ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.ToolStripMenuItem.Text = "显示主窗体";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 退出软件ToolStripMenuItem
//
this.退ToolStripMenuItem.Name = "退出软件ToolStripMenuItem";
this.退ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.退ToolStripMenuItem.Text = "退出软件";
this.退ToolStripMenuItem.Click += new System.EventHandler(this.退ToolStripMenuItem_Click);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(1, 27);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(787, 25);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
// 工具ToolStripMenuItem
//
this.ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.ToolStripMenuItem});
this.ToolStripMenuItem.Name = "工具ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.ToolStripMenuItem.Text = "工具";
//
// 选项ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "选项ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.ToolStripMenuItem.Text = "选项";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 物品管理ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "物品管理ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(124, 22);
this.ToolStripMenuItem.Text = "物品管理";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 关于ToolStripMenuItem
//
this.ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.ToolStripMenuItem});
this.ToolStripMenuItem.Name = "关于ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.ToolStripMenuItem.Text = "关于";
//
// 打开官网ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "打开官网ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.ToolStripMenuItem.Text = "打开官网";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 捐助ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "捐助ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.ToolStripMenuItem.Text = "关于和捐助";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// chromeTabControl1
//
this.chromeTabControl1.AllowDragTab = false;
this.chromeTabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.chromeTabControl1.BackTabPageImage = null;
this.chromeTabControl1.Controls.Add(this.tabPage1);
this.chromeTabControl1.Cursor = System.Windows.Forms.Cursors.Default;
this.chromeTabControl1.ItemSize = new System.Drawing.Size(100, 25);
this.chromeTabControl1.Location = new System.Drawing.Point(1, 55);
this.chromeTabControl1.Name = "chromeTabControl1";
this.chromeTabControl1.SelectedIndex = 0;
this.chromeTabControl1.ShowAddButton = false;
this.chromeTabControl1.ShowCloseButton = false;
this.chromeTabControl1.Size = new System.Drawing.Size(787, 533);
this.chromeTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.chromeTabControl1.TabContextMenuStrip = null;
this.chromeTabControl1.TabIndex = 0;
this.chromeTabControl1.TabMaxWidth = 100;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.BtnBankCard);
this.tabPage1.Controls.Add(this.BtnGoodsView);
this.tabPage1.Location = new System.Drawing.Point(1, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(785, 503);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "首页";
this.tabPage1.UseVisualStyleBackColor = true;
//
// BtnGoodsView
//
this.BtnGoodsView.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnGoodsView.Location = new System.Drawing.Point(16, 17);
this.BtnGoodsView.Name = "BtnGoodsView";
this.BtnGoodsView.Size = new System.Drawing.Size(102, 84);
this.BtnGoodsView.TabIndex = 5;
this.BtnGoodsView.Text = "物品管理";
this.BtnGoodsView.UseVisualStyleBackColor = true;
this.BtnGoodsView.Click += new System.EventHandler(this.BtnGoodsView_Click);
//
// BtnBankCard
//
this.BtnBankCard.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnBankCard.Location = new System.Drawing.Point(124, 17);
this.BtnBankCard.Name = "BtnBankCard";
this.BtnBankCard.Size = new System.Drawing.Size(102, 84);
this.BtnBankCard.TabIndex = 6;
this.BtnBankCard.Text = "银行卡管理";
this.BtnBankCard.UseVisualStyleBackColor = true;
this.BtnBankCard.Click += new System.EventHandler(this.BtnBankCard_Click);
//
// FrmStart
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(789, 592);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.chromeTabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmStart";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "FrmStart";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmStart_FormClosing);
this.Load += new System.EventHandler(this.FrmStart_Load);
this.Shown += new System.EventHandler(this.FrmStart_Shown);
this.MenuTray.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.chromeTabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.ContextMenuStrip MenuTray;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 退ToolStripMenuItem;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.TabPage tabPage1;
private ryControls.ChromeTabControl chromeTabControl1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private ryControls.ButtonEx BtnGoodsView;
private ryControls.ButtonEx BtnBankCard;
}
}

186
Source/MyHouse/FrmStart.cs Normal file
View File

@ -0,0 +1,186 @@
using MyHouse;
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyHouse
{
public partial class FrmStart : RySkins.SKinForm
{
readonly string[] prog_args;
public FrmStart(string[] args)
{
InitializeComponent();
prog_args = args;
//配置软件信息
notifyIcon1.Text = Soft_ConstInfo.Soft_Title;
Text = Soft_ConstInfo.Soft_Title + " V" + RySoft.VersionStr;
if (!Soft_ConstInfo.ShowTray) { notifyIcon1.Visible = false; }
if (!Soft_ConstInfo.DonateVisabled) { ToolStripMenuItem.Text = "关于"; }
if (Soft_ConstInfo.Soft_Url.Length == 0) { ToolStripMenuItem.PerformClick(); }
notifyIcon1.Icon = Icon;
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Normal;
var topmost = this.TopMost;
this.TopMost = true;
this.Show();
this.TopMost = topmost;
}
private void 退ToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void FrmStart_Shown(object sender, EventArgs e)
{
ryCommon.Ini ini = new Ini(Soft_ConstInfo.UserDataFolder + "\\Win.dat");
ini.WriteIni(Soft_ConstInfo.Soft_Id, "hwnd", Handle.ToInt32());
if (prog_args.Length >= 1)
{
//如果是自启动,并且开启了右下角托盘图标,则隐藏自身。
if (prog_args[0] == Soft_ConstInfo.Soft_Pram && Soft_ConstInfo.ShowTray)
this.Hide();
}
}
private void FrmStart_FormClosing(object sender, FormClosingEventArgs e)
{
if (Soft_ConstInfo.ShowTray && Public_Config.HideByCloseBtn && e.CloseReason== CloseReason.UserClosing)
{
e.Cancel = true;
this.Hide();
notifyIcon1.ShowBalloonTip(3000, Soft_ConstInfo.Soft_Title, "软件已经最小化到此处,请右击托盘图标进行关闭。", ToolTipIcon.Info);
return;
}
if (!Soft_MemInfo.IsCanCloseForm)
{
e.Cancel = true;
RySkins.Msg.ShowMsg("当前还有操作正在运行,请稍后关闭软件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
protected override void WndProc(ref System.Windows.Forms.Message msg)
{
switch (msg.Msg)
{
case 17189: //处理消息
{
#region
switch (msg.WParam.ToInt32())
{
case 100://
#region
if ((int)msg.LParam.ToInt32() == 100)
{
this.Show();
this.WindowState = FormWindowState.Normal;
this.Top = (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2;
this.Left = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
//RyForm.SetActiveWindow(Handle);
RyForm.BringToTop(Handle);
ToolStripMenuItem.PerformClick();
this.BringToFront();
this.Select();
this.Focus();
RyForm.BringToTop(Handle);
}
#endregion
break;
}
#endregion
}
break;
default:
base.WndProc(ref msg);//调用基类函数处理非自定义消息。
break;
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Soft_ConstInfo.DonateVisabled)
{
FrmAbout frm = new FrmAbout();
frm.ShowDialog();
frm.Dispose();
}
else
{
RySkins.Msg.ShowMsg(Soft_ConstInfo.AboutText.Replace("#softname#", Soft_ConstInfo.Soft_Title).Replace("#ver#", "V" + RySoft.VersionStr), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.OpenUrl(Soft_ConstInfo.Soft_Url);
}
private void FrmStart_Load(object sender, EventArgs e)
{
RyFiles.DeleteFile(Application.StartupPath + @"\UserDb\tmp\");
Public_Config.LoadSetting();
RyFiles.AddDropDrag(tabPage1.Handle);
//Itrycn_Project.Itrycn_Db.CreateTable();
//var dbver = Itrycn_Db.GetDbVer();
//if(dbver==1) //初始版本,并是当前要求的数据库
//{
//}
//else
//{
// MessageBox.Show("不支持当前数据库版本,这可能是以下原因导致的:\r\n1.数据库已损坏;'\r\n2.当前数据库是由新版软件创建的(请更新软件后重试)。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
// Application.Exit();
// return;
//}
//IDbInterface db = new MySqlDataProvider();
//if (db.ConnDb(Itrycn_Db.SQLConnStr) == 1)
//{
//}
//db.Free();
LiveUpdate.RyUpdate update = new LiveUpdate.RyUpdate(Soft_ConstInfo.Update_Url);
update.CheckUpdate();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmSetting frm = new FrmSetting();
if(frm.ShowDialog()==DialogResult.OK)
{
Public_Config.LoadSetting();
}
frm.Dispose();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.Hide();
DbOp.FrmGoodsView frm=new DbOp.FrmGoodsView();
frm.ShowDialog();
frm.Dispose();
this.Show();
}
private void BtnGoodsView_Click(object sender, EventArgs e)
{
ToolStripMenuItem.PerformClick();
}
private void BtnBankCard_Click(object sender, EventArgs e)
{
WebAPITool.FrmCardsView frm = new WebAPITool.FrmCardsView();
frm.ShowDialog();
}
}
}

1402
Source/MyHouse/FrmStart.resx Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,279 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{DC9FDB61-FEDD-4795-AFDC-8376AB781C56}</ProjectGuid>
<OutputType>WinExe</OutputType>
<RootNamespace>MyHouse</RootNamespace>
<AssemblyName>MyHouse</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\..\Bin\Debug\MyHouse\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\..\Bin\Release\MyHouse\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
</PropertyGroup>
<PropertyGroup>
<ApplicationManifest>app.manifest</ApplicationManifest>
</PropertyGroup>
<PropertyGroup>
<ApplicationIcon>logo.ico</ApplicationIcon>
</PropertyGroup>
<ItemGroup>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\..\C#\私人代码\QO流程管理\Bin\Debug\RySpider\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="RaUI">
<HintPath>..\..\..\..\My Datas\My Codes\毕方项目\CSharp\睿元公用控件组\Bin\Release\CommonControls\.NET4\RaUI.dll</HintPath>
</Reference>
<Reference Include="System">
<HintPath>C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.dll</HintPath>
</Reference>
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Deployment" />
<Reference Include="System.Drawing" />
<Reference Include="System.Windows.Forms" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="API\API.cs" />
<Compile Include="API\ConstVar.cs" />
<Compile Include="API\Json.cs" />
<Compile Include="API\WebDav.cs" />
<Compile Include="clsForm.cs" />
<Compile Include="Config\ImageInfo.cs" />
<Compile Include="Config\Itrycn_Db.cs" />
<Compile Include="Config\Public_Config.cs" />
<Compile Include="DbOp\FrmGoodsEntry.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DbOp\FrmGoodsEntry.Designer.cs">
<DependentUpon>FrmGoodsEntry.cs</DependentUpon>
</Compile>
<Compile Include="DbOp\FrmLocationAdd.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DbOp\FrmLocationAdd.Designer.cs">
<DependentUpon>FrmLocationAdd.cs</DependentUpon>
</Compile>
<Compile Include="DbOp\FrmGoodsAdd.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DbOp\FrmGoodsAdd.Designer.cs">
<DependentUpon>FrmGoodsAdd.cs</DependentUpon>
</Compile>
<Compile Include="DbOp\FrmLocationView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DbOp\FrmLocationView.Designer.cs">
<DependentUpon>FrmLocationView.cs</DependentUpon>
</Compile>
<Compile Include="DbOp\FrmGoodsView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DbOp\FrmGoodsView.Designer.cs">
<DependentUpon>FrmGoodsView.cs</DependentUpon>
</Compile>
<Compile Include="DbOp\FrmSetOpTime.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="DbOp\FrmSetOpTime.Designer.cs">
<DependentUpon>FrmSetOpTime.cs</DependentUpon>
</Compile>
<Compile Include="FrmAbout.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmAbout.Designer.cs">
<DependentUpon>FrmAbout.cs</DependentUpon>
</Compile>
<Compile Include="FrmStart.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="FrmStart.Designer.cs">
<DependentUpon>FrmStart.cs</DependentUpon>
</Compile>
<Compile Include="OTools\FrmPreview.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OTools\FrmPreview.Designer.cs">
<DependentUpon>FrmPreview.cs</DependentUpon>
</Compile>
<Compile Include="OTools\FrmScan.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OTools\FrmScan.Designer.cs">
<DependentUpon>FrmScan.cs</DependentUpon>
</Compile>
<Compile Include="OTools\RegSoft\frmLogin.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="OTools\RegSoft\frmLogin.Designer.cs">
<DependentUpon>frmLogin.cs</DependentUpon>
</Compile>
<Compile Include="frmSetting.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSetting.Designer.cs">
<DependentUpon>frmSetting.cs</DependentUpon>
</Compile>
<Compile Include="Config\Soft_Info.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="SkinForms\FrmMessageBox.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SkinForms\FrmMessageBox.Designer.cs">
<DependentUpon>FrmMessageBox.cs</DependentUpon>
</Compile>
<Compile Include="SkinForms\Msg.cs" />
<Compile Include="SkinForms\SKinForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SkinForms\SKinForm.Designer.cs">
<DependentUpon>SKinForm.cs</DependentUpon>
</Compile>
<Compile Include="SkinForms\SkinMdiForm.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="SkinForms\SkinMdiForm.Designer.cs">
<DependentUpon>SkinMdiForm.cs</DependentUpon>
</Compile>
<Compile Include="SkinForms\ThemeForm.cs" />
<Compile Include="WebAPITool\FrmCardsView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WebAPITool\FrmCardsView.Designer.cs">
<DependentUpon>FrmCardsView.cs</DependentUpon>
</Compile>
<Compile Include="WebAPITool\FrmCardAdd.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="WebAPITool\FrmCardAdd.Designer.cs">
<DependentUpon>FrmCardAdd.cs</DependentUpon>
</Compile>
<EmbeddedResource Include="DbOp\FrmGoodsEntry.resx">
<DependentUpon>FrmGoodsEntry.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DbOp\FrmLocationAdd.resx">
<DependentUpon>FrmLocationAdd.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DbOp\FrmGoodsAdd.resx">
<DependentUpon>FrmGoodsAdd.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DbOp\FrmLocationView.resx">
<DependentUpon>FrmLocationView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DbOp\FrmGoodsView.resx">
<DependentUpon>FrmGoodsView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="DbOp\FrmSetOpTime.resx">
<DependentUpon>FrmSetOpTime.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmAbout.resx">
<DependentUpon>FrmAbout.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="FrmStart.resx">
<DependentUpon>FrmStart.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OTools\FrmPreview.resx">
<DependentUpon>FrmPreview.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OTools\FrmScan.resx">
<DependentUpon>FrmScan.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="OTools\RegSoft\frmLogin.resx">
<DependentUpon>frmLogin.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSetting.resx">
<DependentUpon>frmSetting.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
<SubType>Designer</SubType>
</EmbeddedResource>
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<EmbeddedResource Include="SkinForms\FrmMessageBox.resx">
<DependentUpon>FrmMessageBox.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SkinForms\SKinForm.resx">
<DependentUpon>SKinForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="SkinForms\SkinMdiForm.resx">
<DependentUpon>SkinMdiForm.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WebAPITool\FrmCardsView.resx">
<DependentUpon>FrmCardsView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="WebAPITool\FrmCardAdd.resx">
<DependentUpon>FrmCardAdd.cs</DependentUpon>
</EmbeddedResource>
<None Include="app.config" />
<None Include="app.manifest" />
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
</None>
<Compile Include="Properties\Settings.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Settings.settings</DependentUpon>
<DesignTimeSharedInput>True</DesignTimeSharedInput>
</Compile>
</ItemGroup>
<ItemGroup>
<Content Include="logo.ico" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,64 @@
namespace MyHouse.OTools
{
partial class FrmPreview
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.pictureBox1 = new System.Windows.Forms.PictureBox();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
this.SuspendLayout();
//
// pictureBox1
//
this.pictureBox1.Dock = System.Windows.Forms.DockStyle.Fill;
this.pictureBox1.Location = new System.Drawing.Point(0, 0);
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.Size = new System.Drawing.Size(659, 532);
this.pictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize;
this.pictureBox1.TabIndex = 1;
this.pictureBox1.TabStop = false;
//
// FrmPreview
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(659, 532);
this.Controls.Add(this.pictureBox1);
this.Name = "FrmPreview";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "预览";
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
public System.Windows.Forms.PictureBox pictureBox1;
}
}

View File

@ -0,0 +1,20 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MyHouse.OTools
{
public partial class FrmPreview : Form
{
public FrmPreview()
{
InitializeComponent();
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

352
Source/MyHouse/OTools/FrmScan.Designer.cs generated Normal file
View File

@ -0,0 +1,352 @@
namespace MyHouse
{
partial class FrmScan
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.notifyIcon1 = new System.Windows.Forms.NotifyIcon(this.components);
this.MenuTray = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.退ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.menuStrip1 = new System.Windows.Forms.MenuStrip();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.chromeTabControl1 = new ryControls.ChromeTabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.BtnScan = new ryControls.ButtonEx();
this.LvCbResult = new BrightIdeasSoftware.FastObjectListView();
this.OlvGameName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvFileName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvAddTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.TabLogs = new System.Windows.Forms.TabPage();
this.LvLogs = new BrightIdeasSoftware.FastObjectListView();
this.OlvLog = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvLogTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.statusStrip1 = new System.Windows.Forms.StatusStrip();
this.TsState = new System.Windows.Forms.ToolStripStatusLabel();
this.MenuLogs = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.MenuTray.SuspendLayout();
this.menuStrip1.SuspendLayout();
this.chromeTabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvCbResult)).BeginInit();
this.TabLogs.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.LvLogs)).BeginInit();
this.statusStrip1.SuspendLayout();
this.MenuLogs.SuspendLayout();
this.SuspendLayout();
//
// notifyIcon1
//
this.notifyIcon1.ContextMenuStrip = this.MenuTray;
this.notifyIcon1.Visible = true;
this.notifyIcon1.DoubleClick += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// MenuTray
//
this.MenuTray.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.退ToolStripMenuItem});
this.MenuTray.Name = "MenuTray";
this.MenuTray.Size = new System.Drawing.Size(137, 48);
//
// 显示主窗体ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "显示主窗体ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.ToolStripMenuItem.Text = "显示主窗体";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 退出软件ToolStripMenuItem
//
this.退ToolStripMenuItem.Name = "退出软件ToolStripMenuItem";
this.退ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.退ToolStripMenuItem.Text = "退出软件";
this.退ToolStripMenuItem.Click += new System.EventHandler(this.退ToolStripMenuItem_Click);
//
// menuStrip1
//
this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem});
this.menuStrip1.Location = new System.Drawing.Point(1, 27);
this.menuStrip1.Name = "menuStrip1";
this.menuStrip1.Size = new System.Drawing.Size(802, 25);
this.menuStrip1.TabIndex = 2;
this.menuStrip1.Text = "menuStrip1";
//
// 关于ToolStripMenuItem
//
this.ToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.ToolStripMenuItem});
this.ToolStripMenuItem.Name = "关于ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(44, 21);
this.ToolStripMenuItem.Text = "关于";
//
// 打开官网ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "打开官网ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.ToolStripMenuItem.Text = "打开官网";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 捐助ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "捐助ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(136, 22);
this.ToolStripMenuItem.Text = "关于和捐助";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// chromeTabControl1
//
this.chromeTabControl1.AllowDragTab = false;
this.chromeTabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.chromeTabControl1.BackTabPageImage = null;
this.chromeTabControl1.Controls.Add(this.tabPage1);
this.chromeTabControl1.Controls.Add(this.TabLogs);
this.chromeTabControl1.Cursor = System.Windows.Forms.Cursors.Default;
this.chromeTabControl1.ItemSize = new System.Drawing.Size(100, 25);
this.chromeTabControl1.Location = new System.Drawing.Point(1, 55);
this.chromeTabControl1.Name = "chromeTabControl1";
this.chromeTabControl1.SelectedIndex = 0;
this.chromeTabControl1.ShowAddButton = false;
this.chromeTabControl1.ShowCloseButton = false;
this.chromeTabControl1.Size = new System.Drawing.Size(802, 513);
this.chromeTabControl1.SizeMode = System.Windows.Forms.TabSizeMode.Fixed;
this.chromeTabControl1.TabContextMenuStrip = null;
this.chromeTabControl1.TabIndex = 0;
this.chromeTabControl1.TabMaxWidth = 100;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.BtnScan);
this.tabPage1.Controls.Add(this.LvCbResult);
this.tabPage1.Location = new System.Drawing.Point(1, 29);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(800, 483);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "首页";
this.tabPage1.UseVisualStyleBackColor = true;
//
// BtnScan
//
this.BtnScan.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.BtnScan.Location = new System.Drawing.Point(3, 6);
this.BtnScan.Name = "BtnScan";
this.BtnScan.Size = new System.Drawing.Size(80, 35);
this.BtnScan.TabIndex = 85;
this.BtnScan.Text = "扫描";
this.BtnScan.UseVisualStyleBackColor = true;
this.BtnScan.Click += new System.EventHandler(this.BtnScan_Click);
//
// LvCbResult
//
this.LvCbResult.AllColumns.Add(this.OlvGameName);
this.LvCbResult.AllColumns.Add(this.OlvFileName);
this.LvCbResult.AllColumns.Add(this.OlvAddTime);
this.LvCbResult.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LvCbResult.CellEditUseWholeCell = false;
this.LvCbResult.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvGameName,
this.OlvFileName,
this.OlvAddTime});
this.LvCbResult.Cursor = System.Windows.Forms.Cursors.Default;
this.LvCbResult.EmptyListMsg = "当前列表没有任何项";
this.LvCbResult.FullRowSelect = true;
this.LvCbResult.HideSelection = false;
this.LvCbResult.Location = new System.Drawing.Point(3, 47);
this.LvCbResult.Name = "LvCbResult";
this.LvCbResult.RowHeight = 25;
this.LvCbResult.ShowGroups = false;
this.LvCbResult.ShowItemToolTips = true;
this.LvCbResult.Size = new System.Drawing.Size(794, 433);
this.LvCbResult.TabIndex = 84;
this.LvCbResult.UseCompatibleStateImageBehavior = false;
this.LvCbResult.UseFiltering = true;
this.LvCbResult.View = System.Windows.Forms.View.Details;
this.LvCbResult.VirtualMode = true;
//
// OlvGameName
//
this.OlvGameName.Text = "游戏名";
this.OlvGameName.Width = 200;
//
// OlvFileName
//
this.OlvFileName.Text = "文件名";
this.OlvFileName.Width = 180;
//
// OlvAddTime
//
this.OlvAddTime.Text = "提交时间";
this.OlvAddTime.Width = 200;
//
// TabLogs
//
this.TabLogs.Controls.Add(this.LvLogs);
this.TabLogs.Location = new System.Drawing.Point(1, 29);
this.TabLogs.Name = "TabLogs";
this.TabLogs.Padding = new System.Windows.Forms.Padding(3);
this.TabLogs.Size = new System.Drawing.Size(800, 464);
this.TabLogs.TabIndex = 1;
this.TabLogs.Text = "日志";
this.TabLogs.UseVisualStyleBackColor = true;
//
// LvLogs
//
this.LvLogs.AllColumns.Add(this.OlvLog);
this.LvLogs.AllColumns.Add(this.OlvLogTime);
this.LvLogs.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LvLogs.CellEditUseWholeCell = false;
this.LvLogs.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvLog,
this.OlvLogTime});
this.LvLogs.Cursor = System.Windows.Forms.Cursors.Default;
this.LvLogs.EmptyListMsg = "当前列表没有任何项";
this.LvLogs.FullRowSelect = true;
this.LvLogs.HideSelection = false;
this.LvLogs.Location = new System.Drawing.Point(3, 3);
this.LvLogs.Name = "LvLogs";
this.LvLogs.RowHeight = 25;
this.LvLogs.ShowGroups = false;
this.LvLogs.ShowItemToolTips = true;
this.LvLogs.Size = new System.Drawing.Size(794, 458);
this.LvLogs.TabIndex = 85;
this.LvLogs.UseCompatibleStateImageBehavior = false;
this.LvLogs.UseFiltering = true;
this.LvLogs.View = System.Windows.Forms.View.Details;
this.LvLogs.VirtualMode = true;
//
// OlvLog
//
this.OlvLog.Text = "日志";
this.OlvLog.Width = 400;
//
// OlvLogTime
//
this.OlvLogTime.Text = "日志时间";
this.OlvLogTime.Width = 180;
//
// statusStrip1
//
this.statusStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.TsState});
this.statusStrip1.Location = new System.Drawing.Point(1, 573);
this.statusStrip1.Name = "statusStrip1";
this.statusStrip1.Size = new System.Drawing.Size(802, 22);
this.statusStrip1.TabIndex = 3;
this.statusStrip1.Text = "statusStrip1";
//
// TsState
//
this.TsState.Name = "TsState";
this.TsState.Size = new System.Drawing.Size(83, 17);
this.TsState.Text = "状态:准备就绪";
//
// MenuLogs
//
this.MenuLogs.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem});
this.MenuLogs.Name = "MenuLogs";
this.MenuLogs.Size = new System.Drawing.Size(149, 26);
//
// 复制日志信息ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "复制日志信息ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(148, 22);
this.ToolStripMenuItem.Text = "复制日志信息";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// FrmScan
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(804, 596);
this.Controls.Add(this.statusStrip1);
this.Controls.Add(this.menuStrip1);
this.Controls.Add(this.chromeTabControl1);
this.Name = "FrmScan";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "扫描";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmStart_FormClosing);
this.Load += new System.EventHandler(this.FrmStart_Load);
this.Shown += new System.EventHandler(this.FrmStart_Shown);
this.MenuTray.ResumeLayout(false);
this.menuStrip1.ResumeLayout(false);
this.menuStrip1.PerformLayout();
this.chromeTabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LvCbResult)).EndInit();
this.TabLogs.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.LvLogs)).EndInit();
this.statusStrip1.ResumeLayout(false);
this.statusStrip1.PerformLayout();
this.MenuLogs.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.ChromeTabControl chromeTabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.NotifyIcon notifyIcon1;
private System.Windows.Forms.ContextMenuStrip MenuTray;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem 退ToolStripMenuItem;
private System.Windows.Forms.MenuStrip menuStrip1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private BrightIdeasSoftware.FastObjectListView LvCbResult;
private BrightIdeasSoftware.OLVColumn OlvGameName;
private BrightIdeasSoftware.OLVColumn OlvFileName;
private BrightIdeasSoftware.OLVColumn OlvAddTime;
private ryControls.ButtonEx BtnScan;
private System.Windows.Forms.StatusStrip statusStrip1;
private System.Windows.Forms.ToolStripStatusLabel TsState;
private System.Windows.Forms.TabPage TabLogs;
private BrightIdeasSoftware.FastObjectListView LvLogs;
private BrightIdeasSoftware.OLVColumn OlvLog;
private BrightIdeasSoftware.OLVColumn OlvLogTime;
private System.Windows.Forms.ContextMenuStrip MenuLogs;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
}
}

View File

@ -0,0 +1,197 @@
using MyHouse;
using ryCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace MyHouse
{
public partial class FrmScan : RySkins.SKinForm
{
string[] prog_args;
public FrmScan(string[] args)
{
InitializeComponent();
prog_args = args;
//配置软件信息
notifyIcon1.Text = Soft_ConstInfo.Soft_Title;
Text = Soft_ConstInfo.Soft_Title + " V" + RySoft.VersionStr;
if (!Soft_ConstInfo.ShowTray) { notifyIcon1.Visible = false; }
if (!Soft_ConstInfo.DonateVisabled) { ToolStripMenuItem.Text = "关于"; }
if (Soft_ConstInfo.Soft_Url.Length == 0) { ToolStripMenuItem.PerformClick(); }
notifyIcon1.Icon = Icon;
OlvLog.AspectName = "LogText";
OlvLogTime.AspectName = "LogTime";
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
this.WindowState = FormWindowState.Normal;
var topmost = this.TopMost;
this.TopMost = true;
this.Show();
this.TopMost = topmost;
}
private void 退ToolStripMenuItem_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void FrmStart_Shown(object sender, EventArgs e)
{
ryCommon.Ini ini = new Ini(Soft_ConstInfo.UserDataFolder + "\\Win.dat");
ini.WriteIni(Soft_ConstInfo.Soft_Id, "hwnd", Handle.ToInt32());
if (prog_args.Length >= 1)
{
//如果是自启动,并且开启了右下角托盘图标,则隐藏自身。
if (prog_args[0] == Soft_ConstInfo.Soft_Pram && Soft_ConstInfo.ShowTray)
this.Hide();
}
}
private void FrmStart_FormClosing(object sender, FormClosingEventArgs e)
{
if (Soft_ConstInfo.ShowTray && Public_Config.HideByCloseBtn && e.CloseReason== CloseReason.UserClosing)
{
e.Cancel = true;
this.Hide();
notifyIcon1.ShowBalloonTip(3000, Soft_ConstInfo.Soft_Title, "软件已经最小化到此处,请右击托盘图标进行关闭。", ToolTipIcon.Info);
return;
}
if (!Soft_MemInfo.IsCanCloseForm)
{
e.Cancel = true;
MessageBox.Show("当前还有操作正在运行,请稍后关闭软件。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
protected override void WndProc(ref System.Windows.Forms.Message msg)
{
switch (msg.Msg)
{
case 17189: //处理消息
{
#region
switch (msg.WParam.ToInt32())
{
case 100://
#region
if ((int)msg.LParam.ToInt32() == 100)
{
this.Show();
this.WindowState = FormWindowState.Normal;
this.Top = (Screen.PrimaryScreen.WorkingArea.Height - this.Height) / 2;
this.Left = (Screen.PrimaryScreen.WorkingArea.Width - this.Width) / 2;
//RyForm.SetActiveWindow(Handle);
RyForm.BringToTop(Handle);
ToolStripMenuItem.PerformClick();
this.BringToFront();
this.Select();
this.Focus();
RyForm.BringToTop(Handle);
}
#endregion
break;
}
#endregion
}
break;
default:
base.WndProc(ref msg);//调用基类函数处理非自定义消息。
break;
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (Soft_ConstInfo.DonateVisabled)
{
FrmAbout frm = new FrmAbout();
frm.ShowDialog();
frm.Dispose();
}
else
{
RySkins.Msg.ShowMsg(Soft_ConstInfo.AboutText.Replace("#softname#", Soft_ConstInfo.Soft_Title).Replace("#ver#", "V" + RySoft.VersionStr), "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
ryCommon.RyFiles.OpenUrl(Soft_ConstInfo.Soft_Url);
}
private void FrmStart_Load(object sender, EventArgs e)
{
//Itrycn_Project.Itrycn_Db.CreateTable();
LiveUpdate.RyUpdate update = new LiveUpdate.RyUpdate(Soft_ConstInfo.Update_Url);
update.CheckUpdate();
}
/// <summary>
/// 添加日志
/// </summary>
/// <param name="text"></param>
private void AddLogs(string text)
{
this.Invoke(new Action(() =>
{
LvLogs.AddObject(new LogInfo() { LogText = text, LogTime = DateTime.Now.ToString("yyyy-MM-dd dddd HH:mm:ss") });
TabLogs.Text = "日志("+LvLogs.GetItemCount()+")";
}));
}
bool IsRunning = false;
bool IsExit = false;
private void BtnScan_Click(object sender, EventArgs e)
{
if (IsRunning) { IsExit = true; return; }
IsRunning = true;
Soft_MemInfo.IsCanCloseForm = false;
BtnScan.Text = "停止";
LvCbResult.ClearObjects();
LvLogs.ClearObjects();
TabLogs.Text = "日志(" + LvLogs.GetItemCount() + ")";
TsState.Text = "状态:正在加载数据...";
OlvGameName.Text = "游戏名[" + LvCbResult.GetItemCount() + "]";
Thread th = new Thread(Start);
th.Start();
void Start()
{
//RyWeb.QuickWeb ry3h3 = new RyWeb.QuickWeb();
//将扫描的代码写在下面
//↑将扫描的代码写在上面
IsExit = false;
IsRunning = false;
Soft_MemInfo.IsCanCloseForm = true;
this.Invoke(new Action(() =>
{
//LvCbResult.AddObjects(list);
OlvGameName.Text = "游戏名[" + LvCbResult.GetItemCount() + "]";
TsState.Text = "状态:扫描完毕,共发现" + LvCbResult.GetItemCount() + "个.";
BtnScan.Text = "扫描";
}));
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvLogs.SelectedObject == null) { return; }
var item = (LogInfo)LvLogs.SelectedObject;
RyFiles.CopyToClip(item.LogText);
}
/// <summary>
/// 日志信息
/// </summary>
class LogInfo
{
public string LogText { get; set; }
public string LogTime { get; set; }
}
}
}

View File

@ -0,0 +1,138 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="notifyIcon1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<metadata name="MenuTray.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>135, 17</value>
</metadata>
<metadata name="menuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>246, 17</value>
</metadata>
<metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>366, 17</value>
</metadata>
<metadata name="MenuLogs.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>487, 17</value>
</metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>54</value>
</metadata>
</root>

View File

@ -0,0 +1,190 @@
namespace Itrycn
{
partial class FrmLogin
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.txtUserId = new ryControls.TextBoxEx2();
this.label1 = new System.Windows.Forms.Label();
this.label2 = new System.Windows.Forms.Label();
this.txtPwd = new ryControls.TextBoxEx2();
this.btnLogin = new ryControls.ButtonEx();
this.btnCancel = new ryControls.ButtonEx();
this.pnlTopLogo = new System.Windows.Forms.Panel();
this.lblTitle = new System.Windows.Forms.Label();
this.chkRememberUserId = new System.Windows.Forms.CheckBox();
this.chkAutoLogin = new System.Windows.Forms.CheckBox();
this.pnlTopLogo.SuspendLayout();
this.SuspendLayout();
//
// txtUserId
//
this.txtUserId.BackColor = System.Drawing.Color.White;
this.txtUserId.Location = new System.Drawing.Point(97, 103);
this.txtUserId.Name = "txtUserId";
this.txtUserId.PasswordChar = '\0';
this.txtUserId.ReadOnly = false;
this.txtUserId.SelectionLength = 0;
this.txtUserId.SelectionStart = 0;
this.txtUserId.Size = new System.Drawing.Size(209, 25);
this.txtUserId.TabIndex = 0;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(50, 111);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(41, 12);
this.label1.TabIndex = 1;
this.label1.Text = "用户ID";
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(50, 142);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 3;
this.label2.Text = "密码";
//
// txtPwd
//
this.txtPwd.BackColor = System.Drawing.Color.White;
this.txtPwd.Location = new System.Drawing.Point(97, 134);
this.txtPwd.Name = "txtPwd";
this.txtPwd.PasswordChar = '*';
this.txtPwd.ReadOnly = false;
this.txtPwd.SelectionLength = 0;
this.txtPwd.SelectionStart = 0;
this.txtPwd.Size = new System.Drawing.Size(209, 25);
this.txtPwd.TabIndex = 1;
this.txtPwd.KeyDown += new System.Windows.Forms.KeyEventHandler(this.TxtPwd_KeyDown);
//
// btnLogin
//
this.btnLogin.ForeColor = System.Drawing.Color.White;
this.btnLogin.Location = new System.Drawing.Point(171, 197);
this.btnLogin.Name = "btnLogin";
this.btnLogin.Size = new System.Drawing.Size(65, 27);
this.btnLogin.TabIndex = 2;
this.btnLogin.Text = "登陆";
this.btnLogin.UseVisualStyleBackColor = true;
this.btnLogin.Click += new System.EventHandler(this.BtnLogin_Click);
//
// btnCancel
//
this.btnCancel.ForeColor = System.Drawing.Color.White;
this.btnCancel.Location = new System.Drawing.Point(242, 197);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(65, 27);
this.btnCancel.TabIndex = 3;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// pnlTopLogo
//
this.pnlTopLogo.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(12)))), ((int)(((byte)(125)))), ((int)(((byte)(182)))));
this.pnlTopLogo.Controls.Add(this.lblTitle);
this.pnlTopLogo.Dock = System.Windows.Forms.DockStyle.Top;
this.pnlTopLogo.Location = new System.Drawing.Point(0, 0);
this.pnlTopLogo.Name = "pnlTopLogo";
this.pnlTopLogo.Size = new System.Drawing.Size(377, 59);
this.pnlTopLogo.TabIndex = 7;
//
// lblTitle
//
this.lblTitle.AutoSize = true;
this.lblTitle.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblTitle.ForeColor = System.Drawing.Color.White;
this.lblTitle.Location = new System.Drawing.Point(12, 22);
this.lblTitle.Name = "lblTitle";
this.lblTitle.Size = new System.Drawing.Size(110, 16);
this.lblTitle.TabIndex = 0;
this.lblTitle.Text = "睿元管理系统";
//
// chkRememberUserId
//
this.chkRememberUserId.AutoSize = true;
this.chkRememberUserId.Location = new System.Drawing.Point(97, 165);
this.chkRememberUserId.Name = "chkRememberUserId";
this.chkRememberUserId.Size = new System.Drawing.Size(84, 16);
this.chkRememberUserId.TabIndex = 8;
this.chkRememberUserId.Text = "记住用户ID";
this.chkRememberUserId.UseVisualStyleBackColor = true;
//
// chkAutoLogin
//
this.chkAutoLogin.AutoSize = true;
this.chkAutoLogin.Location = new System.Drawing.Point(202, 165);
this.chkAutoLogin.Name = "chkAutoLogin";
this.chkAutoLogin.Size = new System.Drawing.Size(72, 16);
this.chkAutoLogin.TabIndex = 9;
this.chkAutoLogin.Text = "自动登陆";
this.chkAutoLogin.UseVisualStyleBackColor = true;
this.chkAutoLogin.CheckedChanged += new System.EventHandler(this.ChkAutoLogin_CheckedChanged);
//
// FrmLogin
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(377, 247);
this.Controls.Add(this.chkAutoLogin);
this.Controls.Add(this.chkRememberUserId);
this.Controls.Add(this.pnlTopLogo);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnLogin);
this.Controls.Add(this.label2);
this.Controls.Add(this.txtPwd);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtUserId);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.Name = "FrmLogin";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
this.Text = "登陆";
this.Load += new System.EventHandler(this.FrmLogin_Load);
this.pnlTopLogo.ResumeLayout(false);
this.pnlTopLogo.PerformLayout();
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.TextBoxEx2 txtUserId;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.Label label2;
private ryControls.TextBoxEx2 txtPwd;
private ryControls.ButtonEx btnLogin;
private ryControls.ButtonEx btnCancel;
private System.Windows.Forms.Panel pnlTopLogo;
private System.Windows.Forms.Label lblTitle;
private System.Windows.Forms.CheckBox chkRememberUserId;
private System.Windows.Forms.CheckBox chkAutoLogin;
}
}

View File

@ -0,0 +1,119 @@
using MyHouse;
using ryCommon;
using RyHardWare;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace Itrycn
{
public partial class FrmLogin : Form
{
public delegate void LoginHandler(object sender,out bool LoginSuccess);
[Description("点击登录按钮时激发")]
public event LoginHandler OnLoginClick;
public FrmLogin()
{
InitializeComponent();
}
private void BtnCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void BtnLogin_Click(object sender, EventArgs e)
{
txtUserId.Enabled = false;
txtPwd.Enabled = false;
btnLogin.Enabled = false;
LoginPram.UserId = txtUserId.Text;
LoginPram.Pwd = txtPwd.Text;
bool LoginSuccess = false;
OnLoginClick?.Invoke(this,out LoginSuccess);
txtUserId.Enabled = true;
txtPwd.Enabled = true;
btnLogin.Enabled = true;
if (LoginSuccess)
{
#region
ryCommon.Ini ryIni = new Ini(Soft_ConstInfo.UserDataFolder + "\\Setting.dat");
if (chkAutoLogin.Checked || chkRememberUserId.Checked)
{
ryIni.WriteIni("User", "id", LoginPram.UserId);
if (chkAutoLogin.Checked)
{
LoginPram.isAutoLogin = 2;
ryIni.WriteIni("User", "pwd", rySafe.AES.Encode("121" + LoginPram.Pwd, RyHardWare.Network.GetMacs() + "|" + LoginPram.UserId));
}
else
{
LoginPram.isAutoLogin = 1;
ryIni.DelKey("User", "pwd");
}
}
else
{
ryIni.DelKey("User", "id");
LoginPram.isAutoLogin = 0;
}
#endregion
DialogResult = DialogResult.OK;
}
}
private void TxtPwd_KeyDown(object sender, KeyEventArgs e)
{
if(e.KeyCode==Keys.Enter)
{
btnLogin.PerformClick();
}
}
private void FrmLogin_Load(object sender, EventArgs e)
{
lblTitle.Text = Soft_ConstInfo.Soft_Title;
if (System.IO.Directory.Exists(System.IO.Path.GetDirectoryName(Soft_ConstInfo.UserDataFolder)))
{
System.IO.Directory.CreateDirectory(Soft_ConstInfo.UserDataFolder);
}
ryCommon.Ini ryIni = new Ini(Soft_ConstInfo.UserDataFolder + "\\Setting.dat");
txtUserId.Text=ryIni.ReadIni("User", "id", LoginPram.UserId);
if(txtUserId.Text!="")
{ chkRememberUserId.Checked = true; }
string pwd = rySafe.AES.Decode(ryIni.ReadIni("User", "pwd", ""), Network.GetMacs() + "|" + txtUserId.Text);
if (pwd.IndexOf("121") == 0) { pwd = pwd.Substring(3); } else { pwd = ""; }
txtPwd.Text = pwd;
if (pwd != "")
{
chkAutoLogin.Checked = true;
txtUserId.Enabled = false;
txtPwd.Enabled = false;
btnLogin.PerformClick();
btnLogin.Enabled = false;
}
else
{
txtUserId.SelectionLength = 0;
txtUserId.SelectionStart = 0;
txtPwd.Select();
}
}
private void ChkAutoLogin_CheckedChanged(object sender, EventArgs e)
{
if (chkAutoLogin.Checked) { chkRememberUserId.Checked = true; }
}
}
public static class LoginPram
{
public static string UserId = "";
public static string Pwd = "";
public static int isAutoLogin = 0;
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

57
Source/MyHouse/Program.cs Normal file
View File

@ -0,0 +1,57 @@
using Itrycn;
using MyHouse;
using ryCommon;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyHouse
{
static class Program
{
static System.Threading.Mutex run;
/// <summary>
/// 应用程序的主入口点。
/// </summary>
[STAThread]
static void Main(string[] args)
{
Application.ThreadException += Application_ThreadException;
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
Soft_ConstInfo.SysDataFolder = ryCommon.RyFiles.GetRealPath(Soft_ConstInfo.SysDataFolder);
Soft_ConstInfo.UserDataFolder = ryCommon.RyFiles.GetRealPath(Soft_ConstInfo.UserDataFolder);
run = new System.Threading.Mutex(true, Soft_ConstInfo.Soft_Id, out bool runone);
if (!runone) //已经运行了
{
ryCommon.Ini ini = new ryCommon.Ini(Soft_ConstInfo.UserDataFolder + "\\Win.dat");
ryControls.Win32.SendMessage((IntPtr)ini.ReadIni(Soft_ConstInfo.Soft_Id, "hwnd", 0), 17189, 100, 100);
}
else
{
//Application.Run(new FrmStart(args));
Application.Run(new FrmStart(args));
}
//FrmLogin frm = new FrmLogin();
//if (frm.ShowDialog() == DialogResult.OK)
//{
// Application.Run(new Frmmain());
//}
}
static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
Exception ex = e.ExceptionObject as Exception;
MessageBox.Show(string.Format("捕获到未处理异常:{0}\r\n异常信息{1}\r\n异常堆栈{2}\r\nCLR即将退出{3}", ex.GetType(), ex.Message, ex.StackTrace, e.IsTerminating));
RyFiles.WriteAllText(Application.StartupPath + "\\错误.txt", DateTime.Now.ToString() + "\r\n\r\n错误描述:" + ex.Message + "\r\n\r\n异常堆栈" + ex.StackTrace + "\r\n\r\n异常方法" + ex.TargetSite, Encoding.UTF8);
}
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e)
{
Exception ex = e.Exception;
MessageBox.Show(string.Format("捕获到未处理异常:{0}\r\n异常信息{1}\r\n异常堆栈{2}", ex.GetType(), ex.Message, ex.StackTrace));
RyFiles.WriteAllText(Application.StartupPath + "\\线程错误.txt", DateTime.Now.ToString() + "\r\n\r\n错误描述:" + ex.Message + "\r\n\r\n异常堆栈" + ex.StackTrace + "\r\n\r\n异常方法" + ex.TargetSite, Encoding.UTF8);
}
}
}

View File

@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的一般信息由以下
// 控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("MyHouse")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MyHouse")]
[assembly: AssemblyCopyright("Copyright 2010-2021")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 会使此程序集中的类型
//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型
//请将此类型的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("62b5c3e8-4af1-4a7f-a40b-a6186f83dbd2")]
// 程序集的版本信息由下列四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号
// 方法是按如下所示使用“*”: :
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2502.0801")]
[assembly: AssemblyFileVersion("1.0.2502.0801")]

View File

@ -0,0 +1,63 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace MyHouse.Properties {
using System;
/// <summary>
/// 一个强类型的资源类,用于查找本地化的字符串等。
/// </summary>
// 此类是由 StronglyTypedResourceBuilder
// 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。
// 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen
// (以 /str 作为命令选项),或重新生成 VS 项目。
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
internal class Resources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
internal Resources() {
}
/// <summary>
/// 返回此类使用的缓存的 ResourceManager 实例。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals(resourceMan, null)) {
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MyHouse.Properties.Resources", typeof(Resources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// 重写当前线程的 CurrentUICulture 属性,对
/// 使用此强类型资源类的所有资源查找执行重写。
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
internal static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
}
set {
resourceCulture = value;
}
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,26 @@
//------------------------------------------------------------------------------
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.42000
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------
namespace MyHouse.Properties {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.13.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
}
}

View File

@ -0,0 +1,7 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>

View File

@ -0,0 +1,99 @@

namespace RySkins
{
partial class FrmMessageBox
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmMessageBox));
this.lblMsg = new ryControls.LabelTx();
this.btnCancel = new ryControls.ButtonEx();
this.btnYes = new ryControls.ButtonEx();
this.SuspendLayout();
//
// lblMsg
//
this.lblMsg.BackColor = System.Drawing.Color.Transparent;
this.lblMsg.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.lblMsg.LineDistance = 5;
this.lblMsg.Location = new System.Drawing.Point(11, 39);
this.lblMsg.Name = "lblMsg";
this.lblMsg.Size = new System.Drawing.Size(339, 21);
this.lblMsg.TabIndex = 85;
this.lblMsg.Text = "提示";
this.lblMsg.TextChanged += new System.EventHandler(this.LblMsg_TextChanged);
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnCancel.Location = new System.Drawing.Point(312, 180);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(65, 27);
this.btnCancel.TabIndex = 84;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// btnYes
//
this.btnYes.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnYes.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnYes.Location = new System.Drawing.Point(241, 180);
this.btnYes.Name = "btnYes";
this.btnYes.Size = new System.Drawing.Size(65, 27);
this.btnYes.TabIndex = 83;
this.btnYes.Text = "确定";
this.btnYes.UseVisualStyleBackColor = true;
this.btnYes.Click += new System.EventHandler(this.BtnYes_Click);
//
// FrmMessageBox
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(382, 211);
this.Controls.Add(this.lblMsg);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnYes);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(0, 0);
this.MaximizeBox = false;
this.MinimizeBox = false;
this.Name = "FrmMessageBox";
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FrmMessageBox_FormClosing);
this.ResumeLayout(false);
}
#endregion
public ryControls.ButtonEx btnCancel;
public ryControls.ButtonEx btnYes;
public ryControls.LabelTx lblMsg;
}
}

View File

@ -0,0 +1,69 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace RySkins
{
public partial class FrmMessageBox : SKinForm
{
public FrmMessageBox()
{
InitializeComponent();
}
private bool ProcUse = false;
public MessageBoxButtons ResultDg { get; set; } = MessageBoxButtons.OKCancel;
private void BtnYes_Click(object sender, EventArgs e)
{
ProcUse = true;
if (this.Modal)
{
switch (ResultDg)
{
case MessageBoxButtons.YesNo:
this.DialogResult = DialogResult.Yes;
break;
default:
this.DialogResult = DialogResult.OK;
break;
}
}
else
{
Close();
}
}
private void BtnCancel_Click(object sender, EventArgs e)
{
ProcUse = true;
switch (ResultDg)
{
case MessageBoxButtons.YesNo:
this.DialogResult = DialogResult.No;
break;
default:
this.DialogResult = DialogResult.Cancel;
break;
}
}
private void LblMsg_TextChanged(object sender, EventArgs e)
{
lblMsg.UpdateInfo();
lblMsg.Refresh();
}
private void FrmMessageBox_FormClosing(object sender, FormClosingEventArgs e)
{
if (e.CloseReason == CloseReason.UserClosing && !ProcUse)
{
this.DialogResult = DialogResult.Cancel;
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,104 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace RySkins
{
public static class Msg
{
/// <summary>
/// 显示对话框
/// </summary>
/// <param name="msgText"></param>
/// <param name="title"></param>
/// <returns></returns>
public static DialogResult ShowMsg(string msgText, string title)
{
return ShowMsg(msgText, title, MessageBoxButtons.OK, MessageBoxIcon.Information);
}
/// <summary>
/// 显示对话框
/// </summary>
/// <param name="msgText"></param>
/// <param name="title"></param>
/// <param name="button"></param>
/// <returns></returns>
public static DialogResult ShowMsg(string msgText, string title, MessageBoxButtons button)
{
return ShowMsg(msgText, title, button, MessageBoxIcon.Information);
}
/// <summary>
/// 显示对话框
/// </summary>
/// <param name="msgText"></param>
/// <param name="title"></param>
/// <param name="button"></param>
/// <param name="Icon"></param>
/// <param name="defaultButton"></param>
/// <returns></returns>
public static DialogResult ShowMsg(string msgText, string title, MessageBoxButtons button, MessageBoxIcon Icon,MessageBoxDefaultButton defaultButton)
{
return ShowMsg(msgText, title, button, Icon);
}
/// <summary>
/// 显示对话框
/// </summary>
/// <param name="msgText"></param>
/// <param name="title"></param>
/// <param name="button"></param>
/// <param name="Icon"></param>
/// <returns></returns>
public static DialogResult ShowMsg(string msgText, string title, MessageBoxButtons button, MessageBoxIcon Icon)
{
#pragma warning disable CA2000 // 丢失范围之前释放对象
FrmMessageBox frm = new FrmMessageBox
{
Text = title
};
#pragma warning restore CA2000 // 丢失范围之前释放对象
frm.lblMsg.Text = msgText;
frm.lblMsg.UpdateInfo();
frm.ResultDg = button;
switch (button)
{
case MessageBoxButtons.OK:
frm.btnYes.Location = new System.Drawing.Point(frm.ClientSize.Width - frm.btnYes.Width - 8, frm.ClientSize.Height - frm.btnYes.Height - 8);
frm.btnCancel.Visible = false;
break;
case MessageBoxButtons.OKCancel:
case MessageBoxButtons.YesNo:
frm.btnCancel.Location = new System.Drawing.Point(frm.ClientSize.Width - frm.btnYes.Width - 8, frm.ClientSize.Height - frm.btnYes.Height - 8);
frm.btnYes.Location = new System.Drawing.Point(frm.btnCancel.Left - frm.btnYes.Width - 8, frm.btnCancel.Top);
break;
case MessageBoxButtons.RetryCancel:
frm.btnCancel.Location = new System.Drawing.Point(frm.ClientSize.Width - frm.btnYes.Width - 8, frm.ClientSize.Height - frm.btnYes.Height - 8);
frm.btnYes.Location = new System.Drawing.Point(frm.btnCancel.Left - frm.btnYes.Width - 8, frm.btnCancel.Top);
frm.btnYes.Text = "重试";
break;
default:
frm.btnYes.Location = new System.Drawing.Point(frm.ClientSize.Width - frm.btnYes.Width - 8, frm.ClientSize.Height - frm.btnYes.Height - 8);
frm.btnCancel.Visible = false;
break;
}
frm.TopMost = true;
var handle= WinAPI.User32.GetActiveWindow();
var have_owner = false;
for (int i = 0; i < Application.OpenForms.Count; i++)
{
if(Application.OpenForms[i].Handle==handle)
{
var owner = Application.OpenForms[i];
frm.Location = new System.Drawing.Point(owner.Left + (owner.Width - frm.Width) / 2, owner.Top + (owner.Height - frm.Height) / 2);
have_owner = true;
}
}
//WinAPI.User32.GetWindowRect(handle,out var rectangle);
//var title2= ryCommon.RyForm.GetWinText(handle);
//frm.Location = new System.Drawing.Point(rectangle.X + (rectangle.Width - frm.Width) / 2, rectangle.Y + (rectangle.Height - frm.Height) / 2);
if (!have_owner) { frm.StartPosition = FormStartPosition.CenterScreen; }
return frm.ShowDialog();
}
}
}

View File

@ -0,0 +1,49 @@

namespace RySkins
{
partial class SKinForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// SKinForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(594, 521);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
this.Name = "SKinForm";
this.Text = "SKinForm";
this.Load += new System.EventHandler(this.SKinForm_Load);
this.ResumeLayout(false);
}
#endregion
}
}

View File

@ -0,0 +1,213 @@
using MGdu.WinFormUI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace RySkins
{
[ComVisible(true)]
public partial class SKinForm : GMForm
{
/// <summary>
/// 无参数启动
/// </summary>
public SKinForm() : base()
{
InitializeComponent();
}
private IntPtr ActiveHandle = IntPtr.Zero;
protected override void OnCreateControl()
{
//ActiveHandle= ryCommon.RyForm.GetActiveWindow();
base.OnCreateControl();
InitForm();
}
protected override void OnHandleCreated(EventArgs e)
{
ActiveHandle = ryCommon.RyForm.GetActiveWindow();
base.OnHandleCreated(e);
}
/// <summary>
/// 以参数方式启动
/// </summary>
/// <param name="args"></param>
public SKinForm(string[] args) : base()
{
InitializeComponent();
}
/// <summary>
/// 以单参数方式启动
/// </summary>
/// <param name="arg"></param>
public SKinForm(string arg) : base()
{
InitializeComponent();
}
private void InitForm()
{
if (this.Parent == null)
{
if (this.StartPosition == FormStartPosition.CenterParent)
{
var handle = ActiveHandle;
var parent_handle = WinAPI.User32.GetParent(Handle);
//var dd= this.ParentForm;
if (parent_handle == IntPtr.Zero) { parent_handle = handle; }
var forms = Application.OpenForms;
for (int i = 0; i < forms.Count; i++)
{
if (forms[i].Handle == handle)
{
ShowInCenter(forms[i]);
break;
}
}
}
else if (this.StartPosition == FormStartPosition.CenterScreen)
{
ShowInCenter(null);
}
}
}
/// <summary>
/// 显示在父窗体中间,如果没有父窗体,则显示在显示器中间
/// </summary>
/// <param name="parent"></param>
public void ShowInCenter(Form parent)
{
ShowInCenter(this, parent);
}
/// <summary>
/// 显示在父窗体中间,如果没有父窗体,则显示在显示器中间
/// </summary>
/// <param name="CurForm"></param>
/// <param name="parent"></param>
public static void ShowInCenter(Form CurForm, Form parent)
{
CurForm.StartPosition = FormStartPosition.Manual;
var screen = Screen.FromControl(CurForm);
if (parent == null) //如果没有父窗体,则显示在显示器中间
{
CurForm.Location = new Point((screen.WorkingArea.Width - CurForm.Width) / 2, (screen.WorkingArea.Height - CurForm.Height) / 2);
return;
}
var x = parent.Left + (parent.Width - CurForm.Width) / 2;
var y = parent.Top + (parent.Height - CurForm.Height) / 2;
if ((x + CurForm.Width) > screen.WorkingArea.X + screen.WorkingArea.Width)
{
x = screen.WorkingArea.X + screen.WorkingArea.Width - CurForm.Width;
}
if ((y + CurForm.Height) > screen.WorkingArea.Y + screen.WorkingArea.Height)
{
y = screen.WorkingArea.Y + screen.WorkingArea.Height - CurForm.Height;
}
CurForm.Location = new Point(x, y);
}
/// <summary>
/// 激活窗体
/// </summary>
public void ActiveSkinForm()
{
ryCommon.RyForm.BringToTop(Handle);
ryCommon.RyForm.SetActiveWindow(Handle);
}
/// <summary>
/// 显示窗体
/// </summary>
/// <param name="type">指定要显示的窗体类型名</param>
public static void ShowForm(Type type)
{
RySkins.SKinForm form = (RySkins.SKinForm)Activator.CreateInstance(type);
form.Show();
}
/// <summary>
/// 显示窗体
/// </summary>
/// <param name="type">指定要显示的窗体类型名</param>
/// <param name="arg">参数</param>
public static void ShowForm(Type type, string arg)
{
RySkins.SKinForm form = (RySkins.SKinForm)Activator.CreateInstance(type, new object[] { arg });
form.Show();
}
/// <summary>
/// 显示窗体
/// </summary>
/// <param name="type">指定要显示的窗体类型名</param>
/// <param name="arg">参数</param>
public static void ShowForm(Type type, string[] arg)
{
RySkins.SKinForm form = (RySkins.SKinForm)Activator.CreateInstance(type, arg);
form.Show();
}
/// <summary>
/// 显示模式窗体
/// </summary>
/// <param name="type">指定要显示的窗体类型名</param>
/// <param name="arg">参数</param>
public static void ShowDialogForm(Type type, string[] arg)
{
RySkins.SKinForm form = (RySkins.SKinForm)Activator.CreateInstance(type, arg);
form.ShowDialog();
form.Dispose();
}
/// <summary>
/// 显示窗体,如果当前已经显示过,则激活窗体。
/// </summary>
/// <param name="type">指定要显示的窗体类型名</param>
public static void ShowFormOne(Form parent, Type type)
{
ShowFormOne(parent, type, null);
}
/// <summary>
/// 显示窗体,如果当前已经显示过,则激活窗体。
/// </summary>
/// <param name="type">指定要显示的窗体类型名</param>
/// <param name="arg">参数</param>
public static void ShowFormOne(Form parent, Type type, string[] arg)
{
var forms = Application.OpenForms;
for (int i = 0; i < forms.Count; i++)
{
if (forms[i].GetType() == type)
{
if (forms[i] is RySkins.SKinForm)
{
var skin_form = (RySkins.SKinForm)forms[i];
skin_form.ShowInCenter(parent);
skin_form.ActiveSkinForm();
skin_form.Show();
return;
}
else
{
forms[i].Show();
}
}
}
Form form;
if (arg == null)
{ form = (Form)Activator.CreateInstance(type); }
else
{
form = (Form)Activator.CreateInstance(type, arg);
}
ShowInCenter(form, parent);
ryCommon.RyForm.BringToTop(form.Handle);
ryCommon.RyForm.SetActiveWindow(form.Handle);
form.Show();
}
private void SKinForm_Load(object sender, EventArgs e)
{
if (!this.DesignMode)
{ base.XTheme = new ThemeForm(); }
//Opacity = 0.97;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,48 @@

namespace RySkins
{
partial class SkinMdiForm
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.SuspendLayout();
//
// SkinMdiForm
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(505, 444);
this.IsMdiContainer = true;
this.Name = "SkinMdiForm";
this.Text = "SkinMdiForm";
this.ResumeLayout(false);
}
#endregion
}
}

View File

@ -0,0 +1,203 @@
using MGdu.WinFormUI;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
namespace RySkins
{
public partial class SkinMdiForm : GMForm
{
/// <summary>
/// 顶部栏
/// </summary>
[Description("顶部栏")]
public Panel TopPanel { get; set; } = null;
public SkinMdiForm()
{
InitializeComponent();
InitMdiSkin();
}
#region
/// <summary>
/// 加载皮肤
/// </summary>
private void InitMdiSkin()
{
_mdiClient = FindMdiClient();
base.SizeChanged += new EventHandler((object sender, EventArgs e) =>
{
if (base.WindowState == FormWindowState.Maximized)
{
base.ControlBoxOffset = new Point(4, base.BorderWidth);
}
else
{
base.ControlBoxOffset = new Point(4, 1);
}
SetFormItemLocation(TopPanel);
});
base.Load += new EventHandler((object sender, EventArgs e) =>
{
base.XTheme = new ThemeForm();
base.XTheme.Mdi_TabMinWidth = 70;
base.XTheme.Mdi_TabNormalWidth = 100;
base.XTheme.Mdi_TabMaxWidth = 145;
base.XTheme.Mdi_ShowNewTabBtn = false;
base.XTheme.Mdi_AlwaysShowListAllBtn = false;
base.XTheme.Mdi_BarBottomRegionHeight = 0;
base.XTheme.Mdi_ShowTabCloseIcon = false;
base.XTheme.Mdi_TabShowBorder = false;
base.XTheme.Mdi_BarMargin = new Padding(6, 0, 100, 0);
base.XTheme.Mdi_TabActiveBackColorTop = Color.White;
base.XTheme.Mdi_TabActiveBackColorBottom = Color.FromArgb(248, 248, 248);
base.XTheme.Mdi_TabDeactiveBackColorTop = Color.FromArgb(230, 230, 230);
base.XTheme.Mdi_TabDeactiveBackColorBottom = Color.FromArgb(230, 230, 230);
//base.XTheme.Mdi_UseMsgToActivateChild
base.MdiNewTabButtonClick += new EventHandler(NewFormClick);
base.MdiTabCloseButtonClick += new EventHandler(ChildFormClose);
//base.XTheme.Mdi_TabTopSpace += 80;
if (_mdiClient != null)
{
_mdiClient.Dock = DockStyle.None;
_mdiClient.BackColor = Color.White;
}
});
base.MdiBarCreated += new EventHandler((object sender, EventArgs e) =>
{
SetFormItemLocation(TopPanel);
Application.DoEvents();
Thread th = new Thread(Start);
th.Start();
void Start()
{
Thread.Sleep(10);
this.Invoke(new Action(() =>
{
this.SuspendLayout();
for (int i = 0; i < MdiForms.Count; i++)
{
CreateNewChild(MdiForms[i]);
}
this.ResumeLayout(false);
//CreateNewChild(typeof(DbOp.FrmCaijiView));
//Application.DoEvents();
if (this.MdiChildren.Length > 0)
{
this.ActivateMdiChildForm(this.MdiChildren[0]);
}
}));
}
});
}
/// <summary>
/// 要初始化加载的Form列表
/// </summary>
public List<Form> MdiForms { get; set; } = new List<Form>();
/// <summary>
/// 创建子窗体
/// </summary>
/// <param name="form"></param>
public void CreateNewChild(Form form)
{
//form.SuspendLayout();
form.FormClosed += new FormClosedEventHandler(base.MdiChildClosed);
form.VisibleChanged += new EventHandler(base.MdiChildVisibleChange);
form.MdiParent = this;
//f.BackColor = Color.White;
form.FormBorderStyle = FormBorderStyle.SizableToolWindow;
form.SizeGripStyle = SizeGripStyle.Show;
form.WindowState = FormWindowState.Maximized;
form.Show();
// form.ResumeLayout(false);
//f.Focus();
}
MdiClient _mdiClient;
private int PanelTopHeight { get; set; } = 43;
private void NewFormClick(object sender, EventArgs e)
{
// CreateNewChild();
}
private void ChildFormClose(object sender, EventArgs e)
{
if (sender is Form f)
f.Close();
}
private MdiClient FindMdiClient()
{
MdiClient mdi = null;
foreach (Control c in Controls)
{
if ((mdi = c as MdiClient) != null)
{
break;
}
}
return mdi;
}
private void SetMdiBarLocation()
{
Padding newMargin = Padding.Empty;
//if (WindowState == FormWindowState.Maximized)
// newMargin = new Padding(BorderWidth, BorderWidth, BorderWidth, 0);
//else
//PnlMenu.Top = BorderWidth + base.XTheme.CaptionHeight;
newMargin = new Padding(BorderWidth, BorderWidth + base.XTheme.CaptionHeight + 0, BorderWidth, 0);
if (base.XTheme.Mdi_BarMargin != newMargin)
{
base.XTheme.Mdi_BarMargin = newMargin;
Invalidate();
}
}
private void SetPanelTopLocation(Panel PnlTop)
{
Point newLocation = new Point(base.MdiBarBounds.Left, base.MdiBarBounds.Bottom);
//if (panelTop.Location == newLocation)
// return;
//var size = new Size(base.MdiBarBounds.Width, PanelTopHeight);
//if (PnlTop != null)
//{
// PnlTop.Anchor = AnchorStyles.None;
// PnlTop.Location = newLocation;
// PnlTop.Size = size;
// PnlTop.Anchor = AnchorStyles.Left | AnchorStyles.Right | AnchorStyles.Top;
//}
}
private void SetFormItemLocation(Panel PnlTop)
{
SetMdiBarLocation();
//SetPanelTopLocation(PnlTop);
SetMdiClientLocation(PnlTop);
}
private void SetMdiClientLocation(Panel PnlTop)
{
if (_mdiClient == null)
return;
Point newLocation = Point.Empty;
var size = ClientRectangle.Size;
if (PnlTop != null)
{
newLocation = new Point(PnlTop.Left, PnlTop.Bottom);
if (_mdiClient.Location == newLocation)
return;
int height = base.ClientSize.Height - newLocation.Y -
(base.ClientSize.Width - PnlTop.Width) / 2;
size = new Size(PnlTop.Width, height);
}
_mdiClient.Anchor = AnchorStyles.None;
_mdiClient.Location = newLocation;
_mdiClient.Size = size;
_mdiClient.Anchor =
AnchorStyles.Left | AnchorStyles.Top | AnchorStyles.Right | AnchorStyles.Bottom;
}
#endregion
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,44 @@
using MGdu.WinFormUI;
using MGdu.WinFormUI.MyGraphics;
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
namespace RySkins
{
public class ThemeForm : ThemeFormBase
{
/// <summary>
/// DevExpress风格皮肤
/// </summary>
public ThemeForm()
: base()
{
ThemeName = "Default";
ryControls.Skin.SkinCommon.ButtonSkin.BackColor = Color.DarkGreen;
CaptionBackColorTop = Color.DarkGreen;
CaptionBackColorBottom = Color.SeaGreen;
ryControls.Skin.SkinCommon.ButtonSkin.ColorGradient = true;
BorderWidth = 1;
//CaptionHeight = 30;
IconSize = new Size(22, 22);
//ControlBoxOffset = new Point(8, 8);
//ControlBoxSpace = 2;
SideResizeWidth = 4;
UseDefaultTopRoundingFormRegion = false;
RoundedStyle = RoundStyle.None;
FormBorderOutterColor = Color.Gray;
FormBorderInnerColor = Color.White;
SetClientInset = false;
ShowShadow = false;
CaptionTextCenter = false;
//CaptionTextColor = Color.FromArgb(102, 102, 102);
//FormBackColor = Color.White;
}
}
}

View File

@ -0,0 +1,353 @@
namespace MyHouse.WebAPITool
{
partial class FrmCardAdd
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.ChkEnabled = new System.Windows.Forms.CheckBox();
this.label5 = new System.Windows.Forms.Label();
this.TxtRePayDate = new ryControls.TextBoxEx2();
this.label4 = new System.Windows.Forms.Label();
this.TxtDes = new ryControls.TextBoxEx2();
this.label3 = new System.Windows.Forms.Label();
this.TxtBillDate = new ryControls.TextBoxEx2();
this.label2 = new System.Windows.Forms.Label();
this.TxtCardNum = new ryControls.TextBoxEx2();
this.label1 = new System.Windows.Forms.Label();
this.txtBankName = new ryControls.TextBoxEx2();
this.btnCancel = new ryControls.ButtonEx();
this.btnOK = new ryControls.ButtonEx();
this.label6 = new System.Windows.Forms.Label();
this.DtOutTime = new System.Windows.Forms.DateTimePicker();
this.DtStartTime = new System.Windows.Forms.DateTimePicker();
this.label7 = new System.Windows.Forms.Label();
this.label8 = new System.Windows.Forms.Label();
this.CbbRepayDateMode = new System.Windows.Forms.ComboBox();
this.SuspendLayout();
//
// ChkEnabled
//
this.ChkEnabled.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
this.ChkEnabled.AutoSize = true;
this.ChkEnabled.Checked = true;
this.ChkEnabled.CheckState = System.Windows.Forms.CheckState.Checked;
this.ChkEnabled.Location = new System.Drawing.Point(15, 261);
this.ChkEnabled.Name = "ChkEnabled";
this.ChkEnabled.Size = new System.Drawing.Size(48, 16);
this.ChkEnabled.TabIndex = 29;
this.ChkEnabled.Text = "有效";
this.ChkEnabled.UseVisualStyleBackColor = true;
//
// label5
//
this.label5.AutoSize = true;
this.label5.Location = new System.Drawing.Point(277, 66);
this.label5.Name = "label5";
this.label5.Size = new System.Drawing.Size(41, 12);
this.label5.TabIndex = 28;
this.label5.Text = "还款日";
//
// TxtRePayDate
//
this.TxtRePayDate.BackColor = System.Drawing.Color.White;
this.TxtRePayDate.EmptyText = "";
this.TxtRePayDate.Location = new System.Drawing.Point(319, 58);
this.TxtRePayDate.MaxLength = 999999999;
this.TxtRePayDate.Multiline = false;
this.TxtRePayDate.Name = "TxtRePayDate";
this.TxtRePayDate.OnlyNumeric = false;
this.TxtRePayDate.PasswordChar = '\0';
this.TxtRePayDate.ReadOnly = false;
this.TxtRePayDate.SelectedText = "";
this.TxtRePayDate.SelectionLength = 0;
this.TxtRePayDate.SelectionStart = 0;
this.TxtRePayDate.Size = new System.Drawing.Size(43, 25);
this.TxtRePayDate.TabIndex = 27;
this.TxtRePayDate.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtRePayDate.ToolTip = "";
this.TxtRePayDate.WordWrap = true;
//
// label4
//
this.label4.AutoSize = true;
this.label4.Location = new System.Drawing.Point(13, 131);
this.label4.Name = "label4";
this.label4.Size = new System.Drawing.Size(29, 12);
this.label4.TabIndex = 26;
this.label4.Text = "备注";
//
// TxtDes
//
this.TxtDes.BackColor = System.Drawing.Color.White;
this.TxtDes.EmptyText = "";
this.TxtDes.Location = new System.Drawing.Point(71, 124);
this.TxtDes.MaxLength = 999999999;
this.TxtDes.Multiline = false;
this.TxtDes.Name = "TxtDes";
this.TxtDes.OnlyNumeric = false;
this.TxtDes.PasswordChar = '\0';
this.TxtDes.ReadOnly = false;
this.TxtDes.SelectedText = "";
this.TxtDes.SelectionLength = 0;
this.TxtDes.SelectionStart = 0;
this.TxtDes.Size = new System.Drawing.Size(291, 25);
this.TxtDes.TabIndex = 25;
this.TxtDes.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtDes.ToolTip = "";
this.TxtDes.WordWrap = true;
//
// label3
//
this.label3.AutoSize = true;
this.label3.Location = new System.Drawing.Point(176, 38);
this.label3.Name = "label3";
this.label3.Size = new System.Drawing.Size(41, 12);
this.label3.TabIndex = 24;
this.label3.Text = "账单日";
//
// TxtBillDate
//
this.TxtBillDate.BackColor = System.Drawing.Color.White;
this.TxtBillDate.EmptyText = "";
this.TxtBillDate.Location = new System.Drawing.Point(223, 30);
this.TxtBillDate.MaxLength = 999999999;
this.TxtBillDate.Multiline = false;
this.TxtBillDate.Name = "TxtBillDate";
this.TxtBillDate.OnlyNumeric = false;
this.TxtBillDate.PasswordChar = '\0';
this.TxtBillDate.ReadOnly = false;
this.TxtBillDate.SelectedText = "";
this.TxtBillDate.SelectionLength = 0;
this.TxtBillDate.SelectionStart = 0;
this.TxtBillDate.Size = new System.Drawing.Size(46, 25);
this.TxtBillDate.TabIndex = 23;
this.TxtBillDate.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtBillDate.ToolTip = "";
this.TxtBillDate.WordWrap = true;
//
// label2
//
this.label2.AutoSize = true;
this.label2.Location = new System.Drawing.Point(13, 99);
this.label2.Name = "label2";
this.label2.Size = new System.Drawing.Size(29, 12);
this.label2.TabIndex = 22;
this.label2.Text = "卡号";
//
// TxtCardNum
//
this.TxtCardNum.BackColor = System.Drawing.Color.White;
this.TxtCardNum.EmptyText = "";
this.TxtCardNum.Location = new System.Drawing.Point(71, 92);
this.TxtCardNum.MaxLength = 999999999;
this.TxtCardNum.Multiline = false;
this.TxtCardNum.Name = "TxtCardNum";
this.TxtCardNum.OnlyNumeric = false;
this.TxtCardNum.PasswordChar = '\0';
this.TxtCardNum.ReadOnly = false;
this.TxtCardNum.SelectedText = "";
this.TxtCardNum.SelectionLength = 0;
this.TxtCardNum.SelectionStart = 0;
this.TxtCardNum.Size = new System.Drawing.Size(291, 25);
this.TxtCardNum.TabIndex = 21;
this.TxtCardNum.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.TxtCardNum.ToolTip = "";
this.TxtCardNum.WordWrap = true;
//
// label1
//
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(13, 38);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 20;
this.label1.Text = "银行名称";
//
// txtBankName
//
this.txtBankName.BackColor = System.Drawing.Color.White;
this.txtBankName.EmptyText = "";
this.txtBankName.Location = new System.Drawing.Point(71, 30);
this.txtBankName.MaxLength = 999999999;
this.txtBankName.Multiline = false;
this.txtBankName.Name = "txtBankName";
this.txtBankName.OnlyNumeric = false;
this.txtBankName.PasswordChar = '\0';
this.txtBankName.ReadOnly = false;
this.txtBankName.SelectedText = "";
this.txtBankName.SelectionLength = 0;
this.txtBankName.SelectionStart = 0;
this.txtBankName.Size = new System.Drawing.Size(98, 25);
this.txtBankName.TabIndex = 19;
this.txtBankName.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
this.txtBankName.ToolTip = "";
this.txtBankName.WordWrap = true;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnCancel.Location = new System.Drawing.Point(302, 255);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(65, 27);
this.btnCancel.TabIndex = 18;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnOK.Location = new System.Drawing.Point(231, 255);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(65, 27);
this.btnOK.TabIndex = 17;
this.btnOK.Text = "确定";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// label6
//
this.label6.AutoSize = true;
this.label6.Location = new System.Drawing.Point(13, 163);
this.label6.Name = "label6";
this.label6.Size = new System.Drawing.Size(29, 12);
this.label6.TabIndex = 30;
this.label6.Text = "过期";
//
// DtOutTime
//
this.DtOutTime.CustomFormat = "yyyy-MM-dd dddd";
this.DtOutTime.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.DtOutTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.DtOutTime.Location = new System.Drawing.Point(71, 155);
this.DtOutTime.Name = "DtOutTime";
this.DtOutTime.ShowCheckBox = true;
this.DtOutTime.Size = new System.Drawing.Size(291, 23);
this.DtOutTime.TabIndex = 31;
//
// DtStartTime
//
this.DtStartTime.CustomFormat = "MM月dd日";
this.DtStartTime.Font = new System.Drawing.Font("宋体", 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.DtStartTime.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.DtStartTime.Location = new System.Drawing.Point(96, 184);
this.DtStartTime.Name = "DtStartTime";
this.DtStartTime.ShowCheckBox = true;
this.DtStartTime.Size = new System.Drawing.Size(266, 23);
this.DtStartTime.TabIndex = 33;
//
// label7
//
this.label7.AutoSize = true;
this.label7.Location = new System.Drawing.Point(13, 190);
this.label7.Name = "label7";
this.label7.Size = new System.Drawing.Size(77, 12);
this.label7.TabIndex = 32;
this.label7.Text = "年费起始时间";
//
// label8
//
this.label8.AutoSize = true;
this.label8.Location = new System.Drawing.Point(13, 71);
this.label8.Name = "label8";
this.label8.Size = new System.Drawing.Size(65, 12);
this.label8.TabIndex = 34;
this.label8.Text = "还款日模式";
//
// CbbRepayDateMode
//
this.CbbRepayDateMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.CbbRepayDateMode.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.CbbRepayDateMode.FormattingEnabled = true;
this.CbbRepayDateMode.Items.AddRange(new object[] {
"指定日",
"账单日延后指定天数"});
this.CbbRepayDateMode.Location = new System.Drawing.Point(84, 61);
this.CbbRepayDateMode.Name = "CbbRepayDateMode";
this.CbbRepayDateMode.Size = new System.Drawing.Size(187, 24);
this.CbbRepayDateMode.TabIndex = 35;
//
// FrmCardAdd
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(379, 289);
this.Controls.Add(this.CbbRepayDateMode);
this.Controls.Add(this.label8);
this.Controls.Add(this.DtStartTime);
this.Controls.Add(this.label7);
this.Controls.Add(this.DtOutTime);
this.Controls.Add(this.label6);
this.Controls.Add(this.ChkEnabled);
this.Controls.Add(this.label5);
this.Controls.Add(this.TxtRePayDate);
this.Controls.Add(this.label4);
this.Controls.Add(this.TxtDes);
this.Controls.Add(this.label3);
this.Controls.Add(this.TxtBillDate);
this.Controls.Add(this.label2);
this.Controls.Add(this.TxtCardNum);
this.Controls.Add(this.label1);
this.Controls.Add(this.txtBankName);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Location = new System.Drawing.Point(0, 0);
this.MaximizeBox = false;
this.Name = "FrmCardAdd";
this.Resizable = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "新增";
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private System.Windows.Forms.CheckBox ChkEnabled;
private System.Windows.Forms.Label label5;
private ryControls.TextBoxEx2 TxtRePayDate;
private System.Windows.Forms.Label label4;
private ryControls.TextBoxEx2 TxtDes;
private System.Windows.Forms.Label label3;
private ryControls.TextBoxEx2 TxtBillDate;
private System.Windows.Forms.Label label2;
private ryControls.TextBoxEx2 TxtCardNum;
private System.Windows.Forms.Label label1;
private ryControls.TextBoxEx2 txtBankName;
private ryControls.ButtonEx btnCancel;
private ryControls.ButtonEx btnOK;
private System.Windows.Forms.Label label6;
private System.Windows.Forms.DateTimePicker DtOutTime;
private System.Windows.Forms.DateTimePicker DtStartTime;
private System.Windows.Forms.Label label7;
private System.Windows.Forms.Label label8;
private System.Windows.Forms.ComboBox CbbRepayDateMode;
}
}

View File

@ -0,0 +1,100 @@
using ryCommon;
using ryCommonDb;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyHouse.WebAPITool
{
public partial class FrmCardAdd : RySkins.SKinForm
{
public int isAdd = 1;
public int selectId = 0;
public FrmCardAdd()
{
InitializeComponent();
CbbRepayDateMode.SelectedIndex = 0;
}
#region
public void GetInfo(int id)
{
selectId = id;
string post_str = "api=GetCard&id=" + id;
var jsonResult = API.API.Post("Card", "GetCard", post_str);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
if (data.Rows.Count > 0)
{
DataRow row = data.Rows[0];
txtBankName.Text = row["BankName"].ToString();
TxtCardNum.Text = row["CardNum"].ToString();
TxtBillDate.Text= row["BillDate"].ToString();
CbbRepayDateMode.SelectedIndex = row["RePayDateMode"].ToInt(0, 1, 0);
TxtRePayDate.Text = row["RePayDate"].ToString();
TxtDes.Text = row["Des"].ToString();
ChkEnabled.Checked = row["Enabled"].ToBool();
var OutTime = row["OutTime"].ToInt64();
DtOutTime.Checked = OutTime > 0;
DtOutTime.Value = OutTime.ToDateTime();
var StartTime = row["StartTime"].ToInt();
DtStartTime.Checked = StartTime > 0;
if (StartTime > 0)
{
var day = StartTime % 100;
var month = (StartTime - day) / 100;
DtStartTime.Value = new DateTime(2000, month, day);
}
}
}
else
{
API.API.ErrorJson(jsonResult);
}
}
private void BtnOK_Click(object sender, EventArgs e)
{
if (txtBankName.Text == "")
{
RySkins.Msg.ShowMsg("银行名称不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
if (TxtCardNum.Text == "")
{
RySkins.Msg.ShowMsg("银行卡号不能为空。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}
string post_str = "api=SaveCard&id=" + selectId+
"&BankName=" + RyWeb.WebDecode.UrlEncode(txtBankName.Text) +
"&CardNum=" + RyWeb.WebDecode.UrlEncode(TxtCardNum.Text)+
"&BillDate=" + TxtBillDate.Text.ToInt() +
"&RePayDateMode=" +CbbRepayDateMode.SelectedIndex+
"&RePayDate=" + TxtRePayDate.Text.ToInt()+
"&Des=" + RyWeb.WebDecode.UrlEncode(TxtDes.Text) +
"&Enabled=" +(ChkEnabled.Checked?1:0)+
"&StartTime=" + (DtStartTime.Checked ? DtStartTime.Value.Month*100 + DtStartTime.Value.Day : 0) +
"&OutTime=" + (DtOutTime.Checked? DtOutTime.Value.ToInt64():0);
var jsonResult = API.API.Post("Card", "SaveCard", post_str);
if (jsonResult.IsOK)
{
DialogResult = DialogResult.OK;
}
else
{
API.API.ErrorJson(jsonResult);
}
}
#endregion
private void BtnCancel_Click(object sender, EventArgs e)
{
DialogResult = DialogResult.Cancel;
}
}
}

View File

@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>

View File

@ -0,0 +1,253 @@
namespace MyHouse.WebAPITool
{
partial class FrmCardsView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.components = new System.ComponentModel.Container();
this.rySearch1 = new ryControls.rySearch();
this.LvCards = new BrightIdeasSoftware.FastObjectListView();
this.OlvBankName = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvCardNum = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvBillDate = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvRePayDate = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvOutTime = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvNextRePayDate = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvDes = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.OlvFreeYear = ((BrightIdeasSoftware.OLVColumn)(new BrightIdeasSoftware.OLVColumn()));
this.contextMenuStrip1 = new System.Windows.Forms.ContextMenuStrip(this.components);
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.toolStripMenuItem1 = new System.Windows.Forms.ToolStripSeparator();
this.ToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
this.DtPayDate = new ryControls.DateTimePickerEX();
this.label1 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.LvCards)).BeginInit();
this.contextMenuStrip1.SuspendLayout();
this.SuspendLayout();
//
// rySearch1
//
this.rySearch1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.ButtonRoundBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(236)))), ((int)(((byte)(239)))), ((int)(((byte)(244)))));
this.rySearch1.EmptyText = "请输入搜索内容";
this.rySearch1.Location = new System.Drawing.Point(4, 30);
this.rySearch1.Name = "rySearch1";
this.rySearch1.Size = new System.Drawing.Size(329, 24);
this.rySearch1.TabIndex = 29;
this.rySearch1.OnSearch += new System.EventHandler(this.rySearch1_OnSearch);
//
// LvCards
//
this.LvCards.AllColumns.Add(this.OlvBankName);
this.LvCards.AllColumns.Add(this.OlvCardNum);
this.LvCards.AllColumns.Add(this.OlvBillDate);
this.LvCards.AllColumns.Add(this.OlvRePayDate);
this.LvCards.AllColumns.Add(this.OlvOutTime);
this.LvCards.AllColumns.Add(this.OlvNextRePayDate);
this.LvCards.AllColumns.Add(this.OlvDes);
this.LvCards.AllColumns.Add(this.OlvFreeYear);
this.LvCards.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.LvCards.CellEditUseWholeCell = false;
this.LvCards.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
this.OlvBankName,
this.OlvCardNum,
this.OlvBillDate,
this.OlvRePayDate,
this.OlvOutTime,
this.OlvNextRePayDate,
this.OlvDes,
this.OlvFreeYear});
this.LvCards.ContextMenuStrip = this.contextMenuStrip1;
this.LvCards.Cursor = System.Windows.Forms.Cursors.Default;
this.LvCards.EmptyListMsg = "当前列表没有任何项";
this.LvCards.FullRowSelect = true;
this.LvCards.HideSelection = false;
this.LvCards.Location = new System.Drawing.Point(4, 60);
this.LvCards.Name = "LvCards";
this.LvCards.RowHeight = 25;
this.LvCards.ShowGroups = false;
this.LvCards.ShowItemToolTips = true;
this.LvCards.Size = new System.Drawing.Size(1111, 702);
this.LvCards.TabIndex = 86;
this.LvCards.UseCellFormatEvents = true;
this.LvCards.UseCompatibleStateImageBehavior = false;
this.LvCards.UseFiltering = true;
this.LvCards.View = System.Windows.Forms.View.Details;
this.LvCards.VirtualMode = true;
//
// OlvBankName
//
this.OlvBankName.Text = "银行名";
this.OlvBankName.Width = 80;
//
// OlvCardNum
//
this.OlvCardNum.Text = "卡号";
this.OlvCardNum.Width = 120;
//
// OlvBillDate
//
this.OlvBillDate.Text = "账单日";
this.OlvBillDate.Width = 55;
//
// OlvRePayDate
//
this.OlvRePayDate.Text = "还款日";
this.OlvRePayDate.Width = 100;
//
// OlvOutTime
//
this.OlvOutTime.Text = "卡片过期时间";
this.OlvOutTime.Width = 130;
//
// OlvNextRePayDate
//
this.OlvNextRePayDate.Text = "下次还款";
this.OlvNextRePayDate.Width = 200;
//
// OlvDes
//
this.OlvDes.Text = "备注";
this.OlvDes.Width = 150;
//
// OlvFreeYear
//
this.OlvFreeYear.Text = "免年费达标情况";
this.OlvFreeYear.Width = 250;
//
// contextMenuStrip1
//
this.contextMenuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
this.ToolStripMenuItem,
this.ToolStripMenuItem,
this.ToolStripMenuItem,
this.toolStripMenuItem1,
this.ToolStripMenuItem});
this.contextMenuStrip1.Name = "contextMenuStrip1";
this.contextMenuStrip1.Size = new System.Drawing.Size(161, 98);
//
// 添加银行卡ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "添加银行卡ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.ToolStripMenuItem.Text = "添加银行卡";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 修改银行卡ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "修改银行卡ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.ToolStripMenuItem.Text = "修改银行卡";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// 删除银行卡ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "删除银行卡ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.ToolStripMenuItem.Text = "删除银行卡";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// toolStripMenuItem1
//
this.toolStripMenuItem1.Name = "toolStripMenuItem1";
this.toolStripMenuItem1.Size = new System.Drawing.Size(157, 6);
//
// 设置为年费达标ToolStripMenuItem
//
this.ToolStripMenuItem.Name = "设置为年费达标ToolStripMenuItem";
this.ToolStripMenuItem.Size = new System.Drawing.Size(160, 22);
this.ToolStripMenuItem.Text = "设置为年费达标";
this.ToolStripMenuItem.Click += new System.EventHandler(this.ToolStripMenuItem_Click);
//
// DtPayDate
//
this.DtPayDate.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.DtPayDate.CustomFormat = "yyyy年MM月dd日 dddd";
this.DtPayDate.Format = System.Windows.Forms.DateTimePickerFormat.Custom;
this.DtPayDate.Location = new System.Drawing.Point(948, 33);
this.DtPayDate.Name = "DtPayDate";
this.DtPayDate.Size = new System.Drawing.Size(167, 21);
this.DtPayDate.TabIndex = 87;
this.DtPayDate.ValueChanged += new System.EventHandler(this.DtPayDate_ValueChanged);
//
// label1
//
this.label1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
this.label1.AutoSize = true;
this.label1.Location = new System.Drawing.Point(889, 38);
this.label1.Name = "label1";
this.label1.Size = new System.Drawing.Size(53, 12);
this.label1.TabIndex = 88;
this.label1.Text = "付款时间";
//
// FrmCardsView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(1119, 766);
this.Controls.Add(this.label1);
this.Controls.Add(this.DtPayDate);
this.Controls.Add(this.LvCards);
this.Controls.Add(this.rySearch1);
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmCardsView";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "银行卡管理";
this.Load += new System.EventHandler(this.FrmCardsView_Load);
((System.ComponentModel.ISupportInitialize)(this.LvCards)).EndInit();
this.contextMenuStrip1.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
}
#endregion
private ryControls.rySearch rySearch1;
private BrightIdeasSoftware.FastObjectListView LvCards;
private BrightIdeasSoftware.OLVColumn OlvBankName;
private BrightIdeasSoftware.OLVColumn OlvCardNum;
private BrightIdeasSoftware.OLVColumn OlvBillDate;
private BrightIdeasSoftware.OLVColumn OlvRePayDate;
private BrightIdeasSoftware.OLVColumn OlvOutTime;
private BrightIdeasSoftware.OLVColumn OlvNextRePayDate;
private System.Windows.Forms.ContextMenuStrip contextMenuStrip1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
private ryControls.DateTimePickerEX DtPayDate;
private System.Windows.Forms.Label label1;
private BrightIdeasSoftware.OLVColumn OlvDes;
private BrightIdeasSoftware.OLVColumn OlvFreeYear;
private System.Windows.Forms.ToolStripSeparator toolStripMenuItem1;
private System.Windows.Forms.ToolStripMenuItem ToolStripMenuItem;
}
}

View File

@ -0,0 +1,251 @@
using ryCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace MyHouse.WebAPITool
{
public partial class FrmCardsView : RySkins.SKinForm
{
public FrmCardsView()
{
InitializeComponent();
OlvBankName.AspectGetter = delegate (object x) { return ((CardInfo)x).BankName; };
OlvCardNum.AspectGetter = delegate (object x) { return ((CardInfo)x).CardNum; };
OlvBillDate.AspectGetter = delegate (object x) { return "每月"+((CardInfo)x).BillDate+"日"; };
OlvRePayDate.AspectGetter = delegate (object x) {
var row = (CardInfo)x;
if (row.RePayDateMode == 0)
{
return "每月" + row.RePayDate + "日";
}
else
{
return "账单日后第" + row.RePayDate + "天";
}
};
OlvOutTime.AspectGetter = delegate (object x) {
var OutTime = ((CardInfo)x).OutTime;
return OutTime;
};
OlvOutTime.AspectToStringConverter = delegate (object row, object x)
{
var OutTime = (long)x;
if (OutTime == 0) { return "永不过期"; }
return OutTime.ToDateTime().ToString("yyyy-MM-dd dddd");
};
OlvNextRePayDate.AspectGetter = delegate (object x) {
var CardInfo = (CardInfo)x;
if (CardInfo.RePayDate == 0) { return DateTime.MinValue; }
return API.API.GetNextRepayDate(CalcDt, CardInfo.BillDate, CardInfo.RePayDateMode,CardInfo.RePayDate);
};
OlvNextRePayDate.AspectToStringConverter = delegate (object row, object x)
{
var NextRePayDate = (DateTime)x;
if (NextRePayDate == DateTime.MinValue) { return ""; }
var str = NextRePayDate.ToString("yyyy-MM-dd dddd");
var monthcount = RyDate.GetMonthCount(DateTime.Now, NextRePayDate);
if(DateTime.Now > NextRePayDate) { return str; }
if (monthcount == 1)
{
return str + "(下月"+NextRePayDate.Day+"日)";
}
else if (monthcount ==2)
{
return str + "(下下月" + NextRePayDate.Day + "日)";
}
else if (monthcount == 0)
{
return str + "(本月" + NextRePayDate.Day + "日)";
}
return NextRePayDate.ToString("yyyy-MM-dd dddd");
};
OlvDes.AspectGetter = delegate (object x) { return((CardInfo)x).Des; };
OlvFreeYear.AspectGetter = delegate (object x) {
var CardInfo = (CardInfo)x;
return CardInfo.FreeYearDate;
};
OlvFreeYear.AspectToStringConverter = delegate (object row, object x)
{
var CardInfo = (CardInfo)row;
if (CardInfo.StartTime == 0)
{
return "免年费";
}
var FreeYearDate = CardInfo.FreeYearDate.ToDateTime();
var day = CardInfo.StartTime % 100;
var month = (CardInfo.StartTime - day) / 100;
var dt_start = new DateTime(DateTime.Now.Year, month, day);
if (dt_start > DateTime.Now.Date) { dt_start = dt_start.AddYears(-1); }
var dt_end = dt_start.AddYears(1);
if(FreeYearDate>= dt_start && FreeYearDate< dt_end)
{
return "本年度已达标("+dt_start.ToString("yyyy-MM-dd")+"至"+ dt_end.AddDays(-1).ToString("yyyy-MM-dd") + ")";
}
else
{
return "本年度尚未达标(" + dt_start.ToString("yyyy-MM-dd") + "至" + dt_end.AddDays(-1).ToString("yyyy-MM-dd") + ")";
}
};
LvCards.FormatRow += LvCbResult_FormatRow;
LvCards.FormatCell += LvCbResult_FormatCell;
}
private void LvCbResult_FormatCell(object sender, BrightIdeasSoftware.FormatCellEventArgs e)
{
var item = (CardInfo)e.Model;
if(e.ColumnIndex==OlvDes.Index)
{
e.SubItem.ForeColor= Color.Gray;
}
else if (e.ColumnIndex == OlvFreeYear.Index)
{
if (e.SubItem.Text.IndexOfEx("已达标") >= 0 || e.SubItem.Text.IndexOfEx("免年费") >= 0)
{ e.SubItem.ForeColor = Color.Blue; }
else
{
e.SubItem.ForeColor = Color.Red;
}
}
}
private void LvCbResult_FormatRow(object sender, BrightIdeasSoftware.FormatRowEventArgs e)
{
var item = (CardInfo)e.Model;
if (!item.Enabled) { e.Item.ForeColor = Color.Gray; }
}
private void rySearch1_OnSearch(object sender, EventArgs e)
{
LvCards.ClearObjects();
List<CardInfo> list = new List<CardInfo>();
string post_str = "api=GetCardsList&name=" + RyWeb.WebDecode.UrlEncode(rySearch1.Text);
var jsonResult = API.API.Post("Card", "GetCardsList", post_str);
if (jsonResult.IsOK)
{
DataTable data = jsonResult.List;
for (int i = 0; i < data.Rows.Count; i++)
{
DataRow row = data.Rows[i];
list.Add(new CardInfo()
{
Id = row["id"].ToInt(),
BankName = row["BankName"].ToString(),
CardNum = row["CardNum"].ToString(),
BillDate = row["BillDate"].ToInt(),
RePayDateMode = row["RePayDateMode"].ToInt(),
RePayDate = row["RePayDate"].ToInt(),
Enabled = row["Enabled"].ToInt()==1,
OutTime = row["OutTime"].ToInt64(),
StartTime = row["StartTime"].ToInt(),
FreeYearDate = row["FreeYearDate"].ToInt64(),
Des = row["Des"].ToString(),
});
}
}
else
{
MessageBox.Show(jsonResult.ResultText, "错误代码:" + jsonResult.Result, MessageBoxButtons.OK, MessageBoxIcon.Warning);
}
LvCards.AddObjects(list);
}
private void FrmCardsView_Load(object sender, EventArgs e)
{
rySearch1.PerformClick();
LvCards.Sort(OlvNextRePayDate, SortOrder.Descending);
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
FrmCardAdd frm = new FrmCardAdd();
if(frm.ShowDialog()==DialogResult.OK)
{
rySearch1.PerformClick();
}
frm.Dispose();
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
var item = (CardInfo)LvCards.SelectedObject;
if (item == null) { return; }
FrmCardAdd frm = new FrmCardAdd();
frm.GetInfo(item.Id);
if (frm.ShowDialog() == DialogResult.OK)
{
rySearch1.PerformClick();
}
frm.Dispose();
}
private DateTime CalcDt=DateTime.Now;
private void DtPayDate_ValueChanged(object sender, EventArgs e)
{
CalcDt = DtPayDate.Value;
LvCards.Refresh();
LvCards.Sort(OlvNextRePayDate, SortOrder.Descending);
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (RySkins.Msg.ShowMsg("确定要设置本年度年费已达标吗?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
{
return;
}
var item = (CardInfo)LvCards.SelectedObject;
if (item == null) { return; }
string post_str = "api=SetFreeYearPay&id=" + item.Id;
var jsonResult = API.API.Post("Card", "SetFreeYearPay", post_str);
if (jsonResult.IsOK)
{
RySkins.Msg.ShowMsg("已设置年费达标。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
rySearch1.PerformClick();
}
else
{
API.API.ErrorJson(jsonResult);
}
}
private void ToolStripMenuItem_Click(object sender, EventArgs e)
{
if (LvCards.SelectedObject == null) { MessageBox.Show("请先选择要删除的项。", "提示", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; }
var item = (CardInfo)LvCards.SelectedObject;
var selectId = item.Id;
if (RySkins.Msg.ShowMsg("确定要删除该项吗?一旦删除将不可恢复。", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Information) == DialogResult.No)
{
return;
}
string post_str = "api=DelCard&id=" + selectId;
var jsonResult = API.API.Post("Card", "DelCard", post_str);
if (jsonResult.IsOK)
{
LvCards.RemoveObject(item);
}
else
{
API.API.ErrorJson(jsonResult);
}
}
}
public class CardInfo
{
public int Id { get; set; } = 0;
public string BankName { get; set; } = "";
public string CardNum { get; set; } = "";
public int BillDate { get; set; } = 0;
public int RePayDateMode { get; set; } = 0;
public int RePayDate{ get; set; } = 0;
public bool Enabled { get; set; } = true;
public int StartTime { get; set; } = 0;
public long OutTime { get; set; } = 0;
public string Des { get; set; } = "";
public long FreeYearDate { get; set; } = 0;
}
}

View File

@ -0,0 +1,123 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<metadata name="contextMenuStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
</root>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/></startup></configuration>

View File

@ -0,0 +1,78 @@
<?xml version="1.0" encoding="utf-8"?>
<assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1">
<assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
<security>
<requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
<!-- UAC 清单选项
如果想要更改 Windows 用户帐户控制级别,请使用
以下节点之一替换 requestedExecutionLevel 节点。n
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />
<requestedExecutionLevel level="highestAvailable" uiAccess="false" />
指定 requestedExecutionLevel 元素将禁用文件和注册表虚拟化。
如果你的应用程序需要此虚拟化来实现向后兼容性,则删除此
元素。
-->
<requestedExecutionLevel level="asInvoker" uiAccess="false" />
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!-- 设计此应用程序与其一起工作且已针对此应用程序进行测试的
Windows 版本的列表。取消评论适当的元素,
Windows 将自动选择最兼容的环境。 -->
<!-- Windows Vista -->
<supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" />
<!-- Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" />
<!-- Windows 8 -->
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" />
<!-- Windows 8.1 -->
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" />
<!-- Windows 10 -->
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>
<!-- 指示该应用程序可感知 DPI 且 Windows 在 DPI 较高时将不会对其进行
自动缩放。Windows Presentation Foundation (WPF)应用程序自动感知 DPI无需
选择加入。选择加入此设置的 Windows 窗体应用程序(面向 .NET Framework 4.6)还应
在其 app.config 中将 "EnableWindowsFormsHighDpiAutoResizing" 设置设置为 "true"。
将应用程序设为感知长路径。请参阅 https://docs.microsoft.com/windows/win32/fileio/maximum-file-path-limitation -->
<!--
<application xmlns="urn:schemas-microsoft-com:asm.v3">
<windowsSettings>
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true</dpiAware>
<longPathAware xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">true</longPathAware>
</windowsSettings>
</application>
-->
<!-- 启用 Windows 公共控件和对话框的主题(Windows XP 和更高版本) -->
<!--
<dependency>
<dependentAssembly>
<assemblyIdentity
type="win32"
name="Microsoft.Windows.Common-Controls"
version="6.0.0.0"
processorArchitecture="*"
publicKeyToken="6595b64144ccf1df"
language="*"
/>
</dependentAssembly>
</dependency>
-->
</assembly>

62
Source/MyHouse/clsForm.cs Normal file
View File

@ -0,0 +1,62 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Windows.Forms;
namespace Itrycn
{
public static class MDIClientSupport
{
[DllImport("user32.dll")]
private static extern int GetWindowLong(IntPtr hWnd, int nIndex);
[DllImport("user32.dll")]
private static extern int SetWindowLong(IntPtr hWnd, int nIndex, int dwNewLong);
[DllImport("user32.dll", ExactSpelling = true)]
private static extern int SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int X, int Y, int cx, int cy, uint uFlags);
private const int GWL_EXSTYLE = -20;
private const int WS_EX_CLIENTEDGE = 0x200;
private const uint SWP_NOSIZE = 0x0001;
private const uint SWP_NOMOVE = 0x0002;
private const uint SWP_NOZORDER = 0x0004;
private const uint SWP_NOREDRAW = 0x0008;
private const uint SWP_NOACTIVATE = 0x0010;
private const uint SWP_FRAMECHANGED = 0x0020;
private const uint SWP_SHOWWINDOW = 0x0040;
private const uint SWP_HIDEWINDOW = 0x0080;
private const uint SWP_NOCOPYBITS = 0x0100;
private const uint SWP_NOOWNERZORDER = 0x0200;
private const uint SWP_NOSENDCHANGING = 0x0400;
public static bool SetBevel(this Form form, bool show)
{
foreach (Control c in form.Controls)
{
switch (c)
{
case MdiClient client:
if (client != null)
{
int windowLong = GetWindowLong(c.Handle, GWL_EXSTYLE);
if (show)
{
windowLong |= WS_EX_CLIENTEDGE;
}
else
{
windowLong &= ~WS_EX_CLIENTEDGE;
}
SetWindowLong(c.Handle, GWL_EXSTYLE, windowLong);
// Update the non-client area.
SetWindowPos(client.Handle, IntPtr.Zero, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER |
SWP_NOOWNERZORDER | SWP_FRAMECHANGED);
return true;
}
break;
}
}
return false;
}
}
}

141
Source/MyHouse/frmSetting.Designer.cs generated Normal file
View File

@ -0,0 +1,141 @@
namespace MyHouse
{
partial class FrmSetting
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmSetting));
this.tabControl1 = new System.Windows.Forms.TabControl();
this.tabPage1 = new System.Windows.Forms.TabPage();
this.ChkAutoRun = new System.Windows.Forms.CheckBox();
this.chkAutoLogin = new System.Windows.Forms.CheckBox();
this.btnCancel = new ryControls.ButtonEx();
this.btnOK = new ryControls.ButtonEx();
this.tabControl1.SuspendLayout();
this.tabPage1.SuspendLayout();
this.SuspendLayout();
//
// tabControl1
//
this.tabControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
| System.Windows.Forms.AnchorStyles.Left)
| System.Windows.Forms.AnchorStyles.Right)));
this.tabControl1.Controls.Add(this.tabPage1);
this.tabControl1.Location = new System.Drawing.Point(2, 30);
this.tabControl1.Name = "tabControl1";
this.tabControl1.SelectedIndex = 0;
this.tabControl1.Size = new System.Drawing.Size(624, 440);
this.tabControl1.TabIndex = 0;
//
// tabPage1
//
this.tabPage1.Controls.Add(this.ChkAutoRun);
this.tabPage1.Controls.Add(this.chkAutoLogin);
this.tabPage1.Location = new System.Drawing.Point(4, 22);
this.tabPage1.Name = "tabPage1";
this.tabPage1.Padding = new System.Windows.Forms.Padding(3);
this.tabPage1.Size = new System.Drawing.Size(616, 414);
this.tabPage1.TabIndex = 0;
this.tabPage1.Text = "普通";
this.tabPage1.UseVisualStyleBackColor = true;
//
// ChkAutoRun
//
this.ChkAutoRun.AutoSize = true;
this.ChkAutoRun.Location = new System.Drawing.Point(13, 34);
this.ChkAutoRun.Name = "ChkAutoRun";
this.ChkAutoRun.Size = new System.Drawing.Size(108, 16);
this.ChkAutoRun.TabIndex = 1;
this.ChkAutoRun.Text = "开机时启动软件";
this.ChkAutoRun.UseVisualStyleBackColor = true;
//
// chkAutoLogin
//
this.chkAutoLogin.AutoSize = true;
this.chkAutoLogin.Location = new System.Drawing.Point(13, 12);
this.chkAutoLogin.Name = "chkAutoLogin";
this.chkAutoLogin.Size = new System.Drawing.Size(264, 16);
this.chkAutoLogin.TabIndex = 0;
this.chkAutoLogin.Text = "下次启动软件进行自动登陆(重启软件后生效)";
this.chkAutoLogin.UseVisualStyleBackColor = true;
//
// btnCancel
//
this.btnCancel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnCancel.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnCancel.Location = new System.Drawing.Point(541, 480);
this.btnCancel.Name = "btnCancel";
this.btnCancel.Size = new System.Drawing.Size(79, 30);
this.btnCancel.TabIndex = 22;
this.btnCancel.Text = "取消";
this.btnCancel.UseVisualStyleBackColor = true;
this.btnCancel.Click += new System.EventHandler(this.BtnCancel_Click);
//
// btnOK
//
this.btnOK.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
this.btnOK.BaseColor = System.Drawing.Color.FromArgb(((int)(((byte)(51)))), ((int)(((byte)(76)))), ((int)(((byte)(95)))));
this.btnOK.Location = new System.Drawing.Point(456, 480);
this.btnOK.Name = "btnOK";
this.btnOK.Size = new System.Drawing.Size(79, 30);
this.btnOK.TabIndex = 21;
this.btnOK.Text = "保存";
this.btnOK.UseVisualStyleBackColor = true;
this.btnOK.Click += new System.EventHandler(this.BtnOK_Click);
//
// FrmSetting
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(630, 522);
this.Controls.Add(this.btnCancel);
this.Controls.Add(this.btnOK);
this.Controls.Add(this.tabControl1);
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.Location = new System.Drawing.Point(0, 0);
this.Name = "FrmSetting";
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "设置";
this.Load += new System.EventHandler(this.FrmSetting_Load);
this.Resize += new System.EventHandler(this.FrmSetting_Resize);
this.tabControl1.ResumeLayout(false);
this.tabPage1.ResumeLayout(false);
this.tabPage1.PerformLayout();
this.ResumeLayout(false);
}
#endregion
private System.Windows.Forms.TabControl tabControl1;
private System.Windows.Forms.TabPage tabPage1;
private System.Windows.Forms.CheckBox chkAutoLogin;
private ryControls.ButtonEx btnCancel;
private ryControls.ButtonEx btnOK;
private System.Windows.Forms.CheckBox ChkAutoRun;
}
}

View File

@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace MyHouse
{
public partial class FrmSetting : RySkins.SKinForm
{
public FrmSetting()
{
InitializeComponent();
}
private void FrmSetting_Resize(object sender, EventArgs e)
{
tabControl1.Refresh();
}
private void BtnCancel_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.Cancel;
}
private void BtnOK_Click(object sender, EventArgs e)
{
mySetting.Save();
ryCommon.RyRegedit.RegRoot = Microsoft.Win32.RegistryHive.CurrentUser;
ryCommon.RyRegedit.SetAutoRun(ChkAutoRun.Checked, Soft_ConstInfo.Soft_Id, "\"" + Application.ExecutablePath.Replace("/", "\\") + "\" "+ Soft_ConstInfo.Soft_Pram);
DialogResult = DialogResult.OK;
}
ryControls.RySetting mySetting = new ryControls.RySetting();
private void FrmSetting_Load(object sender, EventArgs e)
{
mySetting.FilePath = Soft_ConstInfo.UserDataFolder + "\\Setting.xml";
mySetting.Add("AutoLogin", chkAutoLogin,false);
mySetting.Read();
ryCommon.RyRegedit.RegRoot = Microsoft.Win32.RegistryHive.CurrentUser;
ChkAutoRun.Checked = ryCommon.RyRegedit.IsAutoRun(Soft_ConstInfo.Soft_Id, "\"" + Application.ExecutablePath.Replace("/", "\\") + "\" "+ Soft_ConstInfo.Soft_Pram);
}
}
}

View File

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAABAAEAICAAAAEAIACoEAAAFgAAACgAAAAgAAAAQAAAAAEAIAAAAAAAABAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAALu+nQCUlIQAfXx1WoaF
eteGhXrXhoV614WEetN7enNGh4d7AHNxbgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdFjcAHRY3AB0WNwAdFjcAHRY3AAAAAAA4MkgAZGFlAFpX
XguNjH+2lZWE/5WVhP+VlYT/lZWE/4uKfZ8pIj8EVFFbACkjPwAAAAAAHRY3AB0WNwAdFjcAHRY3AB0W
NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHRY3AJiYhgB2dXAAkZCBAGZkZgAzLkUAFQ0yABQM
MQCoqZAAf352WpOTg/eVlYT/lZWE/5WVhP+VlYT/kpGC7nt5c0WQkIEAAAAAAA8ILgAyLEUAaWZoAIWE
egBhXmIAY2BkAB0WNwAAAAAAAAAAAAAAAAAAAAAAAAAAAB0WNwCkpY4AeHZxAGNgZBlzcW5XYV5iKCAZ
OQj///8A////AG5sazaOjX/XlZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/jIt+yGdlZyno7bkA///2ABkS
NAdiX2MqcG1sSExIVQlgXWIAYl9jAB0WNwAAAAAAAAAAAAAAAAAdFjcAo6SNAHh2cQBdWmAXh4Z7qZKR
gvuMjH7ihYR5tX59dpN/fXaUjIx+2pWVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/i4p9z3x6
dIZ9fHWKhIN5so2Mf+KQkIHzgH93fCkiPwZfXGEAYV5jAB0WNwAAAAAAAAAAAAAAEwB/fnYAYF1iGIaG
e6mUlIP/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WV
hP+VlYT/lJSD/5SUhP+VlYT/lZWE/5WVhP+SkoL3gH52ejgzSQddWmAAAAAAAAAAAAAAAAAAYl9jAAIA
JgGIiHyOlJSD/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WV
hP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+SkoL3g4J4YJmahwAxK0QAAAAAAAAA
AAB6eHIAoqOMAJOTg3mVlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WV
hP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhPuSkYJXl5eFAD45
TAAAAAAAAAAAAIB+dgCRkYEAj4+ANJSUhO6VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WV
hP+VlYT/lJSD/5SUg/+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lJSD2o2N
fxyNjX8ARUBQAAAAAAAAAAAAHRY3AIeGewCIh3sTk5OD0ZWVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WV
hP+UlIP/lpaF/5ubi/+fn4//n5+P/5qaiv+VlYT/lJSD/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WV
hP+TkoKzeXdyBXx6dAAAAAAAAAAAAAAAAAAjHTsAcG5sAHd2cQqSkYLDlZWE/5WVhP+VlYT/lZWE/5WV
hP+VlYT/lZWE/6Kikv+0tKf/vr6y/8HBtf/BwbX/vb2x/7KypP+fn4//lZWE/5WVhP+VlYT/lZWE/5WV
hP+VlYT/lZWE/5CQgaH///8AJyE+AB0WNwAAAAAAQj1PACkiPgCMjH4Ac3FuMZGRgeKVlYT/lZWE/5WV
hP+VlYT/lZWE/5aWhf+rq53/wcG1/8XFufzExLjZxMS4t8TEuLvExLjgxcW5/7+/s/+np5f/lZWE/5WV
hP+VlYT/lZWE/5WVhP+VlYT/j46Ay2ViZRt5d3IAAAAaADAqQwByb20AAAAAAG1qajuKin3FlZWE/5WV
hP+VlYT/lZWE/5WVhP+VlYT/qama/8PDt//ExLjmw8O4bcPDtxvDw7cGw8O3B8PDtyPDw7iCxMS48cHB
tf+jo5T/lJSD/5WVhP+VlYT/lZWE/5WVhP+UlIP+h4Z7rmRhZCj5/8QAZ2VnAGdlZzN+fXWIjo6A5pWV
hP+VlYT/lZWE/5WVhP+VlYT/lZWE/5ycjP++vrH/xMS47sLCt1LGx7oAw8O3AMPDtwDDw7cAw8O3AAAA
AADCwrdvxcW5+bm5rP+YmIj/lZWE/5WVhP+VlYT/lZWE/5WVhP+UlIT/jIt+2Hp4c3RhXmMkjYx/3pSU
g/+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+UlIP/qama/8TEuP/CwraakpCRAby7sgDAwLUAAAAAACAZ
OQDBwbUAvr2zALm4rwvCwre6w8O3/6OjlP+UlIP/lZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/k5OD/4uK
fbuTk4PwlZWE/5WVhP+VlYT/lZWE/5WVhP+VlYT/lZWE/5WVhP+zs6X/xMS4+728slPCwrcAv7+0AAAA
AAAAAAAAAAAAAAAAAADb3MoAzc2/AL6+tHbExLj/rKyd/5SUg/+VlYT/lZWE/5WVhP+VlYT/lZWE/5WV
hP+VlYT/kpKC0Zybi+2fno3/n52N/p+djf6fnY3+n52N/p+djf6fnY3+n56N/rm4q//Dw7j2tbWtQLu7
sQAhGjoAAAAAAAAAAAAAAAAAAAAAAFVQYgDGxroAubmwYcTEuP+zs6X/np2M/p+djf6fnY3+n52N/p+d
jf6fnY3+n52N/p+ejf+bmovPpKKR8aakk/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/ubiq/8PD
uPyysapaxMS4AJybmQAdFjcAAAAAAAAAAAAdFjcA////AO7w2QC2tq19xMS4/7W0pf+mpJP/pqST/6ak
k/+mpJP/pqST/6akk/+mpJP/pqST/6OgkdOkopKgpqST6aakk/+mpJP/pqST/6akk/+mpJP/pqST/6ak
kv+zsqP/xMS4/7a2rqhFQFYHcW14AGhkcQAdFjcAHRY3AIyKjQCIhooAgH2EFLu6scXDw7f/r62e/6ak
kv+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJPlpKKRiqalkwSlo5M1pqSTp6akk/qmpJP/pqST/6ak
k/+mpJP/pqST/6qomP/AwLP/wcC29aOin2kAAAACjYuOAFlVZgBfW2oAmpmYAC8pRQirqaSGw8O3/L29
r/+oppX/pqST/6akk/+mpJP/pqST/6akk/+mpJP2pqSTmaWjky2oppQDpKKSAKakkwCjoZEJpaOSgaak
k/qmpJP/pqST/6akk/+mpJP/pqST/7Kxov/Dw7f/vr608KakoYyBfoQyXFhoFWFdaxeIhYk8q6qkn8HA
tfjCwrX/r62e/6akk/+mpJP/pqST/6akk/+mpJP/pqST86WjkmyioJAEpqOTAKSikgCal4sApaOSAJ6c
jgCZlooSpKKSzqakk/+mpJP/pqST/6akk/+mpJP/p6WU/7SzpP/Cwrb/w8O3/7q6seq0s6vRtLSs1Ly8
su/ExLj/wcG0/7GvoP+mpJP/pqST/6akk/+mpJP/pqST/6akk/+joZGrj4yEBKGfkAClo5IAjYuCAAAA
AAAdFjcAgHx5AIJ/ewuioJDEpqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/66snP+6uav/wcCz/8PD
tv/Dw7b/wMCz/7i3qf+sqpr/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6Cdj5f//+8AAAAOAAAA
AAAAAAAAAAAAAB0WNwCLiIEAioeAHaKgkdumpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6ak
lP+pqJf/rKqa/6yqmv+pp5f/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/oJ6Ptmhk
agdtaW0AHRY3AAAAAAAAAAAA/P3NAKOhkQCTkIZLpKKS96akk/+mpJP/pqST/6akk/+mpJP/pqST/6ak
k/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6ak
k/+ioJDhiYZ/Jo6LgwAdFjcAAAAAAAAAAABhXGUA////AJyajJOmpJP/pqST/6akk/+mpJP/pqST/6ak
k/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6ak
k/+mpJP/pqST/6Wjkv6YlopdqKaUAB0WNwAAAAAAAAAAAIB9egDS0rEApKKSUqakk+empJP/pqST/6ak
k/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6ak
k/+mpJP/pqST/6akk/+mpJP/pqSTwqOhkSWoppUAHRY3AAAAAAAAAAAAhIF8AJqYiwCoppQApaOSTqak
k+SmpJP/pqST/6akk/empJPnpqST5qakk/umpJP/pqST/6akk/+mpJP/pqST/6akk/+mpJP/pqST/6ak
k/mmpJPkpqST6aakk/mmpJP/pqST/6akk8KkopImpaOSAK+tmQAdFjcAAAAAAAAAAAAAAAAAoqCQAKKg
kACqqJUApaOSTaakk7+mpJOHpqSTR6akkyampJMkpaOTdaakk/OmpJP/pqST/6akk/+mpJP/pqST/6ak
k/+mpJPnpaOTYKakkyKmpJMppqSTTqakk5OmpJOspKKSJ6akkwCwr5oAm5mMAAAAAAAAAAAAAAAAAAAA
AAAAAAAAop+QAKKgkAD///8ApaOSDKimlQCmpJMApqSTAKWjkgCNioIBpaOShqakk/+mpJP/pqST/6ak
k/+mpJP/pqST+aSikmeqqJYApaOTAKakkwCmpJMAm5mMAKSikgimpJMAsK+aAJuZjAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAoqCRAKOhkQClo5IApaOSAKSikgB1cnIAo6GRAKKgkQChn5AZpaOSzqak
k/+mpJP/pqST/6akk/+lo5KynpyOCqGfkAChn5AAlZKHAKWjkgClo5IApKKSAJ+djgCcmo0AAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAdFjcA////AK6s
mACkopJ2pqST+Kakk/ampJP2pqST8qOhkVWnpZMAqKaUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAA/+AH//BAAg/gAAAHwAAAA4AAAAGAAAABgAAAAYAAAAGAAAABgAAAA4AA
AAEAAAAAAAAAAAAAAAAAAQAAAAPAAAADwAAAAYAAAAAAAAAAAAAAAAAAAAAAAIAAAAOAAAABgAAAAYAA
AAGAAAABgAAAAcAAAAPgAAAH8AAAD//AB/8=
</value>
</data>
</root>

BIN
Source/MyHouse/logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 74 KiB

View File

@ -0,0 +1,30 @@
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
!**/.gitignore
!.git/HEAD
!.git/config
!.git/packed-refs
!.git/refs/heads/**

Binary file not shown.

View File

@ -0,0 +1,366 @@
{
"Version": 1,
"WorkspaceRootPath": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\",
"Documents": [
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\dockerfile||{8B382828-6202-11D1-8870-0000F87579D2}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:dockerfile||{8B382828-6202-11D1-8870-0000F87579D2}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\controllers\\cardcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:controllers\\cardcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\mydb\\dataprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:mydb\\dataprovider.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\controllers\\goodscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:controllers\\goodscontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\mydb\\dbop.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:mydb\\dbop.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\api\\api.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:api\\api.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\api\\varextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:api\\varextension.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\api\\contexts.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:api\\contexts.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\api\\cardinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:api\\cardinfo.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:properties\\launchsettings.json||{90A6B3A7-C1A3-4009-A288-E2FF89E96FA0}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\controllers\\wolcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:controllers\\wolcontroller.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:program.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\smarthouseapi.http||{5703B403-55E7-4C63-8C88-A8F52C7A45C5}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:smarthouseapi.http||{5703B403-55E7-4C63-8C88-A8F52C7A45C5}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\properties\\publishprofiles\\folderprofile.pubxml||{FA3CD31E-987B-443A-9B81-186104E8DAC1}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:properties\\publishprofiles\\folderprofile.pubxml||{FA3CD31E-987B-443A-9B81-186104E8DAC1}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\weui\\dist\\style\\weui.css||{A5401142-F49D-43DB-90B1-F57BA349E55C}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:weui\\dist\\style\\weui.css||{A5401142-F49D-43DB-90B1-F57BA349E55C}"
},
{
"AbsoluteMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|e:\\my datas\\my codes\\\u6BD5\u65B9\u9879\u76EE\\csharp\\\u667A\u80FD\u5BB6\u5EADapi\\source\\smarthouseapi\\mydb\\sqlite\\clsdb.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{407E7B22-C2F8-4FA3-80D6-D16135C9E3F7}|SmartHouseAPI.csproj|solutionrelative:mydb\\sqlite\\clsdb.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\zilin\\Desktop\\NuGet.Build.Tasks.Pack.targets||{FA3CD31E-987B-443A-9B81-186104E8DAC1}|"
},
{
"AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\MySQL\\clsMySQLDb.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}",
"RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:MyDb\\MySQL\\clsMySQLDb.cs||{A6C744A8-0E4A-4FC6-886A-064283054674}"
}
],
"DocumentGroupContainers": [
{
"Orientation": 0,
"VerticalTabListWidth": 256,
"DocumentGroups": [
{
"DockedWidth": 24,
"SelectedChildIndex": 6,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}"
},
{
"$type": "Bookmark",
"Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{1c4feeaa-4718-4aa9-859d-94ce25d182ba}"
},
{
"$type": "Bookmark",
"Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{aa2115a1-9712-457b-9047-dbb71ca2cdd2}"
},
{
"$type": "Document",
"DocumentIndex": 1,
"Title": "CardController.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Controllers\\CardController.cs",
"RelativeDocumentMoniker": "Controllers\\CardController.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Controllers\\CardController.cs",
"RelativeToolTip": "Controllers\\CardController.cs",
"ViewState": "AgIAAGEAAAAAAAAAAAAwwJ0AAAAeAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-27T05:54:12.96Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 0,
"Title": "Dockerfile",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Dockerfile",
"RelativeDocumentMoniker": "Dockerfile",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Dockerfile",
"RelativeToolTip": "Dockerfile",
"ViewState": "AgIAABcAAAAAAAAAAADwvx0AAAAfAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001001|",
"WhenOpened": "2024-12-25T05:18:06.663Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 2,
"Title": "DataProvider.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\DataProvider.cs",
"RelativeDocumentMoniker": "MyDb\\DataProvider.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\DataProvider.cs",
"RelativeToolTip": "MyDb\\DataProvider.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAoAAAAeAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2025-02-08T08:02:06.302Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 3,
"Title": "GoodsController.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Controllers\\GoodsController.cs",
"RelativeDocumentMoniker": "Controllers\\GoodsController.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Controllers\\GoodsController.cs",
"RelativeToolTip": "Controllers\\GoodsController.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAALYBAAARAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-28T06:10:46.316Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 5,
"Title": "API.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\API\\API.cs",
"RelativeDocumentMoniker": "API\\API.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\API\\API.cs",
"RelativeToolTip": "API\\API.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAIAAAAUAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-28T06:35:08.633Z"
},
{
"$type": "Document",
"DocumentIndex": 6,
"Title": "VarExtension.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\API\\VarExtension.cs",
"RelativeDocumentMoniker": "API\\VarExtension.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\API\\VarExtension.cs",
"RelativeToolTip": "API\\VarExtension.cs",
"ViewState": "AgIAANsBAAAAAAAAAIAwwOMBAAAOAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-27T02:20:09.702Z",
"EditorCaption": ""
},
{
"$type": "Document",
"DocumentIndex": 9,
"Title": "launchSettings.json",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Properties\\launchSettings.json",
"RelativeDocumentMoniker": "Properties\\launchSettings.json",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Properties\\launchSettings.json",
"RelativeToolTip": "Properties\\launchSettings.json",
"ViewState": "AgIAABsAAAAAAAAAAAAAACMAAAAmAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001642|",
"WhenOpened": "2024-12-27T03:18:13.204Z"
},
{
"$type": "Document",
"DocumentIndex": 12,
"Title": "SmartHouseAPI.http",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\SmartHouseAPI.http",
"RelativeDocumentMoniker": "SmartHouseAPI.http",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\SmartHouseAPI.http",
"RelativeToolTip": "SmartHouseAPI.http",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAMAAAAYAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003502|",
"WhenOpened": "2024-12-27T05:09:53.496Z"
},
{
"$type": "Document",
"DocumentIndex": 4,
"Title": "DbOp.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\DbOp.cs",
"RelativeDocumentMoniker": "MyDb\\DbOp.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\DbOp.cs",
"RelativeToolTip": "MyDb\\DbOp.cs",
"ViewState": "AgIAAC4AAAAAAAAAAAAwwEQAAAArAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-28T07:05:56.908Z"
},
{
"$type": "Document",
"DocumentIndex": 7,
"Title": "Contexts.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\API\\Contexts.cs",
"RelativeDocumentMoniker": "API\\Contexts.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\API\\Contexts.cs",
"RelativeToolTip": "API\\Contexts.cs",
"ViewState": "AgIAAA8AAAAAAAAAAAAgwCIAAAAtAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-27T09:24:24.429Z"
},
{
"$type": "Document",
"DocumentIndex": 8,
"Title": "CardInfo.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\API\\CardInfo.cs",
"RelativeDocumentMoniker": "API\\CardInfo.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\API\\CardInfo.cs",
"RelativeToolTip": "API\\CardInfo.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAkAAAAWAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-27T00:05:12.253Z"
},
{
"$type": "Document",
"DocumentIndex": 11,
"Title": "Program.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Program.cs",
"RelativeDocumentMoniker": "Program.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Program.cs",
"RelativeToolTip": "Program.cs",
"ViewState": "AgIAAA8AAAAAAAAAAAAAAAUAAAAcAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-27T01:57:36.296Z"
},
{
"$type": "Document",
"DocumentIndex": 10,
"Title": "WOLController.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Controllers\\WOLController.cs",
"RelativeDocumentMoniker": "Controllers\\WOLController.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Controllers\\WOLController.cs",
"RelativeToolTip": "Controllers\\WOLController.cs",
"ViewState": "AgIAAFYAAAAAAAAAAAAAwF4AAAAkAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-28T01:44:04.396Z"
},
{
"$type": "Document",
"DocumentIndex": 13,
"Title": "FolderProfile.pubxml",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Properties\\PublishProfiles\\FolderProfile.pubxml",
"RelativeDocumentMoniker": "Properties\\PublishProfiles\\FolderProfile.pubxml",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\Properties\\PublishProfiles\\FolderProfile.pubxml",
"RelativeToolTip": "Properties\\PublishProfiles\\FolderProfile.pubxml",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAA8AAAASAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003576|",
"WhenOpened": "2024-12-27T03:21:58.227Z"
},
{
"$type": "Document",
"DocumentIndex": 14,
"Title": "weui.css",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\weui\\dist\\style\\weui.css",
"RelativeDocumentMoniker": "weui\\dist\\style\\weui.css",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\weui\\dist\\style\\weui.css",
"RelativeToolTip": "weui\\dist\\style\\weui.css",
"ViewState": "AgIAADIMAAAAAAAAAADwvzoMAAATAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003000|",
"WhenOpened": "2024-12-27T03:03:27.143Z"
},
{
"$type": "Document",
"DocumentIndex": 15,
"Title": "clsDb.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\SQLite\\clsDb.cs",
"RelativeDocumentMoniker": "MyDb\\SQLite\\clsDb.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\SQLite\\clsDb.cs",
"RelativeToolTip": "MyDb\\SQLite\\clsDb.cs",
"ViewState": "AgIAAB8BAAAAAAAAAAAcwCQBAAAqAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-27T03:09:06.056Z"
},
{
"$type": "Document",
"DocumentIndex": 17,
"Title": "clsMySQLDb.cs",
"DocumentMoniker": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\MySQL\\clsMySQLDb.cs",
"RelativeDocumentMoniker": "MyDb\\MySQL\\clsMySQLDb.cs",
"ToolTip": "E:\\My Datas\\My Codes\\\u6BD5\u65B9\u9879\u76EE\\CSharp\\\u667A\u80FD\u5BB6\u5EADAPI\\Source\\SmartHouseAPI\\MyDb\\MySQL\\clsMySQLDb.cs",
"RelativeToolTip": "MyDb\\MySQL\\clsMySQLDb.cs",
"ViewState": "AgIAAAAAAAAAAAAAAAAAAAcAAAApAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.000738|",
"WhenOpened": "2024-12-27T02:21:42.149Z"
},
{
"$type": "Document",
"DocumentIndex": 16,
"Title": "NuGet.Build.Tasks.Pack.targets",
"DocumentMoniker": "C:\\Users\\zilin\\Desktop\\NuGet.Build.Tasks.Pack.targets",
"ToolTip": "C:\\Users\\zilin\\Desktop\\NuGet.Build.Tasks.Pack.targets",
"ViewState": "AgIAAMAAAAAAAAAAAAAAwMsAAAATAAAAAAAAAA==",
"Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.003801|",
"WhenOpened": "2024-12-27T02:04:42.853Z"
}
]
},
{
"DockedWidth": 376,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{ca8cc5c7-0231-406a-95cd-aa5ed6ac0190}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{d78612c7-9962-4b83-95d9-268046dad23a}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{3822e751-eb69-4b0e-b301-595a9e4c74d5}"
},
{
"$type": "Bookmark",
"Name": "ST:0:0:{004be353-6879-467c-9d1e-9ac23cdf6d49}"
}
]
},
{
"DockedWidth": 200,
"SelectedChildIndex": -1,
"Children": [
{
"$type": "Bookmark",
"Name": "ST:0:0:{57d563b6-44a5-47df-85be-f4199ad6b651}"
}
]
}
]
}
]
}

Some files were not shown because too many files have changed in this diff Show More