示例#1
0
        public static bool ChangeValue(string _Description, string _OldValue, Func <string, bool> _ValueValidator, out string _NewValue)
        {
            string          retValue     = null;
            Action <string> setValueFunc = (string _Value) =>
            {
                retValue = _Value;
            };
            ChangeValueForm newForm = new ChangeValueForm(_Description, _OldValue, _ValueValidator, setValueFunc);

            newForm.ShowDialog();
            _NewValue = retValue;
            return(retValue != null);
        }
示例#2
0
        public static void ChangeValueAsync(string _Description, string _OldValue, Func <string, bool> _ValueValidator, Action <string> _SetValueFunc)
        {
            ChangeValueForm newForm = new ChangeValueForm(_Description, _OldValue, _ValueValidator, _SetValueFunc);

            newForm.Show();
        }