示例#1
0
 private void OnListKeyDown(object obj)
 {
     if (SelectedItem != null)
     {
         CustomInserts.Remove(SelectedItem);
         CustomInsertView.Refresh();
         SelectedIndex = -1;
         TextLaneOne   = "";
         TextLaneTwo   = "";
     }
 }
示例#2
0
 private void AddToList()
 {
     if (!(CustomInserts.Exists(x => x.TextLaneOne == TextLaneOne) && CustomInserts.Exists(y => y.TextLaneTwo == TextLaneTwo)))
     {
         CustomInserts.Add(new CustomListViewModel()
         {
             TextLaneOne = TextLaneOne, TextLaneTwo = TextLaneTwo
         });
         CustomInsertView.Refresh();
         SelectedIndex = -1;
     }
     TextLaneOne = "";
     TextLaneTwo = "";
 }
示例#3
0
 private void AddFade()
 {
     if (SelectedItem != null)
     {
         SelectedItem.TextLaneOne = TextLaneOne;
         SelectedItem.TextLaneTwo = TextLaneTwo;
         CustomInsertView.Refresh();
         TextLaneOne   = "";
         TextLaneTwo   = "";
         SelectedIndex = -1;
         return;
     }
     AddToList();
 }