Browse Source

完善故障记录工具的数据库迁移,准备文件备份功能

yuzhengyang 8 years ago
parent
commit
1f6186cc18
32 changed files with 1212 additions and 182 deletions
  1. 2 1
      Fork.Net/Fork.Net.SpeciallyTools/Y.FileQueryEngine/Y.FileQueryEngine.csproj
  2. 16 16
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/App.config
  3. 17 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/DatabaseEngine/Configuration.cs
  4. 8 5
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/DatabaseEngine/SuperDb.cs
  5. 1 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Models/FaultLogs.cs
  6. 24 1
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Oreo.FaultLog.csproj
  7. 40 22
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogInputPartial.Designer.cs
  8. 64 3
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogInputPartial.cs
  9. 3 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogInputPartial.resx
  10. 272 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogModifyPartial.Designer.cs
  11. 75 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogModifyPartial.cs
  12. 120 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogModifyPartial.resx
  13. 25 33
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Properties/Resources.Designer.cs
  14. 13 17
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Properties/Settings.Designer.cs
  15. 43 11
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/MainForm.Designer.cs
  16. 10 6
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/MainForm.cs
  17. 109 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/ModifyForm.Designer.cs
  18. 48 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/ModifyForm.cs
  19. 120 0
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/ModifyForm.resx
  20. 5 5
      Fork.Net/Oreo.Plugins/Oreo.FaultLog/packages.config
  21. 18 19
      Fork.Net/Oreo.Plugins/Oreo.FileMan/App.config
  22. 14 0
      Fork.Net/Oreo.Plugins/Oreo.FileMan/DatabaseEngine/Configuration.cs
  23. 7 4
      Fork.Net/Oreo.Plugins/Oreo.FileMan/DatabaseEngine/SuperDb.cs
  24. 14 0
      Fork.Net/Oreo.Plugins/Oreo.FileMan/Models/Backups.cs
  25. 15 11
      Fork.Net/Oreo.Plugins/Oreo.FileMan/Oreo.FileMan.csproj
  26. 13 0
      Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileBackupPartial.Designer.cs
  27. 62 1
      Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileBackupPartial.cs
  28. 21 0
      Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileBackupPartial.resx
  29. 10 0
      Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileDecryptPartial.cs
  30. 2 2
      Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileTypePartial.cs
  31. 13 17
      Fork.Net/Oreo.Plugins/Oreo.FileMan/Properties/Settings.Designer.cs
  32. 8 8
      Fork.Net/Oreo.Plugins/Oreo.FileMan/packages.config

+ 2 - 1
Fork.Net/Fork.Net.SpeciallyTools/Y.FileQueryEngine/Y.FileQueryEngine.csproj

@@ -9,8 +9,9 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Y.FileQueryEngine</RootNamespace>
     <AssemblyName>Y.FileQueryEngine</AssemblyName>
-    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <DebugSymbols>true</DebugSymbols>

+ 16 - 16
Fork.Net/Oreo.Plugins/Oreo.FaultLog/App.config

@@ -1,42 +1,42 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <configSections>
-    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
     <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
   </configSections>
   <connectionStrings>
-    <add name="DefaultConnection" connectionString="data source=|DataDirectory|\FaultLog.db" providerName="System.Data.SQLite" />
+    <add name="DefaultConnection" connectionString="data source=|DataDirectory|\FaultLog.db" providerName="System.Data.SQLite"/>
   </connectionStrings>
   <entityFramework>
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
       <parameters>
-        <parameter value="v13.0" />
+        <parameter value="v13.0"/>
       </parameters>
     </defaultConnectionFactory>
     <providers>
-      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
-      <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
-      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
+      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
+      <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
+      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
     </providers>
   </entityFramework>
   <system.data>
     <DbProviderFactories>
-      <remove invariant="System.Data.SQLite.EF6" />
-      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
-      <remove invariant="System.Data.SQLite" />
-      <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" />
+      <remove invariant="System.Data.SQLite.EF6"/>
+      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
+      <remove invariant="System.Data.SQLite"/>
+      <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/>
     </DbProviderFactories>
   </system.data>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
-        <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2" />
+        <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2"/>
       </dependentAssembly>
       <dependentAssembly>
-        <assemblyIdentity name="System.Data.SQLite.EF6" publicKeyToken="db937bc2d44ff139" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2" />
+        <assemblyIdentity name="System.Data.SQLite.EF6" publicKeyToken="db937bc2d44ff139" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2"/>
       </dependentAssembly>
     </assemblyBinding>
   </runtime>
-</configuration>
+<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2"/></startup></configuration>

+ 17 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/DatabaseEngine/Configuration.cs

@@ -0,0 +1,17 @@
+using System.Data.Entity.Migrations;
+using System.Data.SQLite.EF6.Migrations;
+
+namespace Oreo.FaultLog.DatabaseEngine
+{
+    public class Configuration : DbMigrationsConfiguration<SuperDb>
+    {
+        public Configuration()
+        {
+            AutomaticMigrationsEnabled = true;
+            AutomaticMigrationDataLossAllowed = true;
+            SetSqlGenerator("System.Data.SQLite", new SQLiteMigrationSqlGenerator());
+        }
+        protected override void Seed(SuperDb context)
+        { }
+    }
+}

+ 8 - 5
Fork.Net/Oreo.Plugins/Oreo.FaultLog/DatabaseEngine/SuperDb.cs

