/// <summary>
        /// Update the filter applied to the character list data grid view.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void TimerFilterUpdate(object sender, EventArgs e)
        {
            timerFilter.Stop();
            string filter = "";

            if (textBoxFilter.Text.Length > 2)
            {
                string filterText = textBoxFilter.Text;
                if (filter != "")
                {
                    filter += " AND ";
                }
                filter += "((AccID = '" + FLUtility.EscapeEqualsExpressionString(filterText) + "') " +
                          " OR (AccDir = '" + FLUtility.EscapeLikeExpressionString(filterText) + "') " +
                          " OR (BanReason LIKE '%" + FLUtility.EscapeLikeExpressionString(filterText) + "%'))";
            }

            if (checkBoxShowExpiredBans.Checked)
            {
                if (filter != "")
                {
                    filter += " AND ";
                }
                filter += "(BanEnd < #" + String.Format("{0:s}", DateTime.Now.ToUniversalTime()) + "#)";
            }

            banListBindingSource.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 filterBase = "(ItemType = '" + FLGameData.GAMEDATA_BASES + "')";

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

            string filterSystem = "(ItemType = '" + FLGameData.GAMEDATA_SYSTEMS + "')";

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

            hashListBindingSource1.Filter = filterSystem;
        }
Exemplo n.º 3
0
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            string filterText = FLUtility.EscapeLikeExpressionString(textBox1.Text);

            if (filterText == "")
            {
                generalStatisticsTableBindingSource.Filter = null;
                return;
            }
            string expr = "(Description LIKE '%" + filterText + "%')";

            generalStatisticsTableBindingSource.Filter = expr;
        }
Exemplo n.º 4
0
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            string filterText = FLUtility.EscapeLikeExpressionString(textBoxSearch.Text);

            if (filterText == "")
            {
                infocardsBindingSource.Filter = null;
                return;
            }
            string expr = "(desc LIKE '%" + filterText + "%')";

            expr += " OR (text LIKE '%" + filterText + "%')";
            infocardsBindingSource.Filter = expr;
        }
        /// <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 = "(";

            if (defaultGameDataType.Length > 0)
            {
                filter += "(ItemType = '" + defaultGameDataType + "')";
            }
            if (checkBoxShowAllTypes.Checked || defaultGameDataType.Length == 0)
            {
                if (filter.Length > 1)
                {
                    filter += " OR ";
                }
                filter += "(ItemType = '" + FLGameData.GAMEDATA_GUNS + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_TURRETS + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_MINES + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_PROJECTILES + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_SHIELDS + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_THRUSTERS + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_CM + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_CLOAK + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_LIGHTS + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_MISC + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_SCANNERS + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_TRACTORS + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_ENGINES + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_ARMOR + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_FX + "') OR ";
                filter += "(ItemType = '" + FLGameData.GAMEDATA_POWERGEN + "')";
            }
            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) + "%'))";
            }
            if (filter.Length > 2)
            {
                hashListBindingSource.Filter = filter;
            }
        }
Exemplo n.º 6
0
        private void textBox1_TextChanged(object sender, EventArgs e)
        {
            string filterText = FLUtility.EscapeLikeExpressionString(textBox1.Text);

            if (filterText == "")
            {
                gameDataTableBindingSource.Filter = null;
                return;
            }
            string expr = "(itemInfo LIKE '%" + filterText + "%')";

            expr += " OR (itemKeys LIKE '%" + filterText + "%')";
            expr += " OR (itemGameDataType LIKE '%" + filterText + "%')";
            expr += " OR (itemNickname LIKE '%" + filterText + "%')";
            gameDataTableBindingSource.Filter = expr;
        }
Exemplo n.º 7
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()
        {
            // gameDataTableBindingSource.Filter
            string filter = "(ItemType = '" + FLGameData.GAMEDATA_SHIPS + "')";

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

            hashListBindingSource.Filter = filter;
        }
        private void timer1_Tick(object sender, EventArgs e)
        {
            string filterText = FLUtility.EscapeLikeExpressionString(textBox1.Text);

            if (filterText == "")
            {
                hashListBindingSource.Filter = null;
                return;
            }
            string expr = "(ItemType = '%" + filterText + "%')";

            expr += " OR (ItemNickName LIKE '%" + filterText + "%')";
            expr += " OR (IDSName LIKE '%" + filterText + "%')";
            expr += " OR (IDSInfo LIKE '%" + filterText + "%')";
            expr += " OR (IDSInfo1 LIKE '%" + filterText + "%')";
            expr += " OR (IDSInfo2 LIKE '%" + filterText + "%')";
            expr += " OR (IDSInfo3 LIKE '%" + filterText + "%')";
            expr += " OR (ItemKeys LIKE '%" + filterText + "%')";
            hashListBindingSource.Filter = expr;
        }
Exemplo n.º 9
0
        /// <summary>
        /// Generate from the results dataset for the specified charNameFilter
        /// </summary>
        void GenerateActivityReport(UIDataSet results, string charNameFilter, string title, UIDataSet summaryFactions, DateTime date, bool showChangedOnlineTimeOnly)
        {
            string[] colTitles = new string[] { "Name", "Last On Line", "On Line Time" };
            string[] colNames  = new string[] { "Name", "LastOnLine", "OnLineTime" };

            // Prepare the filepath to save the HTML.
            string escapedFactionName = Regex.Replace(charNameFilter, @"[?:\\/*""<>|]", "");
            string filePath           = String.Format("{0}\\activity_{1}.html", AppSettings.Default.setStatisticsDir, escapedFactionName);

            if (date > DateTime.MinValue)
            {
                filePath = String.Format("{0}\\activity_{1:yyyyMMdd}.html", AppSettings.Default.setStatisticsDir, date);
            }

            // Filter and sort the results table.
            string query = "(Name LIKE '" + FLUtility.EscapeLikeExpressionString(charNameFilter) + "%'" +
                           " OR Name LIKE '%" + FLUtility.EscapeLikeExpressionString(charNameFilter) + "')";

            if (showChangedOnlineTimeOnly)
            {
                query += " AND OnLineSecs > 0";
            }
            DataRow[] rows = results.StatPlayer.Select(query, "OnLineTime DESC");

            // Save it.
            SaveAsHTML(filePath, title, rows, colTitles, colNames, 0, rows.Length);

            // Update faction activity summary table to generate the index table later.
            string linkName = HtmlEncode(filePath.Substring(AppSettings.Default.setStatisticsDir.Length + 1));

            linkName = String.Format("<a href=\"{0}\">{1}</a>", HtmlEncode(linkName), HtmlEncode(linkName));
            TimeSpan totalOnLineTime = TimeSpan.Zero;

            foreach (UIDataSet.StatPlayerRow row in (UIDataSet.StatPlayerRow[])rows)
            {
                totalOnLineTime += row.OnLineTime;
            }
            summaryFactions.StatPlayer.AddStatPlayerRow(linkName, totalOnLineTime, 0, 0, DateTime.Now, (int)totalOnLineTime.TotalSeconds);
        }
Exemplo n.º 10
0
        private void buttonSearch_Click(object sender, EventArgs e)
        {
            label2.Text = "Matching Accounts - Searching";

            string loginid = FLUtility.EscapeLikeExpressionString(textBox1.Text);

            dataAccess.GetLoginIDListByLoginID(damDataSet.LoginIDList, loginid);

            if (checkBoxOnlyNewest.Checked)
            {
                for (int i = 0; i < damDataSet.LoginIDList.Count; i++)
                {
                    DamDataSet.LoginIDListRow row = damDataSet.LoginIDList[i];
                    if (dataAccess.GetLatestLoginIDRowByAccDir(row.AccDir).LoginID != row.LoginID)
                    {
                        damDataSet.LoginIDList.RemoveLoginIDListRow(row);
                        i--;
                    }
                }
            }

            label2.Text = "Matching Accounts";
        }
Exemplo n.º 11
0
 private void buttonSearch_Click(object sender, EventArgs e)
 {
     label2.Text = "Matching Accounts - Searching";
     dataAccess.GetIPListByIP(damDataSet.IPList, FLUtility.EscapeLikeExpressionString(textBox1.Text));
     label2.Text = "Matching Accounts";
 }