Пример #1
0
        private void ExecuteAddProfile(object o)
        {
            var dlg    = new AddProfileDialog(App.Current.MainWindow);
            var result = dlg.ShowDialog();

            if (result == true)
            {
                var profile = new MtConnectionProfile(dlg.ProfileName);
                profile.Host = dlg.Host;
                profile.Port = int.Parse(dlg.Port);

                MtRegistryManager.AddConnectionProfile(profile);
                ConnectionProfiles.Add(profile);
            }
        }
Пример #2
0
        private void ExecuteAddProfile(object o)
        {
            var dlg = new AddProfileDialog(App.Current.MainWindow);
            var result = dlg.ShowDialog();

            if (result == true)
            {
                var profile = new MtConnectionProfile(dlg.ProfileName);
                profile.Host = dlg.Host;
                profile.Port = int.Parse(dlg.Port);

                MtRegistryManager.AddConnectionProfile(profile);
                ConnectionProfiles.Add(profile);
            }
        }