@@ -6,9 +6,9 @@ namespace Oreo.FaultLog.DatabaseEngine
 {
     public class SuperDb : DbContext
     {
-        public SuperDb()
-            : base(@"DefaultConnection")
+        public SuperDb() : base(@"DefaultConnection")
         {
+            Database.SetInitializer(new MigrateDatabaseToLatestVersion<SuperDb, Configuration>());
         }
 
         protected override void OnModelCreating(DbModelBuilder modelBuilder)
@@ -16,13 +16,16 @@ namespace Oreo.FaultLog.DatabaseEngine
             modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();
             modelBuilder.Configurations.AddFromAssembly(typeof(SuperDb).Assembly);
 
-            Database.SetInitializer(new MyDbInitializer(Database.Connection.ConnectionString, modelBuilder));
+            //Database.SetInitializer(new MyDbInitializer(Database.Connection.ConnectionString, modelBuilder));
         }
 
-        public class MyDbInitializer : SqliteDropCreateDatabaseWhenModelChanges<SuperDb>//SqliteDropCreateDatabaseAlways
+        public class MyDbInitializer : SqliteCreateDatabaseIfNotExists<SuperDb>//SqliteDropCreateDatabaseAlways
         {
             public MyDbInitializer(string connectionString, DbModelBuilder modelBuilder)
-                : base(modelBuilder) { }
+                : base(modelBuilder)
+            {
+                Database.SetInitializer(new MigrateDatabaseToLatestVersion<SuperDb, Configuration>());
+            }
 
             protected override void Seed(SuperDb context)
             {

+ 1 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Models/FaultLogs.cs

@@ -9,6 +9,7 @@ namespace Oreo.FaultLog.Models
     {
         public int Id { get; set; }
         public string Ip { get; set; }
+        public string UserName { get; set; }
         public string Phone { get; set; }
         public string Address { get; set; }
         public string System { get; set; }

+ 24 - 1
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Oreo.FaultLog.csproj

@@ -9,10 +9,11 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Oreo.FaultLog</RootNamespace>
     <AssemblyName>Oreo.FaultLog</AssemblyName>
-    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -23,6 +24,7 @@
     <DefineConstants>DEBUG;TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -32,6 +34,7 @@
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
@@ -75,6 +78,7 @@
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="DatabaseEngine\Configuration.cs" />
     <Compile Include="DatabaseEngine\Mapping.cs" />
     <Compile Include="DatabaseEngine\Muse.cs" />
     <Compile Include="DatabaseEngine\SuperDb.cs" />
@@ -85,6 +89,12 @@
     <Compile Include="Partials\FaultLogInputPartial.Designer.cs">
       <DependentUpon>FaultLogInputPartial.cs</DependentUpon>
     </Compile>
+    <Compile Include="Partials\FaultLogModifyPartial.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="Partials\FaultLogModifyPartial.Designer.cs">
+      <DependentUpon>FaultLogModifyPartial.cs</DependentUpon>
+    </Compile>
     <Compile Include="Program.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Views\MainForm.cs">
@@ -93,9 +103,18 @@
     <Compile Include="Views\MainForm.Designer.cs">
       <DependentUpon>MainForm.cs</DependentUpon>
     </Compile>
+    <Compile Include="Views\ModifyForm.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Views\ModifyForm.Designer.cs">
+      <DependentUpon>ModifyForm.cs</DependentUpon>
+    </Compile>
     <EmbeddedResource Include="Partials\FaultLogInputPartial.resx">
       <DependentUpon>FaultLogInputPartial.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Partials\FaultLogModifyPartial.resx">
+      <DependentUpon>FaultLogModifyPartial.cs</DependentUpon>
+    </EmbeddedResource>
     <EmbeddedResource Include="Properties\Resources.resx">
       <Generator>ResXFileCodeGenerator</Generator>
       <LastGenOutput>Resources.Designer.cs</LastGenOutput>
@@ -104,10 +123,14 @@
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
     </Compile>
     <EmbeddedResource Include="Views\MainForm.resx">
       <DependentUpon>MainForm.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="Views\ModifyForm.resx">
+      <DependentUpon>ModifyForm.cs</DependentUpon>
+    </EmbeddedResource>
     <None Include="App.config" />
     <None Include="packages.config" />
     <None Include="Properties\Settings.settings">

+ 40 - 22
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogInputPartial.Designer.cs

@@ -28,7 +28,7 @@
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             this.label8 = new System.Windows.Forms.Label();
             this.label7 = new System.Windows.Forms.Label();
             this.label6 = new System.Windows.Forms.Label();
@@ -38,6 +38,7 @@
             this.label1 = new System.Windows.Forms.Label();
             this.DgvData = new System.Windows.Forms.DataGridView();
             this.panel1 = new System.Windows.Forms.Panel();
+            this.BtToday = new System.Windows.Forms.Button();
             this.BtSearch = new System.Windows.Forms.Button();
             this.TbAddress = new System.Windows.Forms.TextBox();
             this.TbPhone = new System.Windows.Forms.TextBox();
@@ -60,7 +61,7 @@
             this.DgvDataProblem = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.DgvDataSolution = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.DgvDataPostscript = new System.Windows.Forms.DataGridViewTextBoxColumn();
-            this.BtToday = new System.Windows.Forms.Button();
+            this.DgvDataId = new System.Windows.Forms.DataGridViewTextBoxColumn();
             ((System.ComponentModel.ISupportInitialize)(this.DgvData)).BeginInit();
             this.panel1.SuspendLayout();
             this.panel2.SuspendLayout();
@@ -134,6 +135,7 @@
             this.DgvData.AllowUserToAddRows = false;
             this.DgvData.AllowUserToDeleteRows = false;
             this.DgvData.AllowUserToResizeRows = false;
+            this.DgvData.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells;
             this.DgvData.BackgroundColor = System.Drawing.Color.White;
             this.DgvData.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
             this.DgvData.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -146,24 +148,29 @@
             this.DgvDataSystem,
             this.DgvDataProblem,
             this.DgvDataSolution,
-            this.DgvDataPostscript});
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window;
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.GradientInactiveCaption;
-            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.ControlText;
-            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.DgvData.DefaultCellStyle = dataGridViewCellStyle2;
+            this.DgvDataPostscript,
+            this.DgvDataId});
+            dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window;
+            dataGridViewCellStyle1.Font = new System.Drawing.Font("宋体", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.GradientInactiveCaption;
+            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.ControlText;
+            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.DgvData.DefaultCellStyle = dataGridViewCellStyle1;
             this.DgvData.Dock = System.Windows.Forms.DockStyle.Bottom;
             this.DgvData.Location = new System.Drawing.Point(0, 194);
             this.DgvData.Name = "DgvData";
             this.DgvData.ReadOnly = true;
             this.DgvData.RowHeadersVisible = false;
-            this.DgvData.RowTemplate.Height = 23;
+            this.DgvData.RowTemplate.DefaultCellStyle.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.DgvData.RowTemplate.DefaultCellStyle.Padding = new System.Windows.Forms.Padding(2);
+            this.DgvData.RowTemplate.DefaultCellStyle.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.DgvData.RowTemplate.Height = 50;
             this.DgvData.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect;
             this.DgvData.Size = new System.Drawing.Size(700, 206);
             this.DgvData.TabIndex = 31;
+            this.DgvData.CellDoubleClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.DgvData_CellDoubleClick);
             // 
             // panel1
             // 
@@ -181,6 +188,16 @@
             this.panel1.Size = new System.Drawing.Size(677, 37);
             this.panel1.TabIndex = 32;
             // 
+            // BtToday
+            // 
+            this.BtToday.Location = new System.Drawing.Point(601, 7);
+            this.BtToday.Name = "BtToday";
+            this.BtToday.Size = new System.Drawing.Size(55, 23);
+            this.BtToday.TabIndex = 27;
+            this.BtToday.Text = "Today";
+            this.BtToday.UseVisualStyleBackColor = true;
+            this.BtToday.Click += new System.EventHandler(this.BtToday_Click);
+            // 
             // BtSearch
             // 
             this.BtSearch.Location = new System.Drawing.Point(536, 7);
@@ -263,7 +280,6 @@
             // 
             // CbSystem
             // 
-            this.CbSystem.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
             this.CbSystem.FormattingEnabled = true;
             this.CbSystem.Items.AddRange(new object[] {
             "xp",
@@ -357,6 +373,7 @@
             this.DgvDataSystem.Name = "DgvDataSystem";
             this.DgvDataSystem.ReadOnly = true;
             this.DgvDataSystem.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.DgvDataSystem.Width = 50;
             // 
             // DgvDataProblem
             // 
@@ -364,6 +381,7 @@
             this.DgvDataProblem.Name = "DgvDataProblem";
             this.DgvDataProblem.ReadOnly = true;
             this.DgvDataProblem.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.DgvDataProblem.Width = 200;
             // 
             // DgvDataSolution
             // 
@@ -371,6 +389,7 @@
             this.DgvDataSolution.Name = "DgvDataSolution";
             this.DgvDataSolution.ReadOnly = true;
             this.DgvDataSolution.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.DgvDataSolution.Width = 200;
             // 
             // DgvDataPostscript
             // 
@@ -378,16 +397,14 @@
             this.DgvDataPostscript.Name = "DgvDataPostscript";
             this.DgvDataPostscript.ReadOnly = true;
             this.DgvDataPostscript.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
+            this.DgvDataPostscript.Width = 150;
             // 
-            // BtToday
+            // DgvDataId
             // 
-            this.BtToday.Location = new System.Drawing.Point(601, 7);
-            this.BtToday.Name = "BtToday";
-            this.BtToday.Size = new System.Drawing.Size(55, 23);
-            this.BtToday.TabIndex = 27;
-            this.BtToday.Text = "Today";
-            this.BtToday.UseVisualStyleBackColor = true;
-            this.BtToday.Click += new System.EventHandler(this.BtToday_Click);
+            this.DgvDataId.HeaderText = "Id";
+            this.DgvDataId.Name = "DgvDataId";
+            this.DgvDataId.ReadOnly = true;
+            this.DgvDataId.SortMode = System.Windows.Forms.DataGridViewColumnSortMode.NotSortable;
             // 
             // FaultLogInputPartial
             // 
@@ -431,6 +448,7 @@
         private System.Windows.Forms.Button BtAdd;
         private System.Windows.Forms.CheckBox CbIsFinish;
         private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.Button BtToday;
         private System.Windows.Forms.DataGridViewTextBoxColumn DgvDataNo;
         private System.Windows.Forms.DataGridViewTextBoxColumn DgvDataCreateTime;
         private System.Windows.Forms.DataGridViewTextBoxColumn DgvDataFinishTime;
@@ -441,6 +459,6 @@
         private System.Windows.Forms.DataGridViewTextBoxColumn DgvDataProblem;
         private System.Windows.Forms.DataGridViewTextBoxColumn DgvDataSolution;
         private System.Windows.Forms.DataGridViewTextBoxColumn DgvDataPostscript;
-        private System.Windows.Forms.Button BtToday;
+        private System.Windows.Forms.DataGridViewTextBoxColumn DgvDataId;
     }
 }

