////////////////////////////////////////////////////////////////////////// public override string ToString() { string RelProjectPath = WmeUtils.GetRelativePath(FileName, Path.GetDirectoryName(Game.ProjectFile) + "\\"); string str = "; generated by SpriteOptimizer\n\n"; str += "; $EDITOR_PROJECT_ROOT_DIR$ " + RelProjectPath + "\n\n"; NodeToString(DefFile, ref str, ""); return(str); }
////////////////////////////////////////////////////////////////////////// protected void MakeAssocitations(string ExePath) { string IconExe = Path.Combine(WmeUtils.ToolsPath, "ProjectMan.exe"); int IconIndex = 7; string[] Extensions = ParentForm.GetExtensions(); foreach (string Ext in Extensions) { WmeUtils.MakeFileAssociation(Ext, "Wintermute.Script", "WME Script File", ExePath, IconExe, IconIndex); } }
public void File_RecentFiles(ActionParam Param) { switch (Param.Type) { case ActionParam.QueryType.CustomBuild: if (Param.Items != null) { if (_RecentFiles.Count > 0) { int Count = 0; foreach (string RecentFile in _RecentFiles) { if (!File.Exists(RecentFile)) { continue; } Count++; string FileToLoad = RecentFile; ToolStripMenuItem NewItem = new ToolStripMenuItem("&" + Count.ToString() + " " + WmeUtils.ShortenPathname(RecentFile, 50)); NewItem.Click += delegate(object sender, EventArgs e) { RunRecentFile(FileToLoad); }; Param.Items.Add(NewItem); } } Param.Processed = true; } break; } }