예제 #1
0
 private void btnAddServer_Click(object sender, RoutedEventArgs e)
 {
     var frmAdd = new serverlist.AddServer(ref _sl);
     if (frmAdd.ShowDialog() == true)
     {
         _sl.Write();
         btnReflushServer_Click(null, null);
     }
 }
예제 #2
0
        private void btnAddServer_Click(object sender, RoutedEventArgs e)
        {
            var frmAdd = new serverlist.AddServer(ref _sl);

            if (frmAdd.ShowDialog() == true)
            {
                _sl.Write();
                btnReflushServer_Click(null, null);
            }
        }
예제 #3
0
 private void btnEditServer_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         int selected = this.listServer.SelectedIndex;
         var frmEdit = new serverlist.AddServer(ref _sl, selected);
         if (frmEdit.ShowDialog() == true)
         {
             serverlist.serverinfo info = frmEdit.getEdit();
             _sl.Edit(selected, info.Name, info.Address, info.IsHide);
             _sl.Write();
             btnReflushServer_Click(null, null);
         }
     }
     catch (ArgumentOutOfRangeException)
     {
         MessageBox.Show(LangManager.GetLangFromResource("ServerListNoServerSelect"));
     }
 }
예제 #4
0
 private void btnEditServer_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         int selected = this.listServer.SelectedIndex;
         var frmEdit  = new serverlist.AddServer(ref _sl, selected);
         if (frmEdit.ShowDialog() == true)
         {
             serverlist.serverinfo info = frmEdit.getEdit();
             _sl.Edit(selected, info.Name, info.Address, info.IsHide);
             _sl.Write();
             btnReflushServer_Click(null, null);
         }
     }
     catch (ArgumentOutOfRangeException)
     {
         MessageBox.Show(LangManager.GetLangFromResource("ServerListNoServerSelect"));
     }
 }