Ejemplo n.º 1
0
 /// <summary> Display detailed character information for the specified character. </summary>
 /// <param name="c">Character to display, or null to hide panel.</param>
 public void ShowCharacterDetail(Character c)
 {
     if (c == null)
     {
         DetailsPanel.Child = null;
     }
     else
     {
         var vm   = new CharacterDetailsViewmodel(c);
         var view = new CharacterDetails(vm);
         DetailsPanel.Child = view;
     }
 }
Ejemplo n.º 2
0
        /// <summary> Update a character/ship details view. </summary>
        /// <param name="b">Object in which to place the details view.</param>
        /// <param name="c">Character to create view for, or null to hide view.</param>
        private void ShowDetail(Border b, Character c)
        {
            if (b == null)
            {
                return;
            }

            if (c == null)
            {
                b.Child = null;
            }
            else
            {
                var vm   = new CharacterDetailsViewmodel(c);
                var view = new CharacterDetails(vm);
                b.Child = view;
            }
        }