Ejemplo n.º 1
0
 /// <summary>
 ///     Returns null if user did not accept the changes
 /// </summary>
 public static string[] ShowDialog(Form owner, string[] referencePaths)
 {
     using (var window = new EditReferencePaths(referencePaths))
     {
         window.Icon          = owner.Icon;
         window.StartPosition = FormStartPosition.CenterParent;
         window.ShowDialog(owner);
         return(window._result);
     }
 }
Ejemplo n.º 2
0
        private void setReferencePathsToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var referencePaths = EditReferencePaths.ShowDialog(this,
                                                               Settings.Default.ReferencePaths?.Cast <string>().ToArray() ?? new string[] { });

            if (referencePaths != null)
            {
                if (Settings.Default.ReferencePaths == null)
                {
                    Settings.Default.ReferencePaths = new StringCollection();
                }

                Settings.Default.ReferencePaths.Clear();
                Settings.Default.ReferencePaths.AddRange(referencePaths);

                LoadReferenceAssemblies();
            }
        }