private void SendResultLog(string message)
        {
            if (_backgroundWorker != null)
            {
                var status = new ProgressStatus
                {
                    ProgressMode = "Log",
                    MessageText = message
                };

                _backgroundWorker.ReportProgress(100, status);
            }
            else
            {
                // same UI thread, just show the result directly
                CurrentView.ShowResultLogMessage(message, true);
            }

            // log message tyo log file
            _scripterLog.WriteLn(message, true);
        }
        public void UpdateRegistryProcessedStatus(string mode, int procssedNumber)
        {
            if (_backgroundWorker != null)
            {
                var status = new ProgressStatus
                {
                    ProgressMode = "ProcessedNumber",
                    NumProcessed = procssedNumber,
                    ProcessedText = mode
                };

                _backgroundWorker.ReportProgress(100, status);
            }
        }