예제 #1
0
        public SetBlockedSystemWindow(FLGameData gameData, TextBox textBox)
        {
            this.gameData = gameData;
            this.textBox  = textBox;

            InitializeComponent();
            hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
예제 #2
0
        public AddShipPimperBaseWindow(FLGameData gameData, UIDataSet.ShipPimperBaseListDataTable dataTable)
        {
            this.gameData  = gameData;
            this.dataTable = dataTable;

            InitializeComponent();
            hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
예제 #3
0
        public ChangeShipWindow(AppServiceInterface appServices, FLGameData gameData, FLDataFile charFile)
        {
            this.appServices = appServices;
            this.charFile    = charFile;
            InitializeComponent();
            hashListBindingSource.DataSource = gameData.DataStore;

            FilterUpdate();
        }
예제 #4
0
        public AddNoBuyItemWindow(FLGameData gameData, UIDataSet.BaseGoodNoBuyListDataTable dataTable)
        {
            this.gameData  = gameData;
            this.dataTable = dataTable;

            InitializeComponent();
            hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
        public AddEquipPurchaseRestrictionItemWindow(FLGameData gameData, UIDataSet.EquipPurchaseRestrictionItemsDataTable dataTable)
        {
            this.gameData  = gameData;
            this.dataTable = dataTable;

            InitializeComponent();
            hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
예제 #6
0
        public ChangeLocationWindow(AppServiceInterface appServices, FLGameData gameData, List <FLDataFile> charFiles)
        {
            this.appServices = appServices;
            this.charFiles   = charFiles;

            InitializeComponent();
            hashListBindingSource.DataSource  = gameData.DataStore;
            hashListBindingSource1.DataSource = gameData.DataStore;
            FilterUpdate();
        }
        public AddCargoWindow(FLGameData gameData, UIDataSet.PICargoTableDataTable cargoTable, UIDataSet.PICargoTableRow rowToEdit)
        {
            this.gameData   = gameData;
            this.cargoTable = cargoTable;
            this.rowToEdit  = rowToEdit;

            InitializeComponent();
            hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
예제 #8
0
        public EditNoBuyItemWindow(FLGameData gameData, UIDataSet.BaseGoodNoBuyListRow dataItem)
        {
            InitializeComponent();

            this.gameData = gameData;
            this.dataItem = dataItem;
            this.Text     = "Edit No Buy Item: " + dataItem.BaseDescription;

            hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
        public EditEquipPurchaseRestrictionControlItemWindow(FLGameData gameData, UIDataSet.EquipPurchaseRestrictionItemsRow dataItem)
        {
            InitializeComponent();

            this.gameData = gameData;
            this.dataItem = dataItem;
            this.Text     = "Edit Control Item: " + dataItem.Description;

            hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
        public EditSysSensorItemWindow(FLGameData gameData, UIDataSet.SysSensorListRow dataItem)
        {
            InitializeComponent();

            this.gameData             = gameData;
            this.dataItem             = dataItem;
            this.Text                 = "Edit No Buy Item: " + dataItem.SystemDescription;
            this.numericUpDown1.Value = dataItem.NetworkID;

            hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
        /// <summary>
        /// Edit the specified row.
        /// </summary>
        /// <param name="parent">The main window parent.</param>
        /// <param name="rowToEdit">The row to edit.</param>
        public AddEquipmentWindow(FLGameData gameData, UIDataSet.PIEquipmentTableDataTable equipTable, UIDataSet.PIEquipmentTableRow rowToEdit)
        {
            this.gameData   = gameData;
            this.equipTable = equipTable;
            this.rowToEdit  = rowToEdit;

            if (rowToEdit != null)
            {
                defaultGameDataType = rowToEdit.itemGameDataType;
            }

            InitializeComponent();
            this.hashListBindingSource.DataSource = gameData.DataStore;
            FilterUpdate();
        }
예제 #12
0
        /// <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));
        }
예제 #13
0
        /// <summary>
        /// Return the location 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 location.</returns>
        public static string GetLocation(FLGameData gameData, FLDataFile charFile)
        {
            string location = gameData.GetItemDescByNickNameX(charFile.GetSetting("Player", "system").Str(0));

            if (charFile.SettingExists("Player", "pos"))
            {
                float posX = charFile.GetSetting("Player", "pos").Float(0);
                float posY = charFile.GetSetting("Player", "pos").Float(1);
                float posZ = charFile.GetSetting("Player", "pos").Float(2);
                location += String.Format(" in space {0}, {1}, {2}", posX, posY, posZ);
            }
            else
            {
                location += " docked at " + gameData.GetItemDescByNickNameX(charFile.GetSetting("Player", "base").Str(0));
            }
            return(location);
        }
예제 #14
0
 public HashcodeWindow(DamDataSet dataStore, FLGameData gd)
 {
     InitializeComponent();
     gameDataTableBindingSource.DataSource = dataStore;
     this.gd = gd;
 }
 public HashWindow(FLGameData gameData)
 {
     InitializeComponent();
     hashListBindingSource.DataSource = gameData.DataStore;
 }
예제 #16
0
        public EditReps(FLGameData gameData, string itemNickName, FLDataFile cfgFile)
        {
            InitializeComponent();

            this.itemNickName = itemNickName;
            this.cfgFile      = cfgFile;
            this.Text         = "Edit Reputations: " + gameData.GetItemDescByNickNameX(itemNickName);

            GameDataSet.HashListRow[] factions = (GameDataSet.HashListRow[])gameData.DataStore.HashList.Select("ItemType = '" + FLGameData.GAMEDATA_FACTIONS + "'");
            foreach (GameDataSet.HashListRow faction in factions)
            {
                uIDataSet.RepFixerItemFactions.AddRepFixerItemFactionsRow(faction.IDSName, faction.ItemNickName, "");
            }

            foreach (FLDataFile.Setting set in cfgFile.GetSettings(itemNickName))
            {
                string factionNick = set.settingName;

                string repStr = "-";
                if (set.NumValues() > 0)
                {
                    string[] values = set.Str(0).Split(',');
                    if (values.Length == 2)
                    {
                        int mode;
                        if (!Int32.TryParse(values[1], out mode))
                        {
                            repStr = "ERR";
                        }
                        else if (mode == MODE_REP_GREATERTHAN)
                        {
                            repStr = ">";
                        }
                        else if (mode == MODE_REP_STATIC)
                        {
                            repStr = "=";
                        }
                        else
                        {
                            repStr = "<";
                        }

                        float rep;
                        if (!Single.TryParse(values[0], out rep))
                        {
                            repStr = "ERR";
                        }
                        else if (rep > 1.0 || rep < -1.0)
                        {
                            repStr = "ERR";
                        }
                        else
                        {
                            repStr += rep.ToString();
                        }
                    }
                    else if (values.Length == 1)
                    {
                        float rep;
                        if (!Single.TryParse(values[0], out rep))
                        {
                            repStr = "ERR";
                        }
                        else if (rep > 1.0 || rep < -1.0)
                        {
                            repStr = "ERR";
                        }
                        repStr = "<" + rep.ToString();
                    }
                }

                foreach (UIDataSet.RepFixerItemFactionsRow faction in uIDataSet.RepFixerItemFactions.Rows)
                {
                    if (faction.ItemNickName == factionNick)
                    {
                        faction.Reputation = repStr;
                        break;
                    }
                }
            }
        }
예제 #17
0
 public StatisticsGenerator(FLGameData gameData, FLHookSocket flHookCmdr)
 {
     dataAccess   = new DataAccess();
     m_gameData   = gameData;
     m_flHookCmdr = flHookCmdr;
 }