private void BindItemsGrid()
        {
            if (!String.IsNullOrEmpty(JurisdictionGroupList.SelectedValue))
            {
                ShippingMethodDto.ShippingMethodCaseRow[] rows = (ShippingMethodDto.ShippingMethodCaseRow[])_ShippingMethodDto.ShippingMethodCase.Select(String.Format("JurisdictionGroupId={0}", JurisdictionGroupList.SelectedValue));
                if (rows != null)
                {
                    ItemsGrid.DataSource = rows;
                    ItemsGrid.DataBind();
                    if (ItemsGrid.Items.Count != 0)
                    {
                        //string that hold the javascript confirm message
                        string confirm = "return confirm('Are you sure you want to delete?')";
                        foreach (DataGridItem item in ItemsGrid.Items)
                        {
                            LinkButton deleteBtn = (LinkButton)item.Cells[6].Controls[0];
                            deleteBtn.Attributes.Add("onclick", confirm);
                        }
                    }
                }
            }

            if (IsPostBack)
            {
                UpdatePanel1.Update();
            }
            //JurisdictionGroupWeightPanel.Update();
        }
Exemple #2
0
    protected async Task ApplyFilters()
    {
        IReadOnlyList <T> items         = Items();
        IEnumerable <T>   filteredItems = items;

        foreach (EntityGridFilterBase <T> filter in Filters)
        {
            filter.OnBeforeFilter(items);
        }

        foreach (EntityGridFilterBase <T> filter in Filters)
        {
            filteredItems = filteredItems.Where(filter.Filter);
        }

        FilteredItems.Clear();
        FilteredItems.AddRange(filteredItems);

        if (ItemsGridComponent != null)
        {
            await ItemsGridComponent.UpdateGrid();
        }
        else
        {
            await ItemsGrid.UpdateGrid();
        }
    }
        protected void Page_Load(object sender, EventArgs e)
        {
            SPListItem config = SPContext.Current.Web.Lists[Constants.ConfigListName].Items[0];

            AuctionTitle.Text = config["Title"].ToString();

            var list = SPContext.Current.Web.Lists[Constants.ItemsListName];

            var jscriptFormatString = "javascript:auctionOpenModalURL(L_Menu_BaseUrl + '/Lists/" + Constants.ItemsListName + "/EditForm.aspx?ID={0}', 'Update Item', 645, 800, 'refreshCallback', false)";

            var items = (from SPListItem listItem in list.Items
                         orderby listItem.Title
                         select new AuctionItem
            {
                Id = listItem.ID,
                Page = Page.Request.Path,
                Title = FormatTitle(listItem),
                Bids = FormatNumberOfBids(listItem),
                Bid = FormatBid(listItem),
                Value = listItem["Value"] == null ? "" : string.Format("<div class=\"auction-item-grid-value\">{0:c}</div>", listItem["Value"]),
                Bidder = listItem["Bidder"] == null ? "" : FormatBidderName(listItem),
                IsPaid = listItem["IsPaid"] == null ? "" : listItem["IsPaid"].ToString(),
                IsSold = listItem["IsSold"] == null ? "" : listItem["IsSold"].ToString(),
                Action = "<a href=\"#\" onclick=\"" + string.Format(jscriptFormatString, listItem.ID) + "\">Edit</a>",
            }).ToList();

            ItemsGrid.DataSource = items;
            ItemsGrid.DataBind();

            HomeLink.NavigateUrl = Page.Request.Path;
        }
Exemple #4
0
        protected override void SetupCell(bool isRecycled)
        {
            var items = BindingContext as ObservableCollection <MediaItem>;

            ItemsGrid.Layout(new Rectangle(0, 0, CellSize.Width, CellSize.Height));
            ItemsGrid.ScrollToItemWithIndex(0, false);
            ItemsGrid.ItemsSource = items;
        }
Exemple #5
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (UserSession.User == null)
     {
         Response.Redirect("Account/Login.aspx");
     }
     ItemsGrid.DataSource = SqlHelper.GetItems();
     ItemsGrid.DataBind();
 }
Exemple #6
0
 private void ItemsGrid_Enter(object sender, EventArgs e)
 {
     if (lastkeys == Keys.Tab)
     {
         ItemsGrid.SelectedGridItem = ItemsGrid.EnumerateAllItems().First((item) => item.PropertyDescriptor != null);
     }
     else if (lastkeys == (Keys.Tab | Keys.Shift))
     {
         ItemsGrid.SelectedGridItem = ItemsGrid.EnumerateAllItems().Last();
     }
 }
