private void loadCoToolStripMenuItem_Click(object sender, System.EventArgs e) { openFileDialog1.FileName = ""; string initDir = openFileDialog1.InitialDirectory; if (!initDir.ToLower().Contains(@"data\menu\costume")) { if (rootPath != null) { openFileDialog1.InitialDirectory = rootPath + @"menu\Costume"; } else { openFileDialog1.InitialDirectory = @"C:\game\data\menu\Costume"; } } if (fxLauncher != null) { this.CostumeSplitContainer.Panel1.Controls.Remove(this.fxLauncher); this.fxLauncher.Dispose(); this.fxLauncher = null; } DialogResult dR = openFileDialog1.ShowDialog(); if (dR == DialogResult.OK) { currentLoadedFileName = openFileDialog1.FileName; this.CostumeSplitContainer.Panel2.Controls.Clear(); this.openFileDialog1.InitialDirectory = Path.GetDirectoryName(this.openFileDialog1.FileName); if (cEditor != null) { cEditor.Dispose(); cEditor = null; } cEditor = new COH_CostumeUpdater.costume.CostumeEditor(this.openFileDialog1.FileName, ref this.logTxBx); cEditor.Dock = DockStyle.Fill; this.CostumeSplitContainer.Panel2.Controls.Add(cEditor); loadedObject = "CostumeFile"; this.tabPage1.Text = "Costume File"; this.Text = "CostumeFile Editor: " + openFileDialog1.FileName; registerUser("CostumeEditor", openFileDialog1.FileName); fileSaved = false; } }
private void loadAssetsTrick(string file_name) { if (cEditor != null) { cEditor.Dispose(); cEditor = null; } if (fxLauncher != null && !fxLauncher.fileType.ToLower().Equals("txt")) { this.CostumeSplitContainer.Panel1.Controls.Remove(this.fxLauncher); this.fxLauncher.Dispose(); this.fxLauncher = null; } if (fxLauncher == null) { this.fxLauncher = new FxLauncher.FXLauncherForm(@"C:\Cryptic\scratch\assetsTFX.txt", @"C:\Cryptic\scratch\myFavoriteAssetsFiles.txt", "txt", rootPath); fxLauncher.Dock = DockStyle.Fill; this.CostumeSplitContainer.Panel1.Controls.Add(this.fxLauncher); } this.CostumeSplitContainer.SuspendLayout(); this.SuspendLayout(); if (this.CostumeSplitContainer.Panel2.Controls.Count > 0) { this.CostumeSplitContainer.Panel2.Controls[0].Dispose(); } this.CostumeSplitContainer.Panel2.Controls.Clear(); this.tabPage1.Text = "Asset Tricks File"; this.Text = "Asset Tricks Editor: " + file_name; assetEditor.AssetTricks at = new COH_CostumeUpdater.assetEditor.AssetTricks(file_name, ref this.logTxBx, this.openFileDialog1); at.Dock = DockStyle.Fill; this.CostumeSplitContainer.Panel2.Controls.Add(at); this.CostumeSplitContainer.ResumeLayout(false); this.ResumeLayout(false); loadedObject = "assetsTrick"; fxLauncher.selectFxFile(file_name); currentLoadedFileName = file_name; registerUser("AssetsEditor", file_name); }
private void loadRegionCTM_MenuItem_Click(object sender, EventArgs e) { if (!this.openFileDialog1.InitialDirectory.ToLower().Contains(@"data\menu\Costume".ToLower())) { if (rootPath != null) { openFileDialog1.InitialDirectory = rootPath + @"menu\Costume"; } else { openFileDialog1.InitialDirectory = @"C:\game\data\fx"; } //this.openFileDialog1.InitialDirectory = @"C:\game\data\menu\Costume"; } if (fxLauncher != null) { this.CostumeSplitContainer.Panel1.Controls.Remove(this.fxLauncher); this.fxLauncher.Dispose(); this.fxLauncher = null; } openFileDialog1.FileName = "Regions.ctm"; DialogResult dR = openFileDialog1.ShowDialog(); if (dR == DialogResult.OK) { currentLoadedFileName = openFileDialog1.FileName; this.openFileDialog1.InitialDirectory = Path.GetDirectoryName(this.openFileDialog1.FileName); auras.AurasPropagator aProp = new COH_CostumeUpdater.auras.AurasPropagator(this.openFileDialog1.FileName, ref this.logTxBx); aProp.Dock = DockStyle.Fill; this.CostumeSplitContainer.SuspendLayout(); this.CostumeSplitContainer.Panel2.Controls.Clear(); this.CostumeSplitContainer.Panel2.Controls.Add(aProp); this.CostumeSplitContainer.Panel2.ResumeLayout(false); loadedObject = "RegionsCTM"; this.tabPage1.Text = "RegionsCTM File"; this.Text = "RegionsCTM Editor: " + openFileDialog1.FileName; registerUser("AurasEditor", this.openFileDialog1.FileName); fileSaved = false; } }
public void loadPartFile(string file_name) { if (cEditor != null) { cEditor.Dispose(); cEditor = null; } if (fxLauncher != null && !fxLauncher.fileType.ToLower().Equals("part")) { this.CostumeSplitContainer.Panel1.Controls.Remove(this.fxLauncher); this.fxLauncher.Dispose(); this.fxLauncher = null; } if (fxLauncher == null) { this.fxLauncher = new FxLauncher.FXLauncherForm(@"C:\Cryptic\scratch\partHistory.txt", @"C:\Cryptic\scratch\myFavorite.txt", "part", rootPath); fxLauncher.Dock = DockStyle.Fill; this.CostumeSplitContainer.Panel1.Controls.Add(this.fxLauncher); } currentLoadedFileName = file_name; this.CostumeSplitContainer.SuspendLayout(); this.SuspendLayout(); if (this.CostumeSplitContainer.Panel2.Controls.Count > 0) { this.CostumeSplitContainer.Panel2.Controls[0].Dispose(); } this.CostumeSplitContainer.Panel2.Controls.Clear(); this.tabPage1.Text = "Part File"; this.Text = "Part Editor: " + file_name; if (rootPath == null) { rootPath = common.COH_IO.getRootPath(file_name); } fxEditor.ParticalsWin partWin = new COH_CostumeUpdater.fxEditor.ParticalsWin(this.rootPath, file_name, ref tgaFilesDictionary); partWin.Dock = DockStyle.Fill; this.CostumeSplitContainer.Panel2.Controls.Add(partWin); this.CostumeSplitContainer.ResumeLayout(false); this.ResumeLayout(false); loadedObject = "partFile"; fxLauncher.selectFxFile(file_name); registerUser("PartEditor", file_name); }
public void loadFxFile(string file_name) { if (cEditor != null) { cEditor.Dispose(); cEditor = null; } if (fxLauncher != null && !fxLauncher.fileType.ToLower().Equals("fx")) { this.CostumeSplitContainer.Panel1.Controls.Remove(this.fxLauncher); this.fxLauncher.Dispose(); this.fxLauncher = null; } if (fxLauncher == null) { this.fxLauncher = new FxLauncher.FXLauncherForm(@"C:\Cryptic\scratch\tfx.txt", @"C:\Cryptic\scratch\myFavorite.txt", "fx", rootPath); fxLauncher.Dock = DockStyle.Fill; this.CostumeSplitContainer.Panel1.Controls.Add(this.fxLauncher); } currentLoadedFileName = file_name; this.CostumeSplitContainer.SuspendLayout(); this.SuspendLayout(); //disposing causes refersh bug (8/5/2011) need to rework later if (this.CostumeSplitContainer.Panel2.Controls.Count > 0) { this.CostumeSplitContainer.Panel2.Controls[0].Dispose(); } this.CostumeSplitContainer.Panel2.Controls.Clear(); this.tabPage1.Text = "FX/Bhvr/Part File"; this.Text = "FX Editor: " + file_name; fxEditor.FX_FileWin ffw = new COH_CostumeUpdater.fxEditor.FX_FileWin(file_name, ref tgaFilesDictionary); ffw.Dock = DockStyle.Fill; this.CostumeSplitContainer.Panel2.Controls.Add(ffw); this.CostumeSplitContainer.ResumeLayout(false); this.ResumeLayout(false); loadedObject = "fxFile"; fxLauncher.selectFxFile(file_name); registerUser("FxEditor", file_name); }