コード例 #1
0
        public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            form.picwrapper = wrapper;
            PictureBox pb  = form.pb;
            Image      img = ((SimPe.PackedFiles.Wrapper.Picture)wrapper).Image;

            pb.Image = img;
        }
コード例 #2
0
        public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            Wrapper.ExtFamilyTies famt = (Wrapper.ExtFamilyTies)wrapper;
            form.wrapper = famt;

            form.cbLock.Checked       = false;
            form.pool.SelectedElement = null;
            form.pool.Package         = null;
            form.pool_SelectedSimChanged(null, null, null);
            form.pool.Package = wrapper.Package;
        }
コード例 #3
0
        public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            Wrapper.FamilyTies famt = (Wrapper.FamilyTies)wrapper;
            form.wrapper = famt;
            ResetPanel(famt);

            FamilyTieSim[] sims = famt.Sims;
            form.cbtiesims.Items.Clear();
            //form.cbtiesims.Sorted = false;
            foreach (FamilyTieSim sim in sims)
            {
                form.cbtiesims.Items.Add(sim);
            }
            //form.cbtiesims.Sorted = true;
        }
コード例 #4
0
        public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            Wrapper.Fami fami = (Wrapper.Fami)wrapper;
            form.wrapper = fami;

            form.tbname.Text  = fami.Name;
            form.tbmoney.Text = fami.Money.ToString();

            form.tbfamily.Text  = fami.Friends.ToString();
            form.tblotinst.Text = "0x" + Helper.HexString(fami.LotInstance);
            form.tbalbum.Text   = "0x" + Helper.HexString(fami.AlbumGUID);
            form.tbflag.Text    = "0x" + Helper.HexString(fami.Flags);
            form.tbsubhood.Text = "0x" + Helper.HexString(fami.SubHoodNumber);
            form.tbvac.Text     = "0x" + Helper.HexString(fami.VacationLotInstance);
            form.tbblot.Text    = "0x" + Helper.HexString(fami.CurrentlyOnLotInstance);
            form.tbbmoney.Text  = fami.BusinessMoney.ToString();
            form.lbmembers.Items.Clear();


            form.tbcafood1.Text   = fami.CastAwayFood.ToString();
            form.tbcares.Text     = fami.CastAwayResources.ToString();
            form.tbcaunk.Text     = "0x" + Helper.HexString(fami.CastAwayFoodDecay);
            form.tbcaunk.ReadOnly = !SimPe.Helper.WindowsRegistry.HiddenMode;

            form.tbbmoney.Enabled   = (int)fami.Version >= (int)SimPe.PackedFiles.Wrapper.FamiVersions.Business;
            form.tbblot.Enabled     = (int)fami.Version >= (int)SimPe.PackedFiles.Wrapper.FamiVersions.Business;
            form.tbvac.Enabled      = (int)fami.Version >= (int)SimPe.PackedFiles.Wrapper.FamiVersions.Voyage;
            form.tbsubhood.Enabled  = (int)fami.Version >= (int)SimPe.PackedFiles.Wrapper.FamiVersions.University;
            form.gbCastaway.Visible = (int)fami.Version >= (int)SimPe.PackedFiles.Wrapper.FamiVersions.Castaway;

            form.tbmoney.Enabled  = (int)fami.Version < (int)SimPe.PackedFiles.Wrapper.FamiVersions.Castaway;
            form.tbbmoney.Enabled = (int)fami.Version < (int)SimPe.PackedFiles.Wrapper.FamiVersions.Castaway;

            string[] names = fami.SimNames;
            for (int i = 0; i < fami.Members.Length; i++)
            {
                Data.Alias a = new SimPe.Data.Alias(fami.Members[i], fami.SimNames[i]);
                form.lbmembers.Items.Add(a);
            }

            form.cbsims.Items.Clear();
            form.cbsims.Sorted = false;
            foreach (IAlias a in fami.NameProvider.StoredData.Values)
            {
                form.cbsims.Items.Add(a);
            }
            form.cbsims.Sorted = true;
        }
