Example #1
0
 public Form1()
 {
     this.commandsFileCharged = false;
     this.logsFileCharged = false;
     this.dbStatistics = ChargeData.getInstance().getDbStatistics();
     this.InitializeComponentCustom();
 }
Example #2
0
        private void refreshDbInfo(ProcessResult result)
        {
            if (result != null)
            {
                this.dbStatistics = result.DbStatistics;
            }

            Image redData = global::LogsAnalyzerPFC.Properties.Resources.bat_roja;
            Image greenData = global::LogsAnalyzerPFC.Properties.Resources.bat_verde;

            Image redConnection = global::LogsAnalyzerPFC.Properties.Resources.database_fail;
            Image greenConnection = global::LogsAnalyzerPFC.Properties.Resources.database_ok;

            this.picCommands.Image = this.dbStatistics.BaseCommands > 0 ? greenData : redData;
            this.picLogs.Image = this.dbStatistics.UsedCommands > 0 ? greenData : redData;
            this.picBBDD.Image = this.dbStatistics.Connection ? greenConnection : redConnection;

            this.lblVennLeft.Text = (this.dbStatistics.BaseCommands - this.dbStatistics.CommonCommands).ToString();
            this.lblVennCommon.Text = this.dbStatistics.CommonCommands.ToString();
            this.lblVennRight.Text = (this.dbStatistics.UsedCommands - this.dbStatistics.CommonCommands).ToString();
            this.panel1.Visible = this.dbStatistics.BaseCommands > 0;
        }
Example #3
0
        public Statistics getDbStatistics()
        {
            Statistics stat = new Statistics();

            if (stat.Connection = this.checkConnection())
            {
                if ((stat.BaseCommands = this.getBaseCommandsNumber()) > 0)
                {
                    stat.UsedCommands = this.getUsedCommandsNumber();
                    stat.CommonCommands = this.getCommonCommandsNumber();
                }
            }
            return stat;
        }