private void bClear_Click(object sender, EventArgs e) { if (MessageBox.Show($"是否初始化[{this.moduleRadio1.Module}模组]机械校验!!! Y/N", "警告", MessageBoxButtons.YesNo) == DialogResult.Yes) { HardwareOrgHelper.Instance.HardWare[this.moduleRadio1.Module] = new HardwareItem(); HardwareOrgHelper.Save(); this.moduleRadio1_ModuleChange(this, this.moduleRadio1.Module); } }
private void bEnable_Click(object sender, EventArgs e) { if (this.Aixs == GeneralAxis.X) { HardwareOrgHelper.Instance[this.module].X = x; HardwareOrgHelper.Instance[this.module].RX = rx; HardwareOrgHelper.Instance[this.module].XPoly = poly; } else { HardwareOrgHelper.Instance[this.module].Y = x; HardwareOrgHelper.Instance[this.module].RY = rx; HardwareOrgHelper.Instance[this.module].YPoly = poly; } HardwareOrgHelper.Save(); this.bEnable.Enabled = false; }
private void bUpdate_Click(object sender, EventArgs e) { var module = this.module.Module; HardwareOrgHelper.Instance[module].LeftBottom = Org; HardwareOrgHelper.Instance[module].RightBottom = RightBottom; HardwareOrgHelper.Instance[module].LeftTop = LeftTop; HardwareOrgHelper.Instance[module].RightTop = RightTop; HardwareOrgHelper.Instance[module].XYCroodAngle = (double)this.tXYAngle.Value; double deg = (HardwareOrgHelper.Instance[module].XYCroodAngle - 90) / 180.0 * Math.PI; HardwareOrgHelper.Instance[module].XRate = Math.Cos(deg); HardwareOrgHelper.Instance[module].YRate = Math.Sin(deg); //this.bUpdate.Enabled = false; HardwareOrgHelper.Save(); }