Пример #1
0
        private void ItemFullnessRadioButton_Checked(object sender, RoutedEventArgs e)
        {
            RadioButton radioButton = (RadioButton)sender;

            //Update the control variable with correct day time
            switch (radioButton.Content.ToString())
            {
            case "Item Empty":
                _itemMode = EItemMode.eEmpty;
                break;

            case "Item Full":
                _itemMode = EItemMode.eFull;
                break;
            }
            //Refresh the GUI to show reflect the change
            ChangeGUIType();
        }
Пример #2
0
        private BitmapSource GetEquipSlotsItemImages(string [] image_list, string [] image_usage, string [] equip_slots, bool b_use_empty_default, bool b_use_full_default, bool b_equiped, EItemMode item_mode, string table, bool big_gui, bool is_mirrored)
        {
            string strImage;

            if (item_mode == EItemMode.eEmpty)
            {
                if (b_use_empty_default)
                {
                    strImage = image_list[Convert.ToInt32(image_usage[(int)(b_equiped ? EImageUsage.eEquiped : EImageUsage.eStored)])];
                }
                else
                {
                    //it seems that indexes can also have Shoulder:0 and it is valid for some reason
                    string[] strIndexSplit = equip_slots[1].Split(':');
                    int      index         = Convert.ToInt32(strIndexSplit.Length > 1 ? strIndexSplit[1] : strIndexSplit[0]);
                    strImage = image_list[index];
                }
            }
            else
            {
                if (b_use_full_default)
                {
                    strImage = image_list[Convert.ToInt32(image_usage[(int)(b_equiped ? EImageUsage.eEquipedFull : EImageUsage.eStoredFull)])];
                }
                else
                {
                    //it seems that indexes can also have Shoulder:0 and it is valid for some reason
                    string[] strIndexSplit = equip_slots[2].Split(':');
                    int      index         = Convert.ToInt32(strIndexSplit.Length > 1 ? strIndexSplit[1] : strIndexSplit[0]);
                    strImage = image_list[index];
                }
            }

            return(GetItemImage(strImage, table, big_gui, is_mirrored));
        }