private void LeftMouseDownAction(IconViewModel icon) { }
private void LeftMouseUpAction(IconViewModel icon) { icon.Run(); }
void WindowManager_WindowAdded(object sender, WindowEventArgs e) { Application.Current.Dispatcher.Invoke(DispatcherPriority.Normal, new Action(() => { var foundItems = VMLocator.Main.Icons.Where(i => PathTools.SamePath(i.Path, e.Window.FileName)); IconViewModel windowIcon = null; if (foundItems.Any()) windowIcon = foundItems.First(); if (!foundItems.Any() || (windowIcon != null && windowIcon.Windows.Count > 0)) { windowIcon = new IconViewModel() { Name = Path.GetFileName(e.Window.FileName), Path = e.Window.FileName, Pinned = false }; VMLocator.Main.Icons.Add(windowIcon); } windowIcon.Windows.Add(e.Window); })); }