Example #1
0
        private void onFinishCounting()
        {
            isRunning = false;
            // Пройденное время
            watch.Stop();


            btnStart.BackColor    = Color.LightGreen;
            txtWorkingDir.Enabled = true;
            btnBrowse.Enabled     = true;
            btnStart.Text         = "Старт";
            prbStatus.Visible     = false;
            lblStatus.Text        = "Работа выполнена за " + watch.Elapsed.TotalSeconds.ToString("F") + "сек.";

            // Refresh history list
            myCtrlHistory.loadHistory();

            // Время сейчас
            DateTime dtTo   = DateTime.Now;
            DateTime dtFrom = dtTo.Subtract(watch.Elapsed);

            Utils.history = DbHelper.GetHistory(dtFrom.ToString("yyyy-MM-dd HH:mm:ss"), dtTo.ToString("yyyy-MM-dd HH:mm:ss"));
            if (Utils.history != null && Utils.StgGetBool("ShowResultsImmediately"))
            {
                FrmTotalDetails frmTotalDetails = new FrmTotalDetails();
                frmTotalDetails.Show();
            }
        }
Example #2
0
 public FrmSettings()
 {
     InitializeComponent();
     comboBox1.Items.Add("Автоопределение");
     foreach (var enc in System.Text.Encoding.GetEncodings())
     {
         comboBox1.Items.Add(enc.Name);
     }
     comboBox2.SelectedIndex = Utils.StgGetInt("ExStyle");
     checkBox1.Checked       = Utils.StgGetBool("ShowResultsImmediately");
 }
Example #3
0
        public FrmMain()
        {
            /*  ANNOTATION
             *  The software should be able to read pdf,doc,txt and odf
             *  The software should take all files in the input folder and read them one at a time
             *  The software should prepare lists of words with their frequencie
             *  The software should be awesome
             *
             *  TODO:
             *  1.v  Import doc, docx reader library
             *  2.v  Import pdf reader library
             *  3.v  Import odf reader library
             *  4.v  Create functions for each supporting format
             *  5.v  Create open file dialog to show the location of files
             *  6.v  List the files filtering the extension
             *  7.v  Take a file, read all of its contents
             *  8.v  Scan through file and create a list of frequencies for each file
             *  9.v  Sum-up the frequency files
             *  10.v  Percentage
             *  11.v  Percentage in export and in selection
             *  12.v  Общая частотность
             *  13.v  Add date from and date to, to SELECT for all history requests
             *  14.v  Окно со статистикой сразу после Начать
             *  15.v  Excel выгружать числа как числа а не текст!
             *  16.v  Статистика по слову
             *  17.   Import DB
             *  18.   Read line by line
             *  19.   Embed a log
             */

            InitializeComponent();

            // Load settings
            if (Utils.StgGetString("WorkingDir") == "")
            {
                Utils.WorkDirPath = Environment.CurrentDirectory;
            }
            else
            {
                Utils.WorkDirPath = Utils.StgGetString("WorkingDir");
            }

            Utils.StgSet("TxtCodepage", Convert.ToInt32(Properties.Settings.Default["TxtCodepage"]));
            chkSubdirectories.Checked = Utils.StgGetBool("ChkSubdirectories");
        }