Exemplo n.º 1
0
        void newProfile_Click(object sender, EventArgs e)
        {
            var d = new NewProfileDialog();

            Dialog.Show(d, () =>
            {
                if (d.DialogResult == System.Windows.Forms.DialogResult.OK)
                {
                    var p = Profile.New(d.ProfileName.Text, "");
                    p.Save();
                    PopuplateProfiles();
                    foreach (SelectedProfile v in profiles.Items)
                    {
                        if (v.ToString() == p.Name)
                        {
                            profiles.SelectedItem = v;
                        }
                    }
                }
            });
        }
Exemplo n.º 2
0
 void newProfile_Click(object sender, EventArgs e)
 {
     var d = new NewProfileDialog();
     Dialog.Show(d, () =>
     {
         if (d.DialogResult == System.Windows.Forms.DialogResult.OK)
         {
             var p = Profile.New(d.ProfileName.Text, "");
             p.Save();
             PopuplateProfiles();
             foreach (SelectedProfile v in profiles.Items)
                 if (v.ToString() == p.Name)
                     profiles.SelectedItem = v;
         }
     });
 }