Browse Source

在App.config中设置dll文件无效。

jianfeng1.wang 2 năm trước cách đây
mục cha
commit
dc32446123

+ 24 - 18
FactoryTool/FactoryTool/App.config

@@ -1,21 +1,27 @@
 <?xml version="1.0" encoding="utf-8"?>
 <configuration>
-  <configSections>
-    <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
-      <section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
-    </sectionGroup>
-  </configSections>
-  <applicationSettings>
-    <DevExpress.LookAndFeel.Design.AppSettings>
-      <setting name="DPIAwarenessMode" serializeAs="String">
-        <value>System</value>
-      </setting>
-      <setting name="RegisterBonusSkins" serializeAs="String">
-        <value>True</value>
-      </setting>
-    </DevExpress.LookAndFeel.Design.AppSettings>
-  </applicationSettings>
-  <startup>
-    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
-  </startup>
+    <configSections>
+        <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System">
+            <section name="DevExpress.LookAndFeel.Design.AppSettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
+        </sectionGroup>
+    </configSections>
+    <applicationSettings>
+        <DevExpress.LookAndFeel.Design.AppSettings>
+            <setting name="DPIAwarenessMode" serializeAs="String">
+            <value>System</value>
+            </setting>
+            <setting name="RegisterBonusSkins" serializeAs="String">
+            <value>True</value>
+            </setting>
+        </DevExpress.LookAndFeel.Design.AppSettings>
+    </applicationSettings>
+    <startup>
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
+    </startup>
+	<runtime>
+		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
+			<publisherPolicy apply="yes"/>
+			<probing privatePath="Devdlls;" />
+		</assemblyBinding>
+	</runtime>
 </configuration>

+ 80 - 0
FactoryTool/FactoryTool/BurningForm.Designer.cs

@@ -0,0 +1,80 @@
+namespace FactoryTool
+{
+    partial class BurningForm
+    {
+        /// <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.panelControl1 = new DevExpress.XtraEditors.PanelControl();
+            this.panelControl2 = new DevExpress.XtraEditors.PanelControl();
+            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
+            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
+            this.SuspendLayout();
+            // 
+            // panelControl1
+            // 
+            this.panelControl1.Dock = System.Windows.Forms.DockStyle.Top;
+            this.panelControl1.Location = new System.Drawing.Point(0, 0);
+            this.panelControl1.Name = "panelControl1";
+            this.panelControl1.Size = new System.Drawing.Size(865, 123);
+            this.panelControl1.TabIndex = 0;
+            // 
+            // panelControl2
+            // 
+            this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
+            this.panelControl2.Location = new System.Drawing.Point(0, 123);
+            this.panelControl2.Name = "panelControl2";
+            this.panelControl2.Size = new System.Drawing.Size(865, 398);
+            this.panelControl2.TabIndex = 1;
+            // 
+            // BurningForm
+            // 
+            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
+            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+            this.ClientSize = new System.Drawing.Size(865, 521);
+            this.ControlBox = false;
+            this.Controls.Add(this.panelControl2);
+            this.Controls.Add(this.panelControl1);
+            this.FormBorderEffect = DevExpress.XtraEditors.FormBorderEffect.None;
+            this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
+            this.MaximizeBox = false;
+            this.MinimizeBox = false;
+            this.Name = "BurningForm";
+            this.ShowInTaskbar = false;
+            this.Text = "Burning";
+            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
+            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
+            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
+            this.ResumeLayout(false);
+
+        }
+
+        #endregion
+
+        private DevExpress.XtraEditors.PanelControl panelControl1;
+        private DevExpress.XtraEditors.PanelControl panelControl2;
+    }
+}

+ 2 - 2
FactoryTool/FactoryTool/XtraForm1.cs → FactoryTool/FactoryTool/BurningForm.cs

@@ -11,9 +11,9 @@ using System.Windows.Forms;
 
 namespace FactoryTool
 {
-    public partial class XtraForm1 : DevExpress.XtraEditors.XtraForm
+    public partial class BurningForm : DevExpress.XtraEditors.XtraForm
     {
-        public XtraForm1()
+        public BurningForm()
         {
             InitializeComponent();
         }

+ 0 - 0
FactoryTool/FactoryTool/XtraForm1.resx → FactoryTool/FactoryTool/BurningForm.resx


+ 1 - 1
FactoryTool/FactoryTool/XtraForm2.Designer.cs → FactoryTool/FactoryTool/ConfigurationForm.Designer.cs

@@ -1,6 +1,6 @@
 namespace FactoryTool
 {
-    partial class XtraForm2
+    partial class ConfigurationForm
     {
         /// <summary>
         /// Required designer variable.

+ 2 - 2
FactoryTool/FactoryTool/XtraForm2.cs → FactoryTool/FactoryTool/ConfigurationForm.cs

@@ -11,9 +11,9 @@ using System.Windows.Forms;
 
 namespace FactoryTool
 {
-    public partial class XtraForm2 : DevExpress.XtraEditors.XtraForm
+    public partial class ConfigurationForm : DevExpress.XtraEditors.XtraForm
     {
-        public XtraForm2()
+        public ConfigurationForm()
         {
             InitializeComponent();
         }

+ 0 - 0
FactoryTool/FactoryTool/XtraForm2.resx → FactoryTool/FactoryTool/ConfigurationForm.resx


+ 60 - 21
FactoryTool/FactoryTool/FactoryTool.csproj

@@ -31,18 +31,53 @@
     <ErrorReport>prompt</ErrorReport>
     <WarningLevel>4</WarningLevel>
   </PropertyGroup>
+  <PropertyGroup>
+    <ApplicationIcon>main.ico</ApplicationIcon>
+  </PropertyGroup>
   <ItemGroup>
-    <Reference Include="DevExpress.BonusSkins.v22.1" />
-    <Reference Include="DevExpress.Data.Desktop.v22.1" />
-    <Reference Include="DevExpress.Data.v22.1" />
-    <Reference Include="DevExpress.Mvvm.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
-    <Reference Include="DevExpress.Printing.v22.1.Core" />
-    <Reference Include="DevExpress.Utils.v22.1" />
-    <Reference Include="DevExpress.XtraBars.v22.1" />
-    <Reference Include="DevExpress.Sparkline.v22.1.Core" />
-    <Reference Include="DevExpress.XtraEditors.v22.1" />
-    <Reference Include="DevExpress.Drawing.v22.1" />
-    <Reference Include="DevExpress.XtraNavBar.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
+    <Reference Include="DevExpress.BonusSkins.v22.1">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.Data.Desktop.v22.1">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.Data.v22.1">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.Mvvm.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.Printing.v22.1.Core">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.Utils.v22.1">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.XtraBars.v22.1">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.Sparkline.v22.1.Core">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.XtraEditors.v22.1">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.Drawing.v22.1">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.XtraGrid.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.XtraLayout.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.XtraNavBar.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.XtraPrinting.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a">
+      <Private>False</Private>
+    </Reference>
+    <Reference Include="DevExpress.XtraTreeList.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a, processorArchitecture=MSIL" />
     <Reference Include="System" />
     <Reference Include="System.Configuration" />
     <Reference Include="System.Core" />
@@ -83,17 +118,17 @@
     <Compile Include="WelcomeScreen.Designer.cs">
       <DependentUpon>WelcomeScreen.cs</DependentUpon>
     </Compile>
-    <Compile Include="XtraForm1.cs">
+    <Compile Include="BurningForm.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="XtraForm1.Designer.cs">
-      <DependentUpon>XtraForm1.cs</DependentUpon>
+    <Compile Include="BurningForm.Designer.cs">
+      <DependentUpon>BurningForm.cs</DependentUpon>
     </Compile>
-    <Compile Include="XtraForm2.cs">
+    <Compile Include="ConfigurationForm.cs">
       <SubType>Form</SubType>
     </Compile>
-    <Compile Include="XtraForm2.Designer.cs">
-      <DependentUpon>XtraForm2.cs</DependentUpon>
+    <Compile Include="ConfigurationForm.Designer.cs">
+      <DependentUpon>ConfigurationForm.cs</DependentUpon>
     </Compile>
     <EmbeddedResource Include="LoginView.resx">
       <DependentUpon>LoginView.cs</DependentUpon>
@@ -110,11 +145,11 @@
     <EmbeddedResource Include="WelcomeScreen.resx">
       <DependentUpon>WelcomeScreen.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="XtraForm1.resx">
-      <DependentUpon>XtraForm1.cs</DependentUpon>
+    <EmbeddedResource Include="BurningForm.resx">
+      <DependentUpon>BurningForm.cs</DependentUpon>
     </EmbeddedResource>
-    <EmbeddedResource Include="XtraForm2.resx">
-      <DependentUpon>XtraForm2.cs</DependentUpon>
+    <EmbeddedResource Include="ConfigurationForm.resx">
+      <DependentUpon>ConfigurationForm.cs</DependentUpon>
     </EmbeddedResource>
     <None Include="App.config" />
     <None Include="Properties\Settings.settings">
@@ -133,6 +168,10 @@
   <ItemGroup>
     <None Include="Resources\minlogo.png" />
   </ItemGroup>
+  <ItemGroup>
+    <Content Include="main.ico" />
+    <None Include="Resources\ico.png" />
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
   <!-- 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.

+ 1 - 1
FactoryTool/FactoryTool/LoginView.Designer.cs

@@ -129,7 +129,7 @@
             this.Controls.Add(this.labelControl1);
             this.Controls.Add(pictureEdit1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
-            this.IconOptions.Image = global::FactoryTool.Properties.Resources.logo;
+            this.IconOptions.Image = global::FactoryTool.Properties.Resources.ico;
             this.MaximizeBox = false;
             this.MinimizeBox = false;
             this.Name = "LoginView";

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 454 - 393
FactoryTool/FactoryTool/MainView.Designer.cs


+ 15 - 4
FactoryTool/FactoryTool/MainView.cs

@@ -12,6 +12,7 @@ using System.Threading;
 using System.Windows.Forms;
 using System.Configuration;
 using FactoryTool.Properties;
+using System.IO.Ports;
 
 namespace FactoryTool
 {
@@ -24,14 +25,14 @@ namespace FactoryTool
                 InitializeBindings();
 
             //xtraTabbedMdiManager1.MdiParent = this;
-            XtraForm1 xtraForm1 = new XtraForm1();
+            BurningForm xtraForm1 = new BurningForm();
             xtraForm1.MdiParent = this;
             xtraForm1.Show();
 
 
-            XtraForm2 xtraForm2 = new XtraForm2();
+            ConfigurationForm xtraForm2 = new ConfigurationForm();
             xtraForm2.MdiParent = this;
-            xtraForm2.Show();
+            //xtraForm2.Show();
 
             // 设置当前活动窗口;
             //xtraTabbedMdiManager1.SelectedPage = xtraTabbedMdiManager1.Pages[xtraForm1];
@@ -78,7 +79,9 @@ namespace FactoryTool
                 // 关闭欢迎界面;
                 SplashScreenManager.CloseForm();
 
-                HideGalleryItemsByCaptions(skinRibbonGalleryBarItem1, skinsToHide);
+                HideGalleryItemsByCaptions(skinRibbonGalleryBarItem, skinsToHide);
+
+                InitRibbonCtrl();
             }
         }
 
@@ -98,5 +101,13 @@ namespace FactoryTool
             config.Save(ConfigurationSaveMode.Modified);
             ConfigurationManager.RefreshSection(config.AppSettings.SectionInformation.Name);
         }
+
+        /// <summary>
+        /// 初始化Ribbon面板;
+        /// </summary>
+        private void InitRibbonCtrl()
+        {
+            repositoryItemComboBox3.Items.AddRange(SerialPort.GetPortNames());
+        }
     }
 }

+ 1 - 0
FactoryTool/FactoryTool/Program.cs

@@ -1,6 +1,7 @@
 using DevExpress.LookAndFeel;
 using DevExpress.Skins;
 using DevExpress.UserSkins;
+using DevExpress.XtraBars.Navigation;
 using System;
 using System.Collections.Generic;
 using System.Configuration;

+ 10 - 0
FactoryTool/FactoryTool/Properties/Resources.Designer.cs

@@ -60,6 +60,16 @@ namespace FactoryTool.Properties {
             }
         }
         
+        /// <summary>
+        ///   查找 System.Drawing.Bitmap 类型的本地化资源。
+        /// </summary>
+        internal static System.Drawing.Bitmap ico {
+            get {
+                object obj = ResourceManager.GetObject("ico", resourceCulture);
+                return ((System.Drawing.Bitmap)(obj));
+            }
+        }
+        
         /// <summary>
         ///   查找 System.Drawing.Bitmap 类型的本地化资源。
         /// </summary>

+ 3 - 0
FactoryTool/FactoryTool/Properties/Resources.resx

@@ -124,4 +124,7 @@
   <data name="logo" type="System.Resources.ResXFileRef, System.Windows.Forms">
     <value>..\Resources\logo.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
   </data>
+  <data name="ico" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>..\Resources\ico.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
+  </data>
 </root>

+ 3 - 0
FactoryTool/FactoryTool/Properties/licenses.licx

@@ -1,13 +1,16 @@
 DevExpress.XtraEditors.Repository.RepositoryItemCheckEdit, DevExpress.XtraEditors.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraNavBar.NavBarControl, DevExpress.XtraNavBar.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraEditors.TreeListLookUpEdit, DevExpress.XtraTreeList.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.Utils.MVVM.MVVMContext, DevExpress.Utils.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit, DevExpress.XtraEditors.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraTabbedMdi.XtraTabbedMdiManager, DevExpress.XtraBars.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
+DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
 DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v22.1, Version=22.1.5.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a

BIN
FactoryTool/FactoryTool/Resources/ico.png


BIN
FactoryTool/FactoryTool/Resources/main.ico


+ 0 - 67
FactoryTool/FactoryTool/XtraForm1.Designer.cs

@@ -1,67 +0,0 @@
-namespace FactoryTool
-{
-    partial class XtraForm1
-    {
-        /// <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.buttonEdit1 = new DevExpress.XtraEditors.ButtonEdit();
-            ((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).BeginInit();
-            this.SuspendLayout();
-            // 
-            // buttonEdit1
-            // 
-            this.buttonEdit1.Location = new System.Drawing.Point(90, 73);
-            this.buttonEdit1.Name = "buttonEdit1";
-            this.buttonEdit1.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
-            new DevExpress.XtraEditors.Controls.EditorButton()});
-            this.buttonEdit1.Size = new System.Drawing.Size(100, 20);
-            this.buttonEdit1.TabIndex = 0;
-            // 
-            // XtraForm1
-            // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 14F);
-            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-            this.ClientSize = new System.Drawing.Size(298, 268);
-            this.ControlBox = false;
-            this.Controls.Add(this.buttonEdit1);
-            this.FormBorderEffect = DevExpress.XtraEditors.FormBorderEffect.None;
-            this.MaximizeBox = false;
-            this.MinimizeBox = false;
-            this.Name = "XtraForm1";
-            this.ShowInTaskbar = false;
-            this.Text = "XtraForm1";
-            this.WindowState = System.Windows.Forms.FormWindowState.Maximized;
-            ((System.ComponentModel.ISupportInitialize)(this.buttonEdit1.Properties)).EndInit();
-            this.ResumeLayout(false);
-
-        }
-
-        #endregion
-
-        private DevExpress.XtraEditors.ButtonEdit buttonEdit1;
-    }
-}

BIN
FactoryTool/FactoryTool/main.ico


Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác