/// <summary> /// 创建[选择服务器]窗体 /// </summary> /// <param name="tip">对话框中显示的文字提示</param> /// <param name="tipValueContent">一个类型为string-string的字典对象,分别对应“关键字”和“提示语”</param> /// <param name="defaultKey">默认选中的值</param> /// <param name="autoAnswers">自动应答设置</param> /// <param name="autoAnswerPrefix">自动应答的前缀</param> /// <returns>返回string值,指示用户选择项对应的值</returns> public static string CreateSingleSelectForm(string tip, Dictionary<string, string> keyValueContent, string defaultKey, List<AutoAnswer> autoAnswers, string autoAnswerPrefix) { string[] index = new string[1]; FormSingleSelect frm = new FormSingleSelect(ref index, tip, keyValueContent, defaultKey, autoAnswers, autoAnswerPrefix); if (string.IsNullOrEmpty(index[0])) frm.ShowDialog(); return index[0]; }
/// <summary> /// 创建[选择服务器]窗体 /// </summary> /// <param name="tip">对话框中显示的文字提示</param> /// <param name="keyValueContent">一个类型为string-string的字典对象,分别对应“关键字”和“提示语”</param> /// <param name="defaultKey">默认选中的值</param> /// <param name="autoAnswers">自动应答设置</param> /// <param name="autoAnswerPrefix">自动应答的前缀</param> /// <returns>返回string值,指示用户选择项对应的值</returns> public static string CreateSingleSelectForm(string tip, Dictionary <string, string> keyValueContent, string defaultKey, List <AutoAnswer> autoAnswers, string autoAnswerPrefix) { string[] index = new string[1]; FormSingleSelect frm = new FormSingleSelect(ref index, tip, keyValueContent, defaultKey, autoAnswers, autoAnswerPrefix); if (string.IsNullOrEmpty(index[0])) { frm.ShowDialog(); } return(index[0]); }