Пример #1
0
        void AAddProfileExecute(object sender, EventArgs e)
        {
            UserTranslateProfile pf = new UserTranslateProfile();

            SetProfileNameForm nameForm = new SetProfileNameForm(pf, TranslateOptions.Instance.Profiles);
            DialogResult dr = nameForm.ShowDialog(FindForm());
            nameForm.Dispose();
            if(dr == DialogResult.Cancel)
                return;

            CustomProfileServicesForm form = new CustomProfileServicesForm(pf);
            form.ShowDialog(this);
            form.Dispose();

            TranslateOptions.Instance.Profiles.Add(pf);
            TranslateOptions.Instance.CurrentProfile = pf;

            pf.Subjects.AddRange(pf.GetSupportedSubjects());

            UpdateProfiles();
        }