diff --git a/ButcherFactory.AutoUpdate/ButcherFactory.AutoUpdate.csproj b/ButcherFactory.AutoUpdate/ButcherFactory.AutoUpdate.csproj new file mode 100644 index 0000000..2823ace --- /dev/null +++ b/ButcherFactory.AutoUpdate/ButcherFactory.AutoUpdate.csproj @@ -0,0 +1,86 @@ + + + + + Debug + AnyCPU + {9F9BF3C4-A866-4E80-A0CB-1255ADE91428} + WinExe + Properties + ButcherFactory.AutoUpdate + ButcherFactory.AutoUpdate + v4.0 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff --git a/ButcherFactory.AutoUpdate/ClientVersion.cs b/ButcherFactory.AutoUpdate/ClientVersion.cs new file mode 100644 index 0000000..490a4fe --- /dev/null +++ b/ButcherFactory.AutoUpdate/ClientVersion.cs @@ -0,0 +1,82 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace ButcherFactory.AutoUpdate +{ + public class ClientVersion + { + public string Version { get; set; } + + public string ServerUrl { get; set; } + + private List _update = new List(); + public List UpdateFiles { get { return _update; } set { _update = value; } } + } + + public class UpdateFile + { + public string FileName { get; set; } + + public string Url { get; set; } + + public int Size { get; set; } + + public bool NeedRestart { get; set; } + } + + public static class XmlUtil + { + public static T XmlDeserializeObject(string xmlOfObject) where T : class + { + using (MemoryStream ms = new MemoryStream()) + { + using (StreamWriter sr = new StreamWriter(ms, Encoding.UTF8)) + { + sr.Write(xmlOfObject); + sr.Flush(); + ms.Seek(0, SeekOrigin.Begin); + XmlSerializer serializer = new XmlSerializer(typeof(T)); + return serializer.Deserialize(ms) as T; + } + } + } + + public static T DeserializeFromFile(string fileName = "") + { + if (string.IsNullOrWhiteSpace(fileName)) + { + fileName = typeof(T).Name + ".xml"; + } + if (!File.Exists(fileName)) + { + throw new FileNotFoundException("不存在文件:" + fileName); + } + using (var reader = new StreamReader(fileName)) + { + var xs = new XmlSerializer(typeof(T)); + object obj = xs.Deserialize(reader); + reader.Close(); + return (T)obj; + } + } + + public static void SerializerObjToFile(object obj, string fileName = "") + { + if (string.IsNullOrWhiteSpace(fileName)) + { + fileName = obj.GetType().Name + ".xml"; + } + + var ser = new XmlSerializer(obj.GetType()); + using (var stream = File.Open(fileName, FileMode.Create)) + { + ser.Serialize(stream, obj); + } + } + } +} diff --git a/ButcherFactory.AutoUpdate/Form1.Designer.cs b/ButcherFactory.AutoUpdate/Form1.Designer.cs new file mode 100644 index 0000000..050d0a5 --- /dev/null +++ b/ButcherFactory.AutoUpdate/Form1.Designer.cs @@ -0,0 +1,109 @@ +namespace ButcherFactory.AutoUpdate +{ + partial class Form1 + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.progressBarTotal = new System.Windows.Forms.ProgressBar(); + this.progressBarCurrent = new System.Windows.Forms.ProgressBar(); + this.labelCurrentItem = new System.Windows.Forms.Label(); + this.label1 = new System.Windows.Forms.Label(); + this.labelCurrent = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // progressBarTotal + // + this.progressBarTotal.Location = new System.Drawing.Point(23, 88); + this.progressBarTotal.Name = "progressBarTotal"; + this.progressBarTotal.Size = new System.Drawing.Size(438, 12); + this.progressBarTotal.Step = 1; + this.progressBarTotal.TabIndex = 11; + // + // progressBarCurrent + // + this.progressBarCurrent.Location = new System.Drawing.Point(22, 49); + this.progressBarCurrent.Name = "progressBarCurrent"; + this.progressBarCurrent.Size = new System.Drawing.Size(438, 12); + this.progressBarCurrent.Step = 1; + this.progressBarCurrent.TabIndex = 12; + // + // labelCurrentItem + // + this.labelCurrentItem.AutoSize = true; + this.labelCurrentItem.Location = new System.Drawing.Point(92, 34); + this.labelCurrentItem.Name = "labelCurrentItem"; + this.labelCurrentItem.Size = new System.Drawing.Size(0, 12); + this.labelCurrentItem.TabIndex = 8; + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(21, 73); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(53, 12); + this.label1.TabIndex = 9; + this.label1.Text = "总进度:"; + // + // labelCurrent + // + this.labelCurrent.AutoSize = true; + this.labelCurrent.Location = new System.Drawing.Point(21, 34); + this.labelCurrent.Name = "labelCurrent"; + this.labelCurrent.Size = new System.Drawing.Size(65, 12); + this.labelCurrent.TabIndex = 10; + this.labelCurrent.Text = "正在下载:"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(483, 134); + this.ControlBox = false; + this.Controls.Add(this.progressBarTotal); + this.Controls.Add(this.progressBarCurrent); + this.Controls.Add(this.labelCurrentItem); + this.Controls.Add(this.label1); + this.Controls.Add(this.labelCurrent); + this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle; + this.Name = "Form1"; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "自动更新"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.ProgressBar progressBarTotal; + private System.Windows.Forms.ProgressBar progressBarCurrent; + private System.Windows.Forms.Label labelCurrentItem; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label labelCurrent; + } +} + diff --git a/ButcherFactory.AutoUpdate/Form1.cs b/ButcherFactory.AutoUpdate/Form1.cs new file mode 100644 index 0000000..23b6427 --- /dev/null +++ b/ButcherFactory.AutoUpdate/Form1.cs @@ -0,0 +1,191 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Net; +using System.Text; +using System.Threading; +using System.Windows.Forms; + +namespace ButcherFactory.AutoUpdate +{ + public partial class Form1 : Form + { + const string serUri = "http://172.28.1.194:7799/AutoUpdate/ClientVersion.xml"; + const string PuKey = "c756e02cedb42a33f78091a466411bde8447d854"; + private bool isFinished = false; + private List downloadFileList = null; + private ManualResetEvent evtDownload = null; + private ManualResetEvent evtPerDonwload = null; + private WebClient clientDownload = null; + ClientVersion old; + bool error = false; + public Form1(string[] args) + { + InitializeComponent(); + if (args == null || args.Length == 0 || args[0] != PuKey) + error = true; + this.Load += Form1_Load; + } + + void Form1_Load(object sender, EventArgs e) + { + if (error) + Application.Exit(); + var versionFile = "ClientVersion.xml"; + old = new ClientVersion(); + if (File.Exists(versionFile)) + old = XmlUtil.DeserializeFromFile(); + if (string.IsNullOrEmpty(old.ServerUrl)) + old.ServerUrl = serUri; + + clientDownload = new WebClient(); + var version = XmlUtil.XmlDeserializeObject(clientDownload.DownloadString(old.ServerUrl)); + old.ServerUrl = version.ServerUrl; + old.Version = version.Version; + downloadFileList = version.UpdateFiles; + + evtDownload = new ManualResetEvent(true); + evtDownload.Reset(); + Thread t = new Thread(new ThreadStart(ProcDownload)); + t.Name = "download"; + t.Start(); + } + + long total = 0; + long nDownloadedTotal = 0; + string startFile = "ButcherFactory.Login.exe"; + string oldFolder; + private void ProcDownload() + { + evtPerDonwload = new ManualResetEvent(false); + + foreach (var file in this.downloadFileList) + { + total += file.Size; + } + oldFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "old"); + if (!Directory.Exists(oldFolder)) + Directory.CreateDirectory(oldFolder); + + while (!evtDownload.WaitOne(0, false)) + { + if (this.downloadFileList.Count == 0) + break; + + var file = this.downloadFileList[0]; + if (file.NeedRestart) + startFile = file.FileName; + + this.ShowCurrentDownloadFileName(file.FileName); + + //下载 + clientDownload = new WebClient(); + + clientDownload.DownloadProgressChanged += new DownloadProgressChangedEventHandler(OnDownloadProgressChanged); + clientDownload.DownloadFileCompleted += new AsyncCompletedEventHandler(OnDownloadFileCompleted); + + evtPerDonwload.Reset(); + + clientDownload.DownloadFileAsync(new Uri(file.Url), Path.Combine(AppDomain.CurrentDomain.BaseDirectory, file.FileName + ".tmp"), file); + + //等待下载完成 + evtPerDonwload.WaitOne(); + + clientDownload.Dispose(); + clientDownload = null; + + //移除已下载的文件 + this.downloadFileList.Remove(file); + } + + if (this.downloadFileList.Count == 0) + { + Exit(true); + evtDownload.Set(); + XmlUtil.SerializerObjToFile(old); + Process.Start(Path.Combine(Application.StartupPath, startFile)); + Application.Exit(); + } + else + Exit(false); + + evtDownload.Set(); + } + + void OnDownloadFileCompleted(object sender, AsyncCompletedEventArgs e) + { + var file = e.UserState as UpdateFile; + nDownloadedTotal += file.Size; + this.SetProcessBar(0, (int)(nDownloadedTotal * 100 / total)); + //备份文件 + string filePath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, file.FileName); + var oldFile = Path.Combine(oldFolder, file.FileName); + if (File.Exists(filePath)) + { + if (File.Exists(oldFile)) + File.Delete(oldFile); + + File.Move(filePath, oldFile); + } + + File.Move(filePath + ".tmp", filePath); + //继续下载其它文件 + evtPerDonwload.Set(); + } + + void OnDownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e) + { + this.SetProcessBar(e.ProgressPercentage, (int)((nDownloadedTotal + e.BytesReceived) * 100 / total)); + } + + delegate void ShowCurrentDownloadFileNameCallBack(string name); + private void ShowCurrentDownloadFileName(string name) + { + if (this.labelCurrentItem.InvokeRequired) + { + ShowCurrentDownloadFileNameCallBack cb = new ShowCurrentDownloadFileNameCallBack(ShowCurrentDownloadFileName); + this.Invoke(cb, new object[] { name }); + } + else + { + this.labelCurrentItem.Text = name; + } + } + + delegate void SetProcessBarCallBack(int current, int total); + private void SetProcessBar(int current, int total) + { + if (this.progressBarCurrent.InvokeRequired) + { + SetProcessBarCallBack cb = new SetProcessBarCallBack(SetProcessBar); + this.Invoke(cb, new object[] { current, total }); + } + else + { + this.progressBarCurrent.Value = current; + this.progressBarTotal.Value = total; + } + } + + delegate void ExitCallBack(bool success); + private void Exit(bool success) + { + if (this.InvokeRequired) + { + ExitCallBack cb = new ExitCallBack(Exit); + this.Invoke(cb, new object[] { success }); + } + else + { + this.isFinished = success; + this.DialogResult = success ? DialogResult.OK : DialogResult.Cancel; + this.Close(); + } + } + } +} diff --git a/ButcherFactory.AutoUpdate/Form1.resx b/ButcherFactory.AutoUpdate/Form1.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ButcherFactory.AutoUpdate/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ButcherFactory.AutoUpdate/Program.cs b/ButcherFactory.AutoUpdate/Program.cs new file mode 100644 index 0000000..3689840 --- /dev/null +++ b/ButcherFactory.AutoUpdate/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace ButcherFactory.AutoUpdate +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main(string[] args) + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1(args)); + } + } +} diff --git a/ButcherFactory.AutoUpdate/Properties/AssemblyInfo.cs b/ButcherFactory.AutoUpdate/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..8e95145 --- /dev/null +++ b/ButcherFactory.AutoUpdate/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("ButcherFactory.AutoUpdate")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ButcherFactory.AutoUpdate")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("5e1a2475-93a3-4682-aa08-83365d70f1a2")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ButcherFactory.AutoUpdate/Properties/Resources.Designer.cs b/ButcherFactory.AutoUpdate/Properties/Resources.Designer.cs new file mode 100644 index 0000000..a955ccf --- /dev/null +++ b/ButcherFactory.AutoUpdate/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace ButcherFactory.AutoUpdate.Properties +{ + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的、缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ButcherFactory.AutoUpdate.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 为所有资源查找重写当前线程的 CurrentUICulture 属性, + /// 方法是使用此强类型资源类。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ButcherFactory.AutoUpdate/Properties/Resources.resx b/ButcherFactory.AutoUpdate/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ButcherFactory.AutoUpdate/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ButcherFactory.AutoUpdate/Properties/Settings.Designer.cs b/ButcherFactory.AutoUpdate/Properties/Settings.Designer.cs new file mode 100644 index 0000000..6645aee --- /dev/null +++ b/ButcherFactory.AutoUpdate/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ButcherFactory.AutoUpdate.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ButcherFactory.AutoUpdate/Properties/Settings.settings b/ButcherFactory.AutoUpdate/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ButcherFactory.AutoUpdate/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ButcherFactory.BO/ButcherFactory.BO.csproj b/ButcherFactory.BO/ButcherFactory.BO.csproj index bc82a86..b6e00d1 100644 --- a/ButcherFactory.BO/ButcherFactory.BO.csproj +++ b/ButcherFactory.BO/ButcherFactory.BO.csproj @@ -79,6 +79,7 @@ + diff --git a/ButcherFactory.BO/LocalBL/BLUtil.cs b/ButcherFactory.BO/LocalBL/BLUtil.cs new file mode 100644 index 0000000..12a492f --- /dev/null +++ b/ButcherFactory.BO/LocalBL/BLUtil.cs @@ -0,0 +1,27 @@ +using Forks.EnterpriseServices.DomainObjects2.DQuery; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherFactory.BO.LocalBL +{ + public static class BLUtil + { + public static void DeleteLocalDb() + where T : SyncBill + { + var delete = new DQDeleteDom(typeof(T)); + delete.Where.Conditions.Add(DQCondition.And(DQCondition.LessThan("CreateTime", DateTime.Today.AddDays(-3)), DQCondition.EQ("Sync", true))); + delete.EExecute(); + } + + public static void DeleteSaleOutStoreInfo() + { + var delete = new DQDeleteDom(typeof(T)); + delete.Where.Conditions.Add(DQCondition.LessThan("Time", DateTime.Today.AddDays(-3))); + delete.EExecute(); + } + } +} diff --git a/ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs b/ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs index 7a0e2c0..5b2d430 100644 --- a/ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentInStoreBL.cs @@ -36,7 +36,7 @@ namespace ButcherFactory.BO.LocalBL query.Where.Conditions.Add(DQCondition.EQ("State", state)); if (state == 0) query.Where.Conditions.Add(DQCondition.Between("InStoreTime", DateTime.Today, DateTime.Today + new TimeSpan(23, 59, 59))); - query.OrderBy.Expressions.Add(DQOrderByExpression.Create("RowIndex", true)); + query.OrderBy.Expressions.Add(DQOrderByExpression.Create("RowIndex")); var list = new List(); using (var session = DmoSession.New()) { @@ -79,15 +79,15 @@ namespace ButcherFactory.BO.LocalBL { var json = RpcFacade.Call(RpcPath + "GetUnInStoreList"); var list = JsonConvert.DeserializeObject>(json); - var inStored = GetInstoredList(list.Select(x => x.BarCode)); - var result = list.Where(x => !inStored.Any(y => x.BarCode == y)).ToList(); + //var inStored = GetInstoredList(list.Select(x => x.BarCode)); + // var result = list.Where(x => !inStored.Any(y => x.BarCode == y)).ToList(); var idx = 1; - foreach (var item in result) + foreach (var item in list) { item.RowIndex = idx; idx++; } - return new BindingList(result); + return new BindingList(list); } catch { diff --git a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs index 91e03df..8ce286a 100644 --- a/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentProductionBL.cs @@ -32,7 +32,10 @@ namespace ButcherFactory.BO.LocalBL query.Where.Conditions.Add(DQCondition.And(DQCondition.EQ("InStored", false), DQCondition.EQ("Delete", false), DQCondition.EQ("Submited", submited))); query.OrderBy.Expressions.Add(DQOrderByExpression.Create("ID", true)); if (submited) - query.Range = SelectRange.Top(50); + { + query.Where.Conditions.Add(DQCondition.GreaterThanOrEqual("CreateTime", DateTime.Today)); + query.Range = SelectRange.Top(20); + } var list = new BindingList(); using (var session = DmoSession.New()) { diff --git a/ButcherFactory.BO/LocalBL/SegmentStockUpBL.cs b/ButcherFactory.BO/LocalBL/SegmentStockUpBL.cs index 8c86f08..095a68b 100644 --- a/ButcherFactory.BO/LocalBL/SegmentStockUpBL.cs +++ b/ButcherFactory.BO/LocalBL/SegmentStockUpBL.cs @@ -55,7 +55,7 @@ namespace ButcherFactory.BO.LocalBL var json = JsonConvert.SerializeObject(min); var bkJson = RpcFacade.Call(RpcPath + "SaleOutStoreRpc/InsertStockUpDetail", detail.Date, detail.Goods_ID, detail.DeliverGoodsLine_ID, json); if (string.IsNullOrEmpty(bkJson)) - throw new Exception("无等待备货信息"); + return string.Empty; var backInfo = JsonConvert.DeserializeObject(bkJson); detail.SaleOutStoreID = backInfo.LongExt1.Value; detail.ID = backInfo.LongExt2.Value; diff --git a/ButcherFactory.BO/Utils/FormUtil.cs b/ButcherFactory.BO/Utils/FormUtil.cs index b6f42e4..2ca9ec2 100644 --- a/ButcherFactory.BO/Utils/FormUtil.cs +++ b/ButcherFactory.BO/Utils/FormUtil.cs @@ -13,7 +13,7 @@ namespace ButcherFactory.BO.Utils { public static Form CreateFrom() { - RedirectRole(); + //RedirectRole(); var dll = Path.Combine(Directory.GetCurrentDirectory(), "ButcherFactory.Form.dll"); if (!File.Exists(dll)) diff --git a/ButcherFactory.Form/ButcherFactory.Form.csproj b/ButcherFactory.Form/ButcherFactory.Form.csproj index 6332bd3..b63a21f 100644 --- a/ButcherFactory.Form/ButcherFactory.Form.csproj +++ b/ButcherFactory.Form/ButcherFactory.Form.csproj @@ -77,6 +77,12 @@ FormTemplate.cs + + Form + + + InfoBox.cs + Component @@ -202,6 +208,12 @@ SegmentProductionAutoForm.cs + + Form + + + TemplateSelector.cs + Form @@ -241,6 +253,7 @@ WeightRecordDialog.cs + Form @@ -266,6 +279,9 @@ FormTemplate.cs + + InfoBox.cs + WeightControl.cs @@ -321,6 +337,9 @@ SegmentProductionAutoForm.cs + + TemplateSelector.cs + SegmentProductionForm.cs @@ -353,9 +372,11 @@ + + diff --git a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs index 63299bc..e2c1f9e 100644 --- a/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs +++ b/ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.cs @@ -111,6 +111,7 @@ namespace ButcherFactory.CarcassInStore_ { this.Invoke(new Action(() => { + BLUtil.DeleteLocalDb(); if (netStateWatch1.NetState) { BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.白条出入库); diff --git a/ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.cs b/ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.cs index 25dbaca..42e2f9a 100644 --- a/ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.cs +++ b/ButcherFactory.Form/CarcassSaleOut2_/CarcassSaleOutForm.cs @@ -82,6 +82,9 @@ namespace ButcherFactory.CarcassSaleOut2_ protected override void OnLoad(EventArgs e) { base.OnLoad(e); + + BLUtil.DeleteSaleOutStoreInfo(); + BLUtil.DeleteSaleOutStoreInfo(); billState = 0; billStateBox.Text = "未审核"; sendDateBox.Text = sendTime.ToString("yyyy-MM-dd"); diff --git a/ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.cs b/ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.cs index 1b04262..3d80efa 100644 --- a/ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.cs +++ b/ButcherFactory.Form/CarcassTakeOut_/CarcassTakeOutForm.cs @@ -88,6 +88,7 @@ namespace ButcherFactory.CarcassTakeOut_ { this.Invoke(new Action(() => { + BLUtil.DeleteLocalDb(); if (netStateWatch1.NetState) { BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.白条出入库); @@ -266,8 +267,8 @@ namespace ButcherFactory.CarcassTakeOut_ foreach (var item in arr) { historyList.Insert(0, item); - if (historyList.Count > 100) - historyList.RemoveAt(100); + if (historyList.Count > 50) + historyList.RemoveAt(50); needSubmitedList.Remove(item); } weightList.Clear(); diff --git a/ButcherFactory.Form/Controls/InfoBox.Designer.cs b/ButcherFactory.Form/Controls/InfoBox.Designer.cs new file mode 100644 index 0000000..e9560ac --- /dev/null +++ b/ButcherFactory.Form/Controls/InfoBox.Designer.cs @@ -0,0 +1,78 @@ +namespace ButcherFactory.Controls +{ + partial class InfoBox + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.button1 = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // button1 + // + this.button1.Font = new System.Drawing.Font("宋体", 15F); + this.button1.Location = new System.Drawing.Point(180, 278); + this.button1.Name = "button1"; + this.button1.Size = new System.Drawing.Size(120, 56); + this.button1.TabIndex = 0; + this.button1.Text = "确定"; + this.button1.UseVisualStyleBackColor = true; + this.button1.Click += new System.EventHandler(this.button1_Click); + // + // label1 + // + this.label1.BackColor = System.Drawing.Color.White; + this.label1.Font = new System.Drawing.Font("宋体", 18F); + this.label1.ForeColor = System.Drawing.Color.Red; + this.label1.Location = new System.Drawing.Point(30, 32); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(417, 222); + this.label1.TabIndex = 1; + this.label1.Text = "message"; + this.label1.TextAlign = System.Drawing.ContentAlignment.MiddleCenter; + // + // InfoBox + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(485, 349); + this.ControlBox = false; + this.Controls.Add(this.label1); + this.Controls.Add(this.button1); + this.Name = "InfoBox"; + this.Text = "title"; + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.Button button1; + private System.Windows.Forms.Label label1; + } +} \ No newline at end of file diff --git a/ButcherFactory.Form/Controls/InfoBox.cs b/ButcherFactory.Form/Controls/InfoBox.cs new file mode 100644 index 0000000..cf2c227 --- /dev/null +++ b/ButcherFactory.Form/Controls/InfoBox.cs @@ -0,0 +1,74 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ButcherFactory.Controls +{ + public partial class InfoBox : Form + { + System.Timers.Timer timer; + int sec = 0; + public InfoBox(string title, string content,Color foreColor, int second) + { + InitializeComponent(); + label1.Text = content; + this.Text = title; + this.label1.ForeColor = foreColor; + + button1.Text = "确定"; + if (second > 0) + { + sec = second; + timer = new System.Timers.Timer(); + timer.Interval = 1000; + timer.Elapsed += timer_Elapsed; + timer.Start(); + } + this.FormClosing += DialogForm_FormClosing; + } + + void DialogForm_FormClosing(object sender, FormClosingEventArgs e) + { + if (timer != null) + { + if (timer.Enabled) + timer.Enabled = false; + timer.Dispose(); + } + } + + void timer_Elapsed(object sender, System.Timers.ElapsedEventArgs e) + { + this.Invoke(new Action(() => + { + if (sec > 0) + { + button1.Text = string.Format("确定({0}秒)", sec); + sec--; + } + else + { + timer.Enabled = false; + this.Close(); + } + })); + } + + public static void Show(string title, string msg,Color foreColor, int closeSec = 0) + { + var d = new InfoBox(title, msg,foreColor, closeSec); + d.ShowDialog(); + } + + private void button1_Click(object sender, EventArgs e) + { + this.Close(); + } + } +} diff --git a/ButcherFactory.Form/Controls/InfoBox.resx b/ButcherFactory.Form/Controls/InfoBox.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ButcherFactory.Form/Controls/InfoBox.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs b/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs index f580955..bfd649e 100644 --- a/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs +++ b/ButcherFactory.Form/SegmentInStore_/SegmentInStoreForm.cs @@ -72,6 +72,7 @@ namespace ButcherFactory.SegmentInStore_ { this.Invoke(new Action(() => { + BLUtil.DeleteLocalDb(); if (netStateWatch1.NetState) { BaseInfoSyncRpc.SyncBaseInfo(); @@ -96,9 +97,9 @@ namespace ButcherFactory.SegmentInStore_ private void BindExceptionGrid() { - exceptionList = SegmentInStoreBL.GetExceptionList(); - exceptionGrid.DataSource = exceptionList; - exceptionGrid.Refresh(); + //exceptionList = SegmentInStoreBL.GetExceptionList(); + //exceptionGrid.DataSource = exceptionList; + //exceptionGrid.Refresh(); } private void BindBackGrid() @@ -121,7 +122,7 @@ namespace ButcherFactory.SegmentInStore_ { while (true) { - if (this.IsHandleCreated) + try { this.Invoke(new Action(() => { @@ -129,7 +130,8 @@ namespace ButcherFactory.SegmentInStore_ SegmentInStoreBL.UploadSegmentInstoreInfo(); })); } - Thread.Sleep(2000); + catch { } + Thread.Sleep(1000); } } diff --git a/ButcherFactory.Form/SegmentPickUp_/SegmentPickUpForm.cs b/ButcherFactory.Form/SegmentPickUp_/SegmentPickUpForm.cs index ad7069f..328523a 100644 --- a/ButcherFactory.Form/SegmentPickUp_/SegmentPickUpForm.cs +++ b/ButcherFactory.Form/SegmentPickUp_/SegmentPickUpForm.cs @@ -88,6 +88,7 @@ namespace ButcherFactory.SegmentPickUp_ { this.Invoke(new Action(() => { + BLUtil.DeleteLocalDb(); if (netStateWatch1.NetState) { BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.分割领用); diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs index 66020f0..dc157c1 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.Designer.cs @@ -28,16 +28,16 @@ /// private void InitializeComponent() { - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle21 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle22 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle26 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle23 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle24 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle25 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle27 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle28 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle30 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle29 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle16 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle13 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle14 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle15 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle17 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle18 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle20 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle19 = new System.Windows.Forms.DataGridViewCellStyle(); this.uLabel3 = new WinFormControl.ULabel(); this.groupBox2 = new System.Windows.Forms.GroupBox(); this.taskDataGrid = new WinFormControl.UDataGridView(); @@ -49,6 +49,7 @@ this.splitContainer1 = new System.Windows.Forms.SplitContainer(); this.closeBtn = new ButcherFactory.Controls.ColorButton(); this.uWeightControl1 = new ButcherFactory.Controls.WeightControl(); + this.testCkBox = new System.Windows.Forms.CheckBox(); this.barPrintCheck = new System.Windows.Forms.CheckBox(); this.uTimerLabel1 = new WinFormControl.UTimerLabel(); this.productBatchSelect = new System.Windows.Forms.ComboBox(); @@ -68,7 +69,7 @@ this.H_BarCode = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Goods_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.testCkBox = new System.Windows.Forms.CheckBox(); + this.templateBtn = new ButcherFactory.Controls.ColorButton(); this.groupBox2.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.taskDataGrid)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer1)).BeginInit(); @@ -111,15 +112,15 @@ this.taskDataGrid.AllowUserToDeleteRows = false; this.taskDataGrid.AllowUserToResizeColumns = false; this.taskDataGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle21.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle21; + dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.taskDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle11; this.taskDataGrid.BackgroundColor = System.Drawing.Color.White; this.taskDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle22.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle22.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle22.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle22.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle22; + dataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle12.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle12.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.taskDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle12; this.taskDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.taskDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.T_Item, @@ -132,9 +133,9 @@ this.taskDataGrid.Name = "taskDataGrid"; this.taskDataGrid.ReadOnly = true; this.taskDataGrid.RowHeadersVisible = false; - dataGridViewCellStyle26.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle26.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle26; + dataGridViewCellStyle16.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle16.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.taskDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle16; this.taskDataGrid.RowTemplate.Height = 23; this.taskDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.taskDataGrid.Size = new System.Drawing.Size(442, 96); @@ -151,8 +152,8 @@ // this.T_Need.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Need.DataPropertyName = "Need"; - dataGridViewCellStyle23.Format = "#0.######"; - this.T_Need.DefaultCellStyle = dataGridViewCellStyle23; + dataGridViewCellStyle13.Format = "#0.######"; + this.T_Need.DefaultCellStyle = dataGridViewCellStyle13; this.T_Need.HeaderText = "订货"; this.T_Need.Name = "T_Need"; this.T_Need.ReadOnly = true; @@ -161,8 +162,8 @@ // this.T_Done.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Done.DataPropertyName = "Done"; - dataGridViewCellStyle24.Format = "#0.######"; - this.T_Done.DefaultCellStyle = dataGridViewCellStyle24; + dataGridViewCellStyle14.Format = "#0.######"; + this.T_Done.DefaultCellStyle = dataGridViewCellStyle14; this.T_Done.HeaderText = "完工"; this.T_Done.Name = "T_Done"; this.T_Done.ReadOnly = true; @@ -171,8 +172,8 @@ // this.T_Last.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill; this.T_Last.DataPropertyName = "Last"; - dataGridViewCellStyle25.Format = "#0.######"; - this.T_Last.DefaultCellStyle = dataGridViewCellStyle25; + dataGridViewCellStyle15.Format = "#0.######"; + this.T_Last.DefaultCellStyle = dataGridViewCellStyle15; this.T_Last.HeaderText = "剩余"; this.T_Last.Name = "T_Last"; this.T_Last.ReadOnly = true; @@ -201,6 +202,7 @@ // // splitContainer1.Panel1 // + this.splitContainer1.Panel1.Controls.Add(this.templateBtn); this.splitContainer1.Panel1.Controls.Add(this.closeBtn); this.splitContainer1.Panel1.Controls.Add(this.uWeightControl1); this.splitContainer1.Panel1.Controls.Add(this.testCkBox); @@ -243,6 +245,17 @@ this.uWeightControl1.TabIndex = 17; this.uWeightControl1.WeightFalg = null; // + // testCkBox + // + this.testCkBox.AutoSize = true; + this.testCkBox.Font = new System.Drawing.Font("宋体", 15F); + this.testCkBox.Location = new System.Drawing.Point(648, 9); + this.testCkBox.Name = "testCkBox"; + this.testCkBox.Size = new System.Drawing.Size(108, 24); + this.testCkBox.TabIndex = 16; + this.testCkBox.Text = "生产测试"; + this.testCkBox.UseVisualStyleBackColor = true; + // // barPrintCheck // this.barPrintCheck.AutoSize = true; @@ -412,15 +425,15 @@ this.historyDataGrid.AllowUserToDeleteRows = false; this.historyDataGrid.AllowUserToResizeColumns = false; this.historyDataGrid.AllowUserToResizeRows = false; - dataGridViewCellStyle27.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); - this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle27; + dataGridViewCellStyle17.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(235)))), ((int)(((byte)(235))))); + this.historyDataGrid.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle17; this.historyDataGrid.BackgroundColor = System.Drawing.Color.White; this.historyDataGrid.BorderStyle = System.Windows.Forms.BorderStyle.None; - dataGridViewCellStyle28.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle28.Font = new System.Drawing.Font("宋体", 12F); - dataGridViewCellStyle28.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle28.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle28; + dataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle18.Font = new System.Drawing.Font("宋体", 12F); + dataGridViewCellStyle18.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.historyDataGrid.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle18; this.historyDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; this.historyDataGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.H_ID, @@ -434,9 +447,9 @@ this.historyDataGrid.Name = "historyDataGrid"; this.historyDataGrid.ReadOnly = true; this.historyDataGrid.RowHeadersVisible = false; - dataGridViewCellStyle30.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - dataGridViewCellStyle30.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); - this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle30; + dataGridViewCellStyle20.Font = new System.Drawing.Font("宋体", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + dataGridViewCellStyle20.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); + this.historyDataGrid.RowsDefaultCellStyle = dataGridViewCellStyle20; this.historyDataGrid.RowTemplate.Height = 23; this.historyDataGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.historyDataGrid.Size = new System.Drawing.Size(437, 308); @@ -477,22 +490,25 @@ // H_Weight // this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle29.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle29; + dataGridViewCellStyle19.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle19; this.H_Weight.HeaderText = "重量"; this.H_Weight.Name = "H_Weight"; this.H_Weight.ReadOnly = true; // - // testCkBox + // templateBtn // - this.testCkBox.AutoSize = true; - this.testCkBox.Font = new System.Drawing.Font("宋体", 15F); - this.testCkBox.Location = new System.Drawing.Point(648, 13); - this.testCkBox.Name = "testCkBox"; - this.testCkBox.Size = new System.Drawing.Size(108, 24); - this.testCkBox.TabIndex = 16; - this.testCkBox.Text = "生产测试"; - this.testCkBox.UseVisualStyleBackColor = true; + this.templateBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222))))); + this.templateBtn.Font = new System.Drawing.Font("宋体", 15F); + this.templateBtn.ForeColor = System.Drawing.Color.White; + this.templateBtn.Location = new System.Drawing.Point(648, 35); + this.templateBtn.Name = "templateBtn"; + this.templateBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.templateBtn.Size = new System.Drawing.Size(111, 41); + this.templateBtn.TabIndex = 23; + this.templateBtn.Text = "选择标签"; + this.templateBtn.UseVisualStyleBackColor = false; + this.templateBtn.Click += new System.EventHandler(this.templateBtn_Click); // // SegmentProductionAutoForm // @@ -556,5 +572,6 @@ private Controls.ColorButton closeBtn; private Controls.ColorButton goodsSetBtn; private System.Windows.Forms.CheckBox testCkBox; + private Controls.ColorButton templateBtn; } } \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs index 948c858..b22f3b1 100644 --- a/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs +++ b/ButcherFactory.Form/SegmentProductionAuto_/SegmentProductionAutoForm.cs @@ -24,7 +24,8 @@ namespace ButcherFactory.SegmentProductionAuto_ { public List RoleName { - get { return new List { (short)设备类别.分割生产自动化 }; } + //get { return new List { (short)设备类别.分割生产自动化 }; } + get { return new List { (short)设备类别.分割生产 }; } } public Form Generate() @@ -36,9 +37,9 @@ namespace ButcherFactory.SegmentProductionAuto_ Thread checkInStoreState; BindingList historyList; Dictionary> goodsSetDic; - long? workUnitID; long? batchID; DateTime? batchDate; + NotAuto.SegmentProductionFormConfig config; public SegmentProductionAutoForm() { @@ -54,10 +55,10 @@ namespace ButcherFactory.SegmentProductionAuto_ workUnitSelect.SelectedIndexChanged += delegate { if (workUnitSelect.SelectedValue == null) - workUnitID = null; + config.WorkUnitID = null; else - workUnitID = (long)workUnitSelect.SelectedValue; - XmlUtil.SerializerObjToFile(new NotAuto.SegmentProductionFormConfig { WorkUnitID = workUnitID }); + config.WorkUnitID = (long)workUnitSelect.SelectedValue; + XmlUtil.SerializerObjToFile(config); }; productBatchSelect.SelectedIndexChanged += delegate { @@ -92,6 +93,7 @@ namespace ButcherFactory.SegmentProductionAuto_ { this.Invoke(new Action(() => { + BLUtil.DeleteLocalDb(); if (netStateWatch1.NetState) { BaseInfoSyncRpc.SyncGoodsByTag(ApplyClient.分割品); @@ -99,7 +101,7 @@ namespace ButcherFactory.SegmentProductionAuto_ BaseInfoSyncRpc.SyncProductBatch(1); } productBatchSelect.EBindComboBox(x => x.Date == DateTime.Today, 6, "Date"); - var config = XmlUtil.DeserializeFromFile(); + config = XmlUtil.DeserializeFromFile(); workUnitSelect.EBindComboBox(x => x.ID == config.WorkUnitID); BindGoods(); @@ -149,7 +151,7 @@ namespace ButcherFactory.SegmentProductionAuto_ throw new Exception(string.Format("重量必须在{0:#0.######}-{1:#0.######}之间", detail.StandardWeightLow, detail.StandardWeightUp)); weight = detail.StandardWeight.Value; } - var entity = SegmentProductionBL.InsertAndSetGroupID(detail.Goods_ID, weight, workUnitID, batchID.Value, batchDate.Value,testCkBox.Checked); + var entity = SegmentProductionBL.InsertAndSetGroupID(detail.Goods_ID, weight, config.WorkUnitID, batchID.Value, batchDate.Value, testCkBox.Checked); entity.Goods_Code = detail.Goods_Code; entity.Goods_Name = detail.Goods_Name; entity.Goods_Spec = detail.Goods_Spec; @@ -157,13 +159,13 @@ namespace ButcherFactory.SegmentProductionAuto_ if (!testCkBox.Checked) { historyList.Insert(0, entity); - if (historyList.Count > 100) - historyList.RemoveAt(100); + if (historyList.Count > 30) + historyList.RemoveAt(30); historyDataGrid.FirstDisplayedScrollingRowIndex = 0; historyDataGrid.Refresh(); } if (barPrintCheck.Checked) - NotAuto.SegmentProductionPrint.Print(entity, batchDate); + NotAuto.SegmentProductionPrint.Print(entity, batchDate, config.Template); if (!testCkBox.Checked) { taskDataGrid.DataSource = SegmentProductionBL.GetProductTask(batchDate ?? DateTime.Today, entity); @@ -186,7 +188,7 @@ namespace ButcherFactory.SegmentProductionAuto_ { while (true) { - if (this.IsHandleCreated) + try { this.Invoke(new Action(() => { @@ -194,6 +196,7 @@ namespace ButcherFactory.SegmentProductionAuto_ SegmentProductionBL.UploadSegmentInfo(); })); } + catch { } Thread.Sleep(2000); } } @@ -202,13 +205,14 @@ namespace ButcherFactory.SegmentProductionAuto_ { while (true) { - if (this.IsHandleCreated) + try { this.Invoke(new Action(() => { - if (netStateWatch1.NetState) + if (netStateWatch1.NetState) { - if (historyList.Any()) { + if (historyList.Any()) + { var arr = historyList.Reverse().Take(20).ToList(); var inStored = SegmentProductionBL.GetInStoreState(arr.Select(x => x.BarCode).ToList()); var tag = arr.Where(x => inStored.Contains(x.BarCode)); @@ -223,6 +227,7 @@ namespace ButcherFactory.SegmentProductionAuto_ } })); } + catch { } Thread.Sleep(5000); } } @@ -245,8 +250,13 @@ namespace ButcherFactory.SegmentProductionAuto_ if (historyDataGrid.CurrentRow == null) throw new Exception("请先选择要补打的记录"); var item = historyDataGrid.CurrentRow.DataBoundItem as SegmentProduction; - NotAuto.SegmentProductionPrint.Print(item, batchDate); + NotAuto.SegmentProductionPrint.Print(item, batchDate, config.Template); } } + + private void templateBtn_Click(object sender, EventArgs e) + { + new TemplateSelector(config).ShowDialog(); + } } } diff --git a/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.Designer.cs b/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.Designer.cs new file mode 100644 index 0000000..642b1eb --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.Designer.cs @@ -0,0 +1,101 @@ +namespace ButcherFactory.SegmentProductionAuto_ +{ + partial class TemplateSelector + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.closeBtn = new ButcherFactory.Controls.ColorButton(); + this.tp1 = new ButcherFactory.Controls.ColorButton(); + this.tp2 = new ButcherFactory.Controls.ColorButton(); + this.SuspendLayout(); + // + // closeBtn + // + this.closeBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.closeBtn.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(0)))), ((int)(((byte)(25))))); + this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); + this.closeBtn.ForeColor = System.Drawing.Color.White; + this.closeBtn.Location = new System.Drawing.Point(176, 313); + this.closeBtn.Name = "closeBtn"; + this.closeBtn.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(158)))), ((int)(((byte)(234)))), ((int)(((byte)(106))))); + this.closeBtn.Size = new System.Drawing.Size(111, 41); + this.closeBtn.TabIndex = 19; + this.closeBtn.Text = "关闭"; + this.closeBtn.UseVisualStyleBackColor = false; + this.closeBtn.Click += new System.EventHandler(this.closeBtn_Click); + // + // tp1 + // + this.tp1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); + this.tp1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.tp1.Font = new System.Drawing.Font("宋体", 15F); + this.tp1.ForeColor = System.Drawing.Color.White; + this.tp1.Location = new System.Drawing.Point(134, 70); + this.tp1.Name = "tp1"; + this.tp1.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222))))); + this.tp1.Size = new System.Drawing.Size(191, 62); + this.tp1.TabIndex = 20; + this.tp1.Text = "鲜品标签"; + this.tp1.UseVisualStyleBackColor = false; + this.tp1.Click += new System.EventHandler(this.tp1_Click); + // + // tp2 + // + this.tp2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); + this.tp2.Font = new System.Drawing.Font("宋体", 15F); + this.tp2.ForeColor = System.Drawing.Color.White; + this.tp2.Location = new System.Drawing.Point(134, 159); + this.tp2.Name = "tp2"; + this.tp2.SelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(144)))), ((int)(((byte)(98)))), ((int)(((byte)(222))))); + this.tp2.Size = new System.Drawing.Size(191, 62); + this.tp2.TabIndex = 23; + this.tp2.Text = "冻品标签"; + this.tp2.UseVisualStyleBackColor = false; + this.tp2.Click += new System.EventHandler(this.tp2_Click); + // + // TemplateSelector + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.BackColor = System.Drawing.Color.White; + this.ClientSize = new System.Drawing.Size(461, 376); + this.Controls.Add(this.tp2); + this.Controls.Add(this.tp1); + this.Controls.Add(this.closeBtn); + this.Name = "TemplateSelector"; + this.Text = "选择标签"; + this.ResumeLayout(false); + + } + + #endregion + + private Controls.ColorButton closeBtn; + private Controls.ColorButton tp1; + private Controls.ColorButton tp2; + } +} \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.cs b/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.cs new file mode 100644 index 0000000..dcbc873 --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.cs @@ -0,0 +1,55 @@ +using ButcherFactory.BO.Utils; +using ButcherFactory.SegmentProduction_; +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ButcherFactory.SegmentProductionAuto_ +{ + public partial class TemplateSelector : Form + { + SegmentProductionFormConfig config; + public TemplateSelector(SegmentProductionFormConfig _config) + { + InitializeComponent(); + config = _config; + if (config.Template == "SegmentProductionPrint.html") + tp1.Text += "(当前)"; + else + tp2.Text += "(当前)"; + } + + private void closeBtn_Click(object sender, EventArgs e) + { + this.Close(); + } + + private void tp1_Click(object sender, EventArgs e) + { + if (config.Template != "SegmentProductionPrint.html") + { + config.Template = "SegmentProductionPrint.html"; + XmlUtil.SerializerObjToFile(config); + tp1.Text = "鲜品标签(当前)"; + tp2.Text = "冻品标签"; + } + } + + private void tp2_Click(object sender, EventArgs e) + { + if (config.Template != "SegmentProductionPrint1.html") + { + config.Template = "SegmentProductionPrint1.html"; + XmlUtil.SerializerObjToFile(config); + tp1.Text = "鲜品标签"; + tp2.Text = "冻品标签(当前)"; + } + } + } +} diff --git a/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.resx b/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.resx new file mode 100644 index 0000000..1af7de1 --- /dev/null +++ b/ButcherFactory.Form/SegmentProductionAuto_/TemplateSelector.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs b/ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs index 1072e08..c62913a 100644 --- a/ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionForm.cs @@ -18,17 +18,17 @@ using ButcherFactory.Dialogs; namespace ButcherFactory.SegmentProduction_ { - public partial class SegmentProductionForm : Form, IWithRoleForm + public partial class SegmentProductionForm : Form//, IWithRoleForm { - public List RoleName - { - get { return new List { (short)设备类别.分割生产 }; } - } + //public List RoleName + //{ + // get { return new List { (short)设备类别.分割生产 }; } + //} - public Form Generate() - { - return this; - } + //public Form Generate() + //{ + // return this; + //} Thread uploadData; BindingList historyList; @@ -161,7 +161,7 @@ namespace ButcherFactory.SegmentProduction_ historyDataGrid.FirstDisplayedScrollingRowIndex = 0; historyDataGrid.Refresh(); if (barPrintCheck.Checked) - SegmentProductionPrint.Print(entity, batchDate); + SegmentProductionPrint.Print(entity, batchDate,""); } void BindGrid() @@ -277,7 +277,7 @@ namespace ButcherFactory.SegmentProduction_ if (historyDataGrid.CurrentRow == null) throw new Exception("请先选择要补打的记录"); var item = historyDataGrid.CurrentRow.DataBoundItem as SegmentProduction; - SegmentProductionPrint.Print(item, batchDate); + SegmentProductionPrint.Print(item, batchDate, ""); } } diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionFormConfig.cs b/ButcherFactory.Form/SegmentProduction_/SegmentProductionFormConfig.cs index fb3a168..52351ce 100644 --- a/ButcherFactory.Form/SegmentProduction_/SegmentProductionFormConfig.cs +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionFormConfig.cs @@ -9,5 +9,8 @@ namespace ButcherFactory.SegmentProduction_ public class SegmentProductionFormConfig { public long? WorkUnitID { get; set; } + + private string _template = "SegmentProductionPrint.html"; + public string Template { get { return _template; } set { _template = value; } } } } diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs index c552952..77ec3d0 100644 --- a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.cs @@ -12,10 +12,10 @@ namespace ButcherFactory.SegmentProduction_ public static class SegmentProductionPrint { static int id = 1; - const string PRINTFILE = @"PrintTemplate\SegmentProductionPrint.html"; + const string PRINTFILE = @"PrintTemplate\"; const string ENDFILE = @"PrintTemplate\SegmentProductionPrintEnd.html"; const string IMGFILE = @"TempImg\_img{0}.png"; - public static void Print(SegmentProduction entity, DateTime? dt) + public static void Print(SegmentProduction entity, DateTime? dt, string template) { if (AppContext.ConnectInfo.TraceBackUrl == "default") throw new Exception("请先配置追溯服务器地址"); @@ -29,7 +29,7 @@ namespace ButcherFactory.SegmentProduction_ var url = string.Format(AppContext.ConnectInfo.TraceBackUrl + "?code={0}", entity.BarCode); BwpClientPrint.BwpClientWebPrint.Create2DPic(url, imgUrl, 80); dic.Add("$ImageUrl", imgUrl); - BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE, dic); + BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE + template, dic); AfterPrint(); } diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.html b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.html index 4dda980..a054446 100644 --- a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.html +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint.html @@ -19,8 +19,8 @@
规格:$Goods_Spec   生产日期:$Date
- - + +
执行标准:GB/T9959.2-2008
储存条件:-18℃以下保存
保 质 期:18个月
储存条件:0~4℃保存
保 质 期:7天
生产厂家:青岛万福集团股份有限公司
生产厂址:青岛莱西市珠海路五号
diff --git a/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint1.html b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint1.html new file mode 100644 index 0000000..4dda980 --- /dev/null +++ b/ButcherFactory.Form/SegmentProduction_/SegmentProductionPrint1.html @@ -0,0 +1,28 @@ + + + + + + +
品名:$Goods_Name
+
规格:$Goods_Spec   生产日期:$Date
+ + + + + + +
执行标准:GB/T9959.2-2008
储存条件:-18℃以下保存
保 质 期:18个月
生产厂家:青岛万福集团股份有限公司
生产厂址:青岛莱西市珠海路五号
+ + \ No newline at end of file diff --git a/ButcherFactory.Form/SegmentSaleOut_/SegmentSaleOutForm.cs b/ButcherFactory.Form/SegmentSaleOut_/SegmentSaleOutForm.cs index 44f7c8f..0b59aab 100644 --- a/ButcherFactory.Form/SegmentSaleOut_/SegmentSaleOutForm.cs +++ b/ButcherFactory.Form/SegmentSaleOut_/SegmentSaleOutForm.cs @@ -59,6 +59,7 @@ namespace ButcherFactory.SegmentSaleOut_ protected override void OnLoad(EventArgs e) { base.OnLoad(e); + BLUtil.DeleteSaleOutStoreInfo(); billState = 0; billStateBox.Text = "未审核"; sendDateBox.Text = sendTime.ToString("yyyy-MM-dd"); diff --git a/ButcherFactory.Form/SegmentStockUp_/PrintAPI.cs b/ButcherFactory.Form/SegmentStockUp_/PrintAPI.cs new file mode 100644 index 0000000..3be3046 --- /dev/null +++ b/ButcherFactory.Form/SegmentStockUp_/PrintAPI.cs @@ -0,0 +1,43 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherFactory.SegmentStockUp_ +{ + public static class PrintAPI + { + [DllImport("Winpplb.dll")] + public static extern int B_GetUSBBufferLen(); + + [DllImport("Winpplb.dll")] + public static extern int B_EnumUSB(byte[] buf); + + [DllImport("Winpplb.dll")] + public static extern int B_CreateUSBPort(int nPort); + + [DllImport("Winpplb.dll")] + public static extern int B_Set_Direction(char direction); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Text_TrueType(int x, int y, int FSize, string FType, + int Fspin, int FWeight, int FItalic, int FUnline, int FStrikeOut, string id_name, + string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Prn_Barcode(int x, int y, int ori, string type, int narrow, + int width, int height, char human, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Bar2d_QR(int x, int y, int model, int scl, char error, + char dinput, int c, int d, int p, string data); + + [DllImport("Winpplb.dll")] + public static extern int B_Print_Out(int labset); + + [DllImport("Winpplb.dll")] + public static extern void B_ClosePrn(); + } +} diff --git a/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.Designer.cs b/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.Designer.cs index d45ffdd..bcb42eb 100644 --- a/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.Designer.cs +++ b/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.Designer.cs @@ -78,8 +78,8 @@ this.bhNumberLbl = new System.Windows.Forms.Label(); this.label11 = new System.Windows.Forms.Label(); this.panel7 = new System.Windows.Forms.Panel(); - this.refresh = new ButcherFactory.Controls.ColorButton(); this.printCk = new System.Windows.Forms.CheckBox(); + this.refresh = new ButcherFactory.Controls.ColorButton(); this.roundPanel1.SuspendLayout(); this.panel5.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.mainGridView)).BeginInit(); @@ -554,6 +554,17 @@ this.panel7.Size = new System.Drawing.Size(346, 44); this.panel7.TabIndex = 20; // + // printCk + // + this.printCk.AutoSize = true; + this.printCk.Font = new System.Drawing.Font("黑体", 12F); + this.printCk.Location = new System.Drawing.Point(14, 13); + this.printCk.Name = "printCk"; + this.printCk.Size = new System.Drawing.Size(91, 20); + this.printCk.TabIndex = 1; + this.printCk.Text = "打印条码"; + this.printCk.UseVisualStyleBackColor = true; + // // refresh // this.refresh.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(77)))), ((int)(((byte)(135)))), ((int)(((byte)(245))))); @@ -567,17 +578,6 @@ this.refresh.UseVisualStyleBackColor = false; this.refresh.Click += new System.EventHandler(this.refresh_Click); // - // printCk - // - this.printCk.AutoSize = true; - this.printCk.Font = new System.Drawing.Font("黑体", 12F); - this.printCk.Location = new System.Drawing.Point(14, 13); - this.printCk.Name = "printCk"; - this.printCk.Size = new System.Drawing.Size(91, 20); - this.printCk.TabIndex = 1; - this.printCk.Text = "打印条码"; - this.printCk.UseVisualStyleBackColor = true; - // // SegmentStockUpForm // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); diff --git a/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.cs b/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.cs index eb233f2..c02a322 100644 --- a/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.cs +++ b/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpForm.cs @@ -50,13 +50,19 @@ namespace ButcherFactory.SegmentStockUp_ if (string.IsNullOrEmpty(code)) return; if (allDetail.Any(x => x.BarCode == code)) - throw new Exception("条码已使用过"); + { + InfoBox.Show("错误", "条码已使用过", Color.Green, 1); + return; + } if (SegmentStockUpBL.CheckBarCodeUsed(code)) - throw new Exception("条码已使用过"); + { + InfoBox.Show("错误", "条码已使用过", Color.Green, 1); + return; + } var info = SegmentStockUpBL.StockUpScan(code); if (info == null) { - MessageBox.Show("未发现该条码信息"); + InfoBox.Show("错误", "条码未入库", Color.Blue, 1); return; } if (!allMain.Any(x => x.Goods_Code == info.StringExt1 && x.Date == sendTime)) @@ -68,7 +74,7 @@ namespace ButcherFactory.SegmentStockUp_ FillAllDetail(sendTime, first.DeliverGoodsLine_ID, first.Goods_ID); else { - MessageBox.Show("无待备货出库单"); + InfoBox.Show("提示", "没有订单", Color.Red, 1); return; } } @@ -80,7 +86,7 @@ namespace ButcherFactory.SegmentStockUp_ var first = allMain.Where(x => x.Date == sendTime && x.Goods_Code == scan.StringExt1 && !x.Finishd).OrderBy(x => x.SequenceNumber).FirstOrDefault(); if (first == null) { - MessageBox.Show("无待备货出库单"); + InfoBox.Show("提示", "没有订单", Color.Red, 1); return; } var detail = new StockUpDetail(); @@ -96,11 +102,16 @@ namespace ButcherFactory.SegmentStockUp_ if (detail.UnitNumber.HasValue && first.Rate.HasValue) detail.SecondNumber = detail.UnitNumber * first.Rate; var customer = SegmentStockUpBL.InsertStockUpDetail(detail); + if (string.IsNullOrEmpty(customer)) + { + InfoBox.Show("提示", "没有订单", Color.Red, 1); + return; + } allDetail.Add(detail); first.SSecondNumber = (first.SSecondNumber ?? 0) + (detail.SecondNumber ?? 0); first.SUnitNum = (first.SUnitNum ?? 0) + (detail.UnitNumber ?? 0); BindMainGrid(sendTime, first.Goods_ID); - if(printCk.Checked) + if (printCk.Checked) SegmentStockUpPrint.Print(detail, customer); } diff --git a/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpPrint.cs b/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpPrint.cs index 9198b9a..b01360f 100644 --- a/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpPrint.cs +++ b/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpPrint.cs @@ -1,7 +1,10 @@ using ButcherFactory.BO; using System; using System.Collections.Generic; +using System.Drawing.Printing; +using System.IO; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; @@ -10,13 +13,123 @@ namespace ButcherFactory.SegmentStockUp_ internal static class SegmentStockUpPrint { const string PRINTFILE = @"PrintTemplate\SegmentStockUpPrint.html"; + //public static void Print(StockUpDetail entity, string customer) + //{ + // var dic = new Dictionary(); + // dic.Add("$Customer_Name", customer); + // dic.Add("$DriverLine_Name", entity.DeliverGoodsLine_Name); + // dic.Add("$Date", entity.Date.ToString("yyyy/MM/dd")); + // BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE, dic); + //} + public static void Print(StockUpDetail entity, string customer) { - var dic = new Dictionary(); - dic.Add("$Customer_Name", customer); - dic.Add("$DriverLine_Name", entity.DeliverGoodsLine_Name); - dic.Add("$Date", entity.Date.ToString("yyyy/MM/dd")); - BwpClientPrint.BwpClientWebPrint.Print(PRINTFILE, dic); + var templateString = File.ReadAllText("PrintTemplate\\SegmentStockUpPrint.txt", Encoding.UTF8); + + var str = string.Format(templateString, customer, entity.DeliverGoodsLine_Name, entity.Date); + + + var printName = GetZebraPrintName(); + SendBytesToPrinter(printName, System.Text.Encoding.Default.GetBytes(str)); + } + + private static string GetZebraPrintName() + { + foreach (string item in PrinterSettings.InstalledPrinters) + { + PrinterSettings setting = new PrinterSettings() { PrinterName = item }; + if (setting.IsDefaultPrinter) + { + return setting.PrinterName; + } + } + throw new Exception("没有找到对应的打印机"); + } + + [DllImport("winspool.Drv", EntryPoint = "OpenPrinterA", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] + public static extern bool OpenPrinter([MarshalAs(UnmanagedType.LPStr)] string printerName, out IntPtr intptrPrinter, IntPtr intptrPrintDocument); + + [DllImport("winspool.Drv", EntryPoint = "StartDocPrinterA", SetLastError = true, CharSet = CharSet.Auto, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] + public static extern bool StartDocPrinter(IntPtr intptrPrinter, Int32 level, [In, MarshalAs(UnmanagedType.LPStruct)] DocInfo docInfo); + + [DllImport("winspool.Drv", EntryPoint = "StartPagePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] + public static extern bool StartPagePrinter(IntPtr intptrPrinter); + + [DllImport("winspool.Drv", EntryPoint = "EndDocPrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] + public static extern bool EndDocPrinter(IntPtr intptrPrinter); + + [DllImport("winspool.Drv", EntryPoint = "WritePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] + public static extern bool WritePrinter(IntPtr intptrPrinter, IntPtr intptrBytes, Int32 count, out Int32 written); + + [DllImport("winspool.Drv", EntryPoint = "EndPagePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] + public static extern bool EndPagePrinter(IntPtr intptrPrinter); + + [DllImport("winspool.Drv", EntryPoint = "ClosePrinter", SetLastError = true, ExactSpelling = true, CallingConvention = CallingConvention.StdCall)] + public static extern bool ClosePrinter(IntPtr intptrPrinter); + + #region 定义打印文档信息类 + [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Auto)] + public class DocInfo + { + [MarshalAs(UnmanagedType.LPStr)] + public string DocName; + [MarshalAs(UnmanagedType.LPStr)] + public string OutputFile; + [MarshalAs(UnmanagedType.LPStr)] + public string DataType; + } + #endregion + + public static bool SendBytesToPrinter(string printerName, byte[] bytes) + { + bool bSuccess = false; + IntPtr pUnmanagedBytes = new IntPtr(0); + int nLength = bytes.Length; + // Allocate some unmanaged memory for those bytes. + pUnmanagedBytes = Marshal.AllocCoTaskMem(nLength); + // Copy the managed byte array into the unmanaged array. + Marshal.Copy(bytes, 0, pUnmanagedBytes, nLength); + // Send the unmanaged bytes to the printer. + bSuccess = SendBytesToPrinter(printerName, pUnmanagedBytes, nLength); + // Free the unmanaged memory that you allocated earlier. + Marshal.FreeCoTaskMem(pUnmanagedBytes); + return bSuccess; } + + private static bool SendBytesToPrinter(string printerName, IntPtr intptrBytes, Int32 count) + { + Int32 error = 0, written = 0; + IntPtr intptrPrinter = new IntPtr(0); + DocInfo docInfo = new DocInfo(); + bool bSuccess = false; + + docInfo.DocName = ".NET RAW Document"; + docInfo.DataType = "RAW"; + + // Open the printer. + if (OpenPrinter(printerName.Normalize(), out intptrPrinter, IntPtr.Zero)) + { + // Start a document. + if (StartDocPrinter(intptrPrinter, 1, docInfo)) + { + // Start a page. + if (StartPagePrinter(intptrPrinter)) + { + // Write your bytes. + bSuccess = WritePrinter(intptrPrinter, intptrBytes, count, out written); + EndPagePrinter(intptrPrinter); + } + EndDocPrinter(intptrPrinter); + } + ClosePrinter(intptrPrinter); + } + // If you did not succeed, GetLastError may give more information + // about why not. + if (bSuccess == false) + { + error = Marshal.GetLastWin32Error(); + } + return bSuccess; + } } } diff --git a/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpPrint.txt b/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpPrint.txt new file mode 100644 index 0000000..64e6d91 --- /dev/null +++ b/ButcherFactory.Form/SegmentStockUp_/SegmentStockUpPrint.txt @@ -0,0 +1,10 @@ +^XA +^FT288,256^XG000.GRF,1,1^FS +^SEE:GB18030.DAT^FS +^CWJ,E:MSUNG24.FNT^FS +^CI26 +^FT20,100^AJN,36,36 ^FH\^FD客户:{0}^FS +^FT20,200^AJN,36,36 ^FH\^FD线路:{1}^FS +^FT20,300^AJN,36,36 ^FH\^FD日期:{2:yyyy/MM/dd}^FS +^PQ1,0,1,Y +^XZ \ No newline at end of file diff --git a/ButcherFactory.Login/ButcherFactory.Login.csproj b/ButcherFactory.Login/ButcherFactory.Login.csproj index 8ef0d16..e9c1272 100644 --- a/ButcherFactory.Login/ButcherFactory.Login.csproj +++ b/ButcherFactory.Login/ButcherFactory.Login.csproj @@ -71,6 +71,7 @@
+ Login.xaml diff --git a/ButcherFactory.Login/ClientVersion.cs b/ButcherFactory.Login/ClientVersion.cs new file mode 100644 index 0000000..0420a74 --- /dev/null +++ b/ButcherFactory.Login/ClientVersion.cs @@ -0,0 +1,15 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ButcherFactory.Login +{ + public class ClientVersion + { + public string Version { get; set; } + + public string ServerUrl { get; set; } + } +} diff --git a/ButcherFactory.Login/Login.xaml.cs b/ButcherFactory.Login/Login.xaml.cs index c164fb5..09f71a0 100644 --- a/ButcherFactory.Login/Login.xaml.cs +++ b/ButcherFactory.Login/Login.xaml.cs @@ -1,5 +1,7 @@ using ButcherFactory.BO.Utils; using System; +using System.IO; +using System.Net; using System.Threading.Tasks; using System.Windows; using System.Windows.Input; @@ -26,6 +28,7 @@ namespace ButcherFactory.Login pwdInput.Focus(); } catch { } + this.Loaded += Login_Loaded; } private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) @@ -102,5 +105,36 @@ namespace ButcherFactory.Login if (keyBoard.ShowDialog() == true) pwdInput.Password = keyBoard.Result; } + + const string serUri = "http://172.28.1.194:7799/AutoUpdate/ClientVersion.xml"; + const string puKey = "c756e02cedb42a33f78091a466411bde8447d854"; + private void AutoUpdate() + { + if (!File.Exists("ButcherFactory.AutoUpdate.exe")) + return; + var versionInfo = new ClientVersion(); + if (File.Exists("ClientVersion.xml")) + versionInfo = XmlUtil.DeserializeFromFile("ClientVersion.xml"); + if (string.IsNullOrEmpty(versionInfo.ServerUrl)) + versionInfo.ServerUrl = serUri; + + HttpWebRequest req = (HttpWebRequest)WebRequest.Create(versionInfo.ServerUrl); + HttpWebResponse resp = (HttpWebResponse)req.GetResponse(); + if (resp.StatusCode != HttpStatusCode.OK) + return; + + var down = new System.Net.WebClient(); + var serverVersion = XmlUtil.XmlDeserializeObject(down.DownloadString(versionInfo.ServerUrl)); + if (versionInfo.Version == serverVersion.Version) + return; + + System.Diagnostics.Process.Start("ButcherFactory.AutoUpdate.exe", puKey); + App.Current.Shutdown(); + } + + void Login_Loaded(object sender, RoutedEventArgs e) + { + AutoUpdate(); + } } } diff --git a/ButcherFactorySolution.sln b/ButcherFactorySolution.sln index 11c412a..6ce9210 100644 --- a/ButcherFactorySolution.sln +++ b/ButcherFactorySolution.sln @@ -15,6 +15,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherFactory.Tools", "But EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SelfHelpClient", "SelfHelpClient\SelfHelpClient.csproj", "{51EF4E9D-1148-4055-8B1A-9A9DBCA12A03}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ButcherFactory.AutoUpdate", "ButcherFactory.AutoUpdate\ButcherFactory.AutoUpdate.csproj", "{9F9BF3C4-A866-4E80-A0CB-1255ADE91428}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CreateUpdateXmlFile", "CreateUpdateXmlFile\CreateUpdateXmlFile.csproj", "{BA0FF6E3-07FF-43A6-9AA6-D6ED88B46EB0}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -43,6 +47,14 @@ Global {51EF4E9D-1148-4055-8B1A-9A9DBCA12A03}.Debug|Any CPU.Build.0 = Debug|Any CPU {51EF4E9D-1148-4055-8B1A-9A9DBCA12A03}.Release|Any CPU.ActiveCfg = Release|Any CPU {51EF4E9D-1148-4055-8B1A-9A9DBCA12A03}.Release|Any CPU.Build.0 = Release|Any CPU + {9F9BF3C4-A866-4E80-A0CB-1255ADE91428}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {9F9BF3C4-A866-4E80-A0CB-1255ADE91428}.Debug|Any CPU.Build.0 = Debug|Any CPU + {9F9BF3C4-A866-4E80-A0CB-1255ADE91428}.Release|Any CPU.ActiveCfg = Release|Any CPU + {9F9BF3C4-A866-4E80-A0CB-1255ADE91428}.Release|Any CPU.Build.0 = Release|Any CPU + {BA0FF6E3-07FF-43A6-9AA6-D6ED88B46EB0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {BA0FF6E3-07FF-43A6-9AA6-D6ED88B46EB0}.Debug|Any CPU.Build.0 = Debug|Any CPU + {BA0FF6E3-07FF-43A6-9AA6-D6ED88B46EB0}.Release|Any CPU.ActiveCfg = Release|Any CPU + {BA0FF6E3-07FF-43A6-9AA6-D6ED88B46EB0}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ButcherFactorySolution/ButcherFactorySolution.vdproj b/ButcherFactorySolution/ButcherFactorySolution.vdproj index 07a7110..6f3ed47 100644 --- a/ButcherFactorySolution/ButcherFactorySolution.vdproj +++ b/ButcherFactorySolution/ButcherFactorySolution.vdproj @@ -39,6 +39,12 @@ } "Entry" { + "MsmKey" = "8:_20C23BB0E3E14EA68811FF464E0B76D2" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_356C0DCDD67E4B6190DA797DBC373C65" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -87,44 +93,62 @@ } "Entry" { - "MsmKey" = "8:_522FFC69C80F4D5DA4C9B348F8590C61" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_45A67B7D2502BF76FA9795FF8899DE9E" + "OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_60407C93181F42DFB15499FA85D78DE3" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_45A67B7D2502BF76FA9795FF8899DE9E" + "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_654AEDD527E14D5B8535CC81E96B8185" + "MsmKey" = "8:_45A67B7D2502BF76FA9795FF8899DE9E" + "OwnerKey" = "8:_9FC311468D3F37CF5966009732A129CC" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_4D70C75DA5B25015E8DDBF829D234FE8" + "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_4D70C75DA5B25015E8DDBF829D234FE8" + "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { + "MsmKey" = "8:_522FFC69C80F4D5DA4C9B348F8590C61" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_6B8CB9F55DD94D858DE81FA1CF43B162" + "MsmKey" = "8:_60407C93181F42DFB15499FA85D78DE3" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_6F0E808293504BA19048B340A88AEAA1" + "MsmKey" = "8:_631E011F28664D37BFE41B7F31895463" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_70C18C0E0DFD66B15418411D1857F74B" - "OwnerKey" = "8:_9F705636DF3FC7591C089E51A914B437" + "MsmKey" = "8:_654AEDD527E14D5B8535CC81E96B8185" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_70C18C0E0DFD66B15418411D1857F74B" - "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" + "MsmKey" = "8:_6F0E808293504BA19048B340A88AEAA1" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -135,6 +159,12 @@ } "Entry" { + "MsmKey" = "8:_751F65843AA04863A375A3E8D538FA72" + "OwnerKey" = "8:_UNDEFINED" + "MsmSig" = "8:_UNDEFINED" + } + "Entry" + { "MsmKey" = "8:_7849FA7621DB41BA9C7A431166BC6A99" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" @@ -165,20 +195,20 @@ } "Entry" { - "MsmKey" = "8:_7D717FB201604CFA7400BFF79560F461" - "OwnerKey" = "8:_9F705636DF3FC7591C089E51A914B437" + "MsmKey" = "8:_8D58B6FD6249E85E930D55CCE736855E" + "OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_7D717FB201604CFA7400BFF79560F461" - "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" + "MsmKey" = "8:_8D58B6FD6249E85E930D55CCE736855E" + "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_7D717FB201604CFA7400BFF79560F461" - "OwnerKey" = "8:_AED9467B5BDCD87EC2746DB4EF7A24D2" + "MsmKey" = "8:_8D58B6FD6249E85E930D55CCE736855E" + "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -201,13 +231,13 @@ } "Entry" { - "MsmKey" = "8:_9F705636DF3FC7591C089E51A914B437" - "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" + "MsmKey" = "8:_9FC311468D3F37CF5966009732A129CC" + "OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_9F705636DF3FC7591C089E51A914B437" + "MsmKey" = "8:_9FC311468D3F37CF5966009732A129CC" "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" "MsmSig" = "8:_UNDEFINED" } @@ -219,50 +249,50 @@ } "Entry" { - "MsmKey" = "8:_AED9467B5BDCD87EC2746DB4EF7A24D2" - "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" + "MsmKey" = "8:_B24BD1F54711439BA132ABC05EC82AF6" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_AED9467B5BDCD87EC2746DB4EF7A24D2" - "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" + "MsmKey" = "8:_C05D1B3E0BB241258C4AACD21FAB6E72" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_B027E23B6E431EA7A5006FCB5BB20236" - "OwnerKey" = "8:_9F705636DF3FC7591C089E51A914B437" + "MsmKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D" + "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_B027E23B6E431EA7A5006FCB5BB20236" + "MsmKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D" "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_B027E23B6E431EA7A5006FCB5BB20236" - "OwnerKey" = "8:_70C18C0E0DFD66B15418411D1857F74B" + "MsmKey" = "8:_CDEF0D7FE4F14E5E84A3902D05B165EC" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_B24BD1F54711439BA132ABC05EC82AF6" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_D32656229814B10B3981022C6BAE7B85" + "OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_C05D1B3E0BB241258C4AACD21FAB6E72" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_D32656229814B10B3981022C6BAE7B85" + "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_CDEF0D7FE4F14E5E84A3902D05B165EC" - "OwnerKey" = "8:_UNDEFINED" + "MsmKey" = "8:_D32656229814B10B3981022C6BAE7B85" + "OwnerKey" = "8:_4D70C75DA5B25015E8DDBF829D234FE8" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -273,26 +303,26 @@ } "Entry" { - "MsmKey" = "8:_DD91DACD7A0B48CE8926B0CA4EAB5E50" + "MsmKey" = "8:_D56B9B6C31F8406B8656805E779DA34A" "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_DE32A8488C67365FC9BBB4CAF2E074E2" - "OwnerKey" = "8:_9F705636DF3FC7591C089E51A914B437" + "MsmKey" = "8:_D75F76D9C28EDCFD7454D52CBB18C6E9" + "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_DE32A8488C67365FC9BBB4CAF2E074E2" + "MsmKey" = "8:_D75F76D9C28EDCFD7454D52CBB18C6E9" "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_DE32A8488C67365FC9BBB4CAF2E074E2" - "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" + "MsmKey" = "8:_DD91DACD7A0B48CE8926B0CA4EAB5E50" + "OwnerKey" = "8:_UNDEFINED" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -309,38 +339,38 @@ } "Entry" { - "MsmKey" = "8:_FD82AF7F959387F3F4C23A0EB1AC0E35" + "MsmKey" = "8:_UNDEFINED" "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" "MsmSig" = "8:_UNDEFINED" } "Entry" { - "MsmKey" = "8:_FD82AF7F959387F3F4C23A0EB1AC0E35" - "OwnerKey" = "8:_7BC73039AAAE423AB1ADC71EDB603430" + "MsmKey" = "8:_UNDEFINED" + "OwnerKey" = "8:_CDEF0D7FE4F14E5E84A3902D05B165EC" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_60407C93181F42DFB15499FA85D78DE3" + "OwnerKey" = "8:_083AAEAE39990B76FE06389D076F1D2C" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_CDEF0D7FE4F14E5E84A3902D05B165EC" + "OwnerKey" = "8:_9F09F8DA53F59713DB8BFCD6F53DB58A" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_083AAEAE39990B76FE06389D076F1D2C" + "OwnerKey" = "8:_60407C93181F42DFB15499FA85D78DE3" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_9F09F8DA53F59713DB8BFCD6F53DB58A" + "OwnerKey" = "8:_20C23BB0E3E14EA68811FF464E0B76D2" "MsmSig" = "8:_UNDEFINED" } "Entry" @@ -358,49 +388,43 @@ "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_4083346C24A7D8470DB4B61D58809784" + "OwnerKey" = "8:_D75F76D9C28EDCFD7454D52CBB18C6E9" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_FD82AF7F959387F3F4C23A0EB1AC0E35" + "OwnerKey" = "8:_4D70C75DA5B25015E8DDBF829D234FE8" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_AED9467B5BDCD87EC2746DB4EF7A24D2" + "OwnerKey" = "8:_C1BAA40E3F5E065EA88D97DA96D5992D" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_9F705636DF3FC7591C089E51A914B437" + "OwnerKey" = "8:_9FC311468D3F37CF5966009732A129CC" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_70C18C0E0DFD66B15418411D1857F74B" + "OwnerKey" = "8:_45A67B7D2502BF76FA9795FF8899DE9E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_B027E23B6E431EA7A5006FCB5BB20236" + "OwnerKey" = "8:_8D58B6FD6249E85E930D55CCE736855E" "MsmSig" = "8:_UNDEFINED" } "Entry" { "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_DE32A8488C67365FC9BBB4CAF2E074E2" - "MsmSig" = "8:_UNDEFINED" - } - "Entry" - { - "MsmKey" = "8:_UNDEFINED" - "OwnerKey" = "8:_7D717FB201604CFA7400BFF79560F461" + "OwnerKey" = "8:_D32656229814B10B3981022C6BAE7B85" "MsmSig" = "8:_UNDEFINED" } } @@ -589,6 +613,37 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_20C23BB0E3E14EA68811FF464E0B76D2" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:ButcherFactory.AutoUpdate, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_20C23BB0E3E14EA68811FF464E0B76D2" + { + "Name" = "8:ButcherFactory.AutoUpdate.exe" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:..\\ButcherFactory.AutoUpdate\\bin\\Release\\ButcherFactory.AutoUpdate.exe" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" + "IsolateTo" = "8:" + } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_356C0DCDD67E4B6190DA797DBC373C65" { "SourcePath" = "8:..\\ButcherFactory.Form\\SegmentStockUp_\\SegmentStockUpPrint.html" @@ -691,6 +746,68 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_45A67B7D2502BF76FA9795FF8899DE9E" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:MongoDB.Bson, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_45A67B7D2502BF76FA9795FF8899DE9E" + { + "Name" = "8:MongoDB.Bson.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:MongoDB.Bson.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:TRUE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_4D70C75DA5B25015E8DDBF829D234FE8" + { + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_4D70C75DA5B25015E8DDBF829D234FE8" + { + "Name" = "8:Forks.JsonRpc.Client.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Forks.JsonRpc.Client.dll" + "TargetName" = "8:" + "Tag" = "8:" + "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" + "Condition" = "8:" + "Transitive" = "11:FALSE" + "Vital" = "11:TRUE" + "ReadOnly" = "11:FALSE" + "Hidden" = "11:FALSE" + "System" = "11:FALSE" + "Permanent" = "11:FALSE" + "SharedLegacy" = "11:FALSE" + "PackageAs" = "3:1" + "Register" = "3:1" + "Exclude" = "11:FALSE" + "IsDependency" = "11:TRUE" + "IsolateTo" = "8:" + } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_522FFC69C80F4D5DA4C9B348F8590C61" { "SourcePath" = "8:..\\..\\WinFormControl\\WinFormControl\\Sounds\\error.wav" @@ -742,12 +859,12 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_654AEDD527E14D5B8535CC81E96B8185" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_631E011F28664D37BFE41B7F31895463" { - "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Images\\check.png" - "TargetName" = "8:check.png" + "SourcePath" = "8:..\\ButcherFactory.Form\\SegmentProduction_\\SegmentProductionPrint.html" + "TargetName" = "8:SegmentProductionPrint.html" "Tag" = "8:" - "Folder" = "8:_86D9513B15F44137B1E283FBC72D78ED" + "Folder" = "8:_3F4A4FA4686E48BC8111A3DABADB7686" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -762,12 +879,12 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_6B8CB9F55DD94D858DE81FA1CF43B162" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_654AEDD527E14D5B8535CC81E96B8185" { - "SourcePath" = "8:..\\ButcherFactory.Form\\SegmentProduction_\\SegmentProductionPrint.html" - "TargetName" = "8:SegmentProductionPrint.html" + "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Images\\check.png" + "TargetName" = "8:check.png" "Tag" = "8:" - "Folder" = "8:_3F4A4FA4686E48BC8111A3DABADB7686" + "Folder" = "8:_86D9513B15F44137B1E283FBC72D78ED" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -802,23 +919,12 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_70C18C0E0DFD66B15418411D1857F74B" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_748F78F338674C3884B702673BEDE665" { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:MongoDB.Driver, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_70C18C0E0DFD66B15418411D1857F74B" - { - "Name" = "8:MongoDB.Driver.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:MongoDB.Driver.dll" - "TargetName" = "8:" + "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l60.wav" + "TargetName" = "8:l60.wav" "Tag" = "8:" - "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" + "Folder" = "8:_6866532246094A308566729453EB35CA" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -829,16 +935,16 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_748F78F338674C3884B702673BEDE665" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_751F65843AA04863A375A3E8D538FA72" { - "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l60.wav" - "TargetName" = "8:l60.wav" + "SourcePath" = "8:..\\ButcherFactory.Form\\SegmentProduction_\\SegmentProductionPrint1.html" + "TargetName" = "8:SegmentProductionPrint1.html" "Tag" = "8:" - "Folder" = "8:_6866532246094A308566729453EB35CA" + "Folder" = "8:_3F4A4FA4686E48BC8111A3DABADB7686" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -933,20 +1039,20 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_7D717FB201604CFA7400BFF79560F461" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_8D58B6FD6249E85E930D55CCE736855E" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Forks.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" "ScatterAssemblies" { - "_7D717FB201604CFA7400BFF79560F461" + "_8D58B6FD6249E85E930D55CCE736855E" { - "Name" = "8:Forks.Json.dll" + "Name" = "8:Forks.Utils.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:Forks.Json.dll" + "SourcePath" = "8:Forks.Utils.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" @@ -1035,20 +1141,20 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_9F705636DF3FC7591C089E51A914B437" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_9FC311468D3F37CF5966009732A129CC" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:MongoDB.Driver, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL" "ScatterAssemblies" { - "_9F705636DF3FC7591C089E51A914B437" + "_9FC311468D3F37CF5966009732A129CC" { - "Name" = "8:Forks.EnterpriseServices.dll" + "Name" = "8:MongoDB.Driver.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:Forks.EnterpriseServices.dll" + "SourcePath" = "8:MongoDB.Driver.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" @@ -1062,7 +1168,7 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:FALSE" + "Exclude" = "11:TRUE" "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } @@ -1086,23 +1192,12 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_AED9467B5BDCD87EC2746DB4EF7A24D2" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B24BD1F54711439BA132ABC05EC82AF6" { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Forks.JsonRpc.Client, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_AED9467B5BDCD87EC2746DB4EF7A24D2" - { - "Name" = "8:Forks.JsonRpc.Client.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Forks.JsonRpc.Client.dll" - "TargetName" = "8:" + "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l55.wav" + "TargetName" = "8:l55.wav" "Tag" = "8:" - "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" + "Folder" = "8:_6866532246094A308566729453EB35CA" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -1114,24 +1209,13 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_B027E23B6E431EA7A5006FCB5BB20236" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C05D1B3E0BB241258C4AACD21FAB6E72" { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:MongoDB.Bson, Version=1.4.0.4468, Culture=neutral, PublicKeyToken=f686731cfb9cc103, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_B027E23B6E431EA7A5006FCB5BB20236" - { - "Name" = "8:MongoDB.Bson.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:MongoDB.Bson.dll" - "TargetName" = "8:" + "SourcePath" = "8:C:\\360驱动大师目录\\app.ico" + "TargetName" = "8:app.ico" "Tag" = "8:" "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" "Condition" = "8:" @@ -1144,16 +1228,27 @@ "SharedLegacy" = "11:FALSE" "PackageAs" = "3:1" "Register" = "3:1" - "Exclude" = "11:TRUE" - "IsDependency" = "11:TRUE" + "Exclude" = "11:FALSE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_B24BD1F54711439BA132ABC05EC82AF6" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_C1BAA40E3F5E065EA88D97DA96D5992D" { - "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l55.wav" - "TargetName" = "8:l55.wav" + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:Forks.EnterpriseServices, Version=3.1.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_C1BAA40E3F5E065EA88D97DA96D5992D" + { + "Name" = "8:Forks.EnterpriseServices.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:Forks.EnterpriseServices.dll" + "TargetName" = "8:" "Tag" = "8:" - "Folder" = "8:_6866532246094A308566729453EB35CA" + "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -1165,13 +1260,24 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" + "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_C05D1B3E0BB241258C4AACD21FAB6E72" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CDEF0D7FE4F14E5E84A3902D05B165EC" { - "SourcePath" = "8:C:\\360驱动大师目录\\app.ico" - "TargetName" = "8:app.ico" + "AssemblyRegister" = "3:1" + "AssemblyIsInGAC" = "11:FALSE" + "AssemblyAsmDisplayName" = "8:ButcherFactory.Form, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "ScatterAssemblies" + { + "_CDEF0D7FE4F14E5E84A3902D05B165EC" + { + "Name" = "8:ButcherFactory.Form.dll" + "Attributes" = "3:512" + } + } + "SourcePath" = "8:..\\ButcherFactory.Form\\bin\\Release\\ButcherFactory.Form.dll" + "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" "Condition" = "8:" @@ -1188,20 +1294,20 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_CDEF0D7FE4F14E5E84A3902D05B165EC" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D32656229814B10B3981022C6BAE7B85" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:ButcherFactory.Form, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Forks.Json, Version=1.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" "ScatterAssemblies" { - "_CDEF0D7FE4F14E5E84A3902D05B165EC" + "_D32656229814B10B3981022C6BAE7B85" { - "Name" = "8:ButcherFactory.Form.dll" + "Name" = "8:Forks.Json.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:..\\ButcherFactory.Form\\bin\\Release\\ButcherFactory.Form.dll" + "SourcePath" = "8:Forks.Json.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" @@ -1216,7 +1322,7 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:FALSE" + "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D38B860E2FD246B790618B9B4FB991C5" @@ -1239,12 +1345,12 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_DD91DACD7A0B48CE8926B0CA4EAB5E50" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_D56B9B6C31F8406B8656805E779DA34A" { - "SourcePath" = "8:..\\..\\WinFormControl\\WinFormControl\\Sounds\\di.wav" - "TargetName" = "8:di.wav" + "SourcePath" = "8:..\\ButcherFactory.Form\\SegmentStockUp_\\SegmentStockUpPrint.txt" + "TargetName" = "8:SegmentStockUpPrint.txt" "Tag" = "8:" - "Folder" = "8:_6866532246094A308566729453EB35CA" + "Folder" = "8:_3F4A4FA4686E48BC8111A3DABADB7686" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -1259,20 +1365,20 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_DE32A8488C67365FC9BBB4CAF2E074E2" + "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_D75F76D9C28EDCFD7454D52CBB18C6E9" { "AssemblyRegister" = "3:1" "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Forks.Utils, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7254430f49d10aae, processorArchitecture=MSIL" + "AssemblyAsmDisplayName" = "8:Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" "ScatterAssemblies" { - "_DE32A8488C67365FC9BBB4CAF2E074E2" + "_D75F76D9C28EDCFD7454D52CBB18C6E9" { - "Name" = "8:Forks.Utils.dll" + "Name" = "8:Newtonsoft.Json.dll" "Attributes" = "3:512" } } - "SourcePath" = "8:Forks.Utils.dll" + "SourcePath" = "8:Newtonsoft.Json.dll" "TargetName" = "8:" "Tag" = "8:" "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" @@ -1290,12 +1396,12 @@ "IsDependency" = "11:TRUE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_F45F0EE0BF2446558F2C1F4F902125DB" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_DD91DACD7A0B48CE8926B0CA4EAB5E50" { - "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Images\\uCheck.png" - "TargetName" = "8:uCheck.png" + "SourcePath" = "8:..\\..\\WinFormControl\\WinFormControl\\Sounds\\di.wav" + "TargetName" = "8:di.wav" "Tag" = "8:" - "Folder" = "8:_86D9513B15F44137B1E283FBC72D78ED" + "Folder" = "8:_6866532246094A308566729453EB35CA" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -1310,12 +1416,12 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FCCE14D01A514BCF927F597A9F5842D2" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_F45F0EE0BF2446558F2C1F4F902125DB" { - "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l65.wav" - "TargetName" = "8:l65.wav" + "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Images\\uCheck.png" + "TargetName" = "8:uCheck.png" "Tag" = "8:" - "Folder" = "8:_6866532246094A308566729453EB35CA" + "Folder" = "8:_86D9513B15F44137B1E283FBC72D78ED" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -1330,23 +1436,12 @@ "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } - "{9F6F8455-1EF1-4B85-886A-4223BCC8E7F7}:_FD82AF7F959387F3F4C23A0EB1AC0E35" + "{1FB2D0AE-D3B9-43D4-B9DD-F88EC61E35DE}:_FCCE14D01A514BCF927F597A9F5842D2" { - "AssemblyRegister" = "3:1" - "AssemblyIsInGAC" = "11:FALSE" - "AssemblyAsmDisplayName" = "8:Newtonsoft.Json, Version=4.0.3.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL" - "ScatterAssemblies" - { - "_FD82AF7F959387F3F4C23A0EB1AC0E35" - { - "Name" = "8:Newtonsoft.Json.dll" - "Attributes" = "3:512" - } - } - "SourcePath" = "8:Newtonsoft.Json.dll" - "TargetName" = "8:" + "SourcePath" = "8:..\\ButcherFactory.Login\\bin\\Debug\\Sounds\\l65.wav" + "TargetName" = "8:l65.wav" "Tag" = "8:" - "Folder" = "8:_A4535DAA71C54DC088A3FA09FCED8C88" + "Folder" = "8:_6866532246094A308566729453EB35CA" "Condition" = "8:" "Transitive" = "11:FALSE" "Vital" = "11:TRUE" @@ -1358,7 +1453,7 @@ "PackageAs" = "3:1" "Register" = "3:1" "Exclude" = "11:FALSE" - "IsDependency" = "11:TRUE" + "IsDependency" = "11:FALSE" "IsolateTo" = "8:" } } @@ -1484,7 +1579,7 @@ "Name" = "8:Microsoft Visual Studio" "ProductName" = "8:青花瓷屠宰车间管理" "ProductCode" = "8:{8D06A3CB-94E1-40DF-BF89-0A822D5302EF}" - "PackageCode" = "8:{8127AF77-C3B1-4814-8094-97F6C458F56B}" + "PackageCode" = "8:{44AC80A4-2DE7-4DCF-837E-5E3FAA67AF5D}" "UpgradeCode" = "8:{D5614731-239C-49A6-8F35-DB6F5D8E8A8C}" "AspNetVersion" = "8:4.0.30319.0" "RestartWWWService" = "11:FALSE" diff --git a/CreateUpdateXmlFile/ClientVersion.cs b/CreateUpdateXmlFile/ClientVersion.cs new file mode 100644 index 0000000..5b19df9 --- /dev/null +++ b/CreateUpdateXmlFile/ClientVersion.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Xml.Serialization; + +namespace CreateUpdateXmlFile +{ + public class ClientVersion + { + public string Version { get; set; } + + public string ServerUrl { get; set; } + + private List _update = new List(); + public List UpdateFiles { get { return _update; } set { _update = value; } } + } + + public class UpdateFile + { + public string FileName { get; set; } + + public string Url { get; set; } + + public int Size { get; set; } + + public bool NeedRestart { get; set; } + } + + public static class XmlUtil + { + public static void SerializerObjToFile(object obj, string fileName = "") + { + if (string.IsNullOrWhiteSpace(fileName)) + { + fileName = obj.GetType().Name + ".xml"; + } + var ser = new XmlSerializer(obj.GetType()); + using (var stream = File.Open(fileName, FileMode.Create)) + { + ser.Serialize(stream, obj); + } + } + } +} diff --git a/CreateUpdateXmlFile/CreateUpdateXmlFile.csproj b/CreateUpdateXmlFile/CreateUpdateXmlFile.csproj new file mode 100644 index 0000000..6a46f0e --- /dev/null +++ b/CreateUpdateXmlFile/CreateUpdateXmlFile.csproj @@ -0,0 +1,86 @@ + + + + + Debug + AnyCPU + {BA0FF6E3-07FF-43A6-9AA6-D6ED88B46EB0} + WinExe + Properties + CreateUpdateXmlFile + CreateUpdateXmlFile + v4.0 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + \ No newline at end of file diff --git a/CreateUpdateXmlFile/Form1.Designer.cs b/CreateUpdateXmlFile/Form1.Designer.cs new file mode 100644 index 0000000..51f5f22 --- /dev/null +++ b/CreateUpdateXmlFile/Form1.Designer.cs @@ -0,0 +1,145 @@ +namespace CreateUpdateXmlFile +{ + partial class Form1 + { + /// + /// 必需的设计器变量。 + /// + private System.ComponentModel.IContainer components = null; + + /// + /// 清理所有正在使用的资源。 + /// + /// 如果应释放托管资源,为 true;否则为 false。 + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows 窗体设计器生成的代码 + + /// + /// 设计器支持所需的方法 - 不要 + /// 使用代码编辑器修改此方法的内容。 + /// + private void InitializeComponent() + { + this.textBox3 = new System.Windows.Forms.TextBox(); + this.label3 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.textBox2 = new System.Windows.Forms.TextBox(); + this.view = new System.Windows.Forms.Button(); + this.create = new System.Windows.Forms.Button(); + this.label1 = new System.Windows.Forms.Label(); + this.textBox1 = new System.Windows.Forms.TextBox(); + this.folderBrowserDialog1 = new System.Windows.Forms.FolderBrowserDialog(); + this.SuspendLayout(); + // + // textBox3 + // + this.textBox3.Location = new System.Drawing.Point(122, 34); + this.textBox3.Name = "textBox3"; + this.textBox3.Size = new System.Drawing.Size(285, 21); + this.textBox3.TabIndex = 15; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(33, 37); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(53, 12); + this.label3.TabIndex = 14; + this.label3.Text = "主程序:"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(33, 80); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(77, 12); + this.label2.TabIndex = 13; + this.label2.Text = "服务器地址:"; + // + // textBox2 + // + this.textBox2.Location = new System.Drawing.Point(122, 77); + this.textBox2.Name = "textBox2"; + this.textBox2.Size = new System.Drawing.Size(390, 21); + this.textBox2.TabIndex = 12; + // + // view + // + this.view.Location = new System.Drawing.Point(133, 188); + this.view.Name = "view"; + this.view.Size = new System.Drawing.Size(93, 38); + this.view.TabIndex = 11; + this.view.Text = "浏览"; + this.view.UseVisualStyleBackColor = true; + this.view.Click += new System.EventHandler(this.view_Click); + // + // create + // + this.create.Location = new System.Drawing.Point(303, 188); + this.create.Name = "create"; + this.create.Size = new System.Drawing.Size(93, 38); + this.create.TabIndex = 10; + this.create.Text = "生成"; + this.create.UseVisualStyleBackColor = true; + this.create.Click += new System.EventHandler(this.create_Click); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(33, 108); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(65, 12); + this.label1.TabIndex = 9; + this.label1.Text = "目录选择:"; + // + // textBox1 + // + this.textBox1.Font = new System.Drawing.Font("宋体", 12F); + this.textBox1.Location = new System.Drawing.Point(104, 108); + this.textBox1.Multiline = true; + this.textBox1.Name = "textBox1"; + this.textBox1.Size = new System.Drawing.Size(408, 59); + this.textBox1.TabIndex = 8; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(545, 261); + this.Controls.Add(this.textBox3); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.textBox2); + this.Controls.Add(this.view); + this.Controls.Add(this.create); + this.Controls.Add(this.label1); + this.Controls.Add(this.textBox1); + this.Name = "Form1"; + this.Text = "Form1"; + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.TextBox textBox3; + private System.Windows.Forms.Label label3; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.TextBox textBox2; + private System.Windows.Forms.Button view; + private System.Windows.Forms.Button create; + private System.Windows.Forms.Label label1; + private System.Windows.Forms.TextBox textBox1; + private System.Windows.Forms.FolderBrowserDialog folderBrowserDialog1; + } +} + diff --git a/CreateUpdateXmlFile/Form1.cs b/CreateUpdateXmlFile/Form1.cs new file mode 100644 index 0000000..761da5a --- /dev/null +++ b/CreateUpdateXmlFile/Form1.cs @@ -0,0 +1,56 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.IO; +using System.Linq; +using System.Text; +using System.Windows.Forms; + +namespace CreateUpdateXmlFile +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + this.textBox2.Text = "http://172.28.1.194:7799/AutoUpdate/"; + this.textBox3.Text = "ButcherFactory.Login.exe"; + } + + private void view_Click(object sender, EventArgs e) + { + if (folderBrowserDialog1.ShowDialog() == DialogResult.OK) + this.textBox1.Text = folderBrowserDialog1.SelectedPath; + } + + private void create_Click(object sender, EventArgs e) + { + if (textBox1.Text == "" || textBox2.Text == "" || textBox3.Text == "") + { + MessageBox.Show("请完善信息"); + return; + } + var entity = new ClientVersion(); + entity.ServerUrl = textBox2.Text + "ClientVersion.xml"; + entity.Version = DateTime.Now.ToString("yyyyMMddHHmm"); + var folder = new DirectoryInfo(textBox1.Text); + foreach (var file in folder.GetFiles()) + { + if (file.Name == "ButcherFactory.AutoUpdate.exe") + continue; + if (file.Extension == ".xml" && file.Name != "ClientVersion.xml") + continue; + var detail = new UpdateFile(); + detail.FileName = file.Name; + detail.NeedRestart = textBox3.Text == detail.FileName; + detail.Size = (int)file.Length; + detail.Url = textBox2.Text + detail.FileName; + entity.UpdateFiles.Add(detail); + } + XmlUtil.SerializerObjToFile(entity); + MessageBox.Show("OK"); + } + } +} diff --git a/CreateUpdateXmlFile/Form1.resx b/CreateUpdateXmlFile/Form1.resx new file mode 100644 index 0000000..69f943d --- /dev/null +++ b/CreateUpdateXmlFile/Form1.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/CreateUpdateXmlFile/Program.cs b/CreateUpdateXmlFile/Program.cs new file mode 100644 index 0000000..8a0f783 --- /dev/null +++ b/CreateUpdateXmlFile/Program.cs @@ -0,0 +1,21 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Windows.Forms; + +namespace CreateUpdateXmlFile +{ + static class Program + { + /// + /// 应用程序的主入口点。 + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new Form1()); + } + } +} diff --git a/CreateUpdateXmlFile/Properties/AssemblyInfo.cs b/CreateUpdateXmlFile/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ef23380 --- /dev/null +++ b/CreateUpdateXmlFile/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// 有关程序集的常规信息通过以下 +// 特性集控制。更改这些特性值可修改 +// 与程序集关联的信息。 +[assembly: AssemblyTitle("CreateUpdateXmlFile")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("CreateUpdateXmlFile")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// 将 ComVisible 设置为 false 使此程序集中的类型 +// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型, +// 则将该类型上的 ComVisible 特性设置为 true。 +[assembly: ComVisible(false)] + +// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID +[assembly: Guid("abeac87b-e426-4ade-b0cc-b9f8ddc31a99")] + +// 程序集的版本信息由下面四个值组成: +// +// 主版本 +// 次版本 +// 生成号 +// 修订号 +// +// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, +// 方法是按如下所示使用“*”: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/CreateUpdateXmlFile/Properties/Resources.Designer.cs b/CreateUpdateXmlFile/Properties/Resources.Designer.cs new file mode 100644 index 0000000..6881bcb --- /dev/null +++ b/CreateUpdateXmlFile/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// 此代码由工具生成。 +// 运行时版本: 4.0.30319.42000 +// +// 对此文件的更改可能会导致不正确的行为,并且如果 +// 重新生成代码,这些更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace CreateUpdateXmlFile.Properties +{ + + + /// + /// 一个强类型的资源类,用于查找本地化的字符串等。 + /// + // 此类是由 StronglyTypedResourceBuilder + // 类通过类似于 ResGen 或 Visual Studio 的工具自动生成的。 + // 若要添加或移除成员,请编辑 .ResX 文件,然后重新运行 ResGen + // (以 /str 作为命令选项),或重新生成 VS 项目。 + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// 返回此类使用的、缓存的 ResourceManager 实例。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("CreateUpdateXmlFile.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// 为所有资源查找重写当前线程的 CurrentUICulture 属性, + /// 方法是使用此强类型资源类。 + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/CreateUpdateXmlFile/Properties/Resources.resx b/CreateUpdateXmlFile/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/CreateUpdateXmlFile/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/CreateUpdateXmlFile/Properties/Settings.Designer.cs b/CreateUpdateXmlFile/Properties/Settings.Designer.cs new file mode 100644 index 0000000..cc24edb --- /dev/null +++ b/CreateUpdateXmlFile/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace CreateUpdateXmlFile.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/CreateUpdateXmlFile/Properties/Settings.settings b/CreateUpdateXmlFile/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/CreateUpdateXmlFile/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + +