Example #1
0
 public ItemPanel(bool displayItemIcons, PreviewManager iconPreview, FileManager fileManager)
 {
     InitializeComponent();
     _displayItemIcons = displayItemIcons;
     _manager          = iconPreview;
     this.fileManager  = fileManager;
 }
Example #2
0
        //_debug = true;

        #endif

        #region Constructors

        public ItemTransferForm(FileManager fileManager)
        {
            InitializeComponent();

            this.fileManager = fileManager;

            _previewManager = new PreviewManager(fileManager);

            //if (File.Exists(Path.Combine(Directory.GetCurrentDirectory(), "trading.xml")))
            //{
            //    ItemTradingOptions options = XmlUtilities<ItemTradingOptions>.Deserialize("trading.xml");
            //    INVENTORYTYPE = options.InventoryToUse;
            //    INVENTORYHEIGHT = options.InventoryHeight;
            //    _enableItemPreview = options.EnableItemPreview;
            //    _enablePalladiumTrading = options.EnablePalladiumTrading;
            //    _backupCharacters = options.BackupCharacters;
            //    _displayItemIcons = options.DisplayItemIcons;
            //    _displayNamesAndQuantity = options.DisplayNamesAndQuantity;
            //    _debug = options.Debug;
            //}

            //ItemTradingOptions options2 = new ItemTradingOptions();
            //options2.EnableItemPreview = true;
            //options2.EnablePalladiumTrading = true;
            //options2.BackupCharacters = true;
            //options2.InventoryHeight = 6;
            //options2.InventoryToUse = InventoryTypes.Inventory;
            //XmlUtilities<ItemTradingOptions>.Serialize(options2, "trading2.xml");

            this.Text += " - Location: " + INVENTORYTYPE.ToString();

            _characterItemPanel1 = new ItemPanel(_displayItemIcons, _previewManager, fileManager);
            _characterItemPanel2 = new ItemPanel(_displayItemIcons, _previewManager, fileManager);

            _characterItemPanel1.NewItemSelected_Event += new ItemPanel.NewItemSelected(_characterItemPanel_NewItemSelected_Event);
            _characterItemPanel2.NewItemSelected_Event += new ItemPanel.NewItemSelected(_characterItemPanel_NewItemSelected_Event);

            _characterItemPanel1.ItemUnitSize = ITEMUNITSIZE;
            _characterItemPanel2.ItemUnitSize = ITEMUNITSIZE;

            SetPanelSize();

            _characterItemPanel1.Location = new Point(16, 18);
            _characterItemPanel2.Location = new Point(16, 18);

            SetCharacterStatus(_characterStatus1, CharacterStatus.NotLoaded, p_status1, l_status1);
            SetCharacterStatus(_characterStatus2, CharacterStatus.NotLoaded, p_status2, l_status2);

            // use inventory panels, as a normal groupBox doesn't provide the option "AutoScroll"
            p_inventory1.Controls.Add(_characterItemPanel1);
            p_inventory2.Controls.Add(_characterItemPanel2);

            EnableComboBoxes(true, true);

            if (_debug)
            {
                InitDebugControls();
            }
            ts_debugControl.Enabled = _debug;
            ts_debugControl.Visible = _debug;
            cb_isMale.Visible = _debug;

            EnableTradingControls(false);

            _characterFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "My Games\\Hellgate\\Save\\Singleplayer");

            //adding the character names triggers the cb_selectCharacter1_SelectedIndexChanged event which will load the first character
            string[] characters = LoadCharacterNames();
            cb_selectCharacter1.DataSource = characters;
            cb_selectCharacter2.DataSource = characters.Clone();
        }
Example #3
0
 public ItemPanel(bool displayItemIcons, PreviewManager iconPreview, FileManager fileManager)
 {
     InitializeComponent();
     _displayItemIcons = displayItemIcons;
     _manager = iconPreview;
     this.fileManager = fileManager;
 }
Example #4
0
        public ItemTransferForm(FileManager fileManager)
        {
            InitializeComponent();

            this.fileManager = fileManager;

            _previewManager = new PreviewManager(fileManager);

            //if (File.Exists(Path.Combine(Directory.GetCurrentDirectory(), "trading.xml")))
            //{
            //    ItemTradingOptions options = XmlUtilities<ItemTradingOptions>.Deserialize("trading.xml");
            //    INVENTORYTYPE = options.InventoryToUse;
            //    INVENTORYHEIGHT = options.InventoryHeight;
            //    _enableItemPreview = options.EnableItemPreview;
            //    _enablePalladiumTrading = options.EnablePalladiumTrading;
            //    _backupCharacters = options.BackupCharacters;
            //    _displayItemIcons = options.DisplayItemIcons;
            //    _displayNamesAndQuantity = options.DisplayNamesAndQuantity;
            //    _debug = options.Debug;
            //}

            //ItemTradingOptions options2 = new ItemTradingOptions();
            //options2.EnableItemPreview = true;
            //options2.EnablePalladiumTrading = true;
            //options2.BackupCharacters = true;
            //options2.InventoryHeight = 6;
            //options2.InventoryToUse = InventoryTypes.Inventory;
            //XmlUtilities<ItemTradingOptions>.Serialize(options2, "trading2.xml");

            this.Text += " - Location: " + INVENTORYTYPE.ToString();

            _characterItemPanel1 = new ItemPanel(_displayItemIcons, _previewManager, fileManager);
            _characterItemPanel2 = new ItemPanel(_displayItemIcons, _previewManager, fileManager);

            _characterItemPanel1.NewItemSelected_Event += new ItemPanel.NewItemSelected(_characterItemPanel_NewItemSelected_Event);
            _characterItemPanel2.NewItemSelected_Event += new ItemPanel.NewItemSelected(_characterItemPanel_NewItemSelected_Event);

            _characterItemPanel1.ItemUnitSize = ITEMUNITSIZE;
            _characterItemPanel2.ItemUnitSize = ITEMUNITSIZE;

            SetPanelSize();

            _characterItemPanel1.Location = new Point(16, 18);
            _characterItemPanel2.Location = new Point(16, 18);

            SetCharacterStatus(_characterStatus1, CharacterStatus.NotLoaded, p_status1, l_status1);
            SetCharacterStatus(_characterStatus2, CharacterStatus.NotLoaded, p_status2, l_status2);

            // use inventory panels, as a normal groupBox doesn't provide the option "AutoScroll"
            p_inventory1.Controls.Add(_characterItemPanel1);
            p_inventory2.Controls.Add(_characterItemPanel2);

            EnableComboBoxes(true, true);

            if (_debug)
            {
                InitDebugControls();
            }
            ts_debugControl.Enabled = _debug;
            ts_debugControl.Visible = _debug;
            cb_isMale.Visible       = _debug;

            EnableTradingControls(false);

            _characterFolder = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "My Games\\Hellgate\\Save\\Singleplayer");

            //adding the character names triggers the cb_selectCharacter1_SelectedIndexChanged event which will load the first character
            string[] characters = LoadCharacterNames();
            cb_selectCharacter1.DataSource = characters;
            cb_selectCharacter2.DataSource = characters.Clone();
        }