+ 64 - 3
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogInputPartial.cs

@@ -10,6 +10,7 @@ using Oreo.FaultLog.DatabaseEngine;
 using Oreo.FaultLog.Models;
 using Y.Utils.DataUtils.Collections;
 using System.Threading.Tasks;
+using Oreo.FaultLog.Views;
 
 namespace Oreo.FaultLog.Partials
 {
@@ -34,7 +35,9 @@ namespace Oreo.FaultLog.Partials
             {
                 using (var db = new Muse())
                 {
-                    var fls = db.Do<FaultLogs>().SqlQuery("SELECT * FROM faultlogs WHERE createtime LIKE @p0", DateTime.Now.ToString("yyyy-MM-dd") + "%");
+                    var first = db.Get<FaultLogs>(x => x.Id > 0, null);
+
+                    List<FaultLogs> fls = db.Do<FaultLogs>().SqlQuery("SELECT * FROM faultlogs WHERE createtime LIKE @p0", DateTime.Now.ToString("yyyy-MM-dd") + "%").ToList();
                     if (ListTool.HasElements(fls))
                     {
                         foreach (var f in fls)
@@ -102,6 +105,13 @@ namespace Oreo.FaultLog.Partials
                 System = CbSystem.Text,
                 CreateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"),
             };
+
+            TbIp.Text = "";
+            TbPhone.Text = "";
+            TbAddress.Text = "";
+            TbProblem.Text = "";
+            TbSolution.Text = "";
+            TbPostscript.Text = "";
             DgvData.Rows.Clear();
 
             Task.Factory.StartNew(() =>
@@ -129,7 +139,27 @@ namespace Oreo.FaultLog.Partials
                 UIAddButton(true);
             });
         }
-
+        private void DgvData_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
+        {
+            if (e.RowIndex >= 0)
+            {
+                //int id = (int)DgvData.Rows[e.RowIndex].Cells["DgvDataId"].Value;
+                //MessageBox.Show(id.ToString());
+                try
+                {
+                    int id = (int)DgvData.Rows[e.RowIndex].Cells["DgvDataId"].Value;
+                    if (new ModifyForm(id).ShowDialog() == DialogResult.OK)
+                    {
+                        using (var db = new Muse())
+                        {
+                            FaultLogs f = db.Get<FaultLogs>(x => x.Id == id, null);
+                            if (f != null) UIRefreshRow(e.RowIndex, f);
+                        }
+                    }
+                }
+                catch (Exception ex) { }
+            }
+        }
 
         void UIAddRow(FaultLogs f)
         {
@@ -145,9 +175,40 @@ namespace Oreo.FaultLog.Partials
                     f.System,
                     f.Problem,
                     f.Solution,
-                    f.Postscript
+                    f.Postscript,
+                    f.Id
+                });
+            }));
+        }
+        void UIRefreshRow(int row, FaultLogs f)
+        {
+            BeginInvoke(new Action(() =>
+            {
+                DgvData.Rows[row].SetValues(new object[] {
+                    DgvData.Rows.Count+1,
+                    f.CreateTime,
+                    f.FinishTime,
+                    f.Ip,
+                    f.Phone,
+                    f.Address,
+                    f.System,
+                    f.Problem,
+                    f.Solution,
+                    f.Postscript,
+                    f.Id
                 });
             }));
+            //            DgvData.Rows[row].Cells["DgvDataNo
+            // DgvData.Rows[row].Cells["DgvDataCreateTime
+            //DgvData.Rows[row].Cells["DgvDataFinishTime
+            //DgvData.Rows[row].Cells["DgvDataIp
+            //DgvData.Rows[row].Cells["DgvDataPhone
+            //DgvData.Rows[row].Cells["DgvDataAddress
+            //DgvData.Rows[row].Cells["DgvDataSystem
+            //DgvData.Rows[row].Cells["DgvDataProblem
+            //DgvData.Rows[row].Cells["DgvDataSolution
+            //DgvData.Rows[row].Cells["DgvDataPostscript
+            //DgvData.Rows[row].Cells["DgvDataId
         }
         void UIAddButton(bool enable)
         {

+ 3 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogInputPartial.resx

@@ -147,4 +147,7 @@
   <metadata name="DgvDataPostscript.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="DgvDataId.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
 </root>

+ 272 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogModifyPartial.Designer.cs

@@ -0,0 +1,272 @@
+namespace Oreo.FaultLog.Partials
+{
+    partial class FaultLogModifyPartial
+    {
+        /// <summary> 
+        /// 必需的设计器变量。
+        /// </summary>
+        private System.ComponentModel.IContainer components = null;
+
+        /// <summary> 
+        /// 清理所有正在使用的资源。
+        /// </summary>
+        /// <param name="disposing">如果应释放托管资源,为 true;否则为 false。</param>
+        protected override void Dispose(bool disposing)
+        {
+            if (disposing && (components != null))
+            {
+                components.Dispose();
+            }
+            base.Dispose(disposing);
+        }
+
+        #region 组件设计器生成的代码
+
+        /// <summary> 
+        /// 设计器支持所需的方法 - 不要修改
+        /// 使用代码编辑器修改此方法的内容。
+        /// </summary>
+        private void InitializeComponent()
+        {
+            this.panel2 = new System.Windows.Forms.Panel();
+            this.CbIsFinish = new System.Windows.Forms.CheckBox();
+            this.label4 = new System.Windows.Forms.Label();
+            this.CbSystem = new System.Windows.Forms.ComboBox();
+            this.TbPostscript = new System.Windows.Forms.TextBox();
+            this.TbSolution = new System.Windows.Forms.TextBox();
+            this.TbProblem = new System.Windows.Forms.TextBox();
+            this.label8 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label6 = new System.Windows.Forms.Label();
+            this.label5 = new System.Windows.Forms.Label();
+            this.panel1 = new System.Windows.Forms.Panel();
+            this.TbAddress = new System.Windows.Forms.TextBox();
+            this.TbPhone = new System.Windows.Forms.TextBox();
+            this.TbIp = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.label7 = new System.Windows.Forms.Label();
+            this.panel2.SuspendLayout();
+            this.panel1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // panel2
+            // 
+            this.panel2.Controls.Add(this.CbIsFinish);
+            this.panel2.Controls.Add(this.label4);
+            this.panel2.Controls.Add(this.CbSystem);
+            this.panel2.Controls.Add(this.TbPostscript);
+            this.panel2.Controls.Add(this.TbSolution);
+            this.panel2.Controls.Add(this.TbProblem);
+            this.panel2.Controls.Add(this.label8);
+            this.panel2.Controls.Add(this.label3);
+            this.panel2.Controls.Add(this.label6);
+            this.panel2.Controls.Add(this.label5);
+            this.panel2.Location = new System.Drawing.Point(12, 56);
+            this.panel2.Name = "panel2";
+            this.panel2.Size = new System.Drawing.Size(677, 200);
+            this.panel2.TabIndex = 35;
+            // 
+            // CbIsFinish
+            // 
+            this.CbIsFinish.AutoSize = true;
+            this.CbIsFinish.Location = new System.Drawing.Point(392, 140);
+            this.CbIsFinish.Name = "CbIsFinish";
+            this.CbIsFinish.Size = new System.Drawing.Size(15, 14);
+            this.CbIsFinish.TabIndex = 30;
+            this.CbIsFinish.UseVisualStyleBackColor = true;
+            // 
+            // label4
+            // 
+            this.label4.AutoSize = true;
+            this.label4.Location = new System.Drawing.Point(351, 141);
+            this.label4.Name = "label4";
+            this.label4.Size = new System.Drawing.Size(35, 12);
+            this.label4.TabIndex = 29;
+            this.label4.Text = "解决:";
+            // 
+            // CbSystem
+            // 
+            this.CbSystem.FormattingEnabled = true;
+            this.CbSystem.Items.AddRange(new object[] {
+            "xp",
+            "win7"});
+            this.CbSystem.Location = new System.Drawing.Point(392, 109);
+            this.CbSystem.Name = "CbSystem";
+            this.CbSystem.Size = new System.Drawing.Size(100, 20);
+            this.CbSystem.TabIndex = 27;
+            // 
+            // TbPostscript
+            // 
+            this.TbPostscript.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.TbPostscript.Location = new System.Drawing.Point(62, 106);
+            this.TbPostscript.Multiline = true;
+            this.TbPostscript.Name = "TbPostscript";
+            this.TbPostscript.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+            this.TbPostscript.Size = new System.Drawing.Size(254, 79);
+            this.TbPostscript.TabIndex = 26;
+            this.TbPostscript.Text = "备注\r\n备注";
+            // 
+            // TbSolution
+            // 
+            this.TbSolution.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.TbSolution.Location = new System.Drawing.Point(392, 13);
+            this.TbSolution.Multiline = true;
+            this.TbSolution.Name = "TbSolution";
+            this.TbSolution.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+            this.TbSolution.Size = new System.Drawing.Size(254, 79);
+            this.TbSolution.TabIndex = 25;
+            this.TbSolution.Text = "解决\r\n解决";
+            // 
+            // TbProblem
+            // 
+            this.TbProblem.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.TbProblem.Location = new System.Drawing.Point(62, 13);
+            this.TbProblem.Multiline = true;
+            this.TbProblem.Name = "TbProblem";
+            this.TbProblem.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
+            this.TbProblem.Size = new System.Drawing.Size(254, 79);
+            this.TbProblem.TabIndex = 24;
+            this.TbProblem.Text = "问题\r\n问题";
+            // 
+            // label8
+            // 
+            this.label8.AutoSize = true;
+            this.label8.Location = new System.Drawing.Point(21, 19);
+            this.label8.Name = "label8";
+            this.label8.Size = new System.Drawing.Size(35, 12);
+            this.label8.TabIndex = 23;
+            this.label8.Text = "问题:";
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(351, 19);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(35, 12);
+            this.label3.TabIndex = 19;
+            this.label3.Text = "解决:";
+            // 
+            // label6
+            // 
+            this.label6.AutoSize = true;
+            this.label6.Location = new System.Drawing.Point(21, 109);
+            this.label6.Name = "label6";
+            this.label6.Size = new System.Drawing.Size(35, 12);
+            this.label6.TabIndex = 21;
+            this.label6.Text = "备注:";
+            // 
+            // label5
+            // 
+            this.label5.AutoSize = true;
+            this.label5.Location = new System.Drawing.Point(351, 112);
+            this.label5.Name = "label5";
+            this.label5.Size = new System.Drawing.Size(35, 12);
+            this.label5.TabIndex = 20;
+            this.label5.Text = "系统:";
+            // 
+            // panel1
+            // 
+            this.panel1.BackColor = System.Drawing.Color.LightGray;
+            this.panel1.Controls.Add(this.TbAddress);
+            this.panel1.Controls.Add(this.TbPhone);
+            this.panel1.Controls.Add(this.TbIp);
+            this.panel1.Controls.Add(this.label1);
+            this.panel1.Controls.Add(this.label2);
+            this.panel1.Controls.Add(this.label7);
+            this.panel1.Location = new System.Drawing.Point(12, 13);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(677, 37);
+            this.panel1.TabIndex = 34;
+            // 
+            // TbAddress
+            // 
+            this.TbAddress.Location = new System.Drawing.Point(537, 8);
+            this.TbAddress.Name = "TbAddress";
+            this.TbAddress.Size = new System.Drawing.Size(100, 21);
+            this.TbAddress.TabIndex = 25;
+            this.TbAddress.Text = "青岛市李沧区";
+            // 
+            // TbPhone
+            // 
+            this.TbPhone.Location = new System.Drawing.Point(302, 8);
+            this.TbPhone.Name = "TbPhone";
+            this.TbPhone.Size = new System.Drawing.Size(100, 21);
+            this.TbPhone.TabIndex = 24;
+            this.TbPhone.Text = "13612341234";
+            // 
+            // TbIp
+            // 
+            this.TbIp.Location = new System.Drawing.Point(61, 8);
+            this.TbIp.Name = "TbIp";
+            this.TbIp.Size = new System.Drawing.Size(100, 21);
+            this.TbIp.TabIndex = 23;
+            this.TbIp.Text = "192.168.100.100";
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(502, 12);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(35, 12);
+            this.label1.TabIndex = 17;
+            this.label1.Text = "地址:";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(38, 12);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(23, 12);
+            this.label2.TabIndex = 18;
+            this.label2.Text = "IP:";
+            // 
+            // label7
+            // 
+            this.label7.AutoSize = true;
+            this.label7.Location = new System.Drawing.Point(267, 12);
+            this.label7.Name = "label7";
+            this.label7.Size = new System.Drawing.Size(35, 12);
+            this.label7.TabIndex = 22;
+            this.label7.Text = "电话:";
+            // 
+            // FaultLogModifyPartial
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.White;
+            this.Controls.Add(this.panel2);
+            this.Controls.Add(this.panel1);
+            this.Name = "FaultLogModifyPartial";
+            this.Size = new System.Drawing.Size(700, 271);
+            this.Load += new System.EventHandler(this.FaultLogModifyPartial_Load);
+            this.panel2.ResumeLayout(false);
+            this.panel2.PerformLayout();
+            this.panel1.ResumeLayout(false);
+            this.panel1.PerformLayout();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel panel2;
+        private System.Windows.Forms.CheckBox CbIsFinish;
+        private System.Windows.Forms.Label label4;
+        private System.Windows.Forms.ComboBox CbSystem;
+        private System.Windows.Forms.TextBox TbPostscript;
+        private System.Windows.Forms.TextBox TbSolution;
+        private System.Windows.Forms.TextBox TbProblem;
+        private System.Windows.Forms.Label label8;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label6;
+        private System.Windows.Forms.Label label5;
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.TextBox TbAddress;
+        private System.Windows.Forms.TextBox TbPhone;
+        private System.Windows.Forms.TextBox TbIp;
+        private System.Windows.Forms.Label label1;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.Label label7;
+    }
+}

+ 75 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogModifyPartial.cs

@@ -0,0 +1,75 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Linq;
+using System.Text;
+using System.Windows.Forms;
+using Oreo.FaultLog.Models;
+using Oreo.FaultLog.DatabaseEngine;
+
+namespace Oreo.FaultLog.Partials
+{
+    public partial class FaultLogModifyPartial : UserControl
+    {
+        public int Id { get; set; }
+        public FaultLogModifyPartial()
+        {
+            InitializeComponent();
+        }
+
+        private void FaultLogModifyPartial_Load(object sender, EventArgs e)
+        {
+        }
+        public void InitInfo(int id)
+        {
+            Id = id;
+            using (var db = new Muse())
+            {
+                FaultLogs faultLog = db.Get<FaultLogs>(x => x.Id == id, null);
+                if (faultLog != null)
+                {
+                    TbIp.Text = faultLog.Ip;
+                    TbPhone.Text = faultLog.Phone;
+                    TbAddress.Text = faultLog.Address;
+                    TbProblem.Text = faultLog.Problem;
+                    TbSolution.Text = faultLog.Solution;
+                    TbPostscript.Text = faultLog.Postscript;
+                    CbSystem.Text = faultLog.System;
+                    if (faultLog.IsFinish) CbIsFinish.Checked = true;
+                }
+            }
+        }
+        public bool SaveInfo()
+        {
+            using (var db = new Muse())
+            {
+                FaultLogs fl = db.Get<FaultLogs>(x => x.Id == Id, null);
+                if (fl != null)
+                {
+                    fl.Address = TbAddress.Text;
+                    fl.Ip = TbIp.Text;
+                    fl.Phone = TbPhone.Text;
+                    fl.Postscript = TbPostscript.Text;
+                    fl.Problem = TbProblem.Text;
+                    fl.Solution = TbSolution.Text;
+                    fl.System = CbSystem.Text;
+                    if (CbIsFinish.Checked && !fl.IsFinish)
+                    {
+                        fl.IsFinish = true;
+                        fl.FinishTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
+                    }
+                    else
+                    {
+                        fl.IsFinish = false;
+                        fl.FinishTime = "";
+                    }
+                    int flag = db.Update(fl, true);
+                    return flag > 0;
+                }
+            }
+            return false;
+        }
+    }
+}

+ 120 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Partials/FaultLogModifyPartial.resx

@@ -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>

+ 25 - 33
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Properties/Resources.Designer.cs

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

+ 13 - 17
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Properties/Settings.Designer.cs

@@ -1,28 +1,24 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-namespace Oreo.FaultLog.Properties
-{
-
-
+namespace Oreo.FaultLog.Properties {
+    
+    
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.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
-            {
+        
+        public static Settings Default {
+            get {
                 return defaultInstance;
             }
         }

+ 43 - 11
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/MainForm.Designer.cs

@@ -29,10 +29,12 @@
         private void InitializeComponent()
         {
             this.PnMain = new System.Windows.Forms.Panel();
-            this.faultLogInputPartial1 = new Oreo.FaultLog.Partials.FaultLogInputPartial();
             this.PnBottom = new System.Windows.Forms.Panel();
             this.LbAppVersion = new System.Windows.Forms.Label();
             this.LbAppTitle = new System.Windows.Forms.Label();
+            this.BtClose = new System.Windows.Forms.Button();
+            this.BtMin = new System.Windows.Forms.Button();
+            this.faultLogInputPartial1 = new Oreo.FaultLog.Partials.FaultLogInputPartial();
             this.PnMain.SuspendLayout();
             this.PnBottom.SuspendLayout();
             this.SuspendLayout();
@@ -47,15 +49,6 @@
             this.PnMain.Size = new System.Drawing.Size(700, 427);
             this.PnMain.TabIndex = 5;
             // 
-            // faultLogInputPartial1
-            // 
-            this.faultLogInputPartial1.BackColor = System.Drawing.Color.White;
-            this.faultLogInputPartial1.Dock = System.Windows.Forms.DockStyle.Fill;
-            this.faultLogInputPartial1.Location = new System.Drawing.Point(0, 0);
-            this.faultLogInputPartial1.Name = "faultLogInputPartial1";
-            this.faultLogInputPartial1.Size = new System.Drawing.Size(700, 400);
-            this.faultLogInputPartial1.TabIndex = 7;
-            // 
             // PnBottom
             // 
             this.PnBottom.Controls.Add(this.LbAppVersion);
@@ -68,7 +61,7 @@
             // LbAppVersion
             // 
             this.LbAppVersion.ForeColor = System.Drawing.Color.White;
-            this.LbAppVersion.Location = new System.Drawing.Point(450, 4);
+            this.LbAppVersion.Location = new System.Drawing.Point(553, 4);
             this.LbAppVersion.Name = "LbAppVersion";
             this.LbAppVersion.Size = new System.Drawing.Size(140, 19);
             this.LbAppVersion.TabIndex = 0;
@@ -87,12 +80,49 @@
             this.LbAppTitle.Text = "Logggg";
             this.LbAppTitle.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
             // 
+            // BtClose
+            // 
+            this.BtClose.FlatAppearance.BorderSize = 0;
+            this.BtClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.BtClose.ForeColor = System.Drawing.Color.White;
+            this.BtClose.Location = new System.Drawing.Point(667, 9);
+            this.BtClose.Name = "BtClose";
+            this.BtClose.Size = new System.Drawing.Size(26, 23);
+            this.BtClose.TabIndex = 6;
+            this.BtClose.Text = "X";
+            this.BtClose.UseVisualStyleBackColor = true;
+            this.BtClose.Click += new System.EventHandler(this.BtClose_Click);
+            // 
+            // BtMin
+            // 
+            this.BtMin.FlatAppearance.BorderSize = 0;
+            this.BtMin.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.BtMin.ForeColor = System.Drawing.Color.White;
+            this.BtMin.Location = new System.Drawing.Point(639, 9);
+            this.BtMin.Name = "BtMin";
+            this.BtMin.Size = new System.Drawing.Size(26, 23);
+            this.BtMin.TabIndex = 7;
+            this.BtMin.Text = "-";
+            this.BtMin.UseVisualStyleBackColor = true;
+            this.BtMin.Click += new System.EventHandler(this.BtMin_Click);
+            // 
+            // faultLogInputPartial1
+            // 
+            this.faultLogInputPartial1.BackColor = System.Drawing.Color.White;
+            this.faultLogInputPartial1.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.faultLogInputPartial1.Location = new System.Drawing.Point(0, 0);
+            this.faultLogInputPartial1.Name = "faultLogInputPartial1";
+            this.faultLogInputPartial1.Size = new System.Drawing.Size(700, 400);
+            this.faultLogInputPartial1.TabIndex = 7;
+            // 
             // MainForm
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackColor = System.Drawing.Color.Salmon;
             this.ClientSize = new System.Drawing.Size(700, 485);
+            this.Controls.Add(this.BtMin);
+            this.Controls.Add(this.BtClose);
             this.Controls.Add(this.LbAppTitle);
             this.Controls.Add(this.PnMain);
             this.Name = "MainForm";
@@ -112,5 +142,7 @@
         private Partials.FaultLogInputPartial faultLogInputPartial1;
         private System.Windows.Forms.Label LbAppVersion;
         private System.Windows.Forms.Label LbAppTitle;
+        private System.Windows.Forms.Button BtClose;
+        private System.Windows.Forms.Button BtMin;
     }
 }

+ 10 - 6
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/MainForm.cs

@@ -1,10 +1,4 @@
 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 Y.Skin.YoForm.NoTitle;
 
@@ -21,5 +15,15 @@ namespace Oreo.FaultLog.Views
         {
             LbAppVersion.Text = string.Format("当前版本:{0}", Application.ProductVersion);
         }
+
+        private void BtMin_Click(object sender, EventArgs e)
+        {
+            WindowState = FormWindowState.Minimized;
+        }
+
+        private void BtClose_Click(object sender, EventArgs e)
+        {
+            Close();
+        }
     }
 }

+ 109 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/ModifyForm.Designer.cs

@@ -0,0 +1,109 @@
+namespace Oreo.FaultLog.Views
+{
+    partial class ModifyForm
+    {
+        /// <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.panel1 = new System.Windows.Forms.Panel();
+            this.BtSave = new System.Windows.Forms.Button();
+            this.faultLogModifyPartial1 = new Oreo.FaultLog.Partials.FaultLogModifyPartial();
+            this.BtCancel = new System.Windows.Forms.Button();
+            this.panel1.SuspendLayout();
+            this.SuspendLayout();
+            // 
+            // panel1
+            // 
+            this.panel1.Controls.Add(this.BtSave);
+            this.panel1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.panel1.Location = new System.Drawing.Point(0, 328);
+            this.panel1.Name = "panel1";
+            this.panel1.Size = new System.Drawing.Size(700, 33);
+            this.panel1.TabIndex = 5;
+            // 
+            // BtSave
+            // 
+            this.BtSave.FlatAppearance.BorderSize = 0;
+            this.BtSave.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.BtSave.ForeColor = System.Drawing.Color.White;
+            this.BtSave.Location = new System.Drawing.Point(223, 6);
+            this.BtSave.Name = "BtSave";
+            this.BtSave.Size = new System.Drawing.Size(301, 23);
+            this.BtSave.TabIndex = 0;
+            this.BtSave.Text = "保存";
+            this.BtSave.UseVisualStyleBackColor = true;
+            this.BtSave.Click += new System.EventHandler(this.BtSave_Click);
+            // 
+            // faultLogModifyPartial1
+            // 
+            this.faultLogModifyPartial1.BackColor = System.Drawing.Color.White;
+            this.faultLogModifyPartial1.Dock = System.Windows.Forms.DockStyle.Bottom;
+            this.faultLogModifyPartial1.Id = 0;
+            this.faultLogModifyPartial1.Location = new System.Drawing.Point(0, 57);
+            this.faultLogModifyPartial1.Name = "faultLogModifyPartial1";
+            this.faultLogModifyPartial1.Size = new System.Drawing.Size(700, 271);
+            this.faultLogModifyPartial1.TabIndex = 6;
+            // 
+            // BtCancel
+            // 
+            this.BtCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel;
+            this.BtCancel.FlatAppearance.BorderSize = 0;
+            this.BtCancel.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+            this.BtCancel.ForeColor = System.Drawing.Color.White;
+            this.BtCancel.Location = new System.Drawing.Point(657, 12);
+            this.BtCancel.Name = "BtCancel";
+            this.BtCancel.Size = new System.Drawing.Size(31, 23);
+            this.BtCancel.TabIndex = 1;
+            this.BtCancel.Text = "X";
+            this.BtCancel.UseVisualStyleBackColor = true;
+            this.BtCancel.Click += new System.EventHandler(this.BtCancel_Click);
+            // 
+            // ModifyForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.BackColor = System.Drawing.Color.Salmon;
+            this.CancelButton = this.BtCancel;
+            this.ClientSize = new System.Drawing.Size(700, 361);
+            this.Controls.Add(this.BtCancel);
+            this.Controls.Add(this.faultLogModifyPartial1);
+            this.Controls.Add(this.panel1);
+            this.Name = "ModifyForm";
+            this.Text = "ModifyForm";
+            this.Load += new System.EventHandler(this.ModifyForm_Load);
+            this.panel1.ResumeLayout(false);
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private System.Windows.Forms.Panel panel1;
+        private System.Windows.Forms.Button BtSave;
+        private Partials.FaultLogModifyPartial faultLogModifyPartial1;
+        private System.Windows.Forms.Button BtCancel;
+    }
+}

+ 48 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/ModifyForm.cs

@@ -0,0 +1,48 @@
+using Oreo.FaultLog.Models;
+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 Y.Skin.YoForm.NoTitle;
+
+namespace Oreo.FaultLog.Views
+{
+    public partial class ModifyForm : NoTitleForm
+    {
+        public int Id { get; set; }
+        public ModifyForm(int id)
+        {
+            InitializeComponent();
+            Id = id;
+        }
+
+        private void ModifyForm_Load(object sender, EventArgs e)
+        {
+            faultLogModifyPartial1.InitInfo(Id);
+        }
+
+        private void BtSave_Click(object sender, EventArgs e)
+        {
+            if (faultLogModifyPartial1.SaveInfo())
+            {
+                DialogResult = DialogResult.OK;
+                Close();
+            }
+            else
+            {
+                DialogResult = DialogResult.No;
+                Close();
+            }
+        }
+
+        private void BtCancel_Click(object sender, EventArgs e)
+        {
+            DialogResult = DialogResult.Cancel;
+            Close();
+        }
+    }
+}

+ 120 - 0
Fork.Net/Oreo.Plugins/Oreo.FaultLog/Views/ModifyForm.resx

@@ -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>

+ 5 - 5
Fork.Net/Oreo.Plugins/Oreo.FaultLog/packages.config

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="EntityFramework" version="6.1.3" targetFramework="net40" />
-  <package id="SQLite.CodeFirst" version="1.3.1.18" targetFramework="net40" />
+  <package id="EntityFramework" version="6.1.3" targetFramework="net40" requireReinstallation="true" />
+  <package id="SQLite.CodeFirst" version="1.3.1.18" targetFramework="net40" requireReinstallation="true" />
   <package id="System.Data.SQLite" version="1.0.105.2" targetFramework="net40" />
-  <package id="System.Data.SQLite.Core" version="1.0.105.2" targetFramework="net40" />
-  <package id="System.Data.SQLite.EF6" version="1.0.105.2" targetFramework="net40" />
+  <package id="System.Data.SQLite.Core" version="1.0.105.2" targetFramework="net40" requireReinstallation="true" />
+  <package id="System.Data.SQLite.EF6" version="1.0.105.2" targetFramework="net40" requireReinstallation="true" />
   <package id="System.Data.SQLite.EF6.Migrations" version="1.0.104" targetFramework="net40" />
-  <package id="System.Data.SQLite.Linq" version="1.0.105.2" targetFramework="net40" />
+  <package id="System.Data.SQLite.Linq" version="1.0.105.2" targetFramework="net40" requireReinstallation="true" />
 </packages>

+ 18 - 19
Fork.Net/Oreo.Plugins/Oreo.FileMan/App.config

@@ -1,43 +1,42 @@
-<?xml version="1.0" encoding="utf-8"?>
+<?xml version="1.0" encoding="utf-8"?>
 <configuration>
   <configSections>
+    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
     <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
-    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
   </configSections>
   <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.1" />
+    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
   </startup>
   <connectionStrings>
-    <add name="DefaultConnection" connectionString="data source=|DataDirectory|\files.db" providerName="System.Data.SQLite" />
+    <add name="DefaultConnection" connectionString="data source=|DataDirectory|\files.db" providerName="System.Data.SQLite"/>
   </connectionStrings>
   <entityFramework>
     <defaultConnectionFactory type="System.Data.Entity.Infrastructure.LocalDbConnectionFactory, EntityFramework">
       <parameters>
-        <parameter value="mssqllocaldb" />
+        <parameter value="mssqllocaldb"/>
       </parameters>
     </defaultConnectionFactory>
     <providers>
-      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
-      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
-      <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6" />
+      <provider invariantName="System.Data.SQLite.EF6" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
+      <provider invariantName="System.Data.SQLite" type="System.Data.SQLite.EF6.SQLiteProviderServices, System.Data.SQLite.EF6"/>
+      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer"/>
     </providers>
   </entityFramework>
-  <system.data>
-    <DbProviderFactories>
-      <remove invariant="System.Data.SQLite.EF6" />
-      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6" />
-    <remove invariant="System.Data.SQLite" /><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite" /></DbProviderFactories>
-  </system.data>
   <runtime>
     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
       <dependentAssembly>
-        <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2" />
+        <assemblyIdentity name="System.Data.SQLite" publicKeyToken="db937bc2d44ff139" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2"/>
       </dependentAssembly>
       <dependentAssembly>
-        <assemblyIdentity name="System.Data.SQLite.EF6" publicKeyToken="db937bc2d44ff139" culture="neutral" />
-        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2" />
+        <assemblyIdentity name="System.Data.SQLite.EF6" publicKeyToken="db937bc2d44ff139" culture="neutral"/>
+        <bindingRedirect oldVersion="0.0.0.0-1.0.105.2" newVersion="1.0.105.2"/>
       </dependentAssembly>
     </assemblyBinding>
   </runtime>
-</configuration>
+<system.data>
+    <DbProviderFactories>
+      <remove invariant="System.Data.SQLite.EF6"/>
+      <add name="SQLite Data Provider (Entity Framework 6)" invariant="System.Data.SQLite.EF6" description=".NET Framework Data Provider for SQLite (Entity Framework 6)" type="System.Data.SQLite.EF6.SQLiteProviderFactory, System.Data.SQLite.EF6"/>
+    <remove invariant="System.Data.SQLite"/><add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".NET Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite"/></DbProviderFactories>
+  </system.data></configuration>

+ 14 - 0
Fork.Net/Oreo.Plugins/Oreo.FileMan/DatabaseEngine/Configuration.cs

@@ -0,0 +1,14 @@
+namespace Oreo.FileMan.DatabaseEngine
+{
+    //public class Configuration : DbMigrationsConfiguration<SuperDb>
+    //{
+    //    public Configuration()
+    //    {
+    //        AutomaticMigrationsEnabled = true;
+    //        AutomaticMigrationDataLossAllowed = true;
+    //        SetSqlGenerator("System.Data.SQLite", new SQLiteMigrationSqlGenerator());
+    //    }
+    //    protected override void Seed(SuperDb context)
+    //    { }
+    //}
+}

+ 7 - 4
Fork.Net/Oreo.Plugins/Oreo.FileMan/DatabaseEngine/SuperDb.cs

@@ -14,9 +14,9 @@ namespace Oreo.FileMan.DatabaseEngine
 {
     public class SuperDb : DbContext
     {
-        public SuperDb()
-            : base(@"DefaultConnection")
+        public SuperDb() : base(@"DefaultConnection")
         {
+            //Database.SetInitializer(new MigrateDatabaseToLatestVersion<SuperDb, Configuration>());
         }
 
         protected override void OnModelCreating(DbModelBuilder modelBuilder)
@@ -27,10 +27,13 @@ namespace Oreo.FileMan.DatabaseEngine
             Database.SetInitializer(new MyDbInitializer(Database.Connection.ConnectionString, modelBuilder));
         }
 
-        public class MyDbInitializer : SqliteDropCreateDatabaseWhenModelChanges<SuperDb>//SqliteDropCreateDatabaseAlways
+        public class MyDbInitializer : SqliteCreateDatabaseIfNotExists<SuperDb>//SqliteDropCreateDatabaseAlways
         {
             public MyDbInitializer(string connectionString, DbModelBuilder modelBuilder)
-                : base(modelBuilder) { }
+                : base(modelBuilder)
+            {
+                //Database.SetInitializer(new MigrateDatabaseToLatestVersion<SuperDb, Configuration>());
+            }
 
             protected override void Seed(SuperDb context)
             {

+ 14 - 0
Fork.Net/Oreo.Plugins/Oreo.FileMan/Models/Backups.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace Oreo.FileMan.Models
+{
+    public class Backups
+    {
+        public int Id { get; set; }
+        public string FileName { get; set; }
+        public string FullFileName { get; set; }
+    }
+}

+ 15 - 11
Fork.Net/Oreo.Plugins/Oreo.FileMan/Oreo.FileMan.csproj

@@ -9,11 +9,12 @@
     <AppDesignerFolder>Properties</AppDesignerFolder>
     <RootNamespace>Oreo.FileMan</RootNamespace>
     <AssemblyName>Oreo.FileMan</AssemblyName>
-    <TargetFrameworkVersion>v4.6.1</TargetFrameworkVersion>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>
     <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
     <NuGetPackageImportStamp>
     </NuGetPackageImportStamp>
+    <TargetFrameworkProfile />
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -25,6 +26,7 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
     <UseVSHostingProcess>false</UseVSHostingProcess>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     <PlatformTarget>AnyCPU</PlatformTarget>
@@ -34,6 +36,7 @@
     <DefineConstants>TRACE</DefineConstants>
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
+    <Prefer32Bit>false</Prefer32Bit>
   </PropertyGroup>
   <PropertyGroup>
     <ApplicationIcon>Images\Icon\Icon.ico</ApplicationIcon>
@@ -43,15 +46,15 @@
   </PropertyGroup>
   <ItemGroup>
     <Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.dll</HintPath>
+      <HintPath>..\..\packages\EntityFramework.6.1.3\lib\net40\EntityFramework.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\EntityFramework.6.1.3\lib\net45\EntityFramework.SqlServer.dll</HintPath>
+      <HintPath>..\..\packages\EntityFramework.6.1.3\lib\net40\EntityFramework.SqlServer.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="SQLite.CodeFirst, Version=1.3.1.18, Culture=neutral, PublicKeyToken=eb96ba0a78d831a7, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\SQLite.CodeFirst.1.3.1.18\lib\net45\SQLite.CodeFirst.dll</HintPath>
+      <HintPath>..\..\packages\SQLite.CodeFirst.1.3.1.18\lib\net40\SQLite.CodeFirst.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="System" />
@@ -59,11 +62,11 @@
     <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
     <Reference Include="System.Data.SQLite, Version=1.0.105.2, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.105.2\lib\net46\System.Data.SQLite.dll</HintPath>
+      <HintPath>..\..\packages\System.Data.SQLite.Core.1.0.105.2\lib\net40\System.Data.SQLite.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="System.Data.SQLite.EF6, Version=1.0.105.2, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.105.2\lib\net46\System.Data.SQLite.EF6.dll</HintPath>
+      <HintPath>..\..\packages\System.Data.SQLite.EF6.1.0.105.2\lib\net40\System.Data.SQLite.EF6.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="System.Data.SQLite.EF6.Migrations, Version=1.0.104.0, Culture=neutral, processorArchitecture=MSIL">
@@ -71,7 +74,7 @@
       <Private>True</Private>
     </Reference>
     <Reference Include="System.Data.SQLite.Linq, Version=1.0.105.2, Culture=neutral, PublicKeyToken=db937bc2d44ff139, processorArchitecture=MSIL">
-      <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.105.2\lib\net46\System.Data.SQLite.Linq.dll</HintPath>
+      <HintPath>..\..\packages\System.Data.SQLite.Linq.1.0.105.2\lib\net40\System.Data.SQLite.Linq.dll</HintPath>
       <Private>True</Private>
     </Reference>
     <Reference Include="System.Xml.Linq" />
@@ -80,15 +83,16 @@
     <Reference Include="System.Data" />
     <Reference Include="System.Deployment" />
     <Reference Include="System.Drawing" />
-    <Reference Include="System.Net.Http" />
     <Reference Include="System.Windows.Forms" />
     <Reference Include="System.Xml" />
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Commons\R.cs" />
+    <Compile Include="DatabaseEngine\Configuration.cs" />
     <Compile Include="DatabaseEngine\Mapping.cs" />
     <Compile Include="DatabaseEngine\Muse.cs" />
     <Compile Include="DatabaseEngine\SuperDb.cs" />
+    <Compile Include="Models\Backups.cs" />
     <Compile Include="Models\Drives.cs" />
     <Compile Include="Models\Files.cs" />
     <Compile Include="Partials\FileBackupPartial.cs">
@@ -154,10 +158,10 @@
     <EmbeddedResource Include="Views\MainForm.resx">
       <DependentUpon>MainForm.cs</DependentUpon>
     </EmbeddedResource>
+    <None Include="packages.config" />
     <None Include="Properties\app.manifest">
       <SubType>Designer</SubType>
     </None>
-    <None Include="packages.config" />
     <None Include="Properties\Settings.settings">
       <Generator>SettingsSingleFileGenerator</Generator>
       <LastGenOutput>Settings.Designer.cs</LastGenOutput>
@@ -211,12 +215,12 @@
     <Content Include="Images\WaitingGif\Wait-Hor.gif" />
   </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
-  <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.105.2\build\net46\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.105.2\build\net46\System.Data.SQLite.Core.targets')" />
+  <Import Project="..\..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets" Condition="Exists('..\..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets')" />
   <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
     <PropertyGroup>
       <ErrorText>这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。</ErrorText>
     </PropertyGroup>
-    <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.105.2\build\net46\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.105.2\build\net46\System.Data.SQLite.Core.targets'))" />
+    <Error Condition="!Exists('..\..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\System.Data.SQLite.Core.1.0.105.2\build\net40\System.Data.SQLite.Core.targets'))" />
   </Target>
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
        Other similar extension points exist, see Microsoft.Common.targets.

+ 13 - 0
Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileBackupPartial.Designer.cs

@@ -41,6 +41,7 @@
             this.button1 = new System.Windows.Forms.Button();
             this.textBox1 = new System.Windows.Forms.TextBox();
             this.button2 = new System.Windows.Forms.Button();
+            this.BtDelFolder = new System.Windows.Forms.Button();
             ((System.ComponentModel.ISupportInitialize)(this.DgvPath)).BeginInit();
             ((System.ComponentModel.ISupportInitialize)(this.DgvFile)).BeginInit();
             this.SuspendLayout();
@@ -157,10 +158,21 @@
             this.button2.Text = "设置备份目录";
             this.button2.UseVisualStyleBackColor = true;
             // 
+            // BtDelFolder
+            // 
+            this.BtDelFolder.Location = new System.Drawing.Point(99, 6);
+            this.BtDelFolder.Name = "BtDelFolder";
+            this.BtDelFolder.Size = new System.Drawing.Size(75, 23);
+            this.BtDelFolder.TabIndex = 6;
+            this.BtDelFolder.Text = "删除目录";
+            this.BtDelFolder.UseVisualStyleBackColor = true;
+            this.BtDelFolder.Click += new System.EventHandler(this.BtDelFolder_Click);
+            // 
             // FileBackupPartial
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.Controls.Add(this.BtDelFolder);
             this.Controls.Add(this.button2);
             this.Controls.Add(this.textBox1);
             this.Controls.Add(this.button1);
@@ -191,5 +203,6 @@
         private System.Windows.Forms.Button button1;
         private System.Windows.Forms.TextBox textBox1;
         private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Button BtDelFolder;
     }
 }

+ 62 - 1
Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileBackupPartial.cs

@@ -8,6 +8,9 @@ using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
 using System.IO;
+using Y.Utils.IOUtils.FileUtils;
+using Y.Utils.DataUtils.Collections;
+using Y.Utils.DataUtils.UnitConvertUtils;
 
 namespace Oreo.FileMan.Partials
 {
@@ -25,10 +28,68 @@ namespace Oreo.FileMan.Partials
             dialog.Description = "请选择要备份的文件夹";
             if (dialog.ShowDialog() == DialogResult.OK)
             {
+                int row = DgvPath.Rows.Count;
+                UIEnableButton(false);
                 string foldPath = dialog.SelectedPath;
                 BackupFolder.Add(foldPath);
-                DgvPath.Rows.Add(new object[] { Path.GetFileName(foldPath), "0KB" });
+                UIDgvPathAdd(Path.GetFileName(foldPath));
+                long size = 0;
+
+                Task.Factory.StartNew(() =>
+                {
+                    List<string> files = FileTool.GetAllFile(foldPath);
+                    if (ListTool.HasElements(files))
+                    {
+                        foreach (var f in files)
+                        {
+                            size += FileTool.Size(f);
+                            UIDgvPathUpdate(row, Path.GetFileName(foldPath), ByteConvertTool.Fmt(size));
+                        }
+                    }
+                    UIEnableButton(true);
+                });
             }
         }
+        private void BtDelFolder_Click(object sender, EventArgs e)
+        {
+            UIDgvPathDel();
+        }
+        void UIEnableButton(bool enable)
+        {
+            BeginInvoke(new Action(() =>
+            {
+                BtAddFolder.Enabled = enable;
+            }));
+        }
+        void UIDgvPathAdd(string path)
+        {
+            BeginInvoke(new Action(() =>
+            {
+                DgvPath.Rows.Add(new object[] { Path.GetFileName(path), "-" });
+            }));
+        }
+        void UIDgvPathDel()
+        {
+            BeginInvoke(new Action(() =>
+            {
+                if (DgvPath.CurrentRow != null)
+                {
+                    int row = DgvPath.CurrentRow.Index;
+                    if (row >= 0)
+                    {
+                        DgvPath.Rows.RemoveAt(row);
+                    }
+                }
+            }));
+        }
+        void UIDgvPathUpdate(int row, string path, string size)
+        {
+            BeginInvoke(new Action(() =>
+            {
+                DgvPath.Rows[row].SetValues(new object[] { Path.GetFileName(path), size });
+            }));
+        }
+
+
     }
 }

+ 21 - 0
Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileBackupPartial.resx

@@ -123,6 +123,27 @@
   <metadata name="DgvPathSize.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>
+  <metadata name="DgvPathName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DgvPathSize.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DgvFileName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DgvFilePath.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DgvFileSize.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DgvFileVersionHistory.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
+  <metadata name="DgvFileLastBackupTime.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
+    <value>True</value>
+  </metadata>
   <metadata name="DgvFileName.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
     <value>True</value>
   </metadata>

+ 10 - 0
Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileDecryptPartial.cs

@@ -132,5 +132,15 @@ namespace Oreo.FileMan.Partials
                 DgvFileDecryptList.Rows[index].Cells["CoFileDecryptStatus"].Value = status;
             }));
         }