Exemple #7
0
 private void UpdateResourceBox()
 {
     NUP_Coins.Value  = GetRessources().Coins;
     NUP_Jewels.Value = GetRessources().Jewels;
     NUP_Hearts.Value = GetRessources().Hearts;
     for (int i = 0; i < SI_Items.Items.Length; i++)
     {
         SI_Items.Items[i] = GetRessources().Items[i];
     }
     for (int i = 0; i < SI_Items.Enchantments.Length; i++)
     {
         SI_Items.Enchantments[i] = GetRessources().Enhancements[i];
     }
     ItemsGrid.Refresh();
 }
        /// <summary>
        /// Binds the items grid.
        /// </summary>
        /// <param name="id">The id.</param>
        private void BindItemsGrid(int id)
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("MetaFieldId", typeof(int));
            dt.Columns.Add("FriendlyName", typeof(string));

            // Fields
            MetaFieldCollection mfc = MetaField.GetList(MDContext /*Namespace, true*/);            // allow sharing meta fields

            foreach (MetaField field in mfc)
            {
                if (field.IsUser)
                {
                    DataRow row = dt.NewRow();
                    row["MetaFieldId"]  = field.Id;
                    row["FriendlyName"] = field.FriendlyName;
                    dt.Rows.Add(row);
                }
            }

            ItemsGrid.DataSource = new DataView(dt);
            ItemsGrid.DataBind();

            if (id > 0)
            {
                ArrayList list = new ArrayList();

                MetaFieldCollection mfc2 = MetaField.GetList(MDContext, id);
                foreach (MetaField mf in mfc2)
                {
                    if (mf.IsUser)
                    {
                        for (int i = 0; i < ItemsGrid.Items.Count; i++)
                        {
                            if ((int)ItemsGrid.DataKeys[i] == mf.Id)
                            {
                                list.Add(i);
                                TextBox box = (TextBox)ItemsGrid.Items[i].FindControl("Weight");
                                box.Text = mf.Weight.ToString();
                            }
                        }
                    }
                }

                ((Mediachase.Web.Console.Controls.RowSelectorColumn)ItemsGrid.Columns[0]).SelectedIndexes = (int[])list.ToArray(typeof(int));
            }
        }
Exemple #9
0
        /// <summary>
        /// Binds a data source to the invoked server control and all its child controls.
        /// </summary>
        public override void DataBind()
        {
            MetaLabelCtrl.Text       = String.Format("{0} ({1})", MetaField.FriendlyName, LanguageCode);
            MetaDescriptionCtrl.Text = MetaField.Description;

            if (DictionaryItemsTable != null)
            {
                ItemsGrid.DataSource = DictionaryItemsTable;
                ItemsGrid.DataBind();
            }
            else
            {
                BindData();
            }

            base.DataBind();
        }
Exemple #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            clsCliente mObj_Cliente = new clsCliente();
            DataView   dv           = new DataView();

            dv = mObj_Cliente.ObterListaCliente();

            if (dv == null)
            {
                //erro
            }
            else
            {
                ItemsGrid.DataSource = dv;
                ItemsGrid.DataBind();
            }
        }
Exemple #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            UpdateAddNewItemLinks();

            var list      = SPContext.Current.Web.Lists[Constants.ItemsListName];
            var catfilter = Page.Request.QueryString["catid"];
            List <AuctionItem> items;

            if (catfilter != null)
            {
                var catid = Convert.ToInt32(catfilter);
                var cat   = string.Format("{0};#", catid);

                items = (from SPListItem listItem in list.Items
                         orderby listItem.Title
                         where listItem["Categories"].ToString().Contains(cat)
                         select new AuctionItem
                {
                    Image = GetThumbnailImage((SPFieldLookupValueCollection)listItem["Pictures"], listItem.ID),
                    Id = listItem.ID,
                    Page = Page.Request.Path,
                    Title = FormatTitle(listItem),
                    Bid = FormatBid(listItem),
                }).ToList();
            }
            else
            {
                items = (from SPListItem listItem in list.Items
                         orderby listItem.Title
                         select new AuctionItem
                {
                    Image = GetThumbnailImage((SPFieldLookupValueCollection)listItem["Pictures"], listItem.ID),
                    Id = listItem.ID,
                    Page = Page.Request.Path,
                    Title = FormatTitle(listItem),
                    Bid = FormatBid(listItem),
                }).ToList();
            }

            ItemsGrid.DataSource = items;
            ItemsGrid.DataBind();

            UpdateAuctionEndsLabel();
            UpdateSearchCriteriaLabel(items.Count);
        }
