diff --git a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs index d779a13..0d9e95e 100644 --- a/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs +++ b/BO/BO/Bill/GradeAndWeight/GradeAndWeight_Detail.cs @@ -10,6 +10,8 @@ namespace BO.BO.Bill { public long ID { get; set; } + public bool ReadWeight { get; set; } + public long? OrderDetail_ID { get; set; } public int Index { get; set; } diff --git a/ButcherWeight/WeightContext.cs b/ButcherWeight/WeightContext.cs index a86a7dc..9632092 100644 --- a/ButcherWeight/WeightContext.cs +++ b/ButcherWeight/WeightContext.cs @@ -12,10 +12,10 @@ namespace ButcherWeight public static class WeightContext { //#if debug - //private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\WeightSetting.xml"; + private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\WeightSetting.xml"; //#endif //#if !debug - private static string loginConfigPath = Application.StartupPath + "\\WeightSetting.xml"; + //private static string loginConfigPath = Application.StartupPath + "\\WeightSetting.xml"; //#endif private static WeightSetting _config; public static WeightSetting Config diff --git a/Setup/Release/Setup.msi b/Setup/Release/Setup.msi index d063003..446f984 100644 Binary files a/Setup/Release/Setup.msi and b/Setup/Release/Setup.msi differ diff --git a/WeighAndGrading/GradeContext.cs b/WeighAndGrading/GradeContext.cs index 7f183ff..7a76839 100644 --- a/WeighAndGrading/GradeContext.cs +++ b/WeighAndGrading/GradeContext.cs @@ -12,10 +12,10 @@ namespace WeighAndGrading public static class GradeContext { //#if debug - private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\GradeConfig.xml"; + //private static string loginConfigPath = @"C:\BwpB3Project\src\B3ButcherManageClient\ButcherManageClient\bin\Debug\GradeConfig.xml"; //#endif //#if !debug - //private static string loginConfigPath = Application.StartupPath + "\\GradeConfig.xml"; + private static string loginConfigPath = Application.StartupPath + "\\GradeConfig.xml"; //#endif private static GradeConfig _config; public static GradeConfig Config diff --git a/WeighAndGrading/GradeFrom.Designer.cs b/WeighAndGrading/GradeFrom.Designer.cs index 59c6857..d6fe38c 100644 --- a/WeighAndGrading/GradeFrom.Designer.cs +++ b/WeighAndGrading/GradeFrom.Designer.cs @@ -31,11 +31,11 @@ System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.label1 = new System.Windows.Forms.Label(); this.syncBtn = new System.Windows.Forms.Button(); this.label2 = new System.Windows.Forms.Label(); @@ -48,8 +48,17 @@ this.label11 = new System.Windows.Forms.Label(); this.mbPanel = new System.Windows.Forms.FlowLayoutPanel(); this.groupBox3 = new System.Windows.Forms.GroupBox(); + this.vScrollBar2 = new System.Windows.Forms.VScrollBar(); this.label12 = new System.Windows.Forms.Label(); this.historyGrid = new BWP.WinFormControl.UDataGridView(); + this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_ReadWeight = new System.Windows.Forms.DataGridViewCheckBoxColumn(); + this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.enableWeight = new System.Windows.Forms.CheckBox(); this.isPrintCheckBox = new System.Windows.Forms.CheckBox(); this.printBtn = new System.Windows.Forms.Button(); @@ -73,13 +82,7 @@ this.cancelBtn = new System.Windows.Forms.Button(); this.discontBtn = new System.Windows.Forms.Button(); this.discontPanel = new System.Windows.Forms.FlowLayoutPanel(); - this.H_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Livestock_ID = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Index = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Technics = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Livestock_Name = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Weight = new System.Windows.Forms.DataGridViewTextBoxColumn(); - this.H_Time = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.vScrollBar1 = new System.Windows.Forms.VScrollBar(); this.groupBox1.SuspendLayout(); this.groupBox2.SuspendLayout(); this.groupBox3.SuspendLayout(); @@ -197,15 +200,23 @@ // // groupBox3 // + this.groupBox3.Controls.Add(this.vScrollBar2); this.groupBox3.Controls.Add(this.label12); this.groupBox3.Controls.Add(this.historyGrid); this.groupBox3.Location = new System.Drawing.Point(826, 175); this.groupBox3.Name = "groupBox3"; - this.groupBox3.Size = new System.Drawing.Size(422, 680); + this.groupBox3.Size = new System.Drawing.Size(471, 680); this.groupBox3.TabIndex = 11; this.groupBox3.TabStop = false; this.groupBox3.Text = "记录"; // + // vScrollBar2 + // + this.vScrollBar2.Location = new System.Drawing.Point(425, 36); + this.vScrollBar2.Name = "vScrollBar2"; + this.vScrollBar2.Size = new System.Drawing.Size(40, 566); + this.vScrollBar2.TabIndex = 52; + // // label12 // this.label12.AutoSize = true; @@ -237,6 +248,7 @@ this.historyGrid.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { this.H_ID, this.H_Livestock_ID, + this.H_ReadWeight, this.H_Index, this.H_Technics, this.H_Livestock_Name, @@ -251,11 +263,79 @@ dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.historyGrid.RowsDefaultCellStyle = dataGridViewCellStyle5; this.historyGrid.RowTemplate.Height = 40; + this.historyGrid.ScrollBars = System.Windows.Forms.ScrollBars.None; this.historyGrid.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.historyGrid.Size = new System.Drawing.Size(409, 597); + this.historyGrid.Size = new System.Drawing.Size(423, 566); this.historyGrid.TabIndex = 0; this.historyGrid.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.historyGrid_CellClick); // + // H_ID + // + this.H_ID.DataPropertyName = "ID"; + this.H_ID.HeaderText = "ID"; + this.H_ID.Name = "H_ID"; + this.H_ID.ReadOnly = true; + this.H_ID.Visible = false; + // + // H_Livestock_ID + // + this.H_Livestock_ID.HeaderText = "Livestock_ID"; + this.H_Livestock_ID.Name = "H_Livestock_ID"; + this.H_Livestock_ID.ReadOnly = true; + this.H_Livestock_ID.Visible = false; + // + // H_ReadWeight + // + this.H_ReadWeight.DataPropertyName = "ReadWeight"; + this.H_ReadWeight.HeaderText = ""; + this.H_ReadWeight.Name = "H_ReadWeight"; + this.H_ReadWeight.ReadOnly = true; + this.H_ReadWeight.Width = 30; + // + // H_Index + // + this.H_Index.DataPropertyName = "Index"; + this.H_Index.HeaderText = "序号"; + this.H_Index.Name = "H_Index"; + this.H_Index.ReadOnly = true; + this.H_Index.Width = 65; + // + // H_Technics + // + this.H_Technics.DataPropertyName = "Technics_Name"; + this.H_Technics.HeaderText = "工艺"; + this.H_Technics.Name = "H_Technics"; + this.H_Technics.ReadOnly = true; + this.H_Technics.Width = 65; + // + // H_Livestock_Name + // + this.H_Livestock_Name.DataPropertyName = "Livestock_Name"; + this.H_Livestock_Name.HeaderText = "级别"; + this.H_Livestock_Name.Name = "H_Livestock_Name"; + this.H_Livestock_Name.ReadOnly = true; + this.H_Livestock_Name.Width = 90; + // + // H_Weight + // + this.H_Weight.DataPropertyName = "Weight"; + dataGridViewCellStyle3.Format = "#0.######"; + this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3; + this.H_Weight.HeaderText = "重量"; + this.H_Weight.Name = "H_Weight"; + this.H_Weight.ReadOnly = true; + this.H_Weight.Width = 70; + // + // H_Time + // + this.H_Time.DataPropertyName = "Time"; + dataGridViewCellStyle4.Format = "MM/dd HH:mm"; + dataGridViewCellStyle4.NullValue = null; + this.H_Time.DefaultCellStyle = dataGridViewCellStyle4; + this.H_Time.HeaderText = "时间"; + this.H_Time.Name = "H_Time"; + this.H_Time.ReadOnly = true; + // // enableWeight // this.enableWeight.AutoCheck = false; @@ -358,8 +438,9 @@ dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(66)))), ((int)(((byte)(163)))), ((int)(((byte)(218))))); this.dataGridView.RowsDefaultCellStyle = dataGridViewCellStyle8; this.dataGridView.RowTemplate.Height = 40; + this.dataGridView.ScrollBars = System.Windows.Forms.ScrollBars.None; this.dataGridView.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dataGridView.Size = new System.Drawing.Size(469, 517); + this.dataGridView.Size = new System.Drawing.Size(443, 566); this.dataGridView.TabIndex = 4; this.dataGridView.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellClick); // @@ -443,7 +524,7 @@ // closeBtn // this.closeBtn.Font = new System.Drawing.Font("宋体", 15F); - this.closeBtn.Location = new System.Drawing.Point(1217, 12); + this.closeBtn.Location = new System.Drawing.Point(1270, 12); this.closeBtn.Name = "closeBtn"; this.closeBtn.Size = new System.Drawing.Size(102, 43); this.closeBtn.TabIndex = 33; @@ -454,7 +535,7 @@ // configBtn // this.configBtn.Font = new System.Drawing.Font("宋体", 15F); - this.configBtn.Location = new System.Drawing.Point(971, 12); + this.configBtn.Location = new System.Drawing.Point(1024, 12); this.configBtn.Name = "configBtn"; this.configBtn.Size = new System.Drawing.Size(102, 43); this.configBtn.TabIndex = 34; @@ -498,7 +579,7 @@ // discontBtn // this.discontBtn.Font = new System.Drawing.Font("宋体", 15F); - this.discontBtn.Location = new System.Drawing.Point(1095, 12); + this.discontBtn.Location = new System.Drawing.Point(1148, 12); this.discontBtn.Name = "discontBtn"; this.discontBtn.Size = new System.Drawing.Size(102, 43); this.discontBtn.TabIndex = 37; @@ -508,76 +589,24 @@ // // discontPanel // - this.discontPanel.Location = new System.Drawing.Point(1258, 182); + this.discontPanel.Location = new System.Drawing.Point(1303, 182); this.discontPanel.Name = "discontPanel"; this.discontPanel.Size = new System.Drawing.Size(71, 656); this.discontPanel.TabIndex = 33; // - // H_ID + // vScrollBar1 // - this.H_ID.DataPropertyName = "ID"; - this.H_ID.HeaderText = "ID"; - this.H_ID.Name = "H_ID"; - this.H_ID.ReadOnly = true; - this.H_ID.Visible = false; - // - // H_Livestock_ID - // - this.H_Livestock_ID.HeaderText = "Livestock_ID"; - this.H_Livestock_ID.Name = "H_Livestock_ID"; - this.H_Livestock_ID.ReadOnly = true; - this.H_Livestock_ID.Visible = false; - // - // H_Index - // - this.H_Index.DataPropertyName = "Index"; - this.H_Index.HeaderText = "序号"; - this.H_Index.Name = "H_Index"; - this.H_Index.ReadOnly = true; - this.H_Index.Width = 65; - // - // H_Technics - // - this.H_Technics.DataPropertyName = "Technics_Name"; - this.H_Technics.HeaderText = "工艺"; - this.H_Technics.Name = "H_Technics"; - this.H_Technics.ReadOnly = true; - this.H_Technics.Width = 65; - // - // H_Livestock_Name - // - this.H_Livestock_Name.DataPropertyName = "Livestock_Name"; - this.H_Livestock_Name.HeaderText = "级别"; - this.H_Livestock_Name.Name = "H_Livestock_Name"; - this.H_Livestock_Name.ReadOnly = true; - this.H_Livestock_Name.Width = 90; - // - // H_Weight - // - this.H_Weight.DataPropertyName = "Weight"; - dataGridViewCellStyle3.Format = "#0.######"; - this.H_Weight.DefaultCellStyle = dataGridViewCellStyle3; - this.H_Weight.HeaderText = "重量"; - this.H_Weight.Name = "H_Weight"; - this.H_Weight.ReadOnly = true; - this.H_Weight.Width = 70; - // - // H_Time - // - this.H_Time.DataPropertyName = "Time"; - dataGridViewCellStyle4.Format = "MM/dd HH:mm"; - dataGridViewCellStyle4.NullValue = null; - this.H_Time.DefaultCellStyle = dataGridViewCellStyle4; - this.H_Time.HeaderText = "时间"; - this.H_Time.Name = "H_Time"; - this.H_Time.ReadOnly = true; - this.H_Time.Width = 110; + this.vScrollBar1.Location = new System.Drawing.Point(455, 175); + this.vScrollBar1.Name = "vScrollBar1"; + this.vScrollBar1.Size = new System.Drawing.Size(40, 566); + this.vScrollBar1.TabIndex = 51; // // GradeFrom // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1337, 865); + this.ClientSize = new System.Drawing.Size(1379, 865); + this.Controls.Add(this.vScrollBar1); this.Controls.Add(this.discontPanel); this.Controls.Add(this.discontBtn); this.Controls.Add(this.modifyPanel); @@ -659,12 +688,15 @@ private System.Windows.Forms.DataGridViewButtonColumn D_FinishBtn; private System.Windows.Forms.Button discontBtn; private System.Windows.Forms.FlowLayoutPanel discontPanel; + private System.Windows.Forms.VScrollBar vScrollBar2; private System.Windows.Forms.DataGridViewTextBoxColumn H_ID; private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_ID; + private System.Windows.Forms.DataGridViewCheckBoxColumn H_ReadWeight; private System.Windows.Forms.DataGridViewTextBoxColumn H_Index; private System.Windows.Forms.DataGridViewTextBoxColumn H_Technics; private System.Windows.Forms.DataGridViewTextBoxColumn H_Livestock_Name; private System.Windows.Forms.DataGridViewTextBoxColumn H_Weight; private System.Windows.Forms.DataGridViewTextBoxColumn H_Time; + private System.Windows.Forms.VScrollBar vScrollBar1; } } \ No newline at end of file diff --git a/WeighAndGrading/GradeFrom.cs b/WeighAndGrading/GradeFrom.cs index 47c451d..a09b4a1 100644 --- a/WeighAndGrading/GradeFrom.cs +++ b/WeighAndGrading/GradeFrom.cs @@ -37,7 +37,9 @@ namespace WeighAndGrading List details; SerialPort weightPort; int maxIndex = 0; - readonly ConcurrentQueue tempList = new ConcurrentQueue(); + ConcurrentQueue noLivestockList = new ConcurrentQueue(); + + ConcurrentQueue noWeightList = new ConcurrentQueue(); #region weightNeed private IDataFormat _dataFormat; @@ -76,6 +78,11 @@ namespace WeighAndGrading var btn = new Button() { Name = "_" + item.Item1, Text = item.Item2, Tag = item, Size = new Size(70, 60), TextAlign = ContentAlignment.MiddleCenter, Margin = new Padding { All = 10 }, Font = new Font("宋体", 15) }; btn.Click += (sender, e) => { + if (details == null) + { + MessageBox.Show("请先同步数据"); + return; + } var livestockTag = btn.Tag as CTuple; if (modifyDetail == null) AddDetail(livestockTag); @@ -115,6 +122,16 @@ namespace WeighAndGrading maoRow = FindRowSetSelected(maoEntity); dataGridView.Refresh(); details = GradeAndWeightRpc.GetDetails(date, 50); + FillQueue(); + BindDetailGrid(); + if (details.Any()) + maxIndex = details.First().Index; + } + + void FillQueue() + { + noWeightList = new ConcurrentQueue(); + noLivestockList = new ConcurrentQueue(); var stack = new Stack(); foreach (var item in details) { @@ -124,11 +141,13 @@ namespace WeighAndGrading break; } while (stack.Count > 0) - tempList.Enqueue(stack.Pop()); - - BindDetailGrid(); - if (details.Any()) - maxIndex = details.First().Index; + { + var bottom = stack.Pop(); + if (bottom.Weight == null) + noWeightList.Enqueue(bottom); + else + noLivestockList.Enqueue(bottom); + } } void BindDataGrid() @@ -139,6 +158,7 @@ namespace WeighAndGrading if ((bool)row.Cells["D_Finish"].Value) row.DefaultCellStyle.BackColor = Color.YellowGreen; } + InitScrollBar1(); dataGridView.ClearSelection(); } @@ -147,6 +167,7 @@ namespace WeighAndGrading historyGrid.DataSource = null; if (details.Any()) historyGrid.DataSource = details; + InitScrollBar2(); historyGrid.Refresh(); } @@ -356,9 +377,9 @@ namespace WeighAndGrading var tech = livestock.Item3 == 0 ? "烫褪" : "毛剥"; GradeAndWeight_Detail first; - if (tempList.TryPeek(out first) && first.Livestock_ID == 0) + if (noLivestockList.TryPeek(out first) && first.Livestock_ID == 0) { - tempList.TryDequeue(out first); + noLivestockList.TryDequeue(out first); if (currentRow != null) first.OrderDetail_ID = currentRow.OrderDetail_ID; first.Date = butcherTimeInput.Date.Value; @@ -387,7 +408,7 @@ namespace WeighAndGrading details.RemoveAt(49); details.Insert(0, entity); GradeAndWeightRpc.UpdateOrInsertDetail(entity, true); - tempList.Enqueue(entity); + noWeightList.Enqueue(entity); BindDetailGrid(); } if (currentRow != null) @@ -411,10 +432,13 @@ namespace WeighAndGrading { weight -= (GradeContext.Config.Discont ?? 0); GradeAndWeight_Detail first; - if (tempList.TryPeek(out first) && first.Weight == null) + if (noWeightList.TryPeek(out first)) { - tempList.TryDequeue(out first); - first.Weight = (first.Weight ?? 0) + weight; + noWeightList.TryDequeue(out first); + if (first.Weight < 0) + first.Weight = (first.Weight ?? 0) + weight; + else + first.Weight = weight; GradeAndWeightRpc.UpdateOrInsertDetail(first); historyGrid.Refresh(); } @@ -430,7 +454,7 @@ namespace WeighAndGrading details.RemoveAt(49); details.Insert(0, entity); GradeAndWeightRpc.UpdateOrInsertDetail(entity); - tempList.Enqueue(entity); + noLivestockList.Enqueue(entity); BindDetailGrid(); } } @@ -442,10 +466,42 @@ namespace WeighAndGrading modifyPanel.Hide(); } + GradeAndWeight_Detail lastCheckItem; private void historyGrid_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) return; + if (e.ColumnIndex == 2) + { + if (lastCheckItem != null && lastCheckItem.ID != (long)historyGrid.Rows[e.RowIndex].Cells[0].Value) + lastCheckItem.ReadWeight = false; + lastCheckItem = historyGrid.Rows[e.RowIndex].DataBoundItem as GradeAndWeight_Detail; + lastCheckItem.ReadWeight = !lastCheckItem.ReadWeight; + + modifyDetail = null; + if (modifyPanel.Visible) + modifyPanel.Hide(); + historyGrid.Refresh(); + if (lastCheckItem.ReadWeight) + { + noWeightList = new ConcurrentQueue(); + var stack = new Stack(); + foreach (var item in details) + { + stack.Push(item); + if (item.ID == lastCheckItem.ID) + break; + } + while (stack.Count > 0) + noWeightList.Enqueue(stack.Pop()); + } + else + { + FillQueue(); + lastCheckItem = null; + } + return; + } modifyDetail = historyGrid.Rows[e.RowIndex].DataBoundItem as GradeAndWeight_Detail; stateLabel.Text = string.Format("您正在修改序号为 {0} 的信息", modifyDetail.Index); modifyPanel.Show(); @@ -548,5 +604,30 @@ namespace WeighAndGrading discontPanel.Controls.Add(btn); } } + private void InitScrollBar1() + { + vScrollBar1.Maximum = (dataGridView.RowCount - dataGridView.DisplayedRowCount(false) + 30) * dataGridView.RowTemplate.Height; + vScrollBar1.Minimum = 0; + vScrollBar1.SmallChange = dataGridView.RowTemplate.Height; + vScrollBar1.LargeChange = dataGridView.RowTemplate.Height * 30; + this.vScrollBar1.Scroll += (sender, e) => + { + dataGridView.FirstDisplayedScrollingRowIndex = e.NewValue / dataGridView.RowTemplate.Height; + Application.DoEvents(); + }; + } + + private void InitScrollBar2() + { + vScrollBar2.Maximum = (historyGrid.RowCount - historyGrid.DisplayedRowCount(false) + 30) * historyGrid.RowTemplate.Height; + vScrollBar2.Minimum = 0; + vScrollBar2.SmallChange = historyGrid.RowTemplate.Height; + vScrollBar2.LargeChange = historyGrid.RowTemplate.Height * 30; + this.vScrollBar2.Scroll += (sender, e) => + { + historyGrid.FirstDisplayedScrollingRowIndex = e.NewValue / historyGrid.RowTemplate.Height; + Application.DoEvents(); + }; + } } } diff --git a/WeighAndGrading/GradeFrom.resx b/WeighAndGrading/GradeFrom.resx index e28c6b9..ecec308 100644 --- a/WeighAndGrading/GradeFrom.resx +++ b/WeighAndGrading/GradeFrom.resx @@ -123,6 +123,9 @@ True + + True + True