1备货调整 2在线升级调整

This commit is contained in:
wule committed 2025-07-14 19:05:52 +08:00
1 parent dd52c9b2d3
commit fef54e1f0f
13 files changed
+290 -182

No files matched your search

+2
View File
@@ -56,6 +56,8 @@
<CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules> <CodeAnalysisFailOnMissingRules>false</CodeAnalysisFailOnMissingRules>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
<Prefer32Bit>false</Prefer32Bit> <Prefer32Bit>false</Prefer32Bit>
<DefineConstants>
</DefineConstants>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
+1 -1
View File
@@ -27,7 +27,7 @@ namespace AllBase
/// <summary> /// <summary>
/// 版本ID /// 版本ID
/// </summary> /// </summary>
public static int VersionCount = 358; public static int VersionCount = 359;
/// <summary> /// <summary>
/// 版本号 /// 版本号
+26 -5
View File
@@ -18,6 +18,21 @@
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<NuGetPackageImportStamp> <NuGetPackageImportStamp>
</NuGetPackageImportStamp> </NuGetPackageImportStamp>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
<UpdateEnabled>false</UpdateEnabled>
<UpdateMode>Foreground</UpdateMode>
<UpdateInterval>7</UpdateInterval>
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
<UpdatePeriodically>false</UpdatePeriodically>
<UpdateRequired>false</UpdateRequired>
<MapFileExtensions>true</MapFileExtensions>
<ApplicationRevision>0</ApplicationRevision>
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<IsWebBootstrapper>false</IsWebBootstrapper>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
@@ -42,7 +57,7 @@
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ApplicationIcon>qk.ico</ApplicationIcon> <ApplicationIcon>icon.ico</ApplicationIcon>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>
@@ -69,7 +84,7 @@
<OutputPath>..\bin\</OutputPath> <OutputPath>..\bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<DebugType>full</DebugType> <DebugType>full</DebugType>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
@@ -77,10 +92,10 @@
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
<OutputPath>..\bin\</OutputPath> <OutputPath>..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>DEBUG;TRACE</DefineConstants>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
<Prefer32Bit>true</Prefer32Bit> <Prefer32Bit>true</Prefer32Bit>
@@ -1228,7 +1243,13 @@
<Content Include="Resources\tree_商品发布.png" /> <Content Include="Resources\tree_商品发布.png" />
<Content Include="Resources\tree_商品发布_select.png" /> <Content Include="Resources\tree_商品发布_select.png" />
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>false</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup> <PropertyGroup>
<PreBuildEvent> <PreBuildEvent>
+8
View File
@@ -2,5 +2,13 @@
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<ProjectView>ShowAllFiles</ProjectView> <ProjectView>ShowAllFiles</ProjectView>
<PublishUrlHistory>publish\</PublishUrlHistory>
<InstallUrlHistory />
<SupportUrlHistory />
<UpdateUrlHistory />
<BootstrapperUrlHistory />
<ErrorReportUrlHistory />
<FallbackCulture>zh-CN</FallbackCulture>
<VerifyUploadedFiles>false</VerifyUploadedFiles>
</PropertyGroup> </PropertyGroup>
</Project> </Project>
+83 -53
View File
@@ -30,17 +30,19 @@ namespace TemuKJD.KJDForms.ProductForms
private void InitializeComponent() private void InitializeComponent()
{ {
this.components = new System.ComponentModel.Container(); this.components = new System.ComponentModel.Container();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.splitContainer1 = new System.Windows.Forms.SplitContainer();
this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components); this.ucGroupBoxEx4 = new TemuKJD.UserComponent.UcGroupBoxEx(this.components);
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel();
this.lblMinBound = new System.Windows.Forms.Label();
this.txtMinBound = new System.Windows.Forms.TextBox(); this.txtMinBound = new System.Windows.Forms.TextBox();
this.label15 = new System.Windows.Forms.Label(); this.label15 = new System.Windows.Forms.Label();
this.lblMinBound = new System.Windows.Forms.Label(); this.chkIfLessMakeZero = new System.Windows.Forms.CheckBox();
this.txtScale2 = new System.Windows.Forms.TextBox(); this.txtScale2 = new System.Windows.Forms.TextBox();
this.label14 = new System.Windows.Forms.Label(); this.label14 = new System.Windows.Forms.Label();
this.txtScale1 = new System.Windows.Forms.TextBox(); this.txtScale1 = new System.Windows.Forms.TextBox();
@@ -137,12 +139,13 @@ namespace TemuKJD.KJDForms.ProductForms
this.statusBar = new TemuKJD.UserControls.StatusBarUserControl(); this.statusBar = new TemuKJD.UserControls.StatusBarUserControl();
this.panelEx1 = new DevComponents.DotNetBar.PanelEx(); this.panelEx1 = new DevComponents.DotNetBar.PanelEx();
this.btnClear = new DevComponents.DotNetBar.PanelEx(); this.btnClear = new DevComponents.DotNetBar.PanelEx();
this.flowLayoutPanel1 = new System.Windows.Forms.FlowLayoutPanel(); this.label18 = new System.Windows.Forms.Label();
((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit();
this.splitContainer1.Panel1.SuspendLayout(); this.splitContainer1.Panel1.SuspendLayout();
this.splitContainer1.Panel2.SuspendLayout(); this.splitContainer1.Panel2.SuspendLayout();
this.splitContainer1.SuspendLayout(); this.splitContainer1.SuspendLayout();
this.ucGroupBoxEx4.SuspendLayout(); this.ucGroupBoxEx4.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.ucGroupBoxEx3.SuspendLayout(); this.ucGroupBoxEx3.SuspendLayout();
this.ucGroupBoxEx2.SuspendLayout(); this.ucGroupBoxEx2.SuspendLayout();
this.ucGroupBoxEx1.SuspendLayout(); this.ucGroupBoxEx1.SuspendLayout();
@@ -167,7 +170,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.splitContainer4.Panel1.SuspendLayout(); this.splitContainer4.Panel1.SuspendLayout();
this.splitContainer4.Panel2.SuspendLayout(); this.splitContainer4.Panel2.SuspendLayout();
this.splitContainer4.SuspendLayout(); this.splitContainer4.SuspendLayout();
this.flowLayoutPanel1.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// splitContainer1 // splitContainer1
@@ -209,6 +211,7 @@ namespace TemuKJD.KJDForms.ProductForms
this.ucGroupBoxEx4.Controls.Add(this.label10); this.ucGroupBoxEx4.Controls.Add(this.label10);
this.ucGroupBoxEx4.Controls.Add(this.label16); this.ucGroupBoxEx4.Controls.Add(this.label16);
this.ucGroupBoxEx4.Controls.Add(this.label17); this.ucGroupBoxEx4.Controls.Add(this.label17);
this.ucGroupBoxEx4.Controls.Add(this.label18);
this.ucGroupBoxEx4.Location = new System.Drawing.Point(397, 2); this.ucGroupBoxEx4.Location = new System.Drawing.Point(397, 2);
this.ucGroupBoxEx4.Name = "ucGroupBoxEx4"; this.ucGroupBoxEx4.Name = "ucGroupBoxEx4";
this.ucGroupBoxEx4.Size = new System.Drawing.Size(749, 120); this.ucGroupBoxEx4.Size = new System.Drawing.Size(749, 120);
@@ -216,10 +219,31 @@ namespace TemuKJD.KJDForms.ProductForms
this.ucGroupBoxEx4.TabStop = false; this.ucGroupBoxEx4.TabStop = false;
this.ucGroupBoxEx4.Text = "创建备货单"; this.ucGroupBoxEx4.Text = "创建备货单";
// //
// flowLayoutPanel1
//
this.flowLayoutPanel1.Controls.Add(this.lblMinBound);
this.flowLayoutPanel1.Controls.Add(this.txtMinBound);
this.flowLayoutPanel1.Controls.Add(this.label15);
this.flowLayoutPanel1.Controls.Add(this.chkIfLessMakeZero);
this.flowLayoutPanel1.Location = new System.Drawing.Point(240, 83);
this.flowLayoutPanel1.Name = "flowLayoutPanel1";
this.flowLayoutPanel1.Size = new System.Drawing.Size(433, 31);
this.flowLayoutPanel1.TabIndex = 702;
//
// lblMinBound
//
this.lblMinBound.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblMinBound.AutoSize = true;
this.lblMinBound.Location = new System.Drawing.Point(3, 5);
this.lblMinBound.Name = "lblMinBound";
this.lblMinBound.Size = new System.Drawing.Size(87, 17);
this.lblMinBound.TabIndex = 691;
this.lblMinBound.Text = "备货量小于3按";
//
// txtMinBound // txtMinBound
// //
this.txtMinBound.Anchor = System.Windows.Forms.AnchorStyles.Left; this.txtMinBound.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.txtMinBound.Location = new System.Drawing.Point(105, 0); this.txtMinBound.Location = new System.Drawing.Point(93, 2);
this.txtMinBound.Margin = new System.Windows.Forms.Padding(0); this.txtMinBound.Margin = new System.Windows.Forms.Padding(0);
this.txtMinBound.Name = "txtMinBound"; this.txtMinBound.Name = "txtMinBound";
this.txtMinBound.Size = new System.Drawing.Size(39, 23); this.txtMinBound.Size = new System.Drawing.Size(39, 23);
@@ -232,21 +256,25 @@ namespace TemuKJD.KJDForms.ProductForms
// //
this.label15.Anchor = System.Windows.Forms.AnchorStyles.Left; this.label15.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.label15.AutoSize = true; this.label15.AutoSize = true;
this.label15.Location = new System.Drawing.Point(147, 3); this.label15.Location = new System.Drawing.Point(135, 5);
this.label15.Name = "label15"; this.label15.Name = "label15";
this.label15.Size = new System.Drawing.Size(32, 17); this.label15.Size = new System.Drawing.Size(32, 17);
this.label15.TabIndex = 692; this.label15.TabIndex = 692;
this.label15.Text = "备货"; this.label15.Text = "备货";
// //
// lblMinBound // chkIfLessMakeZero
// //
this.lblMinBound.Anchor = System.Windows.Forms.AnchorStyles.Left; this.chkIfLessMakeZero.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.lblMinBound.AutoSize = true; this.chkIfLessMakeZero.AutoSize = true;
this.lblMinBound.Location = new System.Drawing.Point(3, 3); this.chkIfLessMakeZero.Checked = true;
this.lblMinBound.Name = "lblMinBound"; this.chkIfLessMakeZero.CheckState = System.Windows.Forms.CheckState.Checked;
this.lblMinBound.Size = new System.Drawing.Size(99, 17); this.chkIfLessMakeZero.Location = new System.Drawing.Point(183, 3);
this.lblMinBound.TabIndex = 691; this.chkIfLessMakeZero.Margin = new System.Windows.Forms.Padding(13, 3, 3, 3);
this.lblMinBound.Text = "备货数量小于3按"; this.chkIfLessMakeZero.Name = "chkIfLessMakeZero";
this.chkIfLessMakeZero.Size = new System.Drawing.Size(207, 21);
this.chkIfLessMakeZero.TabIndex = 693;
this.chkIfLessMakeZero.Text = "平台允许量小于最小备货量不备货";
this.chkIfLessMakeZero.UseVisualStyleBackColor = true;
// //
// txtScale2 // txtScale2
// //
@@ -661,18 +689,18 @@ namespace TemuKJD.KJDForms.ProductForms
// //
this.dgvShop.AllowUserToAddRows = false; this.dgvShop.AllowUserToAddRows = false;
this.dgvShop.AllowUserToDeleteRows = false; this.dgvShop.AllowUserToDeleteRows = false;
dataGridViewCellStyle7.BackColor = System.Drawing.Color.WhiteSmoke; dataGridViewCellStyle1.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle7; this.dgvShop.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
this.dgvShop.BackgroundColor = System.Drawing.Color.White; this.dgvShop.BackgroundColor = System.Drawing.Color.White;
this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.dgvShop.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle8; this.dgvShop.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvShop.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgvShop.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colSelect, this.colSelect,
@@ -687,8 +715,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.dgvShop.Name = "dgvShop"; this.dgvShop.Name = "dgvShop";
this.dgvShop.ReadOnly = true; this.dgvShop.ReadOnly = true;
this.dgvShop.RowHeadersWidth = 30; this.dgvShop.RowHeadersWidth = 30;
dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvShop.RowsDefaultCellStyle = dataGridViewCellStyle9; this.dgvShop.RowsDefaultCellStyle = dataGridViewCellStyle3;
this.dgvShop.RowTemplate.Height = 23; this.dgvShop.RowTemplate.Height = 23;
this.dgvShop.Size = new System.Drawing.Size(266, 435); this.dgvShop.Size = new System.Drawing.Size(266, 435);
this.dgvShop.TabIndex = 6; this.dgvShop.TabIndex = 6;
@@ -1250,18 +1278,18 @@ namespace TemuKJD.KJDForms.ProductForms
// //
this.dgvStock.AllowUserToAddRows = false; this.dgvStock.AllowUserToAddRows = false;
this.dgvStock.AllowUserToDeleteRows = false; this.dgvStock.AllowUserToDeleteRows = false;
dataGridViewCellStyle10.BackColor = System.Drawing.Color.WhiteSmoke; dataGridViewCellStyle4.BackColor = System.Drawing.Color.WhiteSmoke;
this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle10; this.dgvStock.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle4;
this.dgvStock.BackgroundColor = System.Drawing.Color.White; this.dgvStock.BackgroundColor = System.Drawing.Color.White;
this.dgvStock.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255))))); this.dgvStock.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(63)))), ((int)(((byte)(126)))), ((int)(((byte)(255)))));
dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
dataGridViewCellStyle11.BackColor = System.Drawing.SystemColors.Control; dataGridViewCellStyle5.BackColor = System.Drawing.SystemColors.Control;
dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
dataGridViewCellStyle11.ForeColor = System.Drawing.SystemColors.WindowText; dataGridViewCellStyle5.ForeColor = System.Drawing.SystemColors.WindowText;
dataGridViewCellStyle11.SelectionBackColor = System.Drawing.SystemColors.Highlight; dataGridViewCellStyle5.SelectionBackColor = System.Drawing.SystemColors.Highlight;
dataGridViewCellStyle11.SelectionForeColor = System.Drawing.SystemColors.HighlightText; dataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.False; dataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle11; this.dgvStock.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle5;
this.dgvStock.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.dgvStock.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
this.dgvStock.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.dgvStock.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
this.colUpId, this.colUpId,
@@ -1287,8 +1315,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.dgvStock.Location = new System.Drawing.Point(0, 0); this.dgvStock.Location = new System.Drawing.Point(0, 0);
this.dgvStock.Name = "dgvStock"; this.dgvStock.Name = "dgvStock";
this.dgvStock.ReadOnly = true; this.dgvStock.ReadOnly = true;
dataGridViewCellStyle12.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); dataGridViewCellStyle6.Font = new System.Drawing.Font("微软雅黑", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
this.dgvStock.RowsDefaultCellStyle = dataGridViewCellStyle12; this.dgvStock.RowsDefaultCellStyle = dataGridViewCellStyle6;
this.dgvStock.RowTemplate.Height = 23; this.dgvStock.RowTemplate.Height = 23;
this.dgvStock.Size = new System.Drawing.Size(870, 435); this.dgvStock.Size = new System.Drawing.Size(870, 435);
this.dgvStock.TabIndex = 187; this.dgvStock.TabIndex = 187;
@@ -1527,15 +1555,15 @@ namespace TemuKJD.KJDForms.ProductForms
this.btnClear.Text = "清空结果"; this.btnClear.Text = "清空结果";
this.btnClear.Visible = false; this.btnClear.Visible = false;
// //
// flowLayoutPanel1 // label18
// //
this.flowLayoutPanel1.Controls.Add(this.lblMinBound); this.label18.Anchor = System.Windows.Forms.AnchorStyles.Left;
this.flowLayoutPanel1.Controls.Add(this.txtMinBound); this.label18.AutoSize = true;
this.flowLayoutPanel1.Controls.Add(this.label15); this.label18.Location = new System.Drawing.Point(170, 88);
this.flowLayoutPanel1.Location = new System.Drawing.Point(180, 83); this.label18.Name = "label18";
this.flowLayoutPanel1.Name = "flowLayoutPanel1"; this.label18.Size = new System.Drawing.Size(80, 17);
this.flowLayoutPanel1.Size = new System.Drawing.Size(284, 31); this.label18.TabIndex = 712;
this.flowLayoutPanel1.TabIndex = 702; this.label18.Text = "最小备货量:";
// //
// SaleStockUpForm // SaleStockUpForm
// //
@@ -1554,6 +1582,8 @@ namespace TemuKJD.KJDForms.ProductForms
this.splitContainer1.ResumeLayout(false); this.splitContainer1.ResumeLayout(false);
this.ucGroupBoxEx4.ResumeLayout(false); this.ucGroupBoxEx4.ResumeLayout(false);
this.ucGroupBoxEx4.PerformLayout(); this.ucGroupBoxEx4.PerformLayout();
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.ucGroupBoxEx3.ResumeLayout(false); this.ucGroupBoxEx3.ResumeLayout(false);
this.ucGroupBoxEx2.ResumeLayout(false); this.ucGroupBoxEx2.ResumeLayout(false);
this.ucGroupBoxEx2.PerformLayout(); this.ucGroupBoxEx2.PerformLayout();
@@ -1586,8 +1616,6 @@ namespace TemuKJD.KJDForms.ProductForms
this.splitContainer4.Panel2.ResumeLayout(false); this.splitContainer4.Panel2.ResumeLayout(false);
((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer4)).EndInit();
this.splitContainer4.ResumeLayout(false); this.splitContainer4.ResumeLayout(false);
this.flowLayoutPanel1.ResumeLayout(false);
this.flowLayoutPanel1.PerformLayout();
this.ResumeLayout(false); this.ResumeLayout(false);
} }
@@ -1696,5 +1724,7 @@ namespace TemuKJD.KJDForms.ProductForms
private System.Windows.Forms.Label label16; private System.Windows.Forms.Label label16;
private System.Windows.Forms.Label label17; private System.Windows.Forms.Label label17;
private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1; private System.Windows.Forms.FlowLayoutPanel flowLayoutPanel1;
private System.Windows.Forms.CheckBox chkIfLessMakeZero;
private System.Windows.Forms.Label label18;
} }
} }
@@ -767,8 +767,11 @@ namespace TemuKJD.KJDForms.ProductForms
sku.wantStockUpBound = sku.todaySaleVolume.ParseToInt() * scale sku.wantStockUpBound = sku.todaySaleVolume.ParseToInt() * scale
- sku.inventoryNumInfo.warehouseInventoryNum.ParseToInt() - sku.inventoryNumInfo.warehouseInventoryNum.ParseToInt()
- sku.inventoryNumInfo.waitReceiveNum.ParseToInt(); - sku.inventoryNumInfo.waitReceiveNum.ParseToInt();
if (sku.wantStockUpBound > 0 && sku.wantStockUpBound < this.txtMinBound.Text.ParseToInt()) Invoke(new Action(() =>
sku.wantStockUpBound = this.txtMinBound.Text.ParseToInt(); {
if (sku.wantStockUpBound > 0 && sku.wantStockUpBound < this.txtMinBound.Text.ParseToInt())
sku.wantStockUpBound = this.txtMinBound.Text.ParseToInt();
}));
sku.wantStockUpBound = Math.Max(sku.wantStockUpBound, 0); sku.wantStockUpBound = Math.Max(sku.wantStockUpBound, 0);
} }
if (sInfo.skuQuantityDetailList.Any(s => s.wantStockUpBound > 0)) if (sInfo.skuQuantityDetailList.Any(s => s.wantStockUpBound > 0))
@@ -964,6 +967,12 @@ namespace TemuKJD.KJDForms.ProductForms
if (sku.wantStockUpBound > sBaseSku.applyUpperBound.ParseToInt()) if (sku.wantStockUpBound > sBaseSku.applyUpperBound.ParseToInt())
{ {
sku.wantStockUpBound = sBaseSku.applyUpperBound.ParseToInt(); sku.wantStockUpBound = sBaseSku.applyUpperBound.ParseToInt();
//如果强制要求最小数量,且平台可备数量小于最小数量,直接不允许备货
Invoke(new Action(() =>
{
if (sku.wantStockUpBound < this.txtMinBound.Text.ParseToInt() && this.chkIfLessMakeZero.Checked)
sku.wantStockUpBound = -1;
}));
} }
} }
@@ -1034,7 +1043,8 @@ namespace TemuKJD.KJDForms.ProductForms
private void txtMinBound_TextChanged(object sender, EventArgs e) private void txtMinBound_TextChanged(object sender, EventArgs e)
{ {
this.lblMinBound.Text = "备货数量小于" + txtMinBound.Text.ParseToInt() + "按"; this.lblMinBound.Text = "备货量小于" + txtMinBound.Text.ParseToInt() + "按";
//this.chkIfLessMakeZero.Text = "平台允许备货数量小于" + txtMinBound.Text.ParseToInt() + "不备货";
} }
} }
} }
+21 -15
View File
@@ -435,12 +435,16 @@ namespace TemuKJD.UserForm
public static void GetUserList() public static void GetUserList()
{ {
if (File.Exists("config\\user_login_config")) //if (File.Exists("config\\user_login_config"))
{ {
try try
{ {
var txt = FileBase.ReadAllText("config\\user_login_config", System.Text.Encoding.UTF8); //var txt = FileBase.ReadAllText("config\\user_login_config", System.Text.Encoding.UTF8);
UserParamList = JsonHelper.DeserializeJsonToList<UserParam>(txt); //UserParamList = JsonHelper.DeserializeJsonToList<UserParam>(txt);
UserParamList = NaiBa.Util.Helper.ConfigHelper.LoadConfig<List<UserParam>>("user_login_config");
if (UserParamList == null)
UserParamList = new List<UserParam>();
} }
catch catch
{ {
@@ -451,18 +455,20 @@ namespace TemuKJD.UserForm
public static void SaveUserList() public static void SaveUserList()
{ {
if (!Directory.Exists("config")) //if (!Directory.Exists("config"))
{ //{
Directory.CreateDirectory("config"); // Directory.CreateDirectory("config");
} //}
try //try
{ //{
var txt = JsonHelper.SerializeObject(UserParamList); // var txt = JsonHelper.SerializeObject(UserParamList);
FileBase.WriteAllText("config\\user_login_config", txt, System.Text.Encoding.UTF8); // FileBase.WriteAllText("config\\user_login_config", txt, System.Text.Encoding.UTF8);
} //}
catch //catch
{ //{
} //}
NaiBa.Util.Helper.ConfigHelper.SaveConfig("user_login_config", UserParamList);
} }
private void lblBuy_Click(object sender, EventArgs e) private void lblBuy_Click(object sender, EventArgs e)
+22 -1
View File
@@ -31,13 +31,14 @@ namespace Update
SetFormRoundRectRgn(this, 7); SetFormRoundRectRgn(this, 7);
SetFormRoundRectRgn(panel2, 7); SetFormRoundRectRgn(panel2, 7);
SetFormRoundRectRgn(this.btnOk, 7); SetFormRoundRectRgn(this.btnOk, 7);
SetFormRoundRectRgn(this.btnCancel, 7);
} }
private void btnOk_Click(object sender, EventArgs e) private void btnOk_Click(object sender, EventArgs e)
{ {
if (lblMessage.Text == "升级完成,点击确定重启程序") if (lblMessage.Text == "升级完成,点击确定重启程序")
{ {
string extPath = System.Environment.CurrentDirectory + "\\" + Program.softName; string extPath = System.Environment.CurrentDirectory + "\\" + Program.softName.Replace(".exe", "") + ".exe";
System.Diagnostics.Process.Start(extPath); System.Diagnostics.Process.Start(extPath);
Application.Exit(); Application.Exit();
return; return;
@@ -73,6 +74,16 @@ namespace Update
string tempFile = upTempPath + "\\" + Program.updateUrl.Substring(Program.updateUrl.LastIndexOf("/") + 1); string tempFile = upTempPath + "\\" + Program.updateUrl.Substring(Program.updateUrl.LastIndexOf("/") + 1);
bool result = Program.DownloadFile(Program.updateUrl, tempFile); bool result = Program.DownloadFile(Program.updateUrl, tempFile);
while (true)
{
Invoke(new Action(() =>
{
progressBar1.Value = Program.progress;
}));
if (Program.progress == 100)
break;
}
if (result) if (result)
{ {
ZipFile.ExtractToDirectory(tempFile, upTempPath); ZipFile.ExtractToDirectory(tempFile, upTempPath);
@@ -110,6 +121,7 @@ namespace Update
Thread.Sleep(50); Thread.Sleep(50);
Invoke(new Action(() => Invoke(new Action(() =>
{ {
progressBar1.Value = 100;
lblMessage.Text = "升级完成,点击确定重启程序"; lblMessage.Text = "升级完成,点击确定重启程序";
btnOk.Enabled = true; btnOk.Enabled = true;
})); }));
@@ -118,6 +130,7 @@ namespace Update
{ {
Invoke(new Action(() => Invoke(new Action(() =>
{ {
progressBar1.Value = 100;
this.lblMessage.Text = "升级失败,未获取到升级文件"; this.lblMessage.Text = "升级失败,未获取到升级文件";
btnOk.Enabled = true; btnOk.Enabled = true;
})); }));
@@ -204,10 +217,18 @@ namespace Update
private void CloseMainProgram() private void CloseMainProgram()
{ {
string in_sAppName = Program.softName; //(一个word文档程序) string in_sAppName = Program.softName; //(一个word文档程序)
in_sAppName = in_sAppName.Replace(".exe", "");
try try
{ {
System.Diagnostics.Process[] psiNewcas = System.Diagnostics.Process.GetProcessesByName(in_sAppName); System.Diagnostics.Process[] psiNewcas = System.Diagnostics.Process.GetProcessesByName(in_sAppName);
//System.Diagnostics.Process.GetProcessesByName("");
//var pro = System.Diagnostics.Process.GetProcesses();
//foreach(var p in pro)
//{
// Console.WriteLine(p.ProcessName);
//}
foreach (System.Diagnostics.Process p in psiNewcas) foreach (System.Diagnostics.Process p in psiNewcas)
{ {
+2 -1
View File
@@ -81,6 +81,7 @@ namespace Update
this.btnCancel.TabStop = false; this.btnCancel.TabStop = false;
this.btnCancel.Text = "取 消"; this.btnCancel.Text = "取 消";
this.btnCancel.UseVisualStyleBackColor = false; this.btnCancel.UseVisualStyleBackColor = false;
this.btnCancel.Visible = false;
this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click); this.btnCancel.Click += new System.EventHandler(this.btnCancel_Click);
// //
// panel1 // panel1
@@ -103,7 +104,7 @@ namespace Update
this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.btnClose.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
this.btnClose.Font = new System.Drawing.Font("微软雅黑", 11F); this.btnClose.Font = new System.Drawing.Font("微软雅黑", 11F);
this.btnClose.ForeColor = System.Drawing.Color.White; this.btnClose.ForeColor = System.Drawing.Color.White;
this.btnClose.Location = new System.Drawing.Point(240, -8); this.btnClose.Location = new System.Drawing.Point(238, -5);
this.btnClose.Name = "btnClose"; this.btnClose.Name = "btnClose";
this.btnClose.Size = new System.Drawing.Size(17, 28); this.btnClose.Size = new System.Drawing.Size(17, 28);
this.btnClose.TabIndex = 11; this.btnClose.TabIndex = 11;
+109 -101
View File
@@ -17,6 +17,7 @@ namespace Update
public static int newVersion = 0; public static int newVersion = 0;
public static string updateUrl = ""; public static string updateUrl = "";
public static List<string> updateFileUrls = new List<string>(); public static List<string> updateFileUrls = new List<string>();
public static int progress = 0;
/// <summary> /// <summary>
/// 应用程序的主入口点。 /// 应用程序的主入口点。
@@ -29,7 +30,7 @@ namespace Update
try try
{ {
var text = File.ReadAllText("UpdateConfig.ini"); var text = File.ReadAllText("UpdateConfig.ini");
//File.Delete("UpdateConfig.ini"); File.Delete("UpdateConfig.ini");
var arr = text.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries); var arr = text.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
if (arr.Length > 3) if (arr.Length > 3)
@@ -56,76 +57,76 @@ namespace Update
} }
} }
public static string HttpRequestPost(string url, string postData, string cookies = "", string codeType = "utf-8", string accept = "", string contentType = "") //public static string HttpRequestPost(string url, string postData, string cookies = "", string codeType = "utf-8", string accept = "", string contentType = "")
{ //{
HttpWebResponse response = null; // HttpWebResponse response = null;
string result; // string result;
try // try
{ // {
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); // HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
request.Method = "POST"; // request.Method = "POST";
request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8"; // request.Accept = "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8";
if (!string.IsNullOrEmpty(accept)) // if (!string.IsNullOrEmpty(accept))
request.Accept = accept; // request.Accept = accept;
request.ContentType = "application/x-www-form-urlencoded; charset=" + codeType; // request.ContentType = "application/x-www-form-urlencoded; charset=" + codeType;
if (!string.IsNullOrEmpty(contentType)) // if (!string.IsNullOrEmpty(contentType))
request.ContentType = contentType; // request.ContentType = contentType;
request.Referer = url; // request.Referer = url;
request.AllowAutoRedirect = false; // request.AllowAutoRedirect = false;
if (!string.IsNullOrEmpty(cookies)) // if (!string.IsNullOrEmpty(cookies))
request.Headers.Set(HttpRequestHeader.Cookie, cookies); // request.Headers.Set(HttpRequestHeader.Cookie, cookies);
byte[] byteData = Encoding.GetEncoding(codeType).GetBytes(postData); // byte[] byteData = Encoding.GetEncoding(codeType).GetBytes(postData);
request.ContentLength = byteData.Length; // request.ContentLength = byteData.Length;
using (Stream requestStream = request.GetRequestStream()) // using (Stream requestStream = request.GetRequestStream())
{ // {
requestStream.Write(byteData, 0, byteData.Length); // requestStream.Write(byteData, 0, byteData.Length);
} // }
response = (HttpWebResponse)request.GetResponse(); // response = (HttpWebResponse)request.GetResponse();
} // }
catch (WebException ex) // catch (WebException ex)
{ // {
if (ex.Status == WebExceptionStatus.ProtocolError) // if (ex.Status == WebExceptionStatus.ProtocolError)
{ // {
response = (HttpWebResponse)ex.Response; // response = (HttpWebResponse)ex.Response;
result = ReadResponse(response); // result = ReadResponse(response);
if (response != null) response.Close(); // if (response != null) response.Close();
return result; // return result;
} // }
else return ex.Message; // else return ex.Message;
} // }
catch (Exception e) // catch (Exception e)
{ // {
if (response != null) response.Close(); // if (response != null) response.Close();
return e.Message; // return e.Message;
} // }
result = ReadResponse(response); // result = ReadResponse(response);
if (response != null) response.Close(); // if (response != null) response.Close();
return result; // return result;
} //}
public static string ReadResponse(HttpWebResponse response) //public static string ReadResponse(HttpWebResponse response)
{ //{
using (Stream responseStream = response.GetResponseStream()) // using (Stream responseStream = response.GetResponseStream())
{ // {
Stream streamToRead = responseStream; // Stream streamToRead = responseStream;
if (response.ContentEncoding.ToLower().Contains("gzip")) // if (response.ContentEncoding.ToLower().Contains("gzip"))
{ // {
streamToRead = new GZipStream(streamToRead, CompressionMode.Decompress); // streamToRead = new GZipStream(streamToRead, CompressionMode.Decompress);
} // }
else if (response.ContentEncoding.ToLower().Contains("deflate")) // else if (response.ContentEncoding.ToLower().Contains("deflate"))
{ // {
streamToRead = new DeflateStream(streamToRead, CompressionMode.Decompress); // streamToRead = new DeflateStream(streamToRead, CompressionMode.Decompress);
} // }
using (StreamReader streamReader = new StreamReader(streamToRead, Encoding.UTF8)) // using (StreamReader streamReader = new StreamReader(streamToRead, Encoding.UTF8))
{ // {
return streamReader.ReadToEnd(); // return streamReader.ReadToEnd();
} // }
} // }
} //}
/// <summary> /// <summary>
/// 获取json中的int值 /// 获取json中的int值
@@ -133,16 +134,16 @@ namespace Update
/// <param name="html"></param> /// <param name="html"></param>
/// <param name="reg"></param> /// <param name="reg"></param>
/// <returns></returns> /// <returns></returns>
public static int GetIntJson(ref string html, string reg) //public static int GetIntJson(ref string html, string reg)
{ //{
string temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*['""]([^']+?)['""]"); // string temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*['""]([^']+?)['""]");
if (string.IsNullOrEmpty(temp)) // if (string.IsNullOrEmpty(temp))
temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*([\d-]+)"); // temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*([\d-]+)");
int i; // int i;
if (int.TryParse(temp, out i)) // if (int.TryParse(temp, out i))
return i; // return i;
return 0; // return 0;
} //}
/// <summary> /// <summary>
/// 获取字符串 /// 获取字符串
@@ -150,17 +151,17 @@ namespace Update
/// <param name="html"></param> /// <param name="html"></param>
/// <param name="reg"></param> /// <param name="reg"></param>
/// <returns></returns> /// <returns></returns>
public static string GetStringJson(ref string html, string reg) //public static string GetStringJson(ref string html, string reg)
{ //{
string temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*['""]([^']+?)['""]"); // string temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*['""]([^']+?)['""]");
if (string.IsNullOrEmpty(temp)) // if (string.IsNullOrEmpty(temp))
temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*([\d]+)"); // temp = GetMatchRegexString(html, @"['""]" + reg + @"['""][\s]*:[\s]*([\d]+)");
if (!string.IsNullOrEmpty(temp) && temp.Contains("\"")) // if (!string.IsNullOrEmpty(temp) && temp.Contains("\""))
temp = temp.Substring(0, temp.IndexOf("\"")); // temp = temp.Substring(0, temp.IndexOf("\""));
if (!string.IsNullOrEmpty(temp) && temp.Contains("'")) // if (!string.IsNullOrEmpty(temp) && temp.Contains("'"))
temp = temp.Substring(0, temp.IndexOf("'")); // temp = temp.Substring(0, temp.IndexOf("'"));
return temp; // return temp;
} //}
/// <summary> /// <summary>
/// 返回单个正则匹配项 /// 返回单个正则匹配项
@@ -168,18 +169,18 @@ namespace Update
/// <param name="sourceString"></param> /// <param name="sourceString"></param>
/// <param name="RegexString"></param> /// <param name="RegexString"></param>
/// <returns></returns> /// <returns></returns>
public static string GetMatchRegexString(string sourceString, string RegexString) //public static string GetMatchRegexString(string sourceString, string RegexString)
{ //{
if (!string.IsNullOrEmpty(sourceString)) // if (!string.IsNullOrEmpty(sourceString))
{ // {
MatchCollection mc = Regex.Matches(sourceString, RegexString, RegexOptions.IgnoreCase); // MatchCollection mc = Regex.Matches(sourceString, RegexString, RegexOptions.IgnoreCase);
if (mc.Count > 0) // if (mc.Count > 0)
{ // {
return mc[0].Groups[1].Value.ToString(); // return mc[0].Groups[1].Value.ToString();
} // }
} // }
return null; // return null;
} //}
/// <summary> /// <summary>
/// 下载文件 /// 下载文件
@@ -192,10 +193,12 @@ namespace Update
try try
{ {
WebClientUtils webClient = new WebClientUtils(); WebClientUtils webClient = new WebClientUtils();
webClient.Timeout = 300; webClient.Timeout = 600;
if (File.Exists(FilePath)) if (File.Exists(FilePath))
File.Delete(FilePath); File.Delete(FilePath);
webClient.DownloadFile(Urlstring, FilePath); webClient.DownloadProgressChanged += WebClient_DownloadProgressChanged;
var uri = new Uri(Urlstring);
webClient.DownloadFileAsync(uri, FilePath);
return true; return true;
} }
catch (Exception ex) catch (Exception ex)
@@ -203,5 +206,10 @@ namespace Update
return false; return false;
} }
} }
private static void WebClient_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
progress = e.ProgressPercentage;
}
} }
} }
+1 -1
View File
@@ -29,7 +29,7 @@
<PlatformTarget>AnyCPU</PlatformTarget> <PlatformTarget>AnyCPU</PlatformTarget>
<DebugType>pdbonly</DebugType> <DebugType>pdbonly</DebugType>
<Optimize>true</Optimize> <Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath> <OutputPath>..\..\bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants> <DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
+1 -1
View File
@@ -341,7 +341,7 @@ offCountPara,false;offProductPara,100;IrregularitiesPara,true;noNeerPara,true;no
if (File.Exists(updatefilepath)) if (File.Exists(updatefilepath))
{ {
File.WriteAllText(System.Environment.CurrentDirectory + "\\UpdateConfig.ini", File.WriteAllText(System.Environment.CurrentDirectory + "\\UpdateConfig.ini",
"TemuKJD.exe\r\n" + "TemuKJD\r\n" +
BaseClass.VersionCount + "\r\n" + BaseClass.VersionCount + "\r\n" +
newVersion + "\r\n" + newVersion + "\r\n" +
updateFileAddress); updateFileAddress);
+1
View File
@@ -34,6 +34,7 @@
<ErrorReport>prompt</ErrorReport> <ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel> <WarningLevel>4</WarningLevel>
<UseVSHostingProcess>false</UseVSHostingProcess> <UseVSHostingProcess>false</UseVSHostingProcess>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols> <DebugSymbols>true</DebugSymbols>