title: Programmaticaly opening new windows and updating them periodically
body: <p>Working on a aplication, that is gonna monitor some files and on file change, show that change in new window for each file.</p>
  
  <p>Once user selects which file to monitor, a new window should open on button click. In the background I trigger <code>FileSystemWatcher</code> to watch this file for changes. Once change happens, I have to update this newly opened window (with textbox) with some information.</p>
  
  <p>I have already set up new Window1 (Project -> Add Window -> Window (WPF)).
  The rest of the code looks like this:</p>
  
  <pre><code>FileSystemWatcher watcher = new FileSystemWatcher();
  watcher.Path = current_log.FullName.Substring(0, current_log.FullName.LastIndexOf('\\'));
  
  watcher.NotifyFilter = NotifyFilters.LastAccess | NotifyFilters.LastWrite
             | NotifyFilters.FileName | NotifyFilters.DirectoryName;
  
  watcher.Filter = current_log.Name;
  watcher.Changed += new FileSystemEventHandler(OnChanged);
  watcher.EnableRaisingEvents = true;
  
  //check if window is already active
  //????
  
  //open new window
  Window1 log_window = new Window1();
  log_window.Show();
  log_window.txt_log_window_messages.AppendText("ddd\n");
  </code></pre>
  
  <p>Questions:</p>
  
  <ul>
  <li>How to check if this file already has a monitor window active, to not open it again?</li>
  <li>How to identify in which window I should update textbox in <code>OnChanged()</code> function?</li>
  </ul>