本文整理汇总了C#中Editor.PutString方法的典型用法代码示例。如果您正苦于以下问题:C# Editor.PutString方法的具体用法?C# Editor.PutString怎么用?C# Editor.PutString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Editor
的用法示例。
在下文中一共展示了Editor.PutString方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: WriteRealTimeSetup
private void WriteRealTimeSetup(Editor editor)
{
//保存实时变量数量
editor.PutString("RealtimeNum", textBox_Realtime_Number.Text);
//保存实时变量的其他信息
var total = Convert.ToInt32(textBox_Realtime_Number.Text);
for (var i = 0; i < total; i++)
{
var controlName = panel_Electricity.Controls.Find("txtElectName" + Convert.ToString(i + 1), true);
if (controlName.Length > 0)
{
var txtBox = (TextBox)controlName[0];
var txtNameElect = string.Format("textElectName{0}", i + 1);
editor.PutString(txtNameElect, txtBox.Text);
}
var controlValue = panel_Electricity.Controls.Find("txtElectValue" + Convert.ToString(i + 1), true);
if (controlValue.Length > 0)
{
var txtBox = (TextBox) controlValue[0];
var txtValueElect = string.Format("txtElectValue{0}", i + 1);
editor.PutString(txtValueElect, txtBox.Text);
}
}
}
示例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: WritePidBalance
private void WritePidBalance(Editor editor)
{
//直立PID
editor.PutString("Stand_P", textBox_Stand_P.Text);
editor.PutString("Stand_I", textBox_Stand_I.Text);
editor.PutString("Stand_D", textBox_Stand_D.Text);
//速度PID
editor.PutString("Speed_P", textBox_Speed_P.Text);
editor.PutString("Speed_I", textBox_Speed_I.Text);
editor.PutString("Speed_D", textBox_Speed_D.Text);
//方向PID
editor.PutString("Direction_P", textBox_Direction_P.Text);
editor.PutString("Direction_I", textBox_Direction_I.Text);
editor.PutString("Direction_D", textBox_Direction_D.Text);
}
示例4: WritePidFourWheel
private void WritePidFourWheel(Editor editor)
{
//舵机PID参数
editor.PutString("Steer_P", textBox_Steer_P.Text);
editor.PutString("Steer_I", textBox_Steer_I.Text);
editor.PutString("Steer_D", textBox_Steer_D.Text);
//电机PID参数
editor.PutString("Motor_P", textBox_Motor_P.Text);
editor.PutString("Motor_I", textBox_Motor_I.Text);
editor.PutString("Motor_D", textBox_Motor_D.Text);
}
示例5: 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, "修改");
}
}
}
示例6: 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));
}
}
示例7: ResetRealTimeSetup
private void ResetRealTimeSetup(Editor editor)
{
int realtimeNumber = 1;
editor.PutInt32("RealtimeNum", realtimeNumber);
for (var i = 0; i < realtimeNumber; i++)
{
var txtName = string.Format("textElectName{0}", i + 1);
editor.PutString(txtName, "Name");
var txtValue = string.Format("txtElectValue{0}", i + 1);
editor.PutString(txtValue, "0");
}
}
示例8: 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");
}
示例9: 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, @"修改");
}
}