|
@@ -1560,6 +1560,7 @@ namespace Welling_Motor_Debug_Tool
|
|
|
textBox_FacModeGit.Text = "";
|
|
|
for (ushort i = 0; i < 9; i++)
|
|
|
{
|
|
|
+ textBox_SP.Text += ((char)Data[23 + i]).ToString();
|
|
|
textBox_FacModeGit.Text += ((char)Data[23 + i]).ToString();
|
|
|
}
|
|
|
|
|
@@ -7159,5 +7160,99 @@ namespace Welling_Motor_Debug_Tool
|
|
|
else
|
|
|
numericUpDown_SpeedAdj.Value += 1;
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ bool WriteLockStatus = true;
|
|
|
+ private void pictureBox_WriteLock_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ EnterForm1.ShowDialog();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (EnterForm1.textBox_Passwd.Text == EnterForm1.UserAccount[EnterForm1.comboBox_User.Text])//检验模式所有用户支持
|
|
|
+ {
|
|
|
+ if (EnterForm1.comboBox_User.Text == "工程配置")
|
|
|
+ {
|
|
|
+ if (WriteLockStatus == true)
|
|
|
+ {
|
|
|
+ pictureBox_WriteLock.Image = global::Welling_Motor_Debug_Tool.Properties.Resources.Unlock;
|
|
|
+ foreach (Control c in groupBox2.Controls)
|
|
|
+ {
|
|
|
+ if (c is CheckBox)
|
|
|
+ c.Enabled = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ pictureBox_WriteLock.Image = global::Welling_Motor_Debug_Tool.Properties.Resources.Lock;
|
|
|
+ foreach (Control c in groupBox2.Controls)
|
|
|
+ {
|
|
|
+ if (c is CheckBox)
|
|
|
+ c.Enabled = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ WriteLockStatus = !WriteLockStatus;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show("权限不支持", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show("密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ MessageBox.Show("用户不存在或密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ bool ReadLockStatus = true;
|
|
|
+ private void pictureBox_ReadLock_Click(object sender, EventArgs e)
|
|
|
+ {
|
|
|
+ EnterForm1.ShowDialog();
|
|
|
+ try
|
|
|
+ {
|
|
|
+ if (EnterForm1.textBox_Passwd.Text == EnterForm1.UserAccount[EnterForm1.comboBox_User.Text])//检验模式所有用户支持
|
|
|
+ {
|
|
|
+ if (EnterForm1.comboBox_User.Text == "工程配置")
|
|
|
+ {
|
|
|
+ if (ReadLockStatus == true)
|
|
|
+ {
|
|
|
+ pictureBox_ReadLock.Image = global::Welling_Motor_Debug_Tool.Properties.Resources.Unlock;
|
|
|
+ foreach (Control c in groupBox29.Controls)
|
|
|
+ {
|
|
|
+ if (c is CheckBox)
|
|
|
+ c.Enabled = true;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ pictureBox_ReadLock.Image = global::Welling_Motor_Debug_Tool.Properties.Resources.Lock;
|
|
|
+ foreach (Control c in groupBox29.Controls)
|
|
|
+ {
|
|
|
+ if (c is CheckBox)
|
|
|
+ c.Enabled = false;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ReadLockStatus = !ReadLockStatus;
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show("权限不支持", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ MessageBox.Show("密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ catch (Exception)
|
|
|
+ {
|
|
|
+ MessageBox.Show("用户不存在或密码错误", "提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|