本文整理汇总了C#中InputDialog.SetInstr方法的典型用法代码示例。如果您正苦于以下问题:C# InputDialog.SetInstr方法的具体用法?C# InputDialog.SetInstr怎么用?C# InputDialog.SetInstr使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类InputDialog
的用法示例。
在下文中一共展示了InputDialog.SetInstr方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: buttonEdit_Click
private void buttonEdit_Click(object sender, EventArgs e)
{
string propname = comboProps.SelectedItem.ToString();
InputDialog new_prop_val_dlg = new InputDialog();
new_prop_val_dlg.SetInstr("New value property ...");
new_prop_val_dlg.ShowDialog();
if (new_prop_val_dlg.DialogResult != System.Windows.Forms.DialogResult.OK)
return;
working_component.SetCustomString(propname, new_prop_val_dlg.TextValue);
DisplayPropVal();
}
示例2: buttonNew_Click
private void buttonNew_Click(object sender, EventArgs e)
{
InputDialog new_prop_stuff = new InputDialog();
new_prop_stuff.SetInstr("Name of new property ...");
new_prop_stuff.ShowDialog();
if (new_prop_stuff.DialogResult != System.Windows.Forms.DialogResult.OK)
return;
string new_prop_name = new_prop_stuff.TextValue;
if (working_component.NonemptyPropertyNames().Contains(new_prop_name))
{
MessageBox.Show("There's already a property with that name.");
return;
}
new_prop_stuff = new InputDialog();
new_prop_stuff.SetInstr("Value of new property ...");
new_prop_stuff.ShowDialog();
if (new_prop_stuff.DialogResult != System.Windows.Forms.DialogResult.OK)
return;
working_component.SetCustomString(new_prop_name, new_prop_stuff.TextValue);
RebuildList();
}
示例3: buttonNewNode_Click
private void buttonNewNode_Click(object sender, EventArgs e)
{
InputDialog new_name_dlg = new InputDialog();
new_name_dlg.SetInstr("Name of new node ..."); // in this example we're assuming that "name" will be required for nodes
new_name_dlg.ShowDialog();
if (new_name_dlg.DialogResult == System.Windows.Forms.DialogResult.OK)
{
NodeWrapper.AddGraphNode(CurrentGraph, new_name_dlg.TextValue.Trim());
RebuildNodeList();
}
}
示例4: buttonNewGraph_Click
private void buttonNewGraph_Click(object sender, EventArgs e)
{
InputDialog new_name_dlg = new InputDialog();
new_name_dlg.SetInstr("Name of new graph ...");
new_name_dlg.ShowDialog();
if (new_name_dlg.DialogResult == System.Windows.Forms.DialogResult.OK)
{
string new_name = new_name_dlg.TextValue.Trim();
if (new_name == "") return;
string err_msg = "";
GlGraph new_graph = GlobalsGraphAdmin.CreateGraph(new_name, out err_msg);
if (new_graph == null)
{
MessageBox.Show(err_msg);
return;
}
RebuildGraphList();
comboGraphs.SelectedItem = new_name;
}
}