private void CreatePngSave() { if (File.Exists(pngsave_file)) { pngsave = PngSave.Load(pngsave_file); pngsave.UpdateID(); } else { pngsave = new PngSave(); } pngSaveItemBindingSource.DataSource = pngsave.items; int position = 0; foreach (PngSaveItem item in pngsave.items) { pngSaveItemBindingSource.Position = position; viewer.LoadAnyFile(Path.Combine(save_path, item.File), true); Animate(item); position++; } if (pngSaveItemBindingSource.Count == 0) { CreatePngSaveItem("system.tdcgsav.png"); } pngSaveItemBindingSource.Position = 0; }
public Form1(TSOConfig tso_config, string[] args) { InitializeComponent(); this.ClientSize = tso_config.ClientSize; this.SetStyle(ControlStyles.AllPaintingInWmPaint | ControlStyles.Opaque, true); save_path = tso_config.SavePath; pose_path = tso_config.PosePath; viewer = new CCDViewer(); if (viewer.InitializeApplication(this)) { viewer.LoadAnyFile(Path.Combine(save_path, @"system.tdcgsav.png"), true); viewer.Camera.SetTranslation(0.0f, +10.0f, +44.0f); } this.tso_config = tso_config; }