wyq 1 год назад
Родитель
Сommit
76fa0019f1

+ 3 - 0
DataSimulation.Forms/DataSimulation.Forms.csproj

@@ -248,6 +248,9 @@
     <Content Include="Images\Cancel.svg">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>
+    <Content Include="Images\Import.svg">
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
     <Content Include="Images\Ok.svg">
       <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
     </Content>

+ 20 - 0
DataSimulation.Forms/Images/Import.svg

@@ -0,0 +1,20 @@
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+	 viewBox="0 0 32 32" style="enable-background:new 0 0 32 32;" xml:space="preserve">
+<style type="text/css">
+	.Red{fill:#D11C1C;}
+	.Black{fill:#727272;}
+	.Blue{fill:#1177D7;}
+	.Green{fill:#039C23;}
+	.Yellow{fill:#FFB115;}
+	.White{fill:#FFFFFF;}
+	.st0{opacity:0.5;}
+	.st1{opacity:0.75;}
+	.st2{opacity:0.25;}
+</style>
+<g id="iCalendarImport">
+	<path class="Red" d="M21,12h-1v4h-6v-4H8v4H2v-4H1c-0.5,0-1,0.5-1,1v5h2h18h2v-5C22,12.5,21.5,12,21,12z"/>
+	<path class="Black" d="M22,18v13c0,0.5-0.5,1-1,1H1c-0.5,0-1-0.5-1-1V18h2v12h18V18H22z M6,10H4v4h2V10z M18,10h-2v4h2V10z M9,21v1
+		h1v6h2v-8h-1L9,21z"/>
+	<polygon class="Green" points="32,4 24,4 24,0 16,6 24,12 24,8 32,8 	"/>
+</g>
+</svg>

+ 3 - 5
DataSimulation.Forms/UserControl/CtrlSat.cs

@@ -1,16 +1,14 @@
-using DataSimulation.Repostory.Model;
-using DevExpress.Utils.Html;
+using DataSimulation.Forms.EditForms;
+using DataSimulation.Repostory.EFContext;
+using DataSimulation.Repostory.Model;
 using DevExpress.XtraEditors;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Data.Entity;
 using System.Drawing;
 using System.Linq;
 using System.Windows.Forms;
-using DataSimulation.Repostory.EFContext;
-using DataSimulation.Forms.EditForms;
 
 namespace DataSimulation.Forms.UserControl
 {

+ 14 - 13
DataSimulation.Forms/UserControl/CtrlXl.Designer.cs

@@ -74,10 +74,11 @@
             // 
             // btnImp
             // 
-            this.btnImp.ImageOptions.SvgImage = ((DevExpress.Utils.Svg.SvgImage)(resources.GetObject("btnImp.ImageOptions.SvgImage")));
-            this.btnImp.Location = new System.Drawing.Point(539, 12);
+            this.btnImp.Location = new System.Drawing.Point(569, 12);
+            this.btnImp.MaximumSize = new System.Drawing.Size(0, 24);
+            this.btnImp.MinimumSize = new System.Drawing.Size(0, 24);
             this.btnImp.Name = "btnImp";
-            this.btnImp.Size = new System.Drawing.Size(96, 24);
+            this.btnImp.Size = new System.Drawing.Size(66, 24);
             this.btnImp.StyleController = this.layoutControl1;
             this.btnImp.TabIndex = 6;
             this.btnImp.Text = "导入";
@@ -85,10 +86,10 @@
             // 
             // gridXl
             // 
-            this.gridXl.Location = new System.Drawing.Point(10, 38);
+            this.gridXl.Location = new System.Drawing.Point(10, 50);
             this.gridXl.MainView = this.gridView1;
             this.gridXl.Name = "gridXl";
-            this.gridXl.Size = new System.Drawing.Size(627, 374);
+            this.gridXl.Size = new System.Drawing.Size(627, 362);
             this.gridXl.TabIndex = 5;
             this.gridXl.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
             this.gridView1});
@@ -106,7 +107,7 @@
             this.btnOpen.Properties.AutoHeight = false;
             this.btnOpen.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
             new DevExpress.XtraEditors.Controls.EditorButton()});
-            this.btnOpen.Size = new System.Drawing.Size(459, 24);
+            this.btnOpen.Size = new System.Drawing.Size(489, 24);
             this.btnOpen.StyleController = this.layoutControl1;
             this.btnOpen.TabIndex = 4;
             // 
@@ -129,7 +130,7 @@
             this.layoutControlItem1.MaxSize = new System.Drawing.Size(0, 28);
             this.layoutControlItem1.MinSize = new System.Drawing.Size(118, 28);
             this.layoutControlItem1.Name = "layoutControlItem1";
-            this.layoutControlItem1.Size = new System.Drawing.Size(527, 28);
+            this.layoutControlItem1.Size = new System.Drawing.Size(557, 40);
             this.layoutControlItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem1.Text = "星历文件:";
             this.layoutControlItem1.TextSize = new System.Drawing.Size(52, 14);
@@ -137,21 +138,21 @@
             // layoutControlItem2
             // 
             this.layoutControlItem2.Control = this.gridXl;
-            this.layoutControlItem2.Location = new System.Drawing.Point(0, 28);
+            this.layoutControlItem2.Location = new System.Drawing.Point(0, 40);
             this.layoutControlItem2.Name = "layoutControlItem2";
             this.layoutControlItem2.Padding = new DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0);
-            this.layoutControlItem2.Size = new System.Drawing.Size(627, 374);
+            this.layoutControlItem2.Size = new System.Drawing.Size(627, 362);
             this.layoutControlItem2.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem2.TextVisible = false;
             // 
             // layoutControlItem3
             // 
             this.layoutControlItem3.Control = this.btnImp;
-            this.layoutControlItem3.Location = new System.Drawing.Point(527, 0);
-            this.layoutControlItem3.MaxSize = new System.Drawing.Size(100, 28);
-            this.layoutControlItem3.MinSize = new System.Drawing.Size(100, 28);
+            this.layoutControlItem3.Location = new System.Drawing.Point(557, 0);
+            this.layoutControlItem3.MaxSize = new System.Drawing.Size(70, 40);
+            this.layoutControlItem3.MinSize = new System.Drawing.Size(70, 40);
             this.layoutControlItem3.Name = "layoutControlItem3";
-            this.layoutControlItem3.Size = new System.Drawing.Size(100, 28);
+            this.layoutControlItem3.Size = new System.Drawing.Size(70, 40);
             this.layoutControlItem3.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom;
             this.layoutControlItem3.TextSize = new System.Drawing.Size(0, 0);
             this.layoutControlItem3.TextVisible = false;

+ 9 - 7
DataSimulation.Forms/UserControl/CtrlXl.cs

@@ -1,20 +1,19 @@
-using DevExpress.XtraEditors;
+using DataSimulation.Repostory;
+using DataSimulation.Repostory.EFContext;
+using DataSimulation.Repostory.Model;
+using DevExpress.XtraEditors;
+using DxHelper;
+using ExtensionsDev;
 using System;
 using System.Collections.Generic;
-using System.ComponentModel;
 using System.Data;
 using System.Data.Entity;
 using System.Data.Entity.Migrations;
 using System.Drawing;
 using System.IO;
 using System.Linq;
-using System.Text;
 using System.Threading.Tasks;
 using System.Windows.Forms;
-using ExtensionsDev;
-using DataSimulation.Repostory;
-using DataSimulation.Repostory.Model;
-using DataSimulation.Repostory.EFContext;
 
 namespace DataSimulation.Forms.UserControl
 {
@@ -26,6 +25,9 @@ namespace DataSimulation.Forms.UserControl
             InitializeComponent();
             this.layoutControl1.UseDefault();
             btnOpen.UseChooseFile().UseDoubleClickToSelectAll();
+            btnImp.ImageOptions.SvgImage = SvgHelper.LoadFromFile("Images\\Import.svg");
+            btnImp.ImageOptions.SvgImageSize = new Size(20, 20);
+
         }
         private async void CtrlXl_Load(object sender, EventArgs e)
         {

+ 1 - 20
DataSimulation.Forms/UserControl/CtrlXl.resx

@@ -117,29 +117,10 @@
   <resheader name="writer">
     <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
-  <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
-  <data name="btnImp.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
-    <value>
-        AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z
-        LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
-        dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAMICAAAC77u/
-        PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
-        IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
-        MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
-        Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
-        MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ
-        LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD
-        MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
-        Y2l0eTowLjc1O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkltcG9ydCI+DQogICAgPHBhdGggZD0iTTEyLDEy
-        SDhWNmg0VjEyeiBNMjQsMTd2MXY5YzAsMC42LTAuNCwxLTEsMUgzYy0wLjYsMC0xLTAuNC0xLTFWN2Mw
-        LTAuNiwwLjQtMSwxLTFoM3Y4aDE0TDI0LDE3eiBNMjAsMThINiAgIHY2aDE0VjE4eiIgY2xhc3M9IkJs
-        YWNrIiAvPg0KICAgIDxwb2x5Z29uIHBvaW50cz0iMzIsNiAyNCw2IDI0LDIgMTYsOCAyNCwxNCAyNCwx
-        MCAzMiwxMCAgIiBjbGFzcz0iR3JlZW4iIC8+DQogIDwvZz4NCjwvc3ZnPgs=
-</value>
-  </data>
   <metadata name="popupMenu1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>190, 17</value>
   </metadata>
+  <assembly alias="DevExpress.Data.v23.2" name="DevExpress.Data.v23.2, Version=23.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
   <data name="btnDel.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v23.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
     <value>
         AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIzLjIsIFZlcnNpb249MjMuMi4z