Dynamo.Controls.DynamoView.ShowNewPresetDialog C# (CSharp) Метод

ShowNewPresetDialog() приватный Метод

Presents the preset name dialogue. sets eventargs.Success to true if the user enters a preset name/timestamp and description.
private ShowNewPresetDialog ( Dynamo.Models.PresetsNamePromptEventArgs e ) : void
e Dynamo.Models.PresetsNamePromptEventArgs
Результат void
        internal void ShowNewPresetDialog(PresetsNamePromptEventArgs e)
        {
            string error = "";

            do
            {
                var dialog = new PresetPrompt()
                {
                    DescriptionInput = { Text = e.Description },
                    nameView = { Text = "" },
                    nameBox = { Text = e.Name },
                    // center the prompt
                    Owner = this,
                    WindowStartupLocation = WindowStartupLocation.CenterOwner
                };

               
                if (dialog.ShowDialog() != true)
                {
                    e.Success = false;
                    return;
                }

                if (String.IsNullOrEmpty(dialog.Text))
                {
                   //if the name is empty, then default to the current time
                    e.Name = System.DateTime.Now.ToString();
                    break;
                }
                else
                {
                    error = "";
                }

                e.Name = dialog.Text;
                e.Description = dialog.Description;

            } while (!error.Equals(""));

            e.Success = true;
        }
DynamoView