예제 #1
0
        public void ShowColorEditorViewViewer(IColorSchemeManager colorSchemeManager, IAliasMapping aliasMapping)
        {
            var view      = new ColorEditorView();
            var viewModel = new ColorEditorViewModel(colorSchemeManager, aliasMapping);

            view.Owner                 = _mainWindow;
            view.DataContext           = viewModel;
            view.WindowStartupLocation = WindowStartupLocation.CenterOwner;
            //view.SizeToContent = SizeToContent.WidthAndHeight;
            //view.ResizeMode = ResizeMode.NoResize;
            view.ShowDialog();
        }
예제 #2
0
        public ColorEditor()
        {
            InitializeComponent();

            ColorEditorViewModel = new ColorEditorViewModel();

            DataContext = ColorEditorViewModel;

            MakeHexTextBoxOverType();

            RefreshPalette(0);
        }
예제 #3
0
        public ColorNodeViewModel()
        {
            this.Name = "Color";

            ColorEditorViewModel editor = new ColorEditorViewModel();

            ColorOutput.Name       = "Color";
            ColorOutput.Editor     = editor;
            ColorOutput.ReturnType = typeof(Vec3);
            ColorOutput.Value      = editor.ValueChanged;
            this.Outputs.Add(ColorOutput);
        }
예제 #4
0
        public ColorNodeViewModel()
        {
            this.Name     = "Color";
            this.Category = NodeCategory.Misc;
            LoadIcon();

            ColorEditorViewModel editor = new ColorEditorViewModel();

            ColorOutput.Editor     = editor;
            ColorOutput.ReturnType = typeof(Vec3);
            ColorOutput.Value      = editor.ValueChanged;
            this.Outputs.Add(ColorOutput);
        }
 public ColorEditor()
 {
     InitializeComponent();
     RootGrid.DataContext = _viewModel = new ColorEditorViewModel();
 }