private void lbxFolders_Drop(object sender, DragEventArgs e) { string[] files = (string[])e.Data.GetData(DataFormats.FileDrop); if (files != null && files.Count() > 0) { if (expFolderLinks.IsExpanded && viewModel.Settings.QuickFolderAccessLinks == null) { viewModel.Settings.QuickFolderAccessLinks = new List <FolderLink>(); } foreach (string s in files) { if (Directory.Exists(s)) { var newFolderLink = new FolderLink { Path = s }; AddFolderLink(newFolderLink); } RefreshView(); } } }
public void Add(FolderLink s) { if (storage.FolderLinks.Count() > 0) s.ID = storage.FolderLinks.Select(x => x.ID).Max() + 1; else s.ID = 1; if (storage.FolderLinks.Where(x => x.ExplorerLink.ToLower() == s.ExplorerLink.ToLower()).Count() > 0) return; storage.FolderLinks.Add(s); storage.SaveChanges(); }
private IFolder GetDataFolder(IFolder deploymentFolder) { var dataFolder = Path.IsPathRooted(DataFolder) ? DataFolder : Path.GetFullPath(Path.Combine(deploymentFolder.Link.ToString(), DataFolder)); return(new LocalFolder(FolderLink.From(dataFolder))); }
private async void NewFolderLink() { var dialog = new CoreModules.Dialogs.NewFolderLink(); var item = new FolderLink(); var result = await _app.ShowDialog("New Folder Link", dialog, DialogButtons.OkCancel, true, item); if (result) { _db.FavoriteFolders.Save(item); ApplyFiltering(); } }
private void btnAdd_Click(object sender, RoutedEventArgs e) { var folderBrowserDialog = new FolderBrowserDialog(); if (folderBrowserDialog.ShowDialog() == DialogResult.OK) { var newFolderLink = new FolderLink { Path = folderBrowserDialog.SelectedPath }; AddFolderLink(newFolderLink); } RefreshView(); }
private static void Main() { try { var credentials = Keystore.Get().Result; var listener1 = new FolderLink(@"D:\FileEncryptionTests\Encrypted", @"D:\FileEncryptionTests\Decrypted", credentials); var listener2 = new FolderLink(@"D:\FileEncryptionTests\Encrypted2", @"D:\FileEncryptionTests\Decrypted", credentials); listener1.Launch(); listener2.Launch(); } catch (Exception exception) { Console.WriteLine(exception); } Console.ReadLine(); }
private void btnAdd_Click(object sender, RoutedEventArgs e) { var folderBrowserDialog = new System.Windows.Forms.FolderBrowserDialog(); if (folderBrowserDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK) { var newFolder = new FolderLink() { Path = folderBrowserDialog.SelectedPath }; if (UserSettingStorage.Instance.FolderLinks == null) { UserSettingStorage.Instance.FolderLinks = new List <FolderLink>(); } UserSettingStorage.Instance.FolderLinks.Add(newFolder); UserSettingStorage.Instance.Save(); } lbxFolders.Items.Refresh(); }
private void AddFolderLink(FolderLink newFolderLink) { if (expFolderLinks.IsExpanded && !viewModel.Settings.QuickFolderAccessLinks.Any(x => x.Path == newFolderLink.Path)) { if (viewModel.Settings.QuickFolderAccessLinks == null) { viewModel.Settings.QuickFolderAccessLinks = new List <FolderLink>(); } viewModel.Settings.QuickFolderAccessLinks.Add(newFolderLink); } if (expExcludedPaths.IsExpanded && !viewModel.Settings.IndexSearchExcludedSubdirectoryPaths.Any(x => x.Path == newFolderLink.Path)) { if (viewModel.Settings.IndexSearchExcludedSubdirectoryPaths == null) { viewModel.Settings.IndexSearchExcludedSubdirectoryPaths = new List <FolderLink>(); } viewModel.Settings.IndexSearchExcludedSubdirectoryPaths.Add(newFolderLink); } }
public void MoveUp(FolderLink s) { throw new NotImplementedException(); }
public void Update(FolderLink s) { var item = storage.FolderLinks.Where(x => x.ID == s.ID).First(); item = s; storage.SaveChanges(); }
internal void RemoveFolderLinkFromExcludedIndexPaths(FolderLink selectedRow) => Settings.IndexSearchExcludedSubdirectoryPaths.Remove(selectedRow);
internal void RemoveFolderLinkFromQuickFolders(FolderLink selectedRow) => Settings.QuickFolderAccessLinks.Remove(selectedRow);
private void Deploy(FolderLink location) { Deploy(new LocalFolder(location)); }
private static IFolder GetHostFolder() { return(new LocalFolder(FolderLink.From(AppDomain.CurrentDomain.BaseDirectory))); }
public WebUIContext(Many <HttpLink> bindings, ILifetimeScope scope, bool enableCors, FolderLink contentFolder) : base(bindings, scope, enableCors) { ContentFolder = contentFolder; }