static void PrepareItem(ExtendedImagePanel eip, Wrapper.SDesc sdesc) { eip.ImagePanelColor = System.Drawing.Color.Black; eip.Fade = 0.5f; eip.FadeColor = System.Drawing.Color.Transparent; eip.Tag = sdesc; try { eip.Properties["GUID"].Value = "0x" + Helper.HexString(sdesc.SimId); eip.Properties["Instance"].Value = "0x" + Helper.HexString(sdesc.FileDescriptor.Instance); eip.Properties["Household"].Value = sdesc.HouseholdName; /*eip.Properties["Life Stage"].Value = ((Data.LocalizedLifeSections)sdesc.CharacterDescription.LifeSection).ToString(); * eip.Properties["Career"].Value = ((Data.LocalizedCareers)sdesc.CharacterDescription.Career).ToString(); * eip.Properties["Zodiac Sign"].Value = ((Data.LocalizedZodiacSignes)sdesc.CharacterDescription.ZodiacSign).ToString();*/ } catch (Exception ex) { eip.Properties["Error"].Value = ex.Message; } CreateItem(eip, sdesc); }
protected ExtendedImagePanel CreateItem(Interfaces.Files.IPackedFileDescriptor pfd, int left, int top) { ExtendedImagePanel eip = new ExtendedImagePanel(); eip.BeginUpdate(); eip.SetBounds(left, top, 216, 80); Wrapper.SDesc sdesc = new SDesc(); try { sdesc.ProcessData(pfd, pkg); PrepareItem(eip, sdesc); } catch (Exception ex) { eip.Properties["Error"].Value = ex.Message; } //eip.GotFocus += new EventHandler(eip_GotFocus); //eip.MouseDown += new System.Windows.Forms.MouseEventHandler(eip_MouseDown); //eip.DoubleClick += new EventHandler(eip_DoubleClick); return(eip); }
public static ExtendedImagePanel CreateItem(Wrapper.SDesc sdesc) { ExtendedImagePanel eip = new ExtendedImagePanel(); eip.SetBounds(0, 0, 216, 80); eip.BeginUpdate(); PrepareItem(eip, sdesc); eip.EndUpdate(); return(eip); }