Browse Source

学习WPF的玩法

yuzhengyang 8 years ago
parent
commit
af04004e0f

+ 22 - 12
Fork.Net/Oreo.PCMonitor/Views/NetDetailsWindow.xaml

@@ -5,19 +5,29 @@
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
         xmlns:local="clr-namespace:Oreo.PCMonitor.Views"
         xmlns:local="clr-namespace:Oreo.PCMonitor.Views"
         mc:Ignorable="d"
         mc:Ignorable="d"
-        Title="NetDetailsWindow" Height="400" Width="650" Loaded="Window_Loaded">
+        Title="NetDetailsWindow" Height="450" Width="650" Loaded="Window_Loaded">
     <Grid>
     <Grid>
-        <DataGrid x:Name="dataGrid" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="319" Width="622" ColumnWidth="SizeToHeader" ItemsSource="{Binding GetAllData2}">
-            <DataGrid.Columns>
-                <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="名称"/>
-                <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="下载速度"/>
-                <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="上传速度"/>
-                <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="已下载流量"/>
-                <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="已上传流量"/>
-                <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="连接数"/>
-            </DataGrid.Columns>
-        </DataGrid>
-        <Label x:Name="LbStatus" Content="{Binding Status}" HorizontalAlignment="Left" Margin="10,334,0,0" VerticalAlignment="Top"/>
+        <Label x:Name="LbStatus" Content="{Binding Status}" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Width="622" Height="25"/>
+        <Label x:Name="LbDesc" Content="查看软件的联网情况,网速及流量等。" HorizontalAlignment="Left" Margin="10,35,0,0" VerticalAlignment="Top" Width="622" Height="25"/>
+        <TabControl x:Name="tabControl" HorizontalAlignment="Left" Height="336" Margin="10,73,0,0" VerticalAlignment="Top" Width="622">
+            <TabItem Header="程序网速">
+                <Grid Background="#FFE5E5E5">
+                    <DataGrid x:Name="dataGrid" HorizontalAlignment="Left" VerticalAlignment="Top" Height="307" Width="616" ColumnWidth="SizeToHeader" ItemsSource="{Binding ObNetPro}">
+                        <DataGrid.Columns>
+                            <DataGridTextColumn Binding="{Binding ProcessName}" ClipboardContentBinding="{x:Null}" Header="名称"/>
+                            <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="下载速度"/>
+                            <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="上传速度"/>
+                            <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="已下载流量"/>
+                            <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="已上传流量"/>
+                            <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="连接数"/>
+                        </DataGrid.Columns>
+                    </DataGrid>
+                </Grid>
+            </TabItem>
+            <TabItem Header="网络连接">
+                <Grid Background="#FFE5E5E5"/>
+            </TabItem>
+        </TabControl>
 
 
     </Grid>
     </Grid>
 </Window>
 </Window>

+ 12 - 13
Fork.Net/Oreo.PCMonitor/Views/NetDetailsWindow.xaml.cs

@@ -36,6 +36,16 @@ namespace Oreo.PCMonitor.Views
                 OnPropertyChanged("Status");
                 OnPropertyChanged("Status");
             }
             }
         }
         }
