예제 #1
0
        private void uiFavouritesAddButton_Click(object sender, RoutedEventArgs e)
        {
            AddServerWindow window = new AddServerWindow();

            window.Owner = this;

            try
            {
                window.ShowDialog();
            }
            catch (Exception ex)
            {
                window.Close();
                Common.Message(this, "Add server window error.", ex, MessageWindow.Flags.Error);
                return;
            }

            if (window.AddServer)
            {
                favourites.Add(window.ServerAddress);
            }
        }
예제 #2
0
        private void uiFavouritesAddButton_Click(object sender, RoutedEventArgs e)
        {
            AddServerWindow window = new AddServerWindow();
            window.Owner = this;

            try
            {
                window.ShowDialog();
            }
            catch (Exception ex)
            {
                window.Close();
                Common.Message(this, "Add server window error.", ex, MessageWindow.Flags.Error);
                return;
            }

            if (window.AddServer)
            {
                favourites.Add(window.ServerAddress);
            }
        }