public TextureLayout()
        {
            InitializeComponent();

            this.Header = "Texture";
            this.Initialize(mainWindow, null);

            int x, y;

            byte[] imageData = ExternFileLoader.LoadTexture("../../resources/images/logofm3d.png", out x, out y);

            BitmapSource bitmapSource = BitmapSource.Create(x, y, 300, 300, PixelFormats.Bgra32, BitmapPalettes.Gray256, imageData, x * 4);


            Image image = new Image();

            image.Source = bitmapSource;

            SplitPanel      splitPanel = new SplitPanel();
            DockWindowGroup dg         = new DockWindowGroup();

            dg.Items.Add(new DocumentWindows.TextureViewPort(this, image));
            splitPanel.Children.Add(dg);
            DockSite.SetDock(splitPanel, Dock.Right);
            DockSite.SetDockSize(splitPanel, 150);
            this.dockSite.SplitPanels.Add(splitPanel);
            dg.UpdateVisibility();
        }
Example #2
0
        public void startCreateProject(Dock dock, int docksize)
        {
            SplitPanel      splitPanel = new SplitPanel();
            DockWindowGroup dg         = new DockWindowGroup();

            dg.Items.Add(new ToolWindows.TextEditor.TextEditor(this));
            splitPanel.Children.Add(dg);
            DockSite.SetDock(splitPanel, dock);
            DockSite.SetDockSize(splitPanel, docksize);
            this.dockSite.SplitPanels.Add(splitPanel);
            dg.UpdateVisibility();
        }
Example #3
0
        public void OpenTextEditor(object sender, RoutedEventArgs e)
        {
            SplitPanel      splitPanel = new SplitPanel();
            DockWindowGroup dg         = new DockWindowGroup();

            dg.Items.Add(new ToolWindows.TextEditor.TextEditor(this));
            splitPanel.Children.Add(dg);
            DockSite.SetDock(splitPanel, Dock.Right);
            DockSite.SetDockSize(splitPanel, 600);
            this.dockSite.SplitPanels.Add(splitPanel);
            dg.UpdateVisibility();
        }
Example #4
0
        private void startFileBrowser()
        {
            SplitPanel      splitPanel = new SplitPanel();
            DockWindowGroup dg         = new DockWindowGroup();

            dg.Items.Add(this.fileBrowser = new ToolWindows.FileBrowser.View(this));
            splitPanel.Children.Add(dg);
            DockSite.SetDock(splitPanel, Dock.Right);
            DockSite.SetDockSize(splitPanel, 200);
            this.dockSite.SplitPanels.Add(splitPanel);
            dg.UpdateVisibility();
        }
Example #5
0
        public void OpenFileBrowser(object sender, RoutedEventArgs e)
        {
            SplitPanel      splitPanel = new SplitPanel();
            DockWindowGroup dg         = new DockWindowGroup();

            dg.Items.Add(this.fileBrowser = new ToolWindows.FileBrowser.View(this));

            splitPanel.Children.Add(dg);
            DockSite.SetDock(splitPanel, Dock.Left);
            DockSite.SetDockSize(splitPanel, 150);
            this.dockSite.SplitPanels.Add(splitPanel);
            dg.UpdateVisibility();
        }
Example #6
0
        public MeshLayout(DesignerLib.Mesh mesh)
        {
            this.mesh = mesh;
            this.mesh.PropertyChanged += this.OnMeshProperty;
            InitializeComponent();

            this.Header = this.mesh.Name + (this.mesh.IsSaved ? "" : "*");
            this.Initialize(mainWindow, this.dockSite);

            {
                SplitPanel      splitPanel = new SplitPanel();
                DockWindowGroup dg         = new DockWindowGroup();
                dg.Items.Add(partsWin = new PartsWindow(this.mesh));
                splitPanel.Children.Add(dg);
                DockWindowGroup dg2 = new DockWindowGroup();
                dg2.Items.Add(partsPropWin = new PartsPropWindow(this));
                splitPanel.Children.Add(dg2);
                DockSite.SetDock(splitPanel, Dock.Right);
                DockSite.SetDockSize(splitPanel, 300);
                this.dockSite.SplitPanels.Add(splitPanel);
                dg.UpdateVisibility();
                dg2.UpdateVisibility();
            }
            {
                SplitPanel      splitPanel = new SplitPanel();
                DockWindowGroup dg         = new DockWindowGroup();
                dg.Items.Add(verticesWin = new VerticesWindow(this));
                splitPanel.Children.Add(dg);
                DockSite.SetDock(splitPanel, Dock.Left);
                DockSite.SetDockSize(splitPanel, 200);
                this.dockSite.SplitPanels.Add(splitPanel);
                dg.UpdateVisibility();
            }
            {
                SplitPanel      splitPanel = new SplitPanel();
                DockWindowGroup dg         = new DockWindowGroup();
                dg.Items.Add(viewPort = new DocumentWindows.MeshViewPort(this));
                splitPanel.Children.Add(dg);
                this.dockSite.Content = splitPanel;
                dg.UpdateVisibility();
            }

            partsWin.Closed     += OnPartsWinClosed;
            partsPropWin.Closed += OnPartsPropWinClosed;
            verticesWin.Closed  += OnVerticesWinClosed;
            viewPort.Closed     += OnViewPortClosed;
        }
        public SkeletonLayout(DesignerLib.Skeleton skeleton)
        {
            this.skeleton = skeleton;
            InitializeComponent();

            this.Header = this.skeleton.Name + (this.skeleton.IsSaved ? "" : "*");
            this.Initialize(mainWindow, this.dockSite);

            {
                SplitPanel      splitPanel = new SplitPanel();
                DockWindowGroup dg         = new DockWindowGroup();
                dg.Items.Add(bonesWindow = new ToolWindows.Skeleton.BonesWindow(this.skeleton));
                splitPanel.Children.Add(dg);
                DockSite.SetDock(splitPanel, Dock.Top);
                DockSite.SetDockSize(splitPanel, 500);
                this.dockSite.SplitPanels.Add(splitPanel);
                dg.UpdateVisibility();
            }
            //{
            //    SplitPanel splitPanel = new SplitPanel();
            //    DockWindowGroup dg = new DockWindowGroup();
            //    dg.Items.Add(animWindow = new ToolWindows.Skeleton.AnimationsWindow(this.skeleton));
            //    splitPanel.Children.Add(dg);
            //    DockSite.SetDock(splitPanel, Dock.Right);
            //    DockSite.SetDockSize(splitPanel, 200);
            //    this.dockSite.SplitPanels.Add(splitPanel);
            //    dg.UpdateVisibility();
            //}
            //{
            //    SplitPanel splitPanel = new SplitPanel();
            //    DockWindowGroup dg = new DockWindowGroup();
            //    dg.Items.Add(propWindow = new ToolWindows.Skeleton.PropertiesWindow());
            //    splitPanel.Children.Add(dg);
            //    DockSite.SetDock(splitPanel, Dock.Top);
            //    DockSite.SetDockSize(splitPanel, 200);
            //    this.dockSite.SplitPanels.Add(splitPanel);
            //    dg.UpdateVisibility();
            //}

            bonesWindow.Closed += OnBonesWinClosed;
            //animWindow.Closed += OnAnimWinClosed;
            //propWindow.Closed += OnPropWinClosed;
        }