public WatchFrame() { InitializeComponent(); if (Directory.Exists(CMSConfig.dirwatch)) { FileSystemWatcher f = new FileSystemWatcher(CMSConfig.dirwatch); f.Created += new FileSystemEventHandler(f_Created); f.EnableRaisingEvents = true; for (int i = 0; i < 20; i++) { ImgSlot s = new ImgSlot(); s.Name = "img" + i; s.MouseDown += new MouseButtonEventHandler(img0_MouseDown); s.Margin = new Thickness(3); img.Add(s); c.Children.Add(s); } /* img.Add(img0); img.Add(img1); img.Add(img2); <my:ImgSlot x:Name="img3" MouseDown="img0_MouseDown"/>*/ } else { errorTxt.Text = "Watch Folder not defined"; errorTxt.Visibility = System.Windows.Visibility.Visible; } availableVariablesListBox.IsEnabled = false; }
private void fade(ImgSlot e, Boolean fadein) { e.fade(fadein); }