public ShaderProperties( ) { InitializeComponent( ); using (_cache = CacheStream.Open(Path.Combine(Local.MapsDirectory, "ascension.map"))) { dockPanel1.Theme = new VS2013BlueTheme( ); var asmEditor = new AsmEditor("Test.glsl"); var tagList = new TagList( ); var shaderPropertyGrid = new ShaderPropertyGrid( ); tagList.Load(_cache.Index.Where(TagClass.Vrtx).ToList( )); tagList.NodeMouseClick += (TreeNodeMouseClickEventHandler) delegate(object sender, TreeNodeMouseClickEventArgs e) { var node = e.Node as TagTreeNode; if (node != null) { using (var cache = CacheStream.Open(Path.Combine(Local.MapsDirectory, "ascension.map")) ) { shaderPropertyGrid.DisplayVertexConstants(node.Info, cache); DisplayVertexInstructions(node.Info, cache); } } }; asmEditor.Show(dockPanel1, DockState.Document); tagList.Show(dockPanel1, DockState.DockRight); shaderPropertyGrid.Show(dockPanel1, DockState.DockLeft); } }
public MainForm( ) { InitializeComponent( ); dockPanel1.Theme = new VS2013BlueTheme( ); var fileName = Path.Combine(Local.MapsDirectory, "05b_deltatowers.nomap"); CacheKey key; var directory = Path.GetDirectoryName(fileName); if (directory != null) { var maps = Directory.GetFiles(directory, "*.map", SearchOption.TopDirectoryOnly); var resourceMaps = maps.GroupBy( Halo2.CheckMapType ).Where(x => x.Key == MapType.Shared || x.Key == MapType.MainMenu || x.Key == MapType.SinglePlayerShared) .Select(g => g.First()).ToList(); resourceMaps.ForEach(x => Solution.Index.AddCache(CacheStream.Open(x))); } Solution.Index.AddCache(CacheStream.Open(fileName)); _cacheStream = CacheStream.Open(fileName); dockPanel1.DockBottomPortion = 350f; _sceneView = new SceneView( ); _moonfxshExplorerForm = new MoonfxshExplorer(); _sceneView.SceneInitialized += delegate { _moonfxshExplorerForm.LoadTags(_cacheStream.ToArray()); Solution.SetScenario(( ScenarioBlock )_cacheStream.Index.ScenarioIdent.Get(_cacheStream.GetKey( ))); _sceneView.Scene.OnFrameReady += delegate { this.Text = $@"{1/_sceneView.SceneClock.frameTime :#.###} Update:{ _sceneView.SceneClock.updateTime}"; }; }; _moonfxshExplorerForm.TagItemDoubleClick += (sender, reference) => EditTag(reference); _sceneView.Show(dockPanel1, DockState.Document); _moonfxshExplorerForm.Show(dockPanel1, DockState.DockBottom); }
public DatumViewer( ) { InitializeComponent( ); _cacheStream = CacheStream.Open(Path.Combine(Local.MapsDirectory, "headlong.map")); var objectListView = new TagDatumView( ); var guerillaPropertyView = new GuerillaBlockPropertyViewer( ); objectListView.LoadTagDatums(_cacheStream.Index); objectListView.NodeMouseDoubleClick += (sender, args) => { if (objectListView.SelectedNode != null && objectListView.SelectedNode.Tag is TagDatum) { var guerillaBlock = _cacheStream.Deserialize((( TagDatum )objectListView.SelectedNode.Tag).Identifier); guerillaPropertyView.LoadGuerillaBlocks(guerillaBlock); } }; guerillaPropertyView.Show(dockPanel1, DockState.Document); objectListView.Show(dockPanel1, DockState.DockLeft); }
private static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var _cacheStream = CacheStream.Open(Path.Combine(Local.MapsDirectory, "ascension.map")); }