public bool ShowViewer(IUserControl uc, ChitinKey ckey, ResourceClass.IResource irFile) { this.uc = uc; // -1 == bad load so close formresource // 0 == bad load but keep formresource open // 1 == good load if (uc.SetResourceParams(ckey, irFile) < 0) { return(false); } this.TabText = ResourceStruct.ResourceFileExt(ckey.resourceType) + ":" + ckey.name; this.Text = this.TabText; if ((!isCommon) || ((this.viewUControl == null) && (this.editUControl == null))) { ReloadViewer(uc); //ReloadEditor(uc); } this.Show(ApplicationRuntime.DockPanel); return(true); }
public static string FindOverrideFile(string keyName, ResourceStruct.ResourceType resourceType) { // First try the override File string overrideFile = Path.Combine(ApplicationRuntime.AppPaths.OverrideDirectory, keyName + "." + ResourceStruct.ResourceFileExt(resourceType)); if (File.Exists(overrideFile)) { return(overrideFile.ToUpper()); } else { return(null); } }