Example #1
0
        private void EditItem(ItemType item = null)
        {
            if (pushedPage != null)
            {
                return;
            }
            var sheet = CharacterSheetStorage.Instance.selectedCharacter;

            if (sheet == null)
            {
                return;
            }
            var eit = new EditItemType();

            eit.InitEditor(item);
            pushedPage = eit;
            Navigation.PushAsync(pushedPage);
        }
Example #2
0
        private void ViewItem(ItemType item = null)
        {
            if (pushedPage != null)
            {
                return;
            }
            var sheet = CharacterSheetStorage.Instance.selectedCharacter;

            if (sheet == null)
            {
                return;
            }
            var vit = new ViewItemType();

            vit.InitView(item);
            pushedPage = vit;
            Navigation.PushAsync(pushedPage);
        }
Example #3
0
 public void InitEditor(ItemType item = null)
 {
     pushedPage = null;
     source     = item;
     if (item == null)
     {
         this.item = new ItemType();
     }
     else
     {
         this.item = item.Clone as ItemType;
     }
     ItemName.Text         = this.item.name;
     Description.Text      = this.item.description;
     HasUseLimit.IsChecked = this.item.hasUseLimit;
     Delete.IsEnabled      = source != null;
     UpdateView();
 }
 public void InitView(ItemType item)
 {
     this.item = item;
     UpdateView();
 }