Esempio n. 1
0
        private void btnBuildCustomShortcut_Click(object sender, EventArgs e)
        {
            var shortcutName =
                Path.GetFileNameWithoutExtension(CurrentShortcutItem.ShortcutFileInfo.Name).CleanInvalidFilenameChars();

            if (CurrentShortcutItem.IsTileIconifierCustomShortcut)
            {
                return;
            }

            var cloneConfirmation = new FrmCustomShortcutConfirm
            {
                ShortcutName = shortcutName
            };

            if (cloneConfirmation.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }

            shortcutName = cloneConfirmation.ShortcutName;

            var parameters = new GenerateCustomShortcutParams(CurrentShortcutItem.TargetInfo.FilePath, CurrentShortcutItem.TargetInfo.Arguments,
                                                              CustomShortcutGetters.CustomShortcutCurrentUserPath)
            {
                WorkingFolder = CurrentShortcutItem.ShortcutFileInfo.Directory?.FullName,
                IconPath      = CurrentShortcutItem.TargetInfo.IconLocation
            };

            var customShortcut = new OtherCustomShortcutBuilder(parameters).GenerateCustomShortcut(shortcutName);

            StartFullUpdate();

            JumpToShortcutItem(customShortcut.ShortcutItem);

            //confirm to the user the shortcut has been created
            FormUtils.ShowMessage(this,
                                  string.Format(
                                      Strings.ShortcutCreatedNeedsPinning,
                                      shortcutName.QuoteWrap()),
                                  Strings.ShortcutCreated, MessageBoxButtons.OK, MessageBoxIcon.Information);
        }
Esempio n. 2
0
 public OtherCustomShortcutBuilder(GenerateCustomShortcutParams generateParameters) : base(generateParameters)
 {
 }
 public SteamCustomShortcutBuilder(GenerateCustomShortcutParams generateParameters) : base(generateParameters)
 {
 }
Esempio n. 4
0
 public WindowsStoreAppCustomShortcutBuilder(GenerateCustomShortcutParams generateParameters)
     : base(generateParameters)
 {
 }
 public ExplorerCustomShortcutBuilder(GenerateCustomShortcutParams generateParameters) : base(generateParameters)
 {
 }
 public WindowsStoreAppCustomShortcutBuilder(GenerateCustomShortcutParams generateParameters)
     : base(generateParameters)
 {
 }