예제 #1
0
        private async Task <bool> ExecuteCodeInternal()
        {
            var    inputImagesCopy = this.inputImages.ToArray();
            string rawCode         = this.textPython.Text;

            this.outputImages.Clear();

            try
            {
                await Task.Run(() =>
                {
                    PythonExecutioner exec = new PythonExecutioner(this.SaveImageCallback);
                    exec.RunRawCode(inputImagesCopy, rawCode);
                });
            }
            catch (Exception ex)
            {
                Dialogs.Error(ex.Message);
                return(false);
            }

            return(true);
        }
        private async Task<bool> ExecuteCodeInternal()
        {
            var inputImagesCopy = this.inputImages.ToArray();
            string rawCode = this.textPython.Text;

            this.outputImages.Clear();

            try
            {
                await Task.Run(() =>
                {
                    PythonExecutioner exec = new PythonExecutioner(this.SaveImageCallback);
                    exec.RunRawCode(inputImagesCopy, rawCode);
                });
            }
            catch (Exception ex)
            {
                Dialogs.Error(ex.Message);
                return false;
            }

            return true;
        }