Exemple #12
0
        public override void Awake()
        {
            base.Awake();

            var t = controller.transform;

            DiscountLab   = t.GetComponent <UILabel>("Content/Discount/DiscountLab");
            PriceValueLab = t.GetComponent <UILabel>("Content/PriceBtn/PriceValue");
            DescriptLab   = t.GetComponent <UILabel>("Content/Tip/Label");
            OverTimeLab   = t.GetComponent <UILabel>("Content/TimeLabel");
            ItemsGrid     = t.GetComponent <UIGrid>("Content/GiftGrid");
            ItemsList     = new List <LTShowItem> ();
            for (int i = 0; i < ItemsGrid.transform.childCount; ++i)
            {
                ItemsList.Add(ItemsGrid.GetChild(i).GetMonoILRComponent <LTShowItem>());
            }
            t.GetComponent <ConsecutiveClickCoolTrigger>("Content/PriceBtn").clickEvent.Add(new EventDelegate(OnBtnClick));
        }
Exemple #13
0
        public void Initialize(Base.Inventory inventory)
        {
            Inventory = inventory;
            Transform mainCanvas = Manager.Game.MainCanvas.transform;

            Triforce   = mainCanvas.Find("Inventory/Triforce").GetComponent <RectTransform>();
            BSlotImage = mainCanvas.Find("Inventory/BSlot/Image").GetComponent <Image>();
            ItemsGrid  = mainCanvas.Find("Inventory/ItemsContainer/ItemsGrid").GetComponent <RectTransform>();
            Cursor     = ItemsGrid.Find("Cursor").GetComponent <RectTransform>();
            int count = Constants.SelectableItems.Length;

            ItemRefs    = new GameObject[count];
            ActiveItems = new bool[count];
            for (int i = 0; i < count; i++)
            {
                SetItemActive(Constants.SelectableItems[i], i);
            }
        }
Exemple #14
0
 public void SetItemActive(Items itemType, int index)
 {
     if (index != -1)
     {
         GameObject go = ItemRefs[index];
         if (go == null)
         {
             go = ItemRefs[index] = ItemsGrid.GetChild(index).transform.Find("Image").gameObject;
         }
         bool isActive = Inventory.GetItemCount(itemType) != 0;
         go.SetActive(isActive);
         ActiveItems[index] = isActive;
         // First item in here, so let's select it
         if (isActive && GetActiveCount() == 1)
         {
             MoveCursor(0);
             Inventory.UpdateSelectedItem(Constants.SelectableItems[CurrentIndex]);
         }
     }
 }
Exemple #15
0
        public override void Awake()
        {
            base.Awake();

            var t = mDMono.transform;

            IconSp        = t.GetComponent <UISprite>("BG/IconObj/Icon");
            NameLab       = t.GetComponent <UILabel>("NameLabel");
            DiscountLab   = t.GetComponent <UILabel>("Discount/DiscountLab");
            PriceValueLab = t.GetComponent <UILabel>("PriceBtn/PriceValue");
            TagLab        = t.GetComponent <UILabel>("Tag/Label");
            TagObj        = t.FindEx("Tag").gameObject;
            OverTimeLab   = t.GetComponent <UILabel>("TimeLabel");
            ItemsGrid     = t.GetComponent <UIGrid>("GiftGrid");
            ItemsList     = new List <LTShowItem>();
            for (int i = 0; i < ItemsGrid.transform.childCount; ++i)
            {
                ItemsList.Add(ItemsGrid.GetChild(i).GetMonoILRComponent <LTShowItem>());
            }
            t.GetComponent <ConsecutiveClickCoolTrigger>("PriceBtn").clickEvent.Add(new EventDelegate(OnBtnClick));
        }
        /// <summary>
        /// Binds the data.
        /// </summary>
        private void BindData()
        {
            DataTable dt = new DataTable();

            dt.Columns.Add("MetaFieldId", typeof(int));
            dt.Columns.Add("FriendlyName", typeof(string));

            // Fields
            MetaFieldCollection mfc = MetaField.GetList(MDContext);

            foreach (MetaField field in mfc)
            {
                if (field.IsUser)
                {
                    DataRow row = dt.NewRow();
                    row["MetaFieldId"]  = field.Id;
                    row["FriendlyName"] = field.FriendlyName;
                    dt.Rows.Add(row);
                }
            }

            ItemsGrid.DataSource = new DataView(dt);
            ItemsGrid.DataBind();
        }
