public void Update(Status status)
        {
            if (MainWindow.IsShuttingDown)
            {
                return;
            }
            Dispatcher.Invoke(() => {
                if (!status.Ready)
                {
                    _started = false;
                    MainPanel.Children.Clear();
                    return;
                }

                if (!_started)
                {
                    _started = true;
                    TransformationInfoProvider.GetAllTransformations().ToList().ForEach(pair => {
                        var transformation = pair.Value;
                        if (CreationMode.On)
                        {
                            CreationMode.Transformations.Add(transformation);
                        }
                        MainPanel.Children.Add(new TransformationGrid(transformation));
                    });
                }

                if (!CreationMode.On)
                {
                    TransformationInfoProvider.UpdateTransformations();
                }
            });
        }
        public static void UpdateTransformationsInfo(bool showTransformationImage)
        {
            var updatedTransformationInfo = TransformationInfoProvider.GetTransformationsInfo();

            TransformationInfoProvider.GetAllTransformations().Values.ToList().ForEach(transformation => {
                UpdateTransformationInfo(transformation, showTransformationImage, updatedTransformationInfo);
            });
        }
예제 #3
0
        private void InitTransformations()
        {
            flowLayoutPanel.Controls.Clear();
            showTransformationsToolStripMenuItem.DropDownItems.Clear();
            TransformationViewHelper.InitTransformations();
            if (_currentVersion == null)
            {
                return;
            }

            TransformationInfoProvider.GetAllTransformations().ToList().ForEach(pair => {
                var transformation = pair.Value;
                var cluster        = new ItemCluster(transformation);

                flowLayoutPanel.Controls.Add(cluster.Panel);
                showTransformationsToolStripMenuItem.DropDownItems.Add(cluster.Menu);

                TransformationViewHelper.Add(transformation, cluster);
            });

            TransformationViewHelper.SetInitialValuesFromConfig();

            ItemCluster.UpdateBlockImage(Properties.Settings.Default.BlacklistedItemsIconColor);
        }