示例#1
0
 public static void UpdateThumb(FamilyTreeThumb ths)
 {
     ImageDrawable drawable = ths.ThumbWin.Drawable as ImageDrawable;
     if (drawable != null)
     {
         drawable.Image = UIManager.GetThumbnailImage(MiniSims.GetThumbnailKey(ths.SimDescription, ThumbnailSize.Large, 0x0));
         ths.ThumbWin.Invalidate();
     }
 }
示例#2
0
        public static void UpdateThumb(FamilyTreeThumb ths)
        {
            ImageDrawable drawable = ths.ThumbWin.Drawable as ImageDrawable;

            if (drawable != null)
            {
                drawable.Image = UIManager.GetThumbnailImage(MiniSims.GetThumbnailKey(ths.SimDescription, ThumbnailSize.Large, 0x0));
                ths.ThumbWin.Invalidate();
            }
        }
示例#3
0
        // Retain
        private new FamilyTreeThumb CreateFamilyTreeThumb(IMiniSimDescription desc, Vector2 pos)
        {
            FamilyTreeThumb windowByExportID = UIManager.LoadLayout(ResourceKey.CreateUILayoutKey("HUDSimologyFamilyTreeThumbItem", 0x0)).GetWindowByExportID(0x1) as FamilyTreeThumb;

            //windowByExportID.SimDescription = desc;
            windowByExportID.mSimDesc = desc;

            UpdateThumb(windowByExportID);

            windowByExportID.Position = pos;
            mThumbParentWin.AddChild(windowByExportID);

            // Custom
            windowByExportID.MouseUp    += OnFamilyTreeThumbClick;
            windowByExportID.TooltipText = desc.FullName;
            return(windowByExportID);
        }
示例#4
0
 // Retain
 private void OnFamilyTreeThumbClick(WindowBase sender, UIMouseEventArgs eventArgs)
 {
     try
     {
         FamilyTreeThumb thumb = sender as FamilyTreeThumb;
         if (thumb != null)
         {
             if (eventArgs.MouseKey == MouseKeys.kMouseLeft)
             {
                 RefreshTree(thumb.SimDescription);
             }
             else
             {
                 ShowMenuTask.Perform(thumb.SimDescription);
             }
         }
     }
     catch (Exception e)
     {
         Common.Exception("OnFamilyTreeThumbClick", e);
     }
 }