コード例 #5
0
        /// <summary>
        /// Fixes SubType and Instance hashes of the RCOL
        /// </summary>
        public override void Fix(Interfaces.IWrapperRegistry registry)
        {
            if (list == null)
            {
                list = new ArrayList();
            }

            base.Fix(registry);

            //first we need to fix all referenced Files
            for (int i = 0; i < this.ReferencedFiles.Length; i++)
            {
                Interfaces.Files.IPackedFileDescriptor lpfd = this.ReferencedFiles[i];
                Interfaces.Files.IPackedFileDescriptor pfd  = this.Package.FindFile(lpfd);
                if (pfd != null)
                {
                    //make sure we don't get into an Endless Loop
                    if (list.Contains(pfd))
                    {
                        continue;
                    }

                    list.Add(pfd);
                    SimPe.Interfaces.Plugin.IFileWrapper wrapper = (SimPe.Interfaces.Plugin.IFileWrapper)registry.FindHandler(pfd.Type);
                    if (wrapper != null)
                    {
                        wrapper.ProcessData(pfd, package);
                        wrapper.Fix(registry);
                        lpfd.SubType  = wrapper.FileDescriptor.SubType;
                        lpfd.Group    = wrapper.FileDescriptor.Group;
                        lpfd.Instance = wrapper.FileDescriptor.Instance;
                    }
                    list.Remove(pfd);
                }
            }

            //so now we do fix the Instances
            this.FileDescriptor.SubType  = Hashes.SubTypeHash(Hashes.StripHashFromName(this.FileName));
            this.FileDescriptor.Instance = Hashes.InstanceHash(Hashes.StripHashFromName(this.FileName));

            //commit
            this.SynchronizeUserData();
        }
コード例 #6
0
        public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            Wrapper.SRel srel = (Wrapper.SRel)wrapper;
            form.wrapper = srel;

            form.tbshortterm.Text = srel.Shortterm.ToString();
            form.tblongterm.Text  = srel.Longterm.ToString();

            List <CheckBox> ltcb = new List <CheckBox>(new CheckBox[] {
                form.cbcrush, form.cblove, form.cbengaged, form.cbmarried,
                form.cbfriend, form.cbbuddie, form.cbsteady, form.cbenemy,
                null, null, null, null,
                null, null, form.cbfamily, form.cbbest,
                null, null, null, null, null, null, null, null,
                /*form.cbBFF*/ null, null, null, null, null, null, null, null,
            });
            Boolset bs1 = srel.RelationState.Value;
            Boolset bs2 = srel.RelationState2.Value;

            for (int i = 0; i < ltcb.Count; i++)
            {
                if (ltcb[i] != null)
                {
                    ltcb[i].Checked = ((Boolset)(i < 16 ? bs1 : bs2))[i & 0x0f];
                }
            }

            form.cbfamtype.SelectedIndex = 0;
            for (int i = 1; i < form.cbfamtype.Items.Count; i++)
            {
                if (form.cbfamtype.Items[i] == new Data.LocalizedRelationshipTypes(srel.FamilyRelation))
                {
                    form.cbfamtype.SelectedIndex = i;
                    break;
                }
            }
        }
コード例 #7
0
 public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
 {
     Wrapper.Xml xml = (Wrapper.Xml)wrapper;
     form.wrapper  = xml;
     form.rtb.Text = xml.Text;
 }
コード例 #8
0
        public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            Wrapper.Objd objd = (Wrapper.Objd)wrapper;
            form.wrapper = objd;

            form.tbsimid.Text    = "0x" + Helper.HexString(objd.SimId);
            form.tbsimname.Text  = objd.FileName;
            form.tblottype.Text  = "0x" + Helper.HexString(objd.Type);
            form.lbtypename.Text = ((Data.ObjectTypes)objd.Type).ToString().Trim();
            form.tborgguid.Text  = "0x" + Helper.HexString(objd.OriginalGuid);
            form.tbproxguid.Text = "0x" + Helper.HexString(objd.ProxyGuid);

            Hashtable list = objd.Attributes;

            form.pnelements.Controls.Clear();

            int       top  = 4;
            ArrayList keys = new ArrayList();

            foreach (string k in list.Keys)
            {
                keys.Add("0x" + Helper.HexString((ushort)objd.GetAttributePosition(k)) + ": " + k);
            }
            keys.Sort();

            foreach (string k in keys)
            {
                string[] s  = k.Split(":".ToCharArray(), 2);
                Label    lb = new Label();
                lb.Parent   = form.pnelements;
                lb.AutoSize = true;
                lb.Text     = k + " = ";
                lb.Top      = top;
                lb.Visible  = true;

                TextBox tb = new TextBox();
                tb.BorderStyle  = BorderStyle.None;
                tb.Parent       = form.pnelements;
                tb.Left         = lb.Left + lb.Width;
                tb.Top          = lb.Bottom - tb.Height;
                tb.Width        = 50;
                tb.Text         = "0x" + Helper.HexString(objd.GetAttributeShort(s[1].Trim()));
                tb.Tag          = s[1].Trim();
                tb.Visible      = true;
                tb.TextChanged += new EventHandler(HexTextChanged);

                TextBox tb2 = new TextBox();
                tb2.BorderStyle  = BorderStyle.None;
                tb2.Parent       = form.pnelements;
                tb2.Left         = tb.Left + tb.Width + 4;
                tb2.Top          = lb.Bottom - tb.Height;
                tb2.Width        = 100;
                tb2.Text         = ((short)objd.GetAttributeShort(s[1].Trim())).ToString();
                tb2.Tag          = null;
                tb2.Visible      = true;
                tb2.TextChanged += new EventHandler(DecTextChanged);


                top += Math.Max(lb.Height, tb.Height) + 2;
            }
        }
