internal bool AddFolder(WindowsVer.Windows windowsOs) { string sendToPath = GetSendToFolderPath(windowsOs); WPFFolderBrowserDialog folderBrowserDialog = new WPFFolderBrowserDialog(); if (folderBrowserDialog.ShowDialog() == true) { string folderPath = folderBrowserDialog.FileName; CreateShortcut(sendToPath, folderPath); return(true); } return(false); }
internal bool AddFile(WindowsVer.Windows windowsOs) { string sendToPath = GetSendToFolderPath(windowsOs); OpenFileDialog openFileDialog = new OpenFileDialog(); if (openFileDialog.ShowDialog() == true) { string folderPath = openFileDialog.FileName; CreateShortcut(sendToPath, folderPath); return(true); } return(false); }
internal string GetSendToFolderPath(WindowsVer.Windows windowsOs) { if (!String.IsNullOrEmpty(_cachedSendToPath)) { return(_cachedSendToPath); } if (windowsOs == WindowsVer.Windows.Xp) { _cachedSendToPath = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + @"\SendTo"; } else { _cachedSendToPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + @"\Microsoft\Windows\SendTo"; } return(_cachedSendToPath); }