public ClipboardThumbnailItem(BitmapSource icon, BitmapSource preview, string title, ClipboardSnapshot snapshot) { ShowActivated = false; Focusable = false; Icon = icon; WindowStyle = WindowStyle.None; ResizeMode = ResizeMode.NoResize; Title = title; Width = 0; Height = 0; Owner = GlobalMessageListener.Instance; Top = -short.MaxValue; Left = -short.MaxValue; var bitmap = new BitmapImage(); bitmap.BeginInit(); bitmap.UriSource = new Uri("pack://application:,,,/Shapeshifter;component/Images/Overlay.png"); bitmap.EndInit(); TaskbarItemInfo = new TaskbarItemInfo() { Overlay = bitmap }; _snapshot = snapshot; _preview = BitmapFromBitmapSource(preview); _taskbarList = (ITaskbarList4)new TaskbarList(); _taskbarList.HrInit(); }
static WindowsTaskbar() { if (WindowsUtils.IsWindows7) { _taskbarList = (ITaskbarList4)new CTaskbarList(); _taskbarList.HrInit(); } }
static WindowsTaskbar() { if (WindowsUtils.IsWindows7) { _taskbarList = (ITaskbarList4) new CTaskbarList(); _taskbarList.HrInit(); } }
public Win7TaskBar(IntPtr windowHandle, ITaskbarList4 taskBarList, ITestTreeModel testTreeModel, ITestStatistics testStatistics) { this.windowHandle = windowHandle; this.testTreeModel = testTreeModel; this.testStatistics = testStatistics; testStatistics.Passed.PropertyChanged += UpdateTaskbar; testStatistics.Failed.PropertyChanged += UpdateTaskbar; testStatistics.Skipped.PropertyChanged += UpdateTaskbar; testStatistics.Inconclusive.PropertyChanged += UpdateTaskbar; this.taskBarList = taskBarList; taskBarList.HrInit(); }
static Windows7TaskBar() { try { LOG.Info("Try to initialize Windows 7 Taskbar..."); taskbar = (ITaskbarList4)new TaskbarList(); taskbar.HrInit(); LOG.Info(">>> OK"); } catch (Exception e) { taskbar = null; LOG.Warn("WARN: Cannot create windows 7 taskbar:\n" + e.Message); LOG.Info("Ignore commands for windows 7 taskbar!"); } }
static Windows7TaskBar() { try { LOG.Info("Try to initialize Windows 7 Taskbar..."); taskbar = (ITaskbarList4) new TaskbarList(); taskbar.HrInit(); LOG.Info(">>> OK"); } catch (Exception e) { taskbar = null; LOG.Warn("WARN: Cannot create windows 7 taskbar:\n" + e.Message); LOG.Info("Ignore commands for windows 7 taskbar!"); } }
static WindowsTaskbar() { if (WindowsUtils.IsWindows7) { try { // ReSharper disable once SuspiciousTypeConversion.Global _taskbarList = (ITaskbarList4) new CTaskbarList(); _taskbarList.HrInit(); } #region Error handling catch (Exception ex) { Log.Warn(ex); } #endregion } }
private TaskbarThumbnailManager() { try { if (AppConfig.OSVersion >= AppConfig.VerWin7) { _taskbarList = Activator.CreateInstance(Type.GetTypeFromCLSID(TaskbarListClass)) as ITaskbarList4; _taskbarList.HrInit(); } } catch { _taskbarList = null; return; } }
static void Main(string[] args) { var opts = new Args(args); var wnds = FindWindow(opts.Title); if (wnds.Length == 0) { Environment.Exit(2); } ITaskbarList4 inst = null; try { inst = (ITaskbarList4) new CTaskbarList(); inst.HrInit(); } catch (Exception e) { Console.WriteLine("Failed to create ITaskbarList4 interface, usually because you are not on Windows 7."); Console.WriteLine(""); Console.WriteLine(e.Message); Environment.Exit(3); } foreach (var wnd in wnds) { if (opts.Value.HasValue) { inst.SetProgressValue(wnd, (ulong)opts.Value.Value, 100); } if (opts.State.HasValue) { inst.SetProgressState(wnd, opts.State.Value); } } }
static WindowsTaskbar() { if (WindowsUtils.IsWindows7) { try { // ReSharper disable once SuspiciousTypeConversion.Global _taskbarList = (ITaskbarList4)new CTaskbarList(); _taskbarList.HrInit(); } #region Error handling catch (Exception ex) { Log.Warn(ex); } #endregion } }
static Taskbar() { taskbarInstance.HrInit(); }