コード例 #1
0
        //--------------------//

        #region Form
        private void MainForm_HandleCreated(object sender, EventArgs e)
        {
            Program.ConfigureTaskbar(this, Text);
            WindowsTaskbar.AddTaskLinks(Program.AppUserModelID, new[]
            {
                new WindowsTaskbar.ShellLink(buttonSync.Text.Replace("&", ""), Path.Combine(Locations.InstallBase, Commands.WinForms.Program.ExeName + ".exe"), SyncApps.Name),
                new WindowsTaskbar.ShellLink(buttonUpdateAll.Text.Replace("&", ""), Path.Combine(Locations.InstallBase, Commands.WinForms.Program.ExeName + ".exe"), UpdateApps.Name)
            });
        }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: kara10001111/0install-win
        //--------------------//

        #region Form
        private void MainForm_HandleCreated(object sender, EventArgs e)
        {
            if (Locations.IsPortable || ZeroInstallInstance.IsRunningFromCache)
            {
                WindowsTaskbar.PreventPinning(Handle);
            }
            else
            {
                string exePath     = Path.Combine(Locations.InstallBase, "ZeroInstall.exe");
                string commandsExe = Path.Combine(Locations.InstallBase, "0install-win.exe");
                WindowsTaskbar.SetWindowAppID(Handle, "ZeroInstall", exePath.EscapeArgument(), exePath, "Zero Install");
                WindowsTaskbar.AddTaskLinks("ZeroInstall", new[]
                {
                    new WindowsTaskbar.ShellLink(buttonSync.Text.Replace("&", ""), commandsExe, SyncApps.Name),
                    new WindowsTaskbar.ShellLink(buttonUpdateAll.Text.Replace("&", ""), commandsExe, UpdateApps.Name),
                    new WindowsTaskbar.ShellLink(buttonStoreManage.Text.Replace("&", ""), commandsExe, StoreMan.Name + " manage")
                });
            }
        }