Esempio n. 1
0
        private void ButtonAddServer_Click(object sender, RoutedEventArgs e)
        {
            ServerFormWindow dialog = new ServerFormWindow();
            var result = dialog.ShowDialog();

            if (result == true)
            {
                App.Servers.Add(dialog.Server);
            }
        }
Esempio n. 2
0
        private void ButtonEditServer_Click(object sender, RoutedEventArgs e)
        {
            if (ListServers.SelectedItem == null)
            {
                return;
            }

            var original = ListServers.SelectedItem as Server;
            var copy     = original.Copy();

            var result = new ServerFormWindow(copy).ShowDialog();

            if (result == true)
            {
                App.Servers.Replace(original, copy);
            }

            return;
        }