public void AddAttachement() { Attachement attachement = new Attachement(); attachement.name = "default"; AttachementViewModel vm = new AttachementViewModel(attachement); Attachements.Add(vm); _manager.attachements.Add(attachement); }
private void UpdateView() { Attachements.Clear(); if (Core.ApplicationData.Instance.ActiveGeocache != null) { List <GAPPSF.Attachement.Item> its = GAPPSF.Attachement.Manager.Instance.GetAttachements(Core.ApplicationData.Instance.ActiveGeocache.Code); foreach (var it in its) { Attachements.Add(it); } } }
private void newDialog_DialogClosed(object sender, EventArgs e) { inputDialog.DialogClosed -= newDialog_DialogClosed; if (inputDialog.DialogResult) { string s = inputDialog.InputText.Trim(); if (_editingForComments != null) { _editingForComments.Comment = s; GAPPSF.Attachement.Manager.Instance.AddAttachement(_editingForComments); Attachements.Add(_editingForComments); SelectedItem = _editingForComments; } } _editingForComments = null; }