private void BTN_UPDATE_HISTORY_Click(object sender, EventArgs e)
        {
            LV_HISTORY.Items.Clear();

            string strPathHistory = config.i08_PATH_HIST_PTRN;

            String[] strArrAllFiles = System.IO.Directory.GetFiles(strPathHistory, "*.*", System.IO.SearchOption.AllDirectories);

            LV_HISTORY.BeginUpdate();

            Array.Reverse(strArrAllFiles);

            for (int i = 0; i < strArrAllFiles.Length; i++)
            {
                string single /****/ = strArrAllFiles.ElementAt(i);
                string strFileName   = Path.GetFileName(single);

                string strDate = single.Replace(config.i08_PATH_HIST_PTRN + "\\", "");
                /*****/ strDate = strDate.Replace(strFileName, "").Replace("\\", "");

                ListViewItem lvi = new ListViewItem();

                int nCount = LV_HISTORY.Items.Count;
                lvi.Text = (nCount + 1).ToString();
                lvi.SubItems.Add(strDate);
                lvi.SubItems.Add(strFileName);

                LV_HISTORY.Items.Add(lvi);
            }

            LV_HISTORY.EndUpdate();
        }
Beispiel #2
0
        private void BTN_UPDATE_HISTORY_Click(object sender, EventArgs e)
        {
            LV_HISTORY.Items.Clear();

            string strPathHistory = config.i02_PATH_DATA_DUMP;

            String[] allfiles = System.IO.Directory.GetFiles(strPathHistory, "*.*", System.IO.SearchOption.AllDirectories);

            LV_HISTORY.BeginUpdate();

            Array.Reverse(allfiles);

            for (int i = 0; i < allfiles.Length; i++)
            {
                string single = allfiles.ElementAt(i);

                string strFileName = Path.GetFileName(single);
                if (strFileName.Contains("$") == true)
                {
                    continue;
                }

                // Get File Name
                strFileName = Computer.GetFileName(strFileName);
                // Get Folder Name
                string strDate = Path.GetDirectoryName(single);
                /****/ strDate = strDate.Replace(config.i02_PATH_DATA_DUMP + "\\", "");


                ListViewItem lvi = new ListViewItem();

                int nCount = LV_HISTORY.Items.Count;
                lvi.Text = (nCount + 1).ToString();
                lvi.SubItems.Add(strDate);
                lvi.SubItems.Add(strFileName);

                LV_HISTORY.Items.Add(lvi);
            }

            LV_HISTORY.EndUpdate();
        }
Beispiel #3
0
        private void BTN_UPDATE_HISTORY_Click(object sender, EventArgs e)
        {
            LV_HISTORY.Items.Clear();
            RICH_HISTORY_MSG.Clear();
            TXT_HISTORY_PREV_RECP.Text = string.Empty;
            TXT_HISTORY_PREV_IMAGE.Text = string.Empty;


            string strPathHistory = m_fm.param_path.i07_PATH_HIST_MEASURE;
            String[] arrAllFiles = System.IO.Directory.GetFiles(strPathHistory, "*.*", System.IO.SearchOption.AllDirectories);

            LV_HISTORY.BeginUpdate();

            Array.Reverse(arrAllFiles);

            for (int i = 0; i < arrAllFiles.Length; i++)
            {
                string single = arrAllFiles.ElementAt(i);

                string strFileName = Path.GetFileName(single);

                if (Path.GetExtension(strFileName).ToUpper() == ".XML") continue;
                if (Path.GetExtension(strFileName).ToUpper() == ".TXT") continue;

                string strDate = single.Replace(m_fm.param_path.i07_PATH_HIST_MEASURE + "\\", "");
                /*****/strDate = strDate.Replace(strFileName, "").Replace("\\", "");

                ListViewItem lvi = new ListViewItem();

                int nCount = LV_HISTORY.Items.Count;
                lvi.Text = (nCount + 1).ToString();
                lvi.SubItems.Add(strDate);
                lvi.SubItems.Add(strFileName);

                LV_HISTORY.Items.Add(lvi);
            }

            LV_HISTORY.EndUpdate();
        }