Beispiel #1
0
        private void clangeBlacklisteIconColorToolStripMenuItem_Click(object sender, EventArgs e)
        {
            var colorDialog = new KttColorDialog()
            {
                Color = Properties.Settings.Default.BlacklistedItemsIconColor,
                PreviewColorChangedListener = color => {
                    Invoke((MethodInvoker)(() => {
                        ItemCluster.UpdateBlockImage(color);
                        Refresh();
                    }));
                }
            };

            if (colorDialog.ShowDialog() == DialogResult.OK)
            {
                Properties.Settings.Default.BlacklistedItemsIconColor = colorDialog.Color;
                Properties.Settings.Default.Save();
            }
            ItemCluster.UpdateBlockImage(colorDialog.Color);
            Refresh();
        }
Beispiel #2
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);
        }
 public static void Add(Transformation transformation, ItemCluster cluster)
 {
     Clusters.Add(transformation.Name, cluster);
 }