コード例 #1
0
 private void SettingAxesForm_OnResetAllClicked()
 {
     //if (MessageBox.Show(string.Format("reset all settings to default?"), "reset",
     //MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
     if (MessageBox.Show(string.Format("将所有的参数设置为默认值?"), "重置",
                         MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
     {
         foreach (var item in AxisMgr.Instance.FindAll())
         {
             MotionUtil.ResetAxisPrm(item);
         }
     }
 }
コード例 #2
0
 public void Reset()
 {
     if (this.axis == null)
     {
         return;
     }
     //if (MessageBox.Show(string.Format("reset axis {0} setting to default?", this.axis.Name), "reset",
     //MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
     if (MessageBox.Show(string.Format("将轴 {0} 的参数设置为默认?", this.axis.Name), "重置",
                         MessageBoxButtons.OKCancel, MessageBoxIcon.Warning) == DialogResult.OK)
     {
         MotionUtil.ResetAxisPrm(this.axis);
         this.propertyGrid1.SelectedObject = this.axis.Prm;
         CompareObj.CompareProperty(this.axis.Prm, this.PrmBackUp);
     }
 }