public static void HandleCmdLineArgs() { if (Environment.GetCommandLineArgs().Length > 1) { switch (Environment.GetCommandLineArgs()[1]) { case "-1": WindowsMessageHelper.SendMessage("Jumplist.demo", WindowsMessageHelper.ClearHistoryArg); break; } } }
public static void HandleCmdLineArgs() { if (Environment.GetCommandLineArgs().Length > 1) { switch (Environment.GetCommandLineArgs()[1]) { case JumplistManager.ACTION_EXIT: WindowsMessageHelper.SendMessage("ATG-Notifier", WindowsMessageHelper.TaskCloseArg); break; } } }
public static void AddTaskSelfLink(string title, string commandName, string iconPath, int iconNumber) { if (string.IsNullOrWhiteSpace(commandName)) { throw new ArgumentNullException("commandName"); } var icon = CreateIconReference(iconPath, iconNumber); // Register the command and get the associated number. int command = WindowsMessageHelper.RegisterCommand(commandName); AddTaskLink(title, Assembly.GetEntryAssembly().Location, WindowsMessageHelper.COMMAND_PREFIX + command.ToString(), icon); }
protected override void WndProc(ref Message m) { if (WindowsMessageHelper.WindowMessages.ContainsKey(m.Msg)) { OnJumpListCommandReceived(new CommandEventArgs(WindowsMessageHelper.WindowMessages[m.Msg])); } else if (m.Msg == WindowsMessageHelper.WM_COPYDATA) { string arguments = WindowsMessageHelper.GetArguments(m.LParam); OnStartupInstance(new StartupEventArgs(false, arguments)); } else { base.WndProc(ref m); } }