示例#1
0
 /// <summary>
 /// The show.
 /// </summary>
 /// <param name="formName">The form name.</param>
 /// <param name="label">The label.</param>
 /// <param name="name">The name.</param>
 /// <param name="buttonName">The button name.</param>
 /// <returns>The show.</returns>
 /// <remarks></remarks>
 public static string Show(string formName, string label, string name, string buttonName)
 {
     GetNameDialog temp = new GetNameDialog(formName, label, name, buttonName);
     temp.ShowDialog();
     name = temp.textBox1.Text;
     temp.Dispose();
     return name;
 }
示例#2
0
        /// <summary>
        /// The show.
        /// </summary>
        /// <param name="formName">The form name.</param>
        /// <param name="label">The label.</param>
        /// <param name="name">The name.</param>
        /// <param name="buttonName">The button name.</param>
        /// <returns>The show.</returns>
        /// <remarks></remarks>
        public static string Show(string formName, string label, string name, string buttonName)
        {
            GetNameDialog temp = new GetNameDialog(formName, label, name, buttonName);

            temp.ShowDialog();
            name = temp.textBox1.Text;
            temp.Dispose();
            return(name);
        }
示例#3
0
        /// <summary>
        /// The button 2_ click.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The e.</param>
        /// <remarks></remarks>
        private void renameBtn_Click(object sender, EventArgs e)
        {
            string name = GetNameDialog.Show(
                "Rename the plugin", "Select new name for the plugin:", comboBoxPluginName.Text, "&Rename");

            if (name != null)
            {
                Prefs.CustomPluginMasks[comboBoxPluginName.SelectedIndex].Name = name;
                comboBoxPluginName.Items[comboBoxPluginName.SelectedIndex]     = new string(name.ToCharArray());
            }
        }
示例#4
0
        /// <summary>
        /// The button 3_ click.
        /// </summary>
        /// <param name="sender">The sender.</param>
        /// <param name="e">The e.</param>
        /// <remarks></remarks>
        private void dupBtn_Click(object sender, EventArgs e)
        {
            string name = GetNameDialog.Show(
                "Select duplicated plugin name",
                "Select name for the duplicated plugin:",
                comboBoxPluginName.Text,
                "&Duplicate");

            if (name != null)
            {
                Prefs.CustomPluginMask newMask = new Prefs.CustomPluginMask();
                newMask.Name = Prefs.CustomPluginMasks[comboBoxPluginName.SelectedIndex].Name;
                newMask.VisibleTagTypes.AddRange(Prefs.CustomPluginMasks[comboBoxPluginName.SelectedIndex].VisibleTagTypes);
                Prefs.CustomPluginMasks.Add(newMask);

                comboBoxPluginName.SelectedIndex = comboBoxPluginName.Items.Add(name);
            }
        }
示例#5
0
 /// <summary>
 /// The set name box.
 /// </summary>
 /// <param name="initalName">The inital name.</param>
 /// <returns>The set name box.</returns>
 /// <remarks></remarks>
 public string setNameBox(string initalName)
 {
     initalName = GetNameDialog.Show(
         "Choose new plugin name", "Input a name for the new plugin:", initalName, "&Set Name");
     return(initalName);
 }