Пример #1
0
        public SingleItemEditor(Item item)
        {
            InitializeComponent();
            this.TranslateInterface(GameInfo.CurrentLanguage);

            // disassociate from original reference
            Item = item.ToBytesClass().ToClass <Item>();

            ItemEditor.Initialize(GameInfo.Strings.ItemDataSource);
            ItemEditor.LoadItem(Item);
        }
Пример #2
0
        public PlayerItemEditor(IReadOnlyList<T> array, int width, int height, bool sysbot = false)
        {
            InitializeComponent();
            this.TranslateInterface(GameInfo.CurrentLanguage);
            Items = array;

            var Editor = ItemGrid = new ItemGridEditor(ItemEditor, Items) {Dock = DockStyle.Fill};
            Editor.InitializeGrid(width, height);
            PAN_Items.Controls.Add(Editor);

            ItemEditor.Initialize(GameInfo.Strings.ItemDataSource);
            Editor.LoadItems();
            DialogResult = DialogResult.Cancel;
            LoadItems = () => Editor.LoadItems();
            B_Inject.Visible = sysbot;
        }
Пример #3
0
        public PlayerItemEditor(IReadOnlyList <T> array, int width, int height, int sysbot = 0)
        {
            InitializeComponent();
            Items = array;

            var Editor = new ItemGridEditor(ItemEditor, Items)
            {
                Dock = DockStyle.Fill
            };

            Editor.InitializeGrid(width, height);
            PAN_Items.Controls.Add(Editor);

            ItemEditor.Initialize(GameInfo.Strings.ItemDataSource);
            Editor.LoadItems();
            DialogResult     = DialogResult.Cancel;
            LoadItems        = () => Editor.LoadItems();
            B_Inject.Visible = (SysBotLength = sysbot) > 0;
        }
Пример #4
0
        public PlayerItemEditor(IReadOnlyList <T> array, int width, int height)
        {
            InitializeComponent();
            Items = array;

            var items = GameInfo.Strings.itemlist.ToArray();

            var set = new HashSet <string>();

            for (int i = 0; i < items.Length; i++)
            {
                var item = items[i];
                if (string.IsNullOrEmpty(item))
                {
                    items[i] = $"(Item #{i:000})";
                }
                else if (set.Contains(item))
                {
                    items[i] += $" (#{i:000})";
                }
                else
                {
                    set.Add(item);
                }
            }

            var Editor = new ItemGridEditor(ItemEditor, Items, items)
            {
                Dock = DockStyle.Fill
            };

            Editor.InitializeGrid(width, height);
            PAN_Items.Controls.Add(Editor);

            ItemEditor.Initialize(items);
            Editor.LoadItems();
            DialogResult = DialogResult.Cancel;
            LoadItems    = () => Editor.LoadItems();
        }