public void save() { FX fx = (FX)fxWin.Tag; if (fx.isReadOnly) { MessageBox.Show("File is ReadOnly!\r\nDid you forget to check it out...", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { ArrayList data = fxWin.getData(); common.COH_IO.writeDistFile(data, fileName); COH_CostumeUpdaterForm cForm = (COH_CostumeUpdaterForm)this.FindForm(); if (cForm != null) { COH_CostumeUpdaterForm cTopForm = (COH_CostumeUpdaterForm)cForm.Owner; if (cTopForm != null) { string fxFile = cTopForm.currentLoadedFileName.ToLower().EndsWith(".fx") ? cTopForm.currentLoadedFileName : fileName; FxLauncher.FXLauncherForm.runFx(fxFile, cTopForm); } else { FxLauncher.FXLauncherForm.runFx(fileName, cForm); } } } }
private string getFileName() { COH_CostumeUpdaterForm cuf = (COH_CostumeUpdaterForm)this.FindForm(); if (cuf != null) { return(cuf.currentLoadedFileName); } return(""); }
public void addToTextureDic(string tgaFileName) { COH_CostumeUpdaterForm form = this.FindForm() as COH_CostumeUpdaterForm; if (form != null) { if (!form.tgaFilesDictionary.ContainsKey(tgaFileName)) { form.tgaFilesDictionary[tgaFileName] = System.IO.Path.GetFileName(tgaFileName); form.tgaFilesDictionary = common.COH_IO.sortDictionaryKeys(form.tgaFilesDictionary); } } }