Beispiel #1
0
 /// <summary>
 /// Method used to unregister a Window object. This means removing it from the allWindows
 /// collection; it is the opposite of the RegisterWindow method.
 /// </summary>
 /// <param name="window">Window object to be removed from the allWindows collection.</param>
 public static void UnregisterWindow(Window window)
 {
     lock (allWindowsLock) {
         // Remove Window object from allWindows collection.
         allWindows.Remove(window);
     }
 }
 /// <summary>
 /// Class constructor.
 /// </summary>
 /// <param name="source">The source CheckedListBox object.</param>
 /// <param name="draggedWindow">The Window object which is being dragged.</param>
 /// <param name="isChecked">Flag which tells whether the check box of the window is checked.</param>
 public DragDropInformation(CheckedListBox source, Window draggedWindow, bool isChecked)
 {
     this.source = source;
     this.draggedWindow = draggedWindow;
     this.isChecked = isChecked;
 }
Beispiel #3
0
 /// <summary>
 /// Method used to register a Window object. Registration means that it is added to the
 /// allWindows collection so that the rest of the program can track it.
 /// </summary>
 /// <param name="window">Window object to be added to the allWindows collection.</param>
 public static void RegisterWindow(Window window)
 {
     lock (allWindowsLock) {
         // If the window send as argument is not in the allWindows collections
         if (allWindows.Contains(window) == false)
             // then add it.
             allWindows.Add(window);
     }
 }