public void RunStarted(object automationObject,
                               Dictionary <string, string> replacementsDictionary,
                               WizardRunKind runKind, object[] customParams)
        {
            try
            {
                // Display a form to the user. The form collects
                // input for the custom message.
                var inputWindow = new UserInputWindow();

                inputWindow.AddInput("$displayname$", "Display Name:", "Unturned Plugin");
                inputWindow.AddInput("$description$", "Description:", "An OpenMod Unturned plugin.");
                inputWindow.AddInput("$author$", "Author:", "Your name");

                inputWindow.ShowDialog();

                foreach (var input in inputWindow.Inputs)
                {
                    replacementsDictionary.Add(input.Key, input.Value);
                }

                if (string.IsNullOrWhiteSpace(replacementsDictionary["$displayname$"]))
                {
                    replacementsDictionary["$displayname$"] = replacementsDictionary["$projectname$"];
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
示例#2
0
        public void RunStarted(object automationObject,
                               Dictionary <string, string> replacementsDictionary,
                               WizardRunKind runKind, object[] customParams)
        {
            try
            {
                // Display a form to the user. The form collects
                // input for the custom message.
                var inputWindow = new UserInputWindow(replacementsDictionary);

                //inputWindow.AddInput("$displayname$", "Display Name:", "Unturned Plugin");
                //inputWindow.AddInput("$description$", "Description:", "An OpenMod Unturned plugin.");
                //inputWindow.AddInput("$author$", "Author:", "Your name");

                inputWindow.ShowDialog();

                inputWindow.ApplyInputs(replacementsDictionary);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }