private void button1_Click_1(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridView1.SelectedRows) { StringBuilder sb = new StringBuilder(); DamDataSet.GameDataTableRow dataRow = (DamDataSet.GameDataTableRow)((DataRowView)row.DataBoundItem).Row; if (dataRow.itemDetailsObject is FLGameData.ShipInfo) { FLGameData.ShipInfo info = (FLGameData.ShipInfo)dataRow.itemDetailsObject; sb.AppendFormat("{0}\n", dataRow.itemInfo); sb.AppendFormat("Nickname:\t{0} {1}\n", dataRow.itemNickname, dataRow.itemHash); sb.AppendFormat("Default engine:\t{0} {1}\n", info.defaultEngine, gd.GetItemDescByHash(info.defaultEngine)); sb.AppendFormat("Default powergen:\t{0} {1}\n", info.defaultPowerGen, gd.GetItemDescByHash(info.defaultPowerGen)); sb.AppendFormat("Default sound:\t{0} {1}\n", info.defaultSound, gd.GetItemDescByHash(info.defaultSound)); sb.AppendFormat("Hold size:\t{0}\n", info.holdSize); sb.AppendFormat("Max bats/bots:\t{0}/{1}\n", info.maxBats, info.maxBots); foreach (FLGameData.ShipInfo.Hardpoint hp in info.hardPoints) { if (hp.defaultEquip > 0) { sb.AppendFormat("{0}:\t{1} {2} ", hp.name.PadRight(10), hp.defaultEquip, gd.GetItemDescByHash(hp.defaultEquip)); } else { sb.AppendFormat("{0}:\t", hp.name.PadRight(10)); } foreach (string mountType in hp.mountableItemTypes) { sb.Append(mountType + " "); } sb.Append("\n"); } sb.Append("CMP/3DB hardpoints: "); foreach (string hp in info.validHardPointNames) { sb.Append(hp + " "); } sb.Append("\n"); } else if (dataRow.itemDetailsObject is FLGameData.EquipInfo) { FLGameData.EquipInfo info = (FLGameData.EquipInfo)dataRow.itemDetailsObject; sb.AppendFormat("{0}\n", dataRow.itemInfo); sb.AppendFormat("Nickname:\t{0} {1}\n", dataRow.itemNickname, dataRow.itemHash); sb.AppendFormat("Mount type:\t{0}\n", info.hpType); sb.AppendFormat("Volume:\t{0}\n", info.volume); } else { sb.Append("No information available"); } new InformationDialog(sb.ToString()).ShowDialog(); } }
/// <summary> /// Add the selected item to the parent's cargo table. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void okButton_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridView1.SelectedRows) { GameDataSet.HashListRow dataRow = (GameDataSet.HashListRow)((DataRowView)row.DataBoundItem).Row; dataTable.AddBaseGoodNoBuyListRow(gameData.GetItemDescByHash(dataRow.ItemHash), dataRow.ItemNickName, "", ""); } }
/// <summary> /// Add the selected item to the parent's cargo table. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void okButton_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in itemGrid.SelectedRows) { GameDataSet.HashListRow dataRow = (GameDataSet.HashListRow)((DataRowView)row.DataBoundItem).Row; if (rowToEdit != null) { rowToEdit.itemDescription = gameData.GetItemDescByHash(dataRow.ItemHash); rowToEdit.itemCount = (uint)numericUpDown1.Value; rowToEdit.itemHash = dataRow.ItemHash; } else { cargoTable.AddPICargoTableRow(gameData.GetItemDescByHash(dataRow.ItemHash), (uint)numericUpDown1.Value, dataRow.ItemHash); } } this.Close(); }
/// <summary> /// Add the selected item to the parent's cargo table. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void okButton_Click(object sender, EventArgs e) { foreach (DataGridViewRow row in dataGridView1.SelectedRows) { GameDataSet.HashListRow dataRow = (GameDataSet.HashListRow)((DataRowView)row.DataBoundItem).Row; if (dataTable.FindByItemHash(dataRow.ItemHash) == null) { dataTable.AddRepFixerItemListRow(gameData.GetItemDescByHash(dataRow.ItemHash), dataRow.ItemNickName, dataRow.ItemHash, dataRow.IDSInfo, dataRow.IDSInfo1); } } }
/// <summary> /// Add the selected item to the parent's cargo table. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void okButton_Click(object sender, EventArgs e) { if (ceItemGrid.SelectedRows.Count != 1) { return; } foreach (DataGridViewRow row in ceItemGrid.SelectedRows) { GameDataSet.HashListRow dataRow = (GameDataSet.HashListRow)((DataRowView)row.DataBoundItem).Row; if (rowToEdit != null) { rowToEdit.itemDescription = gameData.GetItemDescByHash(dataRow.ItemHash); rowToEdit.itemHash = dataRow.ItemHash; } else { equipTable.AddPIEquipmentTableRow("*", gameData.GetItemDescByHash(dataRow.ItemHash), dataRow.ItemHash, "", ""); } } this.Close(); }
/// <summary> /// Return the ship string for the specified player /// </summary> /// <param name="gameData">The current game data.</param> /// <param name="charFile">The player's data file.</param> /// <returns>A string containing the ship name.</returns> public static string GetShip(FLGameData gameData, FLDataFile charFile, out Int64 shipArchType) { string nickNameOrHash = charFile.GetSetting("Player", "ship_archetype").Str(0); GameDataSet.HashListRow shipItem = gameData.GetItemByNickName(nickNameOrHash); if (shipItem != null) { shipArchType = shipItem.ItemHash; } else { shipArchType = charFile.GetSetting("Player", "ship_archetype").UInt(0); } return(gameData.GetItemDescByHash(shipArchType)); }