예제 #1
0
        private void findWhatButton_Click(object sender, EventArgs e)
        {
            if (searchWhatTextBox.Text.Length != 0)
            {
                DataLogSearchForm.GetInstance().searchLogListBox.Items.Clear();
                if (DataLogSearchForm.GetInstance().Visible == false)
                {
                    DataLogSearchForm.GetInstance().Show(this);
                }
                else
                {
                    DataLogSearchForm.GetInstance().Activate();
                }

                List <string> strLogArray = new List <string>();

                foreach (string log in strLogRawArray)
                {
                    if (log.Contains(searchWhatTextBox.Text) == true)
                    {
                        strLogArray.Add(log);
                    }
                }

                DataLogSearchForm.GetInstance().searchLogListBox.Items.AddRange(strLogArray.ToArray());
            }
            else
            {
                MessageBox.Show(this, "The input string is empty!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
예제 #2
0
 public static DataLogSearchForm GetInstance()
 {
     if (singlaton == null)
     {
         singlaton = new DataLogSearchForm();
     }
     return(singlaton);
 }
예제 #3
0
 private void DataLogSearchForm_FormClosed(object sender, FormClosedEventArgs e)
 {
     singlaton = null;
 }
예제 #4
0
 private void closeButton_Click(object sender, EventArgs e)
 {
     this.Close();
     this.Dispose();
     singlaton = null;
 }