Example #1
0
        void SetContent()
        {
            if (inter)
            {
                return;
            }
            inter = true;
            if (des != null && slot != null)
            {
                item            = slot.FindItem(des.Guid);
                pb.NumberOffset = des.Minimum;
                pb.Maximum      = des.Maximum;

                if (item != null)
                {
                    pb.Value = item.GetValue(des.DataNumber);
                    if (des.HasComplededFlag)
                    {
                        cb.Checked = item.GetValue(des.CompletedDataNumber) != 0;
                    }
                }
                else
                {
                    lb.Text = des.ToString();
                }



                this.Enabled = true;
            }
            else
            {
                this.Enabled = false;
            }


            SetVisible();
            inter = false;
        }
Example #2
0
        protected NgbhItem GetSecondaryAspirationToken(SDesc sim, bool create)
        {
            if (ngbh == null)
            {
                return(null);
            }
            NgbhSlot slot = ngbh.Sims.GetInstanceSlot(sim.Instance, true);

            if (slot != null)
            {
                NgbhItem item = slot.FindItem(SEC_ASP_TOKEN_GUID);
                if (create && item == null)
                {
                    item = slot.ItemsB.AddNew(SimMemoryType.Token);

                    item.Guid  = SEC_ASP_TOKEN_GUID;
                    item.Value = 0;
                }
                return(item);
            }

            return(null);
        }