+        void UIEnableButton(bool enable)
+        {
+            BeginInvoke(new Action(() =>
+            {
+                BtFileDecrypt.Enabled = enable;
+                BtFileDecryptAdd.Enabled = enable;
+                BtFileDecryptAdds.Enabled = enable;
+                BtFileDecryptClear.Enabled = enable;
+            }));
+        }
     }
 }

+ 2 - 2
Fork.Net/Oreo.Plugins/Oreo.FileMan/Partials/FileTypePartial.cs

@@ -146,8 +146,8 @@ namespace Oreo.FileMan.Partials
                 foreach (var drive in drives)
                 {
                     NewFileCount = 0;
-                    //if (drive.Name.Contains("C")) continue;//测试时跳过C盘
-                    //if (drive.Name.Contains("D")) continue;//测试时跳过D盘
+                    if (drive.Name.Contains("C")) continue;//测试时跳过C盘
+                    if (drive.Name.Contains("D")) continue;//测试时跳过D盘
 
                     using (var db = new Muse())
                     {

+ 13 - 17
Fork.Net/Oreo.Plugins/Oreo.FileMan/Properties/Settings.Designer.cs

@@ -1,28 +1,24 @@
 //------------------------------------------------------------------------------
 // <auto-generated>
-//     This code was generated by a tool.
-//     Runtime Version:4.0.30319.42000
+//     此代码由工具生成。
+//     运行时版本:4.0.30319.42000
 //
-//     Changes to this file may cause incorrect behavior and will be lost if
-//     the code is regenerated.
+//     对此文件的更改可能会导致不正确的行为,并且如果
+//     重新生成代码,这些更改将会丢失。
 // </auto-generated>
 //------------------------------------------------------------------------------
 
-namespace Oreo.FileMan.Properties
-{
-
-
+namespace Oreo.FileMan.Properties {
+    
+    
     [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
-    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
-    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
-    {
-
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.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
-            {
+        
+        public static Settings Default {
+            get {
                 return defaultInstance;
             }
         }

+ 8 - 8
Fork.Net/Oreo.Plugins/Oreo.FileMan/packages.config

@@ -1,11 +1,11 @@
 <?xml version="1.0" encoding="utf-8"?>
 <packages>
-  <package id="EntityFramework" version="6.1.3" targetFramework="net461" />
-  <package id="EntityFramework.zh-Hans" version="6.1.3" targetFramework="net461" />
-  <package id="SQLite.CodeFirst" version="1.3.1.18" targetFramework="net461" />
-  <package id="System.Data.SQLite" version="1.0.105.2" targetFramework="net461" />
-  <package id="System.Data.SQLite.Core" version="1.0.105.2" targetFramework="net461" />
-  <package id="System.Data.SQLite.EF6" version="1.0.105.2" targetFramework="net461" />
-  <package id="System.Data.SQLite.EF6.Migrations" version="1.0.104" targetFramework="net461" />
-  <package id="System.Data.SQLite.Linq" version="1.0.105.2" targetFramework="net461" />
+  <package id="EntityFramework" version="6.1.3" targetFramework="net40" />
+  <package id="EntityFramework.zh-Hans" version="6.1.3" targetFramework="net40" />
+  <package id="SQLite.CodeFirst" version="1.3.1.18" targetFramework="net40" />
+  <package id="System.Data.SQLite" version="1.0.105.2" targetFramework="net40" />
+  <package id="System.Data.SQLite.Core" version="1.0.105.2" targetFramework="net40" />
+  <package id="System.Data.SQLite.EF6" version="1.0.105.2" targetFramework="net40" />
+  <package id="System.Data.SQLite.EF6.Migrations" version="1.0.104" targetFramework="net40" />
+  <package id="System.Data.SQLite.Linq" version="1.0.105.2" targetFramework="net40" />
 </packages>