+        private ObservableCollection<NetProcessInfo> _ObNetPro = new ObservableCollection<NetProcessInfo>();
+        public ObservableCollection<NetProcessInfo> ObNetPro
+        {
+            get { return _ObNetPro; }
+            set
+            {
+                _ObNetPro = value;
+                OnPropertyChanged("ObNetPro");
+            }
+        }
         public event PropertyChangedEventHandler PropertyChanged;
         public event PropertyChangedEventHandler PropertyChanged;
         public virtual void OnPropertyChanged(string propertyName)
         public virtual void OnPropertyChanged(string propertyName)
         {
         {
@@ -51,7 +61,7 @@ namespace Oreo.PCMonitor.Views
         {
         {
             Task.Factory.StartNew(() =>
             Task.Factory.StartNew(() =>
             {
             {
-                while (true)
+                while (IsVisible)
                 {
                 {
                     if (R.NFS.IsNetFlowRun || R.NFS.IsNetPacketRun)
                     if (R.NFS.IsNetFlowRun || R.NFS.IsNetPacketRun)
                     {
                     {
@@ -73,6 +83,7 @@ namespace Oreo.PCMonitor.Views
                         ByteConvertTool.Fmt(R.NFS.NetFlow.DownloadData),
                         ByteConvertTool.Fmt(R.NFS.NetFlow.DownloadData),
                         ByteConvertTool.Fmt(R.NFS.NetFlow.UploadData),
                         ByteConvertTool.Fmt(R.NFS.NetFlow.UploadData),
                          R.NFS.LostPacketCount);
                          R.NFS.LostPacketCount);
+                    ObNetPro = new ObservableCollection<NetProcessInfo>(R.NFS.NetProcessInfoList);
 
 
                     //label1.Text = "丢包数:" + R.NFS.LostPacketCount;
                     //label1.Text = "丢包数:" + R.NFS.LostPacketCount;
                     //LbStatus.Content = "下载:" + ByteConvertTool.Fmt(R.NFS.NetFlow.DownloadData) +
                     //LbStatus.Content = "下载:" + ByteConvertTool.Fmt(R.NFS.NetFlow.DownloadData) +
@@ -104,17 +115,5 @@ namespace Oreo.PCMonitor.Views
                 }
                 }
             }));
             }));
         }
         }
-        public List<NetProcessInfo> GetNetProcessInfoList()
-        {
-            return R.NFS.NetProcessInfoList;
-        }
-        public ObservableCollection<Tuple<int, string, string>> GetAllData()
-        {
-            return null;
-        }
-        public ObservableCollection<Tuple<int, string, string>> GetAllData2
-        {
-            get; set;
-        }
     }
     }
 }
 }

+ 4 - 2
Fork.Net/Test.WpfApplication1/MainWindow.xaml

@@ -10,9 +10,11 @@
         <TextBox x:Name="tbDataFirst" HorizontalAlignment="Left" Height="23" Margin="10,10,0,0" TextWrapping="Wrap" Text="{Binding BindData}" VerticalAlignment="Top" Width="120"/>
         <TextBox x:Name="tbDataFirst" HorizontalAlignment="Left" Height="23" Margin="10,10,0,0" TextWrapping="Wrap" Text="{Binding BindData}" VerticalAlignment="Top" Width="120"/>
         <Label x:Name="label" Content="{Binding BindData}" HorizontalAlignment="Left" Margin="184,10,0,0" VerticalAlignment="Top" RenderTransformOrigin="-4.754,0.783"/>
         <Label x:Name="label" Content="{Binding BindData}" HorizontalAlignment="Left" Margin="184,10,0,0" VerticalAlignment="Top" RenderTransformOrigin="-4.754,0.783"/>
         <TextBox x:Name="tbDataSecond" HorizontalAlignment="Left" Height="23" Margin="387,10,0,0" TextWrapping="Wrap" Text="{Binding TextBoxData}" VerticalAlignment="Top" Width="120"/>
         <TextBox x:Name="tbDataSecond" HorizontalAlignment="Left" Height="23" Margin="387,10,0,0" TextWrapping="Wrap" Text="{Binding TextBoxData}" VerticalAlignment="Top" Width="120"/>
-        <DataGrid x:Name="dataGrid" HorizontalAlignment="Left" Margin="10,38,0,0" VerticalAlignment="Top" Height="271" Width="497" ItemsSource="{Binding GuidList}">
+        <DataGrid x:Name="dataGrid" HorizontalAlignment="Left" Margin="10,38,0,0" VerticalAlignment="Top" Height="271" Width="497" ItemsSource="{Binding GuidList,Mode=TwoWay}" AutoGenerateColumns="False">
             <DataGrid.Columns>
             <DataGrid.Columns>
