Beispiel #1
0
        public override IJsonReaderAndDeleter CreateJsonReader()
        {
            var jsonReader = _jsonReader;

            _jsonReader = null;
            return(jsonReader);
        }
Beispiel #2
0
        public PythonScriptRunner(string scriptDirectory, string exeLocation)
        {
            _scriptDirectory  = scriptDirectory;
            _fileToRun        = @"\run_no_gui.py";
            _programArguments = _scriptDirectory + @"\config.txt";
            _exeLocation      = exeLocation;
            _isRunning        = false;
            _jsonDirectory    = _scriptDirectory + @"\json\";
            _jsonReader       = PythonScriptRunnerFactory.Instance.CreateJsonReader();

            // hopefully nobody creates this guy outside of the main thread
            _threadDispatcherOnConstruction = System.Windows.Threading.Dispatcher.CurrentDispatcher;

            // later I want to use c# processes instead of python proceses:
            // branchList = run_cmd(pythonScriptDirectory+"\run_get_branches.py", "");
            // for branchList:
            //      run_cmd(pythonScriptDirectory+"\run_no_gui.py", "branchName");
            // for processList:
            //      if process.processHasFinished:
            //          send back data to parent (the view) that it needs to update that branch's visualisation
        }