예제 #1
0
 /// <summary>
 /// Ferme une fenetre existante
 /// </summary>
 /// <param name="window"></param>
 public void Close(WindowsEnum window)
 {
     foreach (Window win in Application.Current.Windows)
     {
         if (window.ToString() == win.Title)
         {
             win.Close();
         }
     }
 }
예제 #2
0
 /// <summary>
 /// Ouvre une fenetre existante
 /// </summary>
 /// <param name="window"></param>
 public void OpenExisting(WindowsEnum window)
 {
     foreach (Window win in Application.Current.Windows)
     {
         if (window.ToString() == win.Title)
         {
             win.Show();
         }
     }
 }
예제 #3
0
 /* fermer une fenetre de la liste WindowEnum*/
 public void CloseWindow(WindowsEnum windowsToClose)
 {
     /*pouur chaque fenetre win da l'application*/
     foreach (Window win in Application.Current.Windows)
     {
         /*fermer la fenetre dont le nom est indiqué dans l'appel*/
         if (win.Title == windowsToClose.ToString())
         {
             win.Close();
         }
     }
 }