Esempio n. 1
0
        private void InitData(int slot)
        {
            Assembly assembly = Assembly.GetExecutingAssembly();
            Type     type     = assembly.GetType("Terraria_Hacker.HackFunctions");

            foreach (DictionaryEntry de in hacks)
            {
                object[] args = new object[1];
                args[0] = slot;
                MethodInfo mi = type.GetMethod("get" + de.Key);
                if (mi == null)
                {
                    return;
                }
                ((TextBox)de.Value).Text = Convert.ToString(mi.Invoke(null, args));
            }
            {
                PrefixComboBox.SelectedIndex = GetIndexFromPrefix(HackFunctions.getItemPrefix(slot));
            }
            {
                AutoReuse.CheckState = HackFunctions.getItemAutoReuse(slot) ? CheckState.Checked : CheckState.Unchecked;
            }
            {
                Equippable.CheckState = HackFunctions.getItemAccessory(slot) ? CheckState.Checked : CheckState.Unchecked;
            }
        }