示例#1
0
 private void LocateAllExportOperators(Project project)
 {
     foreach (Page page in project.Pages)
     {
         foreach (Operator op in page.Operators)
         {
             if (op.GetType() == typeof(ExportOperator) && op.IsProcessable)
             {
                 exportOperators.Add((ExportOperator)op);
             }
         }
     }
 }
示例#2
0
        public ProjectView()
        {
            InitializeComponent();
            verkstanWindow = new Verkstan.Window();
            verkstanWindow.ClearColor = Color.DarkCyan.ToArgb();
            unsafe
            {
                verkstanWindow.Boot(previewPanel.Handle.ToPointer());
            }

            fastRenderTimer.Enabled = true;
            slowRenderTimer.Enabled = true;

            project = new Project();
            Page page = new Page();
            project.OperatorPages.Add(page);
            operatorPageView1.Page = page;
        }
示例#3
0
        private void Export(Project project)
        {
            LocateAllExportOperators(project);
            System.Console.WriteLine("Number of exports == " + exportOperators.Count);
            PopulateIdNormalizerHash();

            foreach (ushort oldId in oldIdToNewId.Keys)
            {
                System.Console.WriteLine("oldId == " + oldId + " is now == " + oldIdToNewId[oldId]);
            }
            
            PopulateFilterDefines();
            PopulateExportDefines();

            AddOperatorFilterTypes();
            AddOperatorProperties();
            AddOperatorConnections();
            AddExports();
        }
示例#4
0
        public BuilderForm()
        {
            InitializeComponent();

            builderWindow = new Verkstan.Window();
            builderWindow.RenderOptions.ClearColor = Color.DarkCyan.ToArgb();
            tileTextureToolStripMenuItem1.Checked = builderWindow.RenderOptions.TextureTiling;
            filterTextureToolStripMenuItem1.Checked = builderWindow.RenderOptions.TextureFiltering;
            shadedMeshToolStripMenuItem1.Checked = builderWindow.RenderOptions.MeshShaded;
            unsafe
            {
                builderWindow.Boot(previewPanel.Handle.ToPointer());
            }

            project = new Project();
            page = new Page();
            project.Pages.Add(page);
            operatorPageView1.Page = page;
        }
示例#5
0
 public void ExportToFile(Project project, String filename)
 {
     Export(project);
     WriteToFile(filename);
 }
示例#6
0
 public void ExportToHeader(Project project, String filename)
 {
     Export(project);
     WriteToHeader(filename, project.Name);
 }
示例#7
0
        private void openProjectFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
            String filename = openProjectFileDialog1.FileName;
            XmlDocument doc = new XmlDocument();
            doc.Load(filename);
            XmlElement rootElement = doc.DocumentElement;

            if (project != null)
            {
                builderWindow.ViewedOperator = null;
                project.Dispose();
            }

            try
            {
                project = new Project();
                project.Filename = filename;
                project.FromXmlElement(rootElement);
                operatorPageView1.Page = project.Pages.First();
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message, "An error occured while loading " + filename);
                project = new Project();
            }
        }
示例#8
0
        private void openFileDialog1_FileOk(object sender, CancelEventArgs e)
        {
            String filename = openFileDialog1.FileName;
            XmlDocument doc = new XmlDocument();
            doc.Load(filename);
            XmlElement rootElement = doc.DocumentElement;

            if (project != null)
            {
                verkstanWindow.ViewedOperator = null;
                project.Dispose();
            }

            project = new Project();
            project.Filename = filename;
            project.FromXmlElement(rootElement);
            operatorPageView1.Page = project.OperatorPages.First();
            transport1.Project = project;
            timelinesView1.Timeline = null;
            timelinesView1.Reset();
            string[] splitted = project.Filename.Split(new Char [] {'\\', '/',});
            Text = "db verkstan 1 - " + splitted[splitted.Count() - 1];
        }
示例#9
0
 private void newMenuItem_Click(object sender, EventArgs e)
 {
     project = new Project();
     Page page = new Page();
     project.OperatorPages.Add(page);
     operatorPageView1.Page = page;
     transport1.Project = project;
     timelinesView1.Timeline = null;
     timelinesView1.Reset();
     Text = "db verkstan 1 - untitled.dbv";
 }