コード例 #1
0
        public void AddAttachement()
        {
            Attachement attachement = new Attachement();

            attachement.name = "default";
            AttachementViewModel vm = new AttachementViewModel(attachement);

            Attachements.Add(vm);
            _manager.attachements.Add(attachement);
        }
コード例 #2
0
ファイル: Control.xaml.cs プロジェクト: pheijmans-zz/GAPP
 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);
         }
     }
 }
コード例 #3
0
ファイル: Control.xaml.cs プロジェクト: pheijmans-zz/GAPP
 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;
 }