本文整理汇总了C#中Editor.PutBoolean方法的典型用法代码示例。如果您正苦于以下问题:C# Editor.PutBoolean方法的具体用法?C# Editor.PutBoolean怎么用?C# Editor.PutBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Editor
的用法示例。
在下文中一共展示了Editor.PutBoolean方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WritePortSetup
private void WritePortSetup(Editor editor)
{
if (_hasPorts)
{
//保存选中的端口
editor.PutInt32("selectedPort", comboBox_port.SelectedIndex);
//保存设置的波特率
editor.PutInt32("baudRate", comboBox_baudrate.SelectedIndex);
//保存设置的校验方式
editor.PutInt32("parity", comboBox_parity.SelectedIndex);
//保存设置的数据位
editor.PutInt32("dataBits", comboBox_databit.SelectedIndex);
//保存设置的停止位
editor.PutInt32("stopBits", comboBox_stopbit.SelectedIndex);
//保存自动发送数据时间间隔
editor.PutInt32("intervalTime", Convert.ToInt32(textBox_sendPeriod.Text));
//保存接收方式
editor.PutBoolean("acceptChar", checkBox_receiveHex.Checked);
//保存标志变量,即是否在接收框中显示信息。
editor.PutBoolean("showInfo", showInfo);
}
}
示例2: WriteScopeSetup
private void WriteScopeSetup(Editor editor)
{
//保存虚拟示波器的变量情况
var totalScope = ScopeNumber;
for (var i = 0; i < totalScope; i++)
{
var controlCheckState = panel_Scope.Controls.Find("checkBox_Def" + Convert.ToString(i + 1), true);
if (controlCheckState.Length > 0)
{
var checkboxSelect = (CheckBox)controlCheckState[0];
var checkState = string.Format("SCOPE_CheckState{0}", i + 1);
editor.PutBoolean(checkState, checkboxSelect.Checked);
}
var controlName = panel_Scope.Controls.Find("txtName" + Convert.ToString(i + 1), true);
if (controlName.Length > 0)
{
var txtBox = (TextBox)controlName[0];
var txtName = string.Format("SCOPE_TextName{0}", i + 1);
editor.PutString(txtName, txtBox.Text);
}
}
}
示例3: WritePidSetup
private void WritePidSetup(Editor editor)
{
//保存PID参数选择情况
editor.PutBoolean("radioButton_carType", radioButton_FourWheel.Checked);
if (radioButton_FourWheel.Checked) //四轮车PID
{
WritePidFourWheel(editor);
}
else if (radioButton_BalanceCar.Checked) //直立车PID参数的获取
{
WritePidBalance(editor);
}
}
示例4: WriteDiySetup
private void WriteDiySetup(Editor editor)
{
//保存自定义参数的数量
editor.PutInt32("DIY_Number", Convert.ToInt32(textBox_DIY_Number.Text));
//保存自定义参数的其他信息
var total = Convert.ToInt32(textBox_DIY_Number.Text);
for (var i = 0; i < total; i++)
{
var controlCheckState = panel_add_DIYControls.Controls.Find("checkBox_Def" + Convert.ToString(i + 1), true);
if (controlCheckState.Length > 0)
{
var checkboxSelect = (CheckBox)controlCheckState[0];
var checkState = string.Format("DIY_CheckState{0}", i + 1);
editor.PutBoolean(checkState, checkboxSelect.Checked);
}
var controlName = panel_add_DIYControls.Controls.Find("txtName" + Convert.ToString(i + 1), true);
if (controlName.Length > 0)
{
var txtBox = (TextBox)controlName[0];
var txtName = string.Format("DIY_TextName{0}", i + 1);
editor.PutString(txtName, txtBox.Text);
}
var controlValue = panel_add_DIYControls.Controls.Find("txtValue" + Convert.ToString(i + 1), true);
if (controlValue.Length > 0)
{
var txtBox = (TextBox)controlValue[0];
var txtValue = string.Format("DIY_TextValue{0}", i + 1);
editor.PutString(txtValue, txtBox.Text);
}
var controlButton = panel_add_DIYControls.Controls.Find("buttonSubmit" + Convert.ToString(i + 1), true);
if (controlButton.Length > 0)
{
var button = (Button)controlButton[0];
var buttonName = string.Format("buttonSubmit{0}", i + 1);
editor.PutString(buttonName, "修改");
}
}
}
示例5: ResetScopeSetup
private void ResetScopeSetup(Editor editor)
{
var totalScope = ScopeNumber;
for (var i = 0; i < totalScope; i++)
{
var checkState = string.Format("SCOPE_CheckState{0}", i + 1);
editor.PutBoolean(checkState, false);
var txtNameDIY = string.Format("SCOPE_TextName{0}", i + 1);
editor.PutString(txtNameDIY, "波形" + (i+1));
}
}
示例6: ResetPIDSetup
private void ResetPIDSetup(Editor editor)
{
editor.PutBoolean("radioButton_carType", false);
//舵机PID参数
editor.PutString("Steer_P", "1.0");
editor.PutString("Steer_I", "1.0");
editor.PutString("Steer_D", "1.0");
//电机PID参数
editor.PutString("Motor_P", "1.0");
editor.PutString("Motor_I", "1.0");
editor.PutString("Motor_D", "1.0");
//直立PID
editor.PutString("Stand_P", "1.0");
editor.PutString("Stand_I", "1.0");
editor.PutString("Stand_D", "1.0");
//速度PID
editor.PutString("Speed_P", "1.0");
editor.PutString("Speed_I", "1.0");
editor.PutString("Speed_D", "1.0");
//方向PID
editor.PutString("Direction_P", "1.0");
editor.PutString("Direction_I", "1.0");
editor.PutString("Direction_D", "1.0");
}
示例7: ResetCustomSetup
private void ResetCustomSetup(Editor editor)
{
int diyNumber = 1;
editor.PutInt32("DIY_Number", diyNumber);
for (var i = 0; i < diyNumber; i++)
{
var checkState = string.Format("DIY_CheckState{0}", i + 1);
editor.PutBoolean(checkState, false);
var txtNameDIY = string.Format("DIY_TextName{0}", i + 1);
editor.PutString(txtNameDIY, "Names");
var txtValueDIY = string.Format("DIY_TextValue{0}", i + 1);
editor.PutString(txtValueDIY, "1.0");
var buttonDIY = string.Format("buttonSubmit{0}", i + 1);
editor.PutString(buttonDIY, @"修改");
}
}