-                <DataGridTextColumn Binding="{x:Null}" ClipboardContentBinding="{x:Null}" Header="文本内容"/>
+                <DataGridTextColumn Binding="{Binding Number}" ClipboardContentBinding="{x:Null}" Header="文本内容"/>
+                <DataGridTextColumn Binding="{Binding Name}" ClipboardContentBinding="{x:Null}" Header="文本内容"/>
+                <DataGridTextColumn Binding="{Binding Name}" ClipboardContentBinding="{x:Null}" Header="文本内容"/>
             </DataGrid.Columns>
             </DataGrid.Columns>
         </DataGrid>
         </DataGrid>
 
 

+ 16 - 11
Fork.Net/Test.WpfApplication1/MainWindow.xaml.cs

@@ -1,5 +1,6 @@
 using System;
 using System;
 using System.Collections.Generic;
 using System.Collections.Generic;
+using System.Collections.ObjectModel;
 using System.ComponentModel;
 using System.ComponentModel;
 using System.Linq;
 using System.Linq;
 using System.Text;
 using System.Text;
@@ -54,6 +55,12 @@ namespace Test.WpfApplication1
                 }
                 }
             }
             }
         }
         }
+        ObservableCollection<StudentModel> StudentModelList = new ObservableCollection<StudentModel>()
+            {
+                new StudentModel() { Number = Guid.NewGuid().ToString().Substring(0,2),Name = "张三"},
+                new StudentModel() { Number = Guid.NewGuid().ToString().Substring(0,2),Name = "李四"},
+                new StudentModel() { Number = Guid.NewGuid().ToString().Substring(0,2),Name = "王五"},
+            };
 
 
         public event PropertyChangedEventHandler PropertyChanged;
         public event PropertyChangedEventHandler PropertyChanged;
         public virtual void OnPropertyChanged(string propertyName)
         public virtual void OnPropertyChanged(string propertyName)
@@ -61,8 +68,8 @@ namespace Test.WpfApplication1
             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
             PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
         }
         }
 
 
