コード例 #1
0
        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();
        }
コード例 #2
0
ファイル: StartTools.cs プロジェクト: Divirad/FM3D-Engine
        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();
        }
コード例 #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();
        }
コード例 #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();
        }
コード例 #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();
        }
コード例 #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;
        }
コード例 #7
0
        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;
        }