Example #1
0
 private void InstantiateClientDiscoveryWindow()
 {
     if ((cdw == null) || (cdw.IsLoaded == false)) // HACK: the first time cdw is null
     {
         cdw = new ClientDiscoveryWindow();
         cdw.Show();
     }
     else
     {
         cdw.Activate();
     }
 }
Example #2
0
 private void InstantiateClientDiscoveryWindow(string filePath)
 {
     if ((cdw == null) || (cdw.IsLoaded == false)) // HACK: the first time cdw is null, so the second condition will not be evaluated
     {
         cdw = new ClientDiscoveryWindow(filePath);
         cdw.Show();
     }
     else // That means that I'm trying to open 2 ClientDiscoveryWindow (two servers)
     {
         MessageBox.Show("To start sending another file, close the open Transfar Windows.", "Transfar", MessageBoxButton.OK,
                         MessageBoxImage.Warning, MessageBoxResult.OK, MessageBoxOptions.DefaultDesktopOnly);
     }
 }