Exemplo n.º 1
0
        public LayerManager(Classes.Scene.EditorScene editorScene)
        {
            InitializeComponent();
            CurrentDataContext = new ViewModel();
            EditorScene        = editorScene;

            LayerContextMenu.Foreground  = (SolidColorBrush)FindResource("NormalText");
            LayerContextMenu.Background  = (SolidColorBrush)FindResource("ToolbarBackground");
            LayerContextMenu.BorderBrush = (SolidColorBrush)FindResource("ButtonBorder");

            lbLayers.SelectionChanged          += OversizeTextUpdater;
            lbHorizontalRules.SelectionChanged += OversizeTextUpdater;
            lbMappings.SelectionChanged        += OversizeTextUpdater;
            nudStartLine.ValueChanged          += OversizeTextUpdater;
            nudLineCount.ValueChanged          += OversizeTextUpdater;


            InitDataBindings(EditorScene.AllLayers);
        }
        public ExportAsImageGUI(Classes.Scene.EditorScene _Scene)
        {
            InitializeComponent();
            Scene = _Scene;
            foreach (var layer in _Scene.OtherLayers)
            {
                CheckBox layerCheckbox = new CheckBox()
                {
                    Content = layer.Name
                };
                ExtraLayersSection.Children.Add(layerCheckbox);
            }

            foreach (var obj in _Scene.Entities.SceneObjects)
            {
                CheckBox entityCheckbox = new CheckBox()
                {
                    Content = obj.Name
                };

                RenderableObjects.Items.Add(entityCheckbox);
            }
        }