private void Button_Click_1(object sender, RoutedEventArgs e) { if (SelectedCollection != null) { Settings.Settings.Default.DeleteGeocacheCollection(SelectedCollection.CollectionID); AvailableCollections.Remove(SelectedCollection); } }
private void Button_Click_1(object sender, RoutedEventArgs e) { if (SelectedCollection != null && AvailableCollections.Contains(SelectedCollection)) { Core.Settings.Default.DeleteCollection(SelectedCollection); AvailableCollections.Remove(SelectedCollection); } }
public IQueryable <T> Collection <T>(string collectionName = null) { collectionName ??= typeof(T).Name; if (!AvailableCollections.Contains(collectionName)) { throw new NotSupportedException($"The collection {collectionName} is not available in this context"); } return(Connector.ReadOnlyCollection <T>(SessionId, collectionName)); }
private void newDialog_DialogClosed(object sender, EventArgs e) { inputDialog.DialogClosed -= newDialog_DialogClosed; if (inputDialog.DialogResult) { if (!string.IsNullOrEmpty(inputDialog.InputText)) { string s = inputDialog.InputText.Trim(); if (s.Length > 0) { int id = Core.Settings.Default.GetCollectionID(s); if (id < 0) { Core.Settings.Default.AddCollection(s); AvailableCollections.Add(s); SelectedCollection = s; } } } } }
private void newDialog_DialogClosed(object sender, EventArgs e) { inputDialog.DialogClosed -= newDialog_DialogClosed; if (inputDialog.DialogResult) { if (!string.IsNullOrEmpty(inputDialog.InputText)) { string s = inputDialog.InputText.Trim(); if (s.Length > 0) { var c = Settings.Settings.Default.GetCollection(s); if (c == null) { c = Settings.Settings.Default.GetCollection(s, createIfNotExists: true); if (c != null) { AvailableCollections.Add(c); SelectedCollection = c; } } } } } }
public bool CanMoveDown(CommentsCollection _collection) { int index = AvailableCollections.IndexOf(_collection); return((index != -1) && (index != AvailableCollections.Count - 1)); }
public bool CanMoveUp(CommentsCollection _collection) { int index = AvailableCollections.IndexOf(_collection); return(index > 0); }