コード例 #9
0
        public new void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            SimPe.PackedFiles.Wrapper.Generic generic = (SimPe.PackedFiles.Wrapper.Generic)wrapper;
            form.mytree.Visible = true;
            IPackedFileDescriptor pfd = wrapper.FileDescriptor;

            form.mytree.Nodes.Clear();
            form.treeBanner.Text = "[Can't process unknown type 0x" + pfd.Type.ToString("X") + "]";

            SimPe.PackedFiles.Wrapper.Generic.CreateFileObject cfo = (SimPe.PackedFiles.Wrapper.Generic.CreateFileObject)generic.Subhandlers[pfd.Type];
            SimPe.PackedFiles.Wrapper.Generic file = null;

            //no Type Handler, so try to load a Signature Based Handler
            if (cfo == null)
            {
                file = generic.CreateSignatureBasedFileObject(wrapper);
            }

            //neither signature Based Handler nor Type SubHandler -> return
            if ((cfo == null) && (file == null))
            {
                return;
            }

            //found a type based SubHander, so load it. Otherwise an existing Signature
            //Based filehandler will be used
            if (cfo != null)
            {
                file = cfo(wrapper);
            }

            form.treeBanner.Text = file.GetTypeName(pfd.Type) + " Viewer";

            //clear the Item Panel
            form.treeItemPanel.Controls.Clear();

            //create Columns in Item Panel
            SimPe.PackedFiles.Wrapper.GenericCommon common = file.Attributes;
            if (file.Count > 0)
            {
                common = file.GetItem(0);
            }
            string[] names = common.Names;
            //int size = 0;

            if (names.Length == 0)
            {
                return;
            }
            for (int i = 0; i < names.Length; i++)
            {
                string s = names[i];

                Label lb = new Label();
                lb.Parent    = form.treeItemPanel;
                lb.Location  = new Point(0, i * 21 + 4);
                lb.Text      = names[i];
                lb.AutoSize  = true;
                lb.BackColor = Color.Transparent;

                TextBox tb = new TextBox();
                tb.Parent   = form.treeItemPanel;
                tb.Location = new Point(lb.Width + 8, i * 21);
                tb.Text     = "";
                tb.Width    = form.treeItemPanel.ClientRectangle.Width - tb.Left;
                tb.Tag      = i;
            }


            if (file.Count > 0)           //we have FileItems
            {
                AddTreeNodes(file.Items, null, names);
            }


            if (form.listList.Items.Count == 1)
            {
                form.listBanner.Text += " (" + form.listList.Items.Count.ToString() + " Item)";
            }
        }
コード例 #10
0
        public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            SimPe.PackedFiles.Wrapper.Generic generic = (SimPe.PackedFiles.Wrapper.Generic)wrapper;


            if (wrapper.GetType().GetInterface("SimPe.Interfaces.Plugin.IFileWrapperSaveExtension", true) != null)
            {
                form.wrapper            = (SimPe.Interfaces.Plugin.IFileWrapperSaveExtension)wrapper;
                form.lllvcommit.Enabled = true;
            }
            else
            {
                form.wrapper            = null;
                form.lllvcommit.Enabled = false;
            }

            //visualStyleLinkLabel1
            IPackedFileDescriptor pfd = wrapper.FileDescriptor;

            form.listList.Items.Clear();
            form.listList.Columns.Clear();
            form.listBanner.Text = "[Can't process unknown type 0x" + pfd.Type.ToString("X") + "]";

            try
            {
                SimPe.PackedFiles.Wrapper.Generic.CreateFileObject cfo = (SimPe.PackedFiles.Wrapper.Generic.CreateFileObject)generic.Subhandlers[pfd.Type];
                SimPe.PackedFiles.Wrapper.Generic file = generic;

                form.listBanner.Text = file.GetTypeName(pfd.Type) + " " + Localization.Manager.GetString("viewer");

                //clear the Item Panel
                form.itemPanel.Controls.Clear();

                //create Columns
                SimPe.PackedFiles.Wrapper.GenericCommon common = file.Attributes;
                if (file.Count > 0)
                {
                    common = file.GetItem(0);
                }
                string[] names = common.Names;
                int      size  = 0;

                if (names.Length == 0)
                {
                    return;
                }

                int[] lengths = new int[names.Length];
                for (int i = 0; i < names.Length; i++)
                {
                    string s        = names[i];
                    int    thissize = Math.Max(190, s.Length * 15);
                    size += thissize;

                    if (i == names.Length - 1)
                    {
                        thissize = Math.Max(thissize, form.listList.Width - size);
                    }


                    form.listList.Columns.Add(s, thissize, System.Windows.Forms.HorizontalAlignment.Left);

                    Label lb = new Label();
                    lb.Parent    = form.itemPanel;
                    lb.Location  = new Point(0, i * 21 + 4);
                    lb.Text      = names[i];
                    lb.AutoSize  = true;
                    lb.BackColor = Color.Transparent;

                    TextBox tb = new TextBox();
                    tb.Parent   = form.itemPanel;
                    tb.Location = new Point(lb.Width + 8, i * 21);
                    tb.Text     = "";
                    tb.Width    = form.itemPanel.ClientRectangle.Width - tb.Left;
                    tb.Tag      = i;
                    lengths[i]  = 0;
                }


                if (file.Count > 0)               //we have FileItems
                {
                    for (uint i = 0; i < file.Count; i++)
                    {
                        SimPe.PackedFiles.Wrapper.GenericItem fileitem = file.GetItem(i);

                        if (fileitem != null)
                        {
                            string       name = ToString(names[0], fileitem, fileitem.Properties[names[0]]);
                            ListViewItem item = new ListViewItem(name);
                            lengths[0] = (int)Math.Max(lengths[0], name.Length);
                            for (int k = 1; k < names.Length; k++)
                            {
                                name = ToString(names[k], fileitem, fileitem.Properties[names[k]]);
                                item.SubItems.Add(name);
                                lengths[k] = (int)Math.Max(lengths[k], name.Length);
                            }

                            item.Tag = fileitem;
                            form.listList.Items.Add(item);
                        }
                    }
                }


                for (int i = 0; i < form.listList.Columns.Count; i++)
                {
                    ColumnHeader h = form.listList.Columns[i];
                    h.Width = (int)Math.Min(200, lengths[i] * 10);
                }


                if (form.listList.Items.Count == 1)
                {
                    form.listBanner.Text += " (" + form.listList.Items.Count.ToString() + " Item)";
                }
                else
                {
                    form.listBanner.Text += " (" + form.listList.Items.Count.ToString() + " Items)";
                }
            }
            catch (Exception ex)
            {
                if (Helper.DebugMode)
                {
                    form.listBanner.Text += " [" + ex.Message + "]";
                }
            }

            //form.listList.Sort();
            form.listList.ListViewItemSorter = null;
        }
コード例 #11
0
        public void UpdateGUI(SimPe.Interfaces.Plugin.IFileWrapper wrapper)
        {
            Wrapper.SDesc sdesc = (Wrapper.SDesc)wrapper;
            form.wrapper = sdesc;
            ResetUI(sdesc);

            form.tbmajor.Visible  = true;
            form.tbmajor.ReadOnly = !Helper.WindowsRegistry.HiddenMode;

            //Relations
            form.lbrelations.Items.Clear();

            foreach (ushort u in sdesc.Relations.SimInstances)
            {
                Wrapper.SDesc simdesc = sdesc.Relations.GetSimDescription(u);
                if (simdesc != null)
                {
                    SimRelations rel = sdesc.Relations.GetSimRelationships(u);

                    if (rel != null)
                    {
                        rel.NameTag = "(0x" + Helper.HexString(u) + ")";
                        rel.NameTag = simdesc.SimName + " " + simdesc.SimFamilyName + " " + rel.NameTag;
                        form.lbrelations.Items.Add(rel);
                    }
                }
            }

            //Filename
            if (sdesc.CharacterFileName != null)
            {
                form.lbfilename.Text = sdesc.CharacterFileName + "   (" + Localization.Manager.GetString("rightclickcopy") + ")";
                form.lbfilename.Tag  = sdesc.CharacterFileName;
            }
            else
            {
                form.lbfilename.Text = Localization.Manager.GetString("filenotfound");
                form.lbfilename.Tag  = null;
            }

            form.tbage.Text            = sdesc.CharacterDescription.Age.ToString();
            form.tbsimdescname.Text    = sdesc.SimName;
            form.tbsimdescfamname.Text = sdesc.SimFamilyName;
            form.tbsim.Text            = "0x" + Helper.HexString(sdesc.SimId);
            form.tbsim.ReadOnly        = !Helper.WindowsRegistry.HiddenMode;
            form.tbprevdays.Text       = sdesc.CharacterDescription.PrevAgeDays.ToString();
            form.tbagedur.Text         = sdesc.CharacterDescription.AgeDuration.ToString();
            form.tbunlinked.Text       = "0x" + Helper.HexString(sdesc.Unlinked);
            form.pbImage.Image         = sdesc.Image;

            //Aspiration
            form.cbaspiration.SelectedIndex = 0;
            for (int i = 0; i < form.cbaspiration.Items.Count; i++)
            {
                Data.MetaData.AspirationTypes at = (LocalizedAspirationTypes)form.cbaspiration.Items[i];
                if (at == sdesc.CharacterDescription.Aspiration)
                {
                    form.cbaspiration.SelectedIndex = i;
                    break;
                }
            }

            //Lifesection
            form.cblifesection.SelectedIndex = 0;
            for (int i = 0; i < form.cblifesection.Items.Count; i++)
            {
                Data.MetaData.LifeSections at = (LocalizedLifeSections)form.cblifesection.Items[i];
                if (at == sdesc.CharacterDescription.LifeSection)
                {
                    form.cblifesection.SelectedIndex = i;
                    break;
                }
            }

            //Career
            form.tbcareervalue.Text     = "0x" + Helper.HexString((uint)sdesc.CharacterDescription.Career);
            form.cbcareer.SelectedIndex = 0;
            for (int i = 0; i < form.cbcareer.Items.Count; i++)
            {
                object o = form.cbcareer.Items[i];
                Data.MetaData.Careers at;
                if (o.GetType() == typeof(Alias))
                {
                    at = (Data.LocalizedCareers)((uint)((Alias)o).Id);
                }
                else
                {
                    at = (Data.LocalizedCareers)o;
                }

                if (at == sdesc.CharacterDescription.Career)
                {
                    form.cbcareer.SelectedIndex = i;
                    break;
                }
            }
            form.pbcarrerlevel.Value = Math.Min((ushort)form.pbcarrerlevel.Maximum, sdesc.CharacterDescription.CareerLevel);


            //grades and school
            form.cbgrade.SelectedIndex = 0;
            for (int i = 0; i < form.cbgrade.Items.Count; i++)
            {
                Data.MetaData.Grades grade;
                object o = form.cbgrade.Items[i];
                if (o.GetType() == typeof(Alias))
                {
                    grade = (Data.LocalizedGrades)((uint)((Alias)o).Id);
                }
                else
                {
                    grade = (Data.LocalizedGrades)o;
                }
                if (sdesc.CharacterDescription.Grade == (Data.MetaData.Grades)grade)
                {
                    form.cbgrade.SelectedIndex = i;
                    break;
                }
            }

            //University
            if ((int)sdesc.Version >= (int)SimPe.PackedFiles.Wrapper.SDescVersions.University)
            {
                if (!form.tcsdesc.TabPages.Contains(form.tbuni))
                {
                    form.tcsdesc.TabPages.Add(form.tbuni);
                }
                form.cbmajor.SelectedIndex = 0;
                form.tbmajor.Text          = "0x" + Helper.HexString((uint)sdesc.University.Major);
                form.tbmajor.Visible       = Helper.WindowsRegistry.HiddenMode;
                form.cbmajor.SelectedIndex = form.cbmajor.Items.Count - 1;
                for (int i = 0; i < form.cbmajor.Items.Count; i++)
                {
                    object      o = form.cbmajor.Items[i];
                    Data.Majors at;
                    if (o.GetType() == typeof(Alias))
                    {
                        at = (Data.Majors)((uint)((Alias)o).Id);
                    }
                    else
                    {
                        at = (Data.Majors)o;
                    }

                    if (at == sdesc.University.Major)
                    {
                        form.cbmajor.SelectedIndex = i;
                        break;
                    }
                }

                form.cboncampus.Checked = (sdesc.University.OnCampus == 0x1);
                form.pbeffort.Value     = Math.Max(form.pbeffort.Minimum, Math.Min(form.pbeffort.Maximum, sdesc.University.Effort));
                form.pblastgrade.Value  = Math.Max(form.pblastgrade.Minimum, Math.Min(form.pblastgrade.Maximum, form.pblastgrade.Maximum - (sdesc.University.Grade / (1000 / (form.pblastgrade.Maximum - form.pblastgrade.Minimum)))));

                form.pbunitime.Value  = Math.Max(form.pbunitime.Minimum, Math.Min(form.pbunitime.Maximum, sdesc.University.Time));
                form.tbinfluence.Text = sdesc.University.Influence.ToString();
                form.tbsemester.Text  = sdesc.University.Semester.ToString();
            }
            else
            {
                if (form.tcsdesc.TabPages.Contains(form.tbuni))
                {
                    form.tcsdesc.TabPages.Remove(form.tbuni);
                }
            }


            form.cbschooltype.SelectedIndex = 0;
            form.tbschooltype.Visible       = Helper.WindowsRegistry.HiddenMode;
            for (int i = 0; i < form.cbschooltype.Items.Count; i++)
            {
                Data.LocalizedSchoolType type;
                object o = form.cbschooltype.Items[i];
                if (o.GetType() == typeof(Alias))
                {
                    type = (Data.LocalizedSchoolType)((uint)((Alias)o).Id);
                }
                else
                {
                    type = (Data.LocalizedSchoolType)o;
                }

                if (sdesc.CharacterDescription.SchoolType == (Data.MetaData.SchoolTypes)type)
                {
                    form.cbschooltype.SelectedIndex = i;
                    break;
                }
            }

            //ghostflags
            form.cbisghost.Checked         = sdesc.CharacterDescription.GhostFlag.IsGhost;
            form.cbpassobject.Checked      = sdesc.CharacterDescription.GhostFlag.CanPassThroughObjects;
            form.cbpasswalls.Checked       = sdesc.CharacterDescription.GhostFlag.CanPassThroughWalls;
            form.cbpasspeople.Checked      = sdesc.CharacterDescription.GhostFlag.CanPassThroughPeople;
            form.cbignoretraversal.Checked = sdesc.CharacterDescription.GhostFlag.IgnoreTraversalCosts;

            //body flags
            form.cbfit.Checked      = sdesc.CharacterDescription.BodyFlag.Fit;
            form.cbfat.Checked      = sdesc.CharacterDescription.BodyFlag.Fat;
            form.cbpregfull.Checked = sdesc.CharacterDescription.BodyFlag.PregnantFull;
            form.cbpreghalf.Checked = sdesc.CharacterDescription.BodyFlag.PregnantHalf;
            form.cbpreginv.Checked  = sdesc.CharacterDescription.BodyFlag.PregnantHidden;

            //Random Data
            form.cbzodiac.SelectedIndex     = ((ushort)sdesc.CharacterDescription.ZodiacSign - 1);
            form.rbfemale.Checked           = (sdesc.CharacterDescription.Gender == Data.MetaData.Gender.Female);
            form.rbmale.Checked             = (sdesc.CharacterDescription.Gender == Data.MetaData.Gender.Male);
            form.pblifelinepoints.Value     = sdesc.CharacterDescription.LifelinePoints + 600;
            form.pbblizlifelinepoints.Value = sdesc.CharacterDescription.BlizLifelinePoints;
            form.tblifelinescore.Text       = sdesc.CharacterDescription.LifelineScore.ToString();
            form.tbschooltype.Text          = "0x" + Helper.HexString((uint)sdesc.CharacterDescription.SchoolType);
            form.pbjobperformance.Value     = sdesc.CharacterDescription.CareerPerformance + 1000;
            form.tbfaminst.Text             = "0x" + Helper.HexString(sdesc.FamilyInstance);
            form.tbvoice.Text    = "0x" + Helper.HexString(sdesc.CharacterDescription.VoiceType);
            form.tbautonomy.Text = "0x" + Helper.HexString(sdesc.CharacterDescription.AutonomyLevel);
            form.tbnpc.Text      = "0x" + Helper.HexString(sdesc.CharacterDescription.NPCType);

            //Decay
            form.pbhunger.Value  = sdesc.Decay.Hunger + 1000;
            form.pbcomfort.Value = sdesc.Decay.Comfort + 1000;
            form.pbbladder.Value = sdesc.Decay.Bladder + 1000;
            form.pbenergy.Value  = sdesc.Decay.Energy + 1000;
            form.pbhygiene.Value = sdesc.Decay.Hygiene + 1000;
            form.pbsocial.Value  = sdesc.Decay.Social + 1000;
            form.pbfun.Value     = sdesc.Decay.Fun + 1000;

            //Character
            form.pbneat.Value     = sdesc.Character.Neat / 100;
            form.pboutgoing.Value = sdesc.Character.Outgoing / 100;
            form.pbactive.Value   = sdesc.Character.Active / 100;
            form.pbplayful.Value  = sdesc.Character.Playful / 100;
            form.pbnice.Value     = sdesc.Character.Nice / 100;

            //Genetic Character
            form.pbgenneat.Value     = sdesc.GeneticCharacter.Neat / 100;
            form.pbgenoutgoing.Value = sdesc.GeneticCharacter.Outgoing / 100;
            form.pbgenactive.Value   = sdesc.GeneticCharacter.Active / 100;
            form.pbgenplayful.Value  = sdesc.GeneticCharacter.Playful / 100;
            form.pbgennice.Value     = sdesc.GeneticCharacter.Nice / 100;

            //Skills
            form.pbbody.Value       = sdesc.Skills.Body;
            form.pbcharisma.Value   = sdesc.Skills.Charisma;
            form.pbcleaning.Value   = sdesc.Skills.Cleaning;
            form.pbcooking.Value    = sdesc.Skills.Cooking;
            form.pbcreativity.Value = sdesc.Skills.Creativity;
            form.pblogic.Value      = sdesc.Skills.Logic;
            form.pbmechanical.Value = sdesc.Skills.Mechanical;
            form.pbfatness.Value    = sdesc.Skills.Fatness;
            form.pbromance.Value    = sdesc.Skills.Romance;

            //Interests
            form.pbman.Value           = sdesc.Interests.FemalePreference + 1000;
            form.pbwoman.Value         = sdesc.Interests.MalePreference + 1000;
            form.pbanimals.Value       = sdesc.Interests.Animals / 100;
            form.pbcrime.Value         = sdesc.Interests.Crime / 100;
            form.pbculture.Value       = sdesc.Interests.Culture / 100;
            form.pbentertainment.Value = sdesc.Interests.Entertainment / 100;
            form.pbenvironment.Value   = sdesc.Interests.Environment / 100;
            form.pbfashion.Value       = sdesc.Interests.Fashion / 100;
            form.pbfood.Value          = sdesc.Interests.Food / 100;
            form.pbhealth.Value        = sdesc.Interests.Health / 100;
            form.pbmonei.Value         = sdesc.Interests.Money / 100;
            form.pbparanormal.Value    = sdesc.Interests.Paranormal / 100;
            form.pbpolitics.Value      = sdesc.Interests.Politics / 100;
            form.pbschool.Value        = sdesc.Interests.School / 100;
            form.pbscifi.Value         = sdesc.Interests.Scifi / 100;
            form.pbsports.Value        = sdesc.Interests.Sports / 100;
            form.pbtoys.Value          = sdesc.Interests.Toys / 100;
            form.pbtravel.Value        = sdesc.Interests.Travel / 100;
            form.pbweather.Value       = sdesc.Interests.Weather / 100;
            form.pbwork.Value          = sdesc.Interests.Work / 100;
            form.UpdateAllProgressTextValues();

            form.simnamechanged = false;

            //this has to be set after the PB-Update
            form.tbcarrerlevel.Text = sdesc.CharacterDescription.CareerLevel.ToString();
        }