public static LogData Process()
        {
            if (MainConfig.Instance.SelectedAccount == null)
            {
                MessageBox.Show("No selected account!");
                return(null);
            }
            if (string.IsNullOrEmpty(MainConfig.Instance.SelectedAccount.Name))
            {
                MessageBox.Show("No selected account!");
                return(null);
            }



            //string logFileName = CohLogPathManagement.GetLogFileName();
            //string path = Path.Combine(MainConfig.Instance.SelectedAccount.LogFileFolder, logFileName);
            string path = CohLogPathManagement.GetCurrentLogFilePath();

            if (!File.Exists(path))
            {
                MessageBox.Show("Log file is not found!");
                return(null);
            }

            //if (!ValidateIsHomecoming(path))
            //{
            //    MessageBox.Show("HOMECOMING validation failed!");
            //    return null;
            //}



            LogData data = FetchData(path);

            if (data == null)
            {
                MessageBox.Show("File content is not valid!");
                return(null);
            }


            ProcessContent(data);

            return(data);
        }
Beispiel #2
0
 private void bSelectAccount_Click(object sender, EventArgs e)
 {
     CohLogPathManagement.Process();
     this.LoadUI();
 }
Beispiel #3
0
 private void bBrowseLogFile_Click(object sender, EventArgs e)
 {
     CohLogPathManagement.FetchLogFilePath();
     this.LoadUI();
 }