From 78e61735cba2414aad7425242e1ab064afef84ee Mon Sep 17 00:00:00 2001 From: yibo <361071264@qq.com> Date: Thu, 29 Mar 2018 22:43:47 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E6=95=B4=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ButcherFactory.Form.csproj | 11 +- .../CarcassInStoreForm.Designer.cs | 535 +++++++++++++++++- .../CarcassInStore_/CarcassInStoreForm.resx | 246 ++++++++ ButcherFactory.Login/Login.cs | 2 + ButcherFactory.Login/Program.cs | 4 + ButcherFactory.Login/SettingForm.Designer.cs | 8 + ButcherFactory.Login/SettingForm.resx | 24 +- 7 files changed, 816 insertions(+), 14 deletions(-) create mode 100644 ButcherFactory.Form/CarcassInStore_/CarcassInStoreForm.resx diff --git a/ButcherFactory.Form/ButcherFactory.Form.csproj b/ButcherFactory.Form/ButcherFactory.Form.csproj index b92d8de..92ac9c9 100644 --- a/ButcherFactory.Form/ButcherFactory.Form.csproj +++ b/ButcherFactory.Form/ButcherFactory.Form.csproj @@ -30,16 +30,21 @@ 4 + + + + + @@ -62,7 +67,11 @@ ButcherFactory.BO - + + + CarcassInStoreForm.cs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + + True + + \ No newline at end of file diff --git a/ButcherFactory.Login/Login.cs b/ButcherFactory.Login/Login.cs index 0a36365..1b5a062 100644 --- a/ButcherFactory.Login/Login.cs +++ b/ButcherFactory.Login/Login.cs @@ -41,6 +41,8 @@ namespace ButcherFactory.Login private async void loginBtn_Click(object sender, EventArgs e) { + if (string.IsNullOrEmpty(AppContext.ConnectInfo.SqlConnection)) + throw new Exception("请设置数据库地址!"); var username = userNameBox.Text.Trim(); var pwd = pwdBox.Text; if (string.IsNullOrEmpty(username)) diff --git a/ButcherFactory.Login/Program.cs b/ButcherFactory.Login/Program.cs index 31e34ff..a6b886d 100644 --- a/ButcherFactory.Login/Program.cs +++ b/ButcherFactory.Login/Program.cs @@ -29,6 +29,7 @@ namespace ButcherFactory.Login var aProcessName = Process.GetCurrentProcess().ProcessName; if ((Process.GetProcessesByName(aProcessName)).GetUpperBound(0) > 0) { + SoundPalyUtil.PlaySound(SoundType.Error); UMessageBox.Show(@"系统已经在运行中,如果要重新启动,请从进程中关闭...", @"系统警告"); } else @@ -47,6 +48,7 @@ namespace ButcherFactory.Login { // LogUtil.WriteError(e); + SoundPalyUtil.PlaySound(SoundType.Error); UMessageBox.Show("错误:" + e.Message + " \n详细信息:" + e.StackTrace); //UMessageBox.Show("错误:" + e.Message ); } @@ -66,6 +68,7 @@ namespace ButcherFactory.Login //LogUtil.WriteError(ex); err = ex.Message; } + SoundPalyUtil.PlaySound(SoundType.Error); UMessageBox.Show("错误:" + ex.Message + " \n详细信息:" + ex.StackTrace); // UMessageBox.Show("错误:" + err); } @@ -79,6 +82,7 @@ namespace ButcherFactory.Login //LogUtil.WriteError(ex); err = ex.Message; } + SoundPalyUtil.PlaySound(SoundType.Error); UMessageBox.Show("错误:" + ex.Message + " \n详细信息:" + ex.StackTrace); //UMessageBox.Show("错误:" + err); } diff --git a/ButcherFactory.Login/SettingForm.Designer.cs b/ButcherFactory.Login/SettingForm.Designer.cs index 4a27b1c..14ba889 100644 --- a/ButcherFactory.Login/SettingForm.Designer.cs +++ b/ButcherFactory.Login/SettingForm.Designer.cs @@ -80,6 +80,7 @@ // this.saveBtn.BackColor = System.Drawing.Color.Transparent; this.saveBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("saveBtn.BackgroundImage"))); + this.saveBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); this.saveBtn.FlatAppearance.BorderSize = 0; this.saveBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.saveBtn.Font = new System.Drawing.Font("宋体", 15F); @@ -96,6 +97,9 @@ // this.closeBtn.BackColor = System.Drawing.Color.Transparent; this.closeBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("closeBtn.BackgroundImage"))); + this.closeBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.closeBtn.FlatAppearance.BorderSize = 0; + this.closeBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); this.closeBtn.ForeColor = System.Drawing.Color.Black; this.closeBtn.Location = new System.Drawing.Point(373, 188); @@ -110,6 +114,9 @@ // this.updateBtn.BackColor = System.Drawing.Color.Transparent; this.updateBtn.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("updateBtn.BackgroundImage"))); + this.updateBtn.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(((int)(((byte)(45)))), ((int)(((byte)(155)))), ((int)(((byte)(214))))); + this.updateBtn.FlatAppearance.BorderSize = 0; + this.updateBtn.FlatStyle = System.Windows.Forms.FlatStyle.Flat; this.updateBtn.Font = new System.Drawing.Font("宋体", 15F); this.updateBtn.ForeColor = System.Drawing.Color.Black; this.updateBtn.Location = new System.Drawing.Point(601, 188); @@ -124,6 +131,7 @@ // 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(872, 284); this.ControlBox = false; this.Controls.Add(this.updateBtn); diff --git a/ButcherFactory.Login/SettingForm.resx b/ButcherFactory.Login/SettingForm.resx index 46acbfb..d2e473b 100644 --- a/ButcherFactory.Login/SettingForm.resx +++ b/ButcherFactory.Login/SettingForm.resx @@ -120,26 +120,26 @@ - iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABzSURBVGhD7dABDQAgDMAw7F05ZhCBg89AkyroeXdY - CAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKC - oCAoCAqCgqAgKAgKgoKgICgICoKCoNWdD6R7ug7J7zUqAAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= - iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABzSURBVGhD7dABDQAgDMAw7F05ZhCBg89AkyroeXdY - CAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKC - oCAoCAqCgqAgKAgKgoKgICgICoKCoNWdD6R7ug7J7zUqAAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= - iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAABl0RVh0U29m - dHdhcmUAQWRvYmUgSW1hZ2VSZWFkeXHJZTwAAABzSURBVGhD7dABDQAgDMAw7F05ZhCBg89AkyroeXdY - CAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKC - oCAoCAqCgqAgKAgKgoKgICgICoKCoNWdD6R7ug7J7zUqAAAAAElFTkSuQmCC + iVBORw0KGgoAAAANSUhEUgAAAGAAAAAwCAIAAABhdOiYAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO + wwAADsMBx2+oZAAAAHNJREFUaEPt0AENACAMwDAkowVB14aDz0CTKui5b1gICoKCoCAoCAqCgqAgKAgK + goKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAgKAgKgoKgICgICoKCoCAoCAqCgqAg + KAgKgoKg1ZsPvpCB0hBohjQAAAAASUVORK5CYII= \ No newline at end of file