-        private List<string> _GuidList;
-        public List<string> GuidList
+        private ObservableCollection<StudentModel> _GuidList;
+        public ObservableCollection<StudentModel> GuidList
         {
         {
             get { return _GuidList; }
             get { return _GuidList; }
             set
             set
@@ -77,19 +84,17 @@ namespace Test.WpfApplication1
             InitializeComponent();
             InitializeComponent();
             DataContext = this;
             DataContext = this;
 
 
+            GuidList = StudentModelList;
+
             Task.Factory.StartNew(() =>
             Task.Factory.StartNew(() =>
             {
             {
                 for (int i = 0; i < 10000; i++)
                 for (int i = 0; i < 10000; i++)
                 {
                 {
-                    List<string> gl = new List<string>() {
-                        Guid.NewGuid().ToString(),
-                        Guid.NewGuid().ToString(),
-                        Guid.NewGuid().ToString(),
-                        new string('1',DateTime.Now.Second),
-                        DateTime.Now.ToString("HH:mm:ss.fff"),
-                        "12234567890-hgfdaWWERTYHBNBBVVCXZ"
-                    };
-                    GuidList = gl;
+                    foreach (var item in GuidList)
+                    {
+                        item.Number = Guid.NewGuid().ToString().Substring(0, 2);
+                    }
+                    GuidList = new ObservableCollection<StudentModel>(StudentModelList);
 
 
 
 
                     TextBoxData = DateTime.Now.ToString("HH:mm:ss.fff");
                     TextBoxData = DateTime.Now.ToString("HH:mm:ss.fff");

+ 14 - 0
Fork.Net/Test.WpfApplication1/StudentModel.cs

@@ -0,0 +1,14 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Text;
+
+namespace Test.WpfApplication1
+{
+    public class StudentModel
+    {
+        public string Number { get; set; }
+        public string Name { get; set; }
+    }
+}

+ 1 - 0
Fork.Net/Test.WpfApplication1/Test.WpfApplication1.csproj

@@ -53,6 +53,7 @@
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
     </ApplicationDefinition>
+    <Compile Include="StudentModel.cs" />
     <Page Include="MainWindow.xaml">
     <Page Include="MainWindow.xaml">
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>

+ 7 - 7
Fork.Net/Y.Skin/YoForm/Irregular/IrregularFormSkin.cs

@@ -111,15 +111,15 @@ namespace Y.Skin.YoForm.Irregular
         private void FormMovableEvent()
         private void FormMovableEvent()
         {
         {
             //绘制层窗体移动
             //绘制层窗体移动
-            this.MouseDown += new MouseEventHandler(Frm_MouseDown);
-            this.MouseMove += new MouseEventHandler(Frm_MouseMove);
-            this.MouseUp += new MouseEventHandler(Frm_MouseUp);
+            //this.MouseDown += new MouseEventHandler(Frm_MouseDown);
+            //this.MouseMove += new MouseEventHandler(Frm_MouseMove);
+            //this.MouseUp += new MouseEventHandler(Frm_MouseUp);
             this.LocationChanged += new EventHandler(Frm_LocationChanged);
             this.LocationChanged += new EventHandler(Frm_LocationChanged);
             //控制层层窗体移动
             //控制层层窗体移动
-            Main.MouseDown += new MouseEventHandler(Frm_MouseDown);
-            Main.MouseMove += new MouseEventHandler(Frm_MouseMove);
-            Main.MouseUp += new MouseEventHandler(Frm_MouseUp);
-            Main.LocationChanged += new EventHandler(Frm_LocationChanged);
+            //Main.MouseDown += new MouseEventHandler(Frm_MouseDown);
+            //Main.MouseMove += new MouseEventHandler(Frm_MouseMove);
+            //Main.MouseUp += new MouseEventHandler(Frm_MouseUp);
+            //Main.LocationChanged += new EventHandler(Frm_LocationChanged);
         }
         }
 
 
         /// <summary>
         /// <summary>

+ 1 - 1
Fork.Net/Y.Test/Program.cs

@@ -17,7 +17,7 @@ namespace Y.Test
         {
         {
             Application.EnableVisualStyles();
             Application.EnableVisualStyles();
             Application.SetCompatibleTextRenderingDefault(false);
             Application.SetCompatibleTextRenderingDefault(false);
-            Application.Run(new TestMove());
+            Application.Run(new MainForm());
         }
         }
     }
     }
 }
 }

+ 35 - 33
Fork.Net/Y.Test/Properties/Resources.Designer.cs

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

+ 12 - 5
Fork.Net/Y.Test/Properties/Resources.resx

@@ -46,7 +46,7 @@
     
     
     mimetype: application/x-microsoft.net.object.binary.base64
     mimetype: application/x-microsoft.net.object.binary.base64
     value   : The object must be serialized with 
     value   : The object must be serialized with 
-            : System.Serialization.Formatters.Binary.BinaryFormatter
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
             : and then encoded with base64 encoding.
             : and then encoded with base64 encoding.
     
     
     mimetype: application/x-microsoft.net.object.soap.base64
     mimetype: application/x-microsoft.net.object.soap.base64
@@ -60,6 +60,7 @@
             : and then encoded with base64 encoding.
             : 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: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:element name="root" msdata:IsDataSet="true">
       <xsd:complexType>
       <xsd:complexType>
         <xsd:choice maxOccurs="unbounded">
         <xsd:choice maxOccurs="unbounded">
@@ -68,9 +69,10 @@
               <xsd:sequence>
               <xsd:sequence>
                 <xsd:element name="value" type="xsd:string" minOccurs="0" />
                 <xsd:element name="value" type="xsd:string" minOccurs="0" />
               </xsd:sequence>
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" />
+              <xsd:attribute name="name" use="required" type="xsd:string" />
               <xsd:attribute name="type" type="xsd:string" />
               <xsd:attribute name="type" type="xsd:string" />
               <xsd:attribute name="mimetype" type="xsd:string" />
               <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
             </xsd:complexType>
           </xsd:element>
           </xsd:element>
           <xsd:element name="assembly">
           <xsd:element name="assembly">
@@ -85,9 +87,10 @@
                 <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                 <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:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
               </xsd:sequence>
               </xsd:sequence>
-              <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
+              <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="type" type="xsd:string" msdata:Ordinal="3" />
               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
               <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
             </xsd:complexType>
             </xsd:complexType>
           </xsd:element>
           </xsd:element>
           <xsd:element name="resheader">
           <xsd:element name="resheader">
@@ -109,9 +112,13 @@
     <value>2.0</value>
     <value>2.0</value>
   </resheader>
   </resheader>
   <resheader name="reader">
   <resheader name="reader">
-    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   </resheader>
   <resheader name="writer">
   <resheader name="writer">
-    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
   </resheader>
   </resheader>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="Rainbow" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Images\BackgroundImages\Rainbow.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>
 </root>

+ 167 - 3
Fork.Net/Y.Test/Views/MainForm.Designer.cs

@@ -34,6 +34,22 @@
             this.label1 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.listView1 = new System.Windows.Forms.ListView();
             this.listView1 = new System.Windows.Forms.ListView();
             this.button2 = new System.Windows.Forms.Button();
             this.button2 = new System.Windows.Forms.Button();
+            this.button3 = new System.Windows.Forms.Button();
+            this.button4 = new System.Windows.Forms.Button();
+            this.button5 = new System.Windows.Forms.Button();
+            this.button6 = new System.Windows.Forms.Button();
+            this.button7 = new System.Windows.Forms.Button();
+            this.button8 = new System.Windows.Forms.Button();
+            this.button9 = new System.Windows.Forms.Button();
+            this.button10 = new System.Windows.Forms.Button();
+            this.button11 = new System.Windows.Forms.Button();
+            this.button12 = new System.Windows.Forms.Button();
+            this.pictureBox1 = new System.Windows.Forms.PictureBox();
+            this.pictureBox2 = new System.Windows.Forms.PictureBox();
+            this.pictureBox3 = new System.Windows.Forms.PictureBox();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).BeginInit();
             this.SuspendLayout();
             this.SuspendLayout();
             // 
             // 
             // button1
             // button1
@@ -67,7 +83,7 @@
             // 
             // 
             // listView1
             // listView1
             // 
             // 
-            this.listView1.Location = new System.Drawing.Point(254, 62);
+            this.listView1.Location = new System.Drawing.Point(545, 62);
             this.listView1.Name = "listView1";
             this.listView1.Name = "listView1";
             this.listView1.Size = new System.Drawing.Size(121, 97);
             this.listView1.Size = new System.Drawing.Size(121, 97);
             this.listView1.TabIndex = 3;
             this.listView1.TabIndex = 3;
@@ -75,7 +91,7 @@
             // 
             // 
             // button2
             // button2
             // 
             // 
-            this.button2.Location = new System.Drawing.Point(299, 204);
+            this.button2.Location = new System.Drawing.Point(434, 130);
             this.button2.Name = "button2";
             this.button2.Name = "button2";
             this.button2.Size = new System.Drawing.Size(75, 23);
             this.button2.Size = new System.Drawing.Size(75, 23);
             this.button2.TabIndex = 4;
             this.button2.TabIndex = 4;
@@ -83,12 +99,144 @@
             this.button2.UseVisualStyleBackColor = true;
             this.button2.UseVisualStyleBackColor = true;
             this.button2.Click += new System.EventHandler(this.button2_Click);
             this.button2.Click += new System.EventHandler(this.button2_Click);
             // 
             // 
+            // button3
+            // 
+            this.button3.Location = new System.Drawing.Point(434, 107);
+            this.button3.Name = "button3";
+            this.button3.Size = new System.Drawing.Size(75, 23);
+            this.button3.TabIndex = 5;
+            this.button3.Text = "button3";
+            this.button3.UseVisualStyleBackColor = true;
+            // 
+            // button4
+            // 
+            this.button4.Location = new System.Drawing.Point(434, 153);
+            this.button4.Name = "button4";
+            this.button4.Size = new System.Drawing.Size(75, 23);
+            this.button4.TabIndex = 6;
+            this.button4.Text = "button4";
+            this.button4.UseVisualStyleBackColor = true;
+            // 
+            // button5
+            // 
+            this.button5.Location = new System.Drawing.Point(434, 176);
+            this.button5.Name = "button5";
+            this.button5.Size = new System.Drawing.Size(75, 23);
+            this.button5.TabIndex = 7;
+            this.button5.Text = "button5";
+            this.button5.UseVisualStyleBackColor = true;
+            // 
+            // button6
+            // 
+            this.button6.Location = new System.Drawing.Point(434, 199);
+            this.button6.Name = "button6";
+            this.button6.Size = new System.Drawing.Size(75, 23);
+            this.button6.TabIndex = 8;
+            this.button6.Text = "button6";
+            this.button6.UseVisualStyleBackColor = true;
+            // 
+            // button7
+            // 
+            this.button7.Location = new System.Drawing.Point(434, 222);
+            this.button7.Name = "button7";
+            this.button7.Size = new System.Drawing.Size(75, 23);
+            this.button7.TabIndex = 9;
+            this.button7.Text = "button7";
+            this.button7.UseVisualStyleBackColor = true;
+            // 
+            // button8
+            // 
+            this.button8.Location = new System.Drawing.Point(434, 245);
+            this.button8.Name = "button8";
+            this.button8.Size = new System.Drawing.Size(75, 23);
+            this.button8.TabIndex = 10;
+            this.button8.Text = "button8";
+            this.button8.UseVisualStyleBackColor = true;
+            // 
+            // button9
+            // 
+            this.button9.Location = new System.Drawing.Point(434, 268);
+            this.button9.Name = "button9";
+            this.button9.Size = new System.Drawing.Size(75, 23);
+            this.button9.TabIndex = 11;
+            this.button9.Text = "button9";
+            this.button9.UseVisualStyleBackColor = true;
+            // 
+            // button10
+            // 
+            this.button10.Location = new System.Drawing.Point(434, 291);
+            this.button10.Name = "button10";
+            this.button10.Size = new System.Drawing.Size(75, 23);
+            this.button10.TabIndex = 12;
+            this.button10.Text = "button10";
+            this.button10.UseVisualStyleBackColor = true;
+            // 
+            // button11
+            // 
+            this.button11.Location = new System.Drawing.Point(434, 314);
+            this.button11.Name = "button11";
+            this.button11.Size = new System.Drawing.Size(75, 23);
+            this.button11.TabIndex = 13;
+            this.button11.Text = "button11";
+            this.button11.UseVisualStyleBackColor = true;
+            // 
+            // button12
+            // 
+            this.button12.Location = new System.Drawing.Point(434, 337);
+            this.button12.Name = "button12";
+            this.button12.Size = new System.Drawing.Size(75, 23);
+            this.button12.TabIndex = 14;
+            this.button12.Text = "button12";
+            this.button12.UseVisualStyleBackColor = true;
+            // 
+            // pictureBox1
+            // 
+            this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("pictureBox1.Image")));
+            this.pictureBox1.Location = new System.Drawing.Point(515, 165);
+            this.pictureBox1.Name = "pictureBox1";
+            this.pictureBox1.Size = new System.Drawing.Size(241, 92);
+            this.pictureBox1.TabIndex = 15;
+            this.pictureBox1.TabStop = false;
+            // 
+            // pictureBox2
+            // 
+            this.pictureBox2.Image = global::Y.Test.Properties.Resources.Rainbow;
+            this.pictureBox2.Location = new System.Drawing.Point(515, 263);
+            this.pictureBox2.Name = "pictureBox2";
+            this.pictureBox2.Size = new System.Drawing.Size(151, 92);
+            this.pictureBox2.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage;
+            this.pictureBox2.TabIndex = 16;
+            this.pictureBox2.TabStop = false;
+            // 
+            // pictureBox3
+            // 
+            this.pictureBox3.Image = global::Y.Test.Properties.Resources.Rainbow;
+            this.pictureBox3.Location = new System.Drawing.Point(515, 366);
+            this.pictureBox3.Name = "pictureBox3";
+            this.pictureBox3.Size = new System.Drawing.Size(151, 92);
+            this.pictureBox3.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+            this.pictureBox3.TabIndex = 17;
+            this.pictureBox3.TabStop = false;
+            // 
             // MainForm
             // MainForm
             // 
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
             this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage")));
-            this.ClientSize = new System.Drawing.Size(418, 320);
+            this.ClientSize = new System.Drawing.Size(814, 470);
+            this.Controls.Add(this.pictureBox3);
+            this.Controls.Add(this.pictureBox2);
+            this.Controls.Add(this.pictureBox1);
+            this.Controls.Add(this.button12);
+            this.Controls.Add(this.button11);
+            this.Controls.Add(this.button10);
+            this.Controls.Add(this.button9);
+            this.Controls.Add(this.button8);
+            this.Controls.Add(this.button7);
+            this.Controls.Add(this.button6);
+            this.Controls.Add(this.button5);
+            this.Controls.Add(this.button4);
+            this.Controls.Add(this.button3);
             this.Controls.Add(this.button2);
             this.Controls.Add(this.button2);
             this.Controls.Add(this.listView1);
             this.Controls.Add(this.listView1);
             this.Controls.Add(this.label1);
             this.Controls.Add(this.label1);
@@ -98,6 +246,9 @@
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen;
             this.Text = "MainForm";
             this.Text = "MainForm";
             this.Load += new System.EventHandler(this.MainForm_Load);
             this.Load += new System.EventHandler(this.MainForm_Load);
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.pictureBox3)).EndInit();
             this.ResumeLayout(false);
             this.ResumeLayout(false);
             this.PerformLayout();
             this.PerformLayout();
 
 
@@ -110,5 +261,18 @@
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.Label label1;
         private System.Windows.Forms.ListView listView1;
         private System.Windows.Forms.ListView listView1;
         private System.Windows.Forms.Button button2;
         private System.Windows.Forms.Button button2;
+        private System.Windows.Forms.Button button3;
+        private System.Windows.Forms.Button button4;
+        private System.Windows.Forms.Button button5;
+        private System.Windows.Forms.Button button6;
+        private System.Windows.Forms.Button button7;
+        private System.Windows.Forms.Button button8;
+        private System.Windows.Forms.Button button9;
+        private System.Windows.Forms.Button button10;
+        private System.Windows.Forms.Button button11;
+        private System.Windows.Forms.Button button12;
+        private System.Windows.Forms.PictureBox pictureBox1;
+        private System.Windows.Forms.PictureBox pictureBox2;
+        private System.Windows.Forms.PictureBox pictureBox3;
     }
     }
 }
 }

File diff suppressed because it is too large
+ 6864 - 0
Fork.Net/Y.Test/Views/MainForm.resx


+ 1 - 0
Fork.Net/Y.Test/Y.Test.csproj

@@ -112,6 +112,7 @@
     <Compile Include="Properties\Resources.Designer.cs">
     <Compile Include="Properties\Resources.Designer.cs">
       <AutoGen>True</AutoGen>
       <AutoGen>True</AutoGen>
       <DependentUpon>Resources.resx</DependentUpon>
       <DependentUpon>Resources.resx</DependentUpon>
+      <DesignTime>True</DesignTime>
     </Compile>
     </Compile>
     <EmbeddedResource Include="Views\ChineseCalendarForm.resx">
     <EmbeddedResource Include="Views\ChineseCalendarForm.resx">
       <DependentUpon>ChineseCalendarForm.cs</DependentUpon>
       <DependentUpon>ChineseCalendarForm.cs</DependentUpon>