Beispiel #1
0
        public FormProgress(ProgressComposer progressComposer, Action startAction, Action finishAction)
        {
            InitializeComponent();

            _progress               = progressComposer;
            _startAction            = startAction;
            _finishAction           = finishAction;
            _progressEvents         = new List <ProgressEventArgs>();
            _filteredProgressEvents = new List <ProgressEventArgs>();

            buttonFilter.Enabled = false;

            if (ReferenceEquals(_startAction, null) == false)
            {
                //  DispatcherTimer setup
                _dispatcherTimer          = new DispatcherTimer();
                _dispatcherTimer.Tick    += dispatcherTimer_Tick;
                _dispatcherTimer.Interval = new TimeSpan(0, 0, 2);
            }
            else
            {
                _dispatcherTimer = null;
            }

            StartOperation();
        }
Beispiel #2
0
        public static GMacCodeBlock Process(GMacMacro baseMacro, ProgressComposer progress)
        {
            var optimizer = new TcbOptimizer(baseMacro);

            optimizer.BeginProcessing();

            return(optimizer.CodeBlock);
        }
Beispiel #3
0
        public static GMacCodeBlock Process(LlGenerator generator, ProgressComposer progress)
        {
            var optimizer = new TcbOptimizer(generator)
            {
                EnableTestEvaluation = false
            };

            optimizer.BeginProcessing();

            return(optimizer.CodeBlock);
        }
Beispiel #4
0
        static GMacSystemUtils()
        {
            Version = "Version " +
                      Application
                      .ProductVersion
                      .Split(new[] { '.' }, StringSplitOptions.RemoveEmptyEntries)
                      .Take(3)
                      .Concatenate(".");

            Progress = new ProgressComposer();

            InitializeSettings();
        }
Beispiel #5
0
 public LanguageCompilationLog(ISourceCodeUnitsContainer project, ProgressComposer progressComposer)
 {
     Project  = project;
     Progress = progressComposer;
 }
Beispiel #6
0
        public static GMacCodeBlock Process(LlGenerator generator, Dictionary <string, GMacMacroParameterBinding> inputsWithTestValues, bool fixOutputsOrder, ProgressComposer progress)
        {
            var optimizer = new TcbOptimizer(generator)
            {
                FixOutputComputationsOrder = fixOutputsOrder,
                EnableTestEvaluation       = inputsWithTestValues.Count > 0,
                _inputsWithTestValues      = inputsWithTestValues
            };

            optimizer.BeginProcessing();

            return(optimizer.CodeBlock);
        }
Beispiel #7
0
 public static void SetProgress(ProgressComposer progress)
 {
     Progress = progress;
 }
Beispiel #8
0
 public FormProgress(ProgressComposer progressComposer)
     : this(progressComposer, null, null)
 {
 }