Exemple #17
0
        void CreateTreeView()
        {
            //LOCATIONS
            Gtk.TreeViewColumn LocationsColumn = new Gtk.TreeViewColumn();
            LocationsColumn.Title = "Locations";
            Gtk.CellRendererText LocationsColumnCell = new Gtk.CellRendererText();
            LocationsColumn.PackStart(LocationsColumnCell, true);

            //creo la lista perchè nella treeview faccio vedere SOLO il nome e non la data
            //ListStore Lista_Locations = new ListStore (typeof(string));

            //foreach( Location actLocation in DataAccess.Instance.ListaLocations)
            //	Lista_Locations.AppendValues(actLocation.LocationName);

            //qui collego il nome con l'oggetto, la funzione è sotto
            LocationsColumn.SetCellDataFunc(LocationsColumnCell, new Gtk.TreeCellDataFunc(RenderLocation));

            LocationsGrid.AppendColumn(LocationsColumn);

            LocationsColumn.AddAttribute(LocationsColumnCell, "text", 0);

            //riempio la griglia
            LocationsGrid.Model = DataAccess.Instance.ListaLocations;
            //m_Lista_Locations;
            //CONTAINERS
            Gtk.TreeViewColumn ContainersColum = new Gtk.TreeViewColumn();
            ContainersColum.Title = "Containers";
            Gtk.CellRendererText ContainersColumCell = new Gtk.CellRendererText();
            ContainersColum.PackStart(ContainersColumCell, true);

            //creo la lista perchè nella treeview faccio vedere SOLO il nome e non la data
            //ListStore Lista_Containers = new ListStore (typeof(string));

            //foreach( Container actContainer in DataAccess.Instance.ListaContainers)
            //	Lista_Containers.AppendValues(actContainer.ContainerName);

            //qui collego il nome con l'oggetto, la funzione è sotto
            ContainersColum.SetCellDataFunc(ContainersColumCell, new Gtk.TreeCellDataFunc(RenderContainer));

            ContainersGrid.AppendColumn(ContainersColum);
            ContainersColum.AddAttribute(ContainersColumCell, "text", 0);

            //riempio la griglia
            ContainersGrid.Model = DataAccess.Instance.ListaContainers;

            //ITEMS
            Gtk.TreeViewColumn ItemsColum = new Gtk.TreeViewColumn();
            ItemsColum.Title = "Items";
            Gtk.CellRendererText ItemsColumCell = new Gtk.CellRendererText();
            ItemsColum.PackStart(ItemsColumCell, true);

            //creo la lista perchè nella treeview faccio vedere SOLO il nome e non la data
            //ListStore Lista_Item = new ListStore (typeof(string));

            //foreach( Item actItem in DataAccess.Instance.ListaItems)
            //	Lista_Item.AppendValues(actItem.ItemName);

            //qui collego il nome con l'oggetto, la funzione è sotto
            ItemsColum.SetCellDataFunc(ItemsColumCell, new Gtk.TreeCellDataFunc(RenderItem));


            ItemsGrid.AppendColumn(ItemsColum);
            ItemsColum.AddAttribute(ItemsColumCell, "text", 0);

            //riempio la griglia
            ItemsGrid.Model = DataAccess.Instance.ListaItems;



            this.ShowAll();
        }
Exemple #18
0
 public override void OnSizeChanged(Size size)
 {
     base.OnSizeChanged(size);
     ItemsGrid.Layout(new Rectangle(0, 0, size.Width, size.Height));
 }
