当前位置: 首页>>代码示例>>C#>>正文


C# InputDialog.SetInstr方法代码示例

本文整理汇总了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();
        }
开发者ID:BillSherman,项目名称:GlobalsGraphDB,代码行数:12,代码来源:PropertiesEditor.cs

示例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();
        }
开发者ID:BillSherman,项目名称:GlobalsGraphDB,代码行数:24,代码来源:PropertiesEditor.cs

示例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();
     }
 }
开发者ID:amoun00,项目名称:Contributions,代码行数:11,代码来源:frmMain.cs

示例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;
            }
        }
开发者ID:amoun00,项目名称:Contributions,代码行数:22,代码来源:frmMain.cs


注:本文中的InputDialog.SetInstr方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。