コード例 #1
0
 private void DisplayPSMComponent(PSMComponent psmComponent)
 {
     if (psmComponent != null)
     {
         if (psmComponent.Interpretation != null)
         {
             if (!string.IsNullOrEmpty(psmComponent.Interpretation.Name))
             {
                 lInterpreted.ToolTip = psmComponent.ToString();
                 lInterpreted.Text    = psmComponent.Interpretation.Name;
             }
             else
             {
                 lInterpreted.ToolTip = psmComponent.ToString();
                 lInterpreted.Text    = psmComponent.ToString();
             }
         }
         else
         {
             lInterpreted.ToolTip = string.Empty;
             lInterpreted.Text    = "(none)";
         }
         lInterpreted.DataContext  = psmComponent.Interpretation;
         spPSMComponent.Visibility = System.Windows.Visibility.Visible;
     }
     else
     {
         spPSMComponent.DataContext = null;
         spPSMComponent.Visibility  = System.Windows.Visibility.Hidden;
     }
 }