Exemple #19
0
        private void Parse()
        {
            updating = true;

            #region UpdateOwnedBox()
            if (CB_MonIndex.SelectedValue != null)
            {
                int ind = (int)CB_MonIndex.SelectedValue;

                //team preview
                int pbIndex = 0;
                foreach (PictureBox pb in new[] { PB_Team1, PB_Team2, PB_Team3, PB_Team4 })
                {
                    pb.Image = GetTeamImage(GetMonFrommSlot(pbIndex), pbIndex, (ltir == pbIndex));
                    pbIndex++;
                }

                //caught CHK
                CHK_CaughtMon.Checked = GetMon(ind).Caught;

                //level view
                if (GetMon(ind).Lollipops > db.Mons[ind].MaxLollipops || GetMon(ind).Level > 10 + db.Mons[ind].MaxLollipops)
                {
                    NUP_Lollipop.Maximum   = NUP_Level.Maximum = 63;
                    NUP_Lollipop.ForeColor = NUP_Level.ForeColor = Color.Red;
                }
                else
                {
                    NUP_Lollipop.Maximum   = db.Mons[ind].MaxLollipops;
                    NUP_Level.Maximum      = 10 + NUP_Lollipop.Maximum;
                    NUP_Lollipop.ForeColor = NUP_Level.ForeColor = SystemColors.WindowText;
                }
                NUP_Lollipop.Value = GetMon(ind).Lollipops;
                NUP_Level.Value    = GetMon(ind).Level;

                //Skill level
                for (int i = 0; i < TLP_Skills.ColumnCount; i++)
                {
                    for (int j = 0; j < TLP_Skills.RowCount; j++)
                    {
                        if (TLP_Skills.GetControlFromPosition(i, j) is RadioButton)
                        {
                            (TLP_Skills.GetControlFromPosition(i, j) as RadioButton).Checked = (GetMon(ind).CurrentSkill == j);
                        }
                        else if (TLP_Skills.GetControlFromPosition(i, j) is Label)
                        {
                            (TLP_Skills.GetControlFromPosition(i, j) as Label).Text = (db.Mons[ind].Skills[j] == 0 && j != 0) ? "" : db.SkillsList[db.Mons[ind].Skills[j] - 1];
                            TT_Skill.SetToolTip((TLP_Skills.GetControlFromPosition(i, j) as Label), (db.Mons[ind].Skills[j] > 0) ? db.SkillsTextList[db.Mons[ind].Skills[j] - 1] : "default");
                        }
                        else if (TLP_Skills.GetControlFromPosition(i, j) is NumericUpDown)
                        {
                            (TLP_Skills.GetControlFromPosition(i, j) as NumericUpDown).Maximum = GetMon(ind).SkillLevel[j] > 5 ? 7 : 5;
                            (TLP_Skills.GetControlFromPosition(i, j) as NumericUpDown).Value   = Math.Max(GetMon(ind).SkillLevel[j], 1);
                        }

                        (TLP_Skills.GetControlFromPosition(i, j) as Control).Visible = (GetMon(ind).Caught&& j < db.Mons[ind].SkillCount);  //visibility stuff for convenience
                    }
                }

                #region Visibility

                L_Level.Visible     = L_Skill.Visible = NUP_Level.Visible = PB_Skill.Visible = CHK_CaughtMon.Checked;
                PB_Lollipop.Visible = NUP_Lollipop.Visible = (CHK_CaughtMon.Checked && NUP_Lollipop.Maximum != 0);
                PB_Mon.Image        = GetCaughtImage(ind, CHK_CaughtMon.Checked);
                PB_MegaX.Visible    = CHK_MegaX.Visible = db.HasMega[ind][0];
                PB_MegaY.Visible    = CHK_MegaY.Visible = db.HasMega[ind][1];
                PB_MegaX.Image      = db.HasMega[ind][0] ? new Bitmap((Image)Properties.Resources.ResourceManager.GetObject("MegaStone" + db.Mons[ind].SpecieIndex.ToString("000") + (db.HasMega[ind][1] ? "_X" : string.Empty))) : new Bitmap(16, 16);
                PB_MegaY.Image      = db.HasMega[ind][1] ? new Bitmap((Image)Properties.Resources.ResourceManager.GetObject("MegaStone" + db.Mons[ind].SpecieIndex.ToString("000") + "_Y")) : new Bitmap(16, 16);
                CHK_MegaX.Checked   = (GetMon(ind).Stone & 1) != 0;
                CHK_MegaY.Checked   = (GetMon(ind).Stone & 2) != 0;
                PB_SpeedUpX.Image   = db.HasMega[ind][0] ? new Bitmap(ResizeImage((Image)Properties.Resources.ResourceManager.GetObject("mega_speedup"), 24, 24)) : new Bitmap(16, 16);
                PB_SpeedUpY.Image   = db.HasMega[ind][1] ? new Bitmap(ResizeImage((Image)Properties.Resources.ResourceManager.GetObject("mega_speedup"), 24, 24)) : new Bitmap(16, 16);
                RB_Skill1.Enabled   = (db.Mons[ind].SkillCount > 1);
                #endregion Visibility

                //Speedup values
                if (!(db.HasMega[ind][0] || db.HasMega[ind][1]) || db.MegaList.IndexOf(ind) == -1) //temporary fix while there are still some mega forms missing in megastone.bin
                {
                    NUP_SpeedUpX.Maximum = NUP_SpeedUpY.Maximum = NUP_SpeedUpX.Value = NUP_SpeedUpY.Value = 0;
                    NUP_SpeedUpX.Visible = NUP_SpeedUpY.Visible = (db.MegaList.IndexOf(ind) != -1);
                }
                else
                {
                    bool boolX = GetMon(ind).SpeedUpX > db.Megas[db.MegaList.IndexOf(ind)].Item2;
                    bool boolY = db.HasMega[ind][1] && GetMon(ind).SpeedUpY > db.Megas[db.MegaList.IndexOf(ind, db.MegaList.IndexOf(ind) + 1)].Item2;
                    NUP_SpeedUpX.ForeColor = boolX ? Color.Red : SystemColors.WindowText;
                    NUP_SpeedUpY.ForeColor = boolY ? Color.Red : SystemColors.WindowText;
                    NUP_SpeedUpX.Maximum   = boolX ? 127 : (db.HasMega[ind][0] ? db.Megas[db.MegaList.IndexOf(ind)].Item2 : 0);
                    NUP_SpeedUpY.Maximum   = boolY ? 127 : (db.HasMega[ind][1] ? db.Megas[db.MegaList.IndexOf(ind, db.MegaList.IndexOf(ind) + 1)].Item2 : 0);
                    NUP_SpeedUpX.Value     = db.HasMega[ind][0] ? GetMon(ind).SpeedUpX : 0;
                    NUP_SpeedUpY.Value     = db.HasMega[ind][1] ? GetMon(ind).SpeedUpY : 0;
                    NUP_SpeedUpX.Visible   = CHK_CaughtMon.Checked && CHK_MegaX.Visible && CHK_MegaX.Checked;
                    NUP_SpeedUpY.Visible   = CHK_CaughtMon.Checked && CHK_MegaY.Visible && CHK_MegaY.Checked; //Else NUP_SpeedUpY appears if the next mega in terms of offsets has been obtained
                }
                PB_SpeedUpX.Visible = NUP_SpeedUpX.Visible;
                PB_SpeedUpY.Visible = NUP_SpeedUpY.Visible;
            }
            #endregion

            #region UpdateResourceBox()
            rsItem          rsI   = GetRessources();
            NumericUpDown[] nup   = new NumericUpDown[] { NUP_Coins, NUP_Jewels, NUP_Hearts };
            var             val   = new[] { rsI.Coins, rsI.Jewels, rsI.Hearts };
            int[]           legit = new int[] { 99999, 150, 99 };
            int[]           max   = new int[] { 131071, 255, 127 };
            for (int i = 0; i < nup.Length; i++)
            {
                nup[i].Maximum   = (val[i] > legit[i]) ? max[i] : legit[i];
                nup[i].ForeColor = (val[i] > legit[i]) ? Color.Red : SystemColors.WindowText;
            }
            NUP_Coins.Value  = rsI.Coins;
            NUP_Jewels.Value = rsI.Jewels;
            NUP_Hearts.Value = rsI.Hearts;
            for (int i = 0; i < SI_Items.Items.Length; i++)
            {
                SI_Items.Items[i] = rsI.Items[i].Range();
            }
            for (int i = 0; i < SI_Items.Enchantments.Length; i++)
            {
                SI_Items.Enchantments[i] = rsI.Enhancements[i].Range();
            }
            ItemsGrid.Refresh();
            #endregion

            #region UpdateStageBox()
            int[]           index      = new int[] { (int)NUP_MainIndex.Value - 1, (int)NUP_ExpertIndex.Value - 1, (int)NUP_EventIndex.Value };
            PictureBox[]    stagesPics = new[] { PB_Main, PB_Expert, PB_Event };
            NumericUpDown[] nups       = new[] { NUP_MainScore, NUP_ExpertScore, NUP_EventScore };

            for (int i = 0; i < index.Length; i++)
            {
                nups[i].Value       = GetStage(index[i], i).Score;
                stagesPics[i].Image = GetStageImage(index[i], i);
            }
            #endregion

            updating = false;
        }