Esempio n. 1
0
        private void icon_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (SuspendChange > 0)
            {
                return;
            }

            if (e.ChangedButton == MouseButton.Left && e.ClickCount == 2) // double click
            {
                string iconFile = ProgramControl.OpenIconPicker(progSet.GetIcon());
                if (iconFile != null)
                {
                    progSet.config.Icon = iconFile;
                    App.client.UpdateProgram(progSet.guid, progSet.config);

                    string iconStr = progSet.GetIcon();

                    if (ImgFunc.IsImageFileName(iconStr))
                    {
                        iconBG.Background = new SolidColorBrush(Colors.Transparent);
                    }

                    icon.Source = ImgFunc.GetIcon(iconStr, iconBG.Width);
                }
            }
        }
Esempio n. 2
0
        private void icon_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (SuspendChange > 0)
            {
                return;
            }

            if (e.ChangedButton == MouseButton.Left && e.ClickCount == 2) // double click
            {
                string iconFile = ProgramControl.OpenIconPicker(progSet.GetIcon());
                if (iconFile != null)
                {
                    progSet.config.Icon = iconFile;
                    App.client.UpdateProgram(progSet.guid, progSet.config);
                    icon.Source = ImgFunc.GetIcon(progSet.GetIcon(), icon.Width);
                }
            }
        }
Esempio n. 3
0
        private void icon_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (SuspendChange > 0)
            {
                return;
            }

            if (e.ChangedButton == MouseButton.Left && e.ClickCount == 2) // double click
            {
                string iconFile = ProgramControl.OpenIconPicker(item.Icon);
                if (iconFile != null)
                {
                    item.Icon = iconFile;
                    //App.presets.UpdatePreset(preset);
                    icon.Source = ImgFunc.GetIcon(item.Icon, icon.Width);
                }
            }
        }