Пример #1
0
        private void ButtonSync_Click(object sender, EventArgs e)
        {
            if (CheckRequiredField())
            {
                if (listBoxLogs.Items.Count > 0)
                {
                    listBoxLogs.Items.Clear();
                }

                ClearFields();

                Cursor.Current = Cursors.WaitCursor;
                UtilityClass newUtility  = new UtilityClass();
                SearchObject InputObject = new SearchObject();
                Logs = new List <LogObject>();
                InputObject.LogName     = comboBoxLogs.Text;
                InputObject.LogComputer = comboBoxInstance.Text;
                InputObject.LogSource   = systemSource;

                if (checkBoxFilter.Checked)
                {
                    InputObject.StartTime = dateTimePickerStart.Value;
                    InputObject.EndTime   = dateTimePickerEnd.Value;

                    InputObject.Teller      = textBoxTeller.Text;
                    InputObject.Transaction = textBoxTransaction.Text;
                    InputObject.Branch      = textBoxBranch.Text;
                }
                else
                {
                    InputObject.StartTime = DateTime.MinValue;
                    InputObject.EndTime   = DateTime.MaxValue;
                }
                GetLogs(InputObject);
                //LoadLogs();
                Cursor.Current = Cursors.Default;
            }
            else
            {
                MessageBox.Show("Please enter the required field values", "Event Visualizer");
            }
        }
Пример #2
0
        private void ListBoxLogs_SelectedIndexChanged(object sender, EventArgs e)
        {
            int selectedIndex = listBoxLogs.SelectedIndex;

            rxXMLDoc = new XmlDocument();
            UtilityClass newClass = new UtilityClass();

            if (Logs[selectedIndex].LogLevel == System.Diagnostics.EventLogEntryType.Information)
            {
                textBoxTextView.Text = Logs[selectedIndex].LogDetails.Message;
                rxXMLDoc             = newClass.GetFormattedOutput(Logs[selectedIndex].LogDetails.Message, Logs[selectedIndex].LogDetails.Transaction, labelPath.Text, Logs[selectedIndex]);
                string formattedOutput = newClass.Beautify(rxXMLDoc);
                textBoxOutput.Text = formattedOutput;
                toolStripStatusLabelTransactionNumber.Text = "Transaction Number: " + Logs[selectedIndex].LogDetails.Transaction + "  | Date Time: " + Logs[selectedIndex].LogTime;
            }

            if (Logs[selectedIndex].LogLevel == System.Diagnostics.EventLogEntryType.Error)
            {
                textBoxTextView.Text = Logs[selectedIndex].LogMessage;
                textBoxOutput.Text   = Logs[selectedIndex].LogMessage;
                toolStripStatusLabelTransactionNumber.Text = "Error Occured | Date Time: " + Logs[selectedIndex].LogTime;
            }
        }
Пример #3
0
        private void ComboBoxSystem_SelectedIndexChanged(object sender, EventArgs e)
        {
            UtilityClass newClass = new UtilityClass();

            systemSource = newClass.GetSystemSource(comboBoxSystem.Text);
        }