コード例 #1
0
        private void IpcGetFileScanned()
        {
            Parser p = new Parser();

            while (true)
            {
                Consts c = new Consts();
                ipc.Connect();
                ipc.Write(c.GetConsts(0x1));
                p.FileScanned(ipc.Read());

                this.Dispatcher.Invoke(() =>
                {
                    if (btn_log_extend.IsVisible == false)
                    {
                        btn_log_extend.Visibility = Visibility.Visible;
                    }

                    ModFileScanned(p.cf.filePath);
                    ModFileScanned(p.cf.filePath);
                    ModTotalScanObjects(p.cs.scans);
                    ModOmitidosObjects(p.cs.omitted);
                });

                ipc.Close();

                Thread.Sleep(100);
            }
        }
コード例 #2
0
        public int CheckDbExists()
        {
            Consts c        = new Consts();
            string rootPath = Environment.CurrentDirectory;
            string dbPath   = rootPath + "\\db\\full." + c.GetConsts(0x2);

            // long length = new System.IO.FileInfo(dbPath).Length;

            return(0x0);
        }
コード例 #3
0
        /**
         * Modify lbl_file_scanned.
         * @param (Solo se chequea el index 0x0) que indica el flag que debe hacer
         * cuando existe scan threads en el engine, 0x2 para llamar a IpcGetFileScanned()
         * 0x1 para llamar a IpcKillScanThreards()
         */
        private void IpcGetScanThreads(object flagDoing)
        {
            Consts c = new Consts();

            if (ipc.IsConnected() == false)
            {
                ipc.Connect();
            }

            ipc.Write(c.GetConsts(0x3));
            string ipcJson = ipc.Read();

            ipc.Close();

            if (ipcJson != null)
            {
                Array a = new object[0x1];
                a = (Array)flagDoing;
                int oneParm = (int)a.GetValue(0);

                Parser      p        = new Parser();
                JsonThreads jThreads = p.ThreadsResponse(ipcJson);

                // Flag what do?
                if (jThreads.master_thread_counter > 0x0)
                {
                    switch (oneParm)
                    {
                    case 0x1:
                        // IpcKillScanThreards();
                        break;

                    case 0x2:
                        IpcGetFileScanned();
                        break;
                    }
                }
            }
        }