public ComponTransformViewModel()
        {
            _transformModel = new TransformModel();
            _flameColorMode = FlameColorMode.Color;

            Command       = new RelayCommand(CommandHandler);
            GradientModel = new GradientModel(Colors.Gray, Colors.Gray);
            ColorPosition = .5;


            FColor = Colors.Gray;
            Parameter1Visibility = Visibility.Collapsed;
            Parameter2Visibility = Visibility.Collapsed;
            Parameter3Visibility = Visibility.Collapsed;
            Parameter4Visibility = Visibility.Collapsed;

            Variations        = VariationFactoryModel.StaticVariationFactory.VariationNames;
            VariationSelected = "Linear";

            BindStorage.SetActionFor(ActionValueChanged, _propParameters);
            BindStorage.SetActionFor(ActionValueChanged, _propValues2);
            BindStorage.SetActionFor(ActionTransformValueChanged, _propValues);
            BindStorage.SetActionFor(ActionVariationChanged, _propVariation);

            SetCoefficients();
        }
        private void Init()
        {
            CommandCanvasLoaded    = new RelayCommand(CommandCanvasLoadedHandler);
            CommandCanvasMouseDown = new RelayCommand(CommandCanvasMouseDownHandler);
            CommandCanvasMouseUp   = new RelayCommand(CommandCanvasMouseUpHandler);
            CommandCanvasMouseMove = new RelayCommand(CommandCanvasMouseMoveHandler);
            Command = new RelayCommand(CommandHandler);

            _cubeEllipse = new Ellipse
            {
                Width           = 16.0,
                Height          = 16.0,
                Stroke          = Brushes.WhiteSmoke,
                StrokeThickness = 1
            };
            _columnArrows = Application.Current.TryFindResource("ArrowsBox") as Canvas;
            if (_columnArrows != null)
            {
                _columnArrows.Height = 8.0;
            }

            ColorCurrent = new SolidColorBrush(_initialColor);
            RadioH       = true;
            BindStorage.SetActionFor(ActRadio, "RadioH", "RadioS", "RadioV", "RadioR", "RadioG", "RadioB");
            BindStorage.SetActionFor(ActText, "TextH", "TextS", "TextV", "TextR", "TextG", "TextB", "TextHex");
        }
Example #3
0
 public PanelTransformsViewModel()
 {
     Command    = new RelayCommand(Handler);
     Transforms = new ObservableCollection <PanelTransform>();
     ActionFire.AddOrReplace("panel-transform-remove", new Action <int>(HandlerTransformRemove), GetType());
     PanelModel = new PanelModel();
     BindStorage.SetActionFor(HandlerChanged, "Transforms", "Final");
 }
Example #4
0
        public FileViewModel()
        {
            ListItems = new ObservableCollection <string>();

            Command = new RelayCommand(CommandHandler);

            BindStorage.SetActionFor("SelectedItem", ActionSelectedItem);
            BindStorage.SetActionFor("FileName", ActionSelectedItem);

            PreviewBorder1 = new Thickness(0);
            SelectedIndex  = -1;
        }
Example #5
0
        public void Set(RenderSettingsModel renderSettings, Action callback)
        {
            BindStorage.SetActionFor("RenderByQuality", ActionRenderByQuality);

            _renderSettings     = renderSettings;
            ShotsPerIteration   = _renderSettings.ShotsPerIteration * 0.001;
            Iterations          = _renderSettings.Iterations * 0.001;
            RenderPerIterations = _renderSettings.RenderPerIterations;
            RenderColorMode     = new RenderColorModeModel();
            RenderColorMode.SetMode(_renderSettings.RenderColorMode);
            Quality = renderSettings.Quality;
            if (renderSettings.RenderByQuality)
            {
                RenderByQuality = true;
            }
            _callback = callback;
        }