/// <summary>
        /// Update the filter applied to the character list data grid view.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FilterUpdate()
        {
            string filter = "((ItemType = '" + FLGameData.GAMEDATA_AMMO + "')";

            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_ARMOR + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_CARGO + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_CLOAK + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_CM + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_GUNS + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_MINES + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_PROJECTILES + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_SCANNERS + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_SHIELDS + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_THRUSTERS + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_TRACTORS + "')";
            filter += " OR (ItemType = '" + FLGameData.GAMEDATA_TURRETS + "')";
            filter += ")";

            if (textBox1.Text.Length > 0)
            {
                string filterText = textBox1.Text;
                if (filter != null)
                {
                    filter += " AND ";
                }
                filter += "((IDSName LIKE '%" + FLUtility.EscapeLikeExpressionString(filterText) + "%')";
                filter += " OR (ItemNickName LIKE '%" + FLUtility.EscapeLikeExpressionString(filterText) + "%')";
                filter += " OR (ItemType LIKE '%" + FLUtility.EscapeLikeExpressionString(filterText) + "%'))";
            }
            hashListBindingSource.Filter = filter;
        }
Exemplo n.º 2
0
        /// <summary>
        /// Update the filter applied to the character list data grid view.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void FilterUpdate()
        {
            string filter = "((ItemType = '" + FLGameData.GAMEDATA_BASES + "')";

            filter += ")";

            if (textBox1.Text.Length > 0)
            {
                string filterText = textBox1.Text;
                if (filter != null)
                {
                    filter += " AND ";
                }
                filter += "((IDSName LIKE '%" + FLUtility.EscapeLikeExpressionString(filterText) + "%')";
                filter += " OR (ItemNickName LIKE '%" + FLUtility.EscapeLikeExpressionString(filterText) + "%')";
                filter += " OR (ItemType LIKE '%" + FLUtility.EscapeLikeExpressionString(filterText) + "%'))";
            }
            hashListBindingSource.Filter = filter;
        }