示例#1
0
        public bool OpenRenameDialog(string currentName, out string newName)
        {
            var dialog = new RenameWindow {
                NewName = currentName,
                Owner   = Window.Value
            };
            bool?result = dialog.ShowDialog();

            if (result ?? false)
            {
                newName = dialog.NewName;
                return(true);
            }
            else
            {
                newName = null;
                return(false);
            }
        }
示例#2
0
        public bool OpenRenameDialog(string currentName, string description, out string newName)
        {
            var dialog = new RenameWindow
            {
                NewName     = currentName,
                Description = description,
                Owner       = Window.Value
            };

            var result = dialog.ShowDialog();

            if (result ?? false)
            {
                newName = dialog.NewName;
                return(true);
            }
            else
            {
                newName = string.Empty;
                return(false);
            }
        }
        public bool OpenRenameDialog(string currentName, string description, out string newName)
        {
            var dialog = new RenameWindow
                         {
                             NewName = currentName,
                             Description = description,
                             Owner = Window.Value
                         };

            bool? result = dialog.ShowDialog();
            if (result ?? false)
            {
                newName = dialog.NewName;
                return true;
            }
            else
            {
                newName = null;
                return false;
            }
        }