@ working on the reference manual

This commit is contained in:
codeimp 2009-04-14 21:10:00 +00:00
parent 58ed944a46
commit 7c3671eac0
17 changed files with 92 additions and 4 deletions

View file

@ -337,7 +337,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
#endregion
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_brightness.html");
}
// Mode engages
public override void OnEngage()
{

View file

@ -155,6 +155,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_curvelinedefs.html");
}
// Cancelled
public override void OnCancel()
{

View file

@ -351,6 +351,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_drawgeometry.html");
}
// Engaging
public override void OnEngage()
{

View file

@ -598,6 +598,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_editselection.html");
}
// Mode engages
public override void OnEngage()
{

View file

@ -64,6 +64,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_mapanalysis.html");
}
// Cancelled
public override void OnCancel()
{

View file

@ -64,6 +64,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_findreplace.html");
}
// Cancelled
public override void OnCancel()
{

View file

@ -383,7 +383,12 @@ namespace CodeImp.DoomBuilder.BuilderModes
#endregion
#region ================== Events
public override void OnHelp()
{
General.ShowHelp("e_sectors.html");
}
// Cancel mode
public override void OnCancel()
{

View file

@ -76,6 +76,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
#region ================== Methods
public override void OnHelp()
{
General.ShowHelp("e_things.html");
}
// Cancel mode
public override void OnCancel()
{

View file

@ -75,6 +75,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
// vertices
//
this.vertices.AllowDecimal = false;
this.vertices.AllowNegative = false;
this.vertices.AllowRelative = false;
this.vertices.ImeMode = System.Windows.Forms.ImeMode.Off;
@ -88,6 +89,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
// distance
//
this.distance.AllowDecimal = false;
this.distance.AllowNegative = false;
this.distance.AllowRelative = false;
this.distance.ImeMode = System.Windows.Forms.ImeMode.Off;
@ -101,6 +103,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
//
// angle
//
this.angle.AllowDecimal = false;
this.angle.AllowNegative = false;
this.angle.AllowRelative = false;
this.angle.ImeMode = System.Windows.Forms.ImeMode.Off;
@ -226,6 +229,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Curve Linedefs";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.CurveLinedefsForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.CurveLinedefsForm_HelpRequested);
this.ResumeLayout(false);
this.PerformLayout();

View file

@ -202,6 +202,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
// Apply now
General.Editing.AcceptMode();
}
private void CurveLinedefsForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_curvelinedefs.html");
}
#endregion
}

View file

@ -184,6 +184,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.StartPosition = System.Windows.Forms.FormStartPosition.Manual;
this.Text = "Map Analysis";
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.ErrorCheckForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.ErrorCheckForm_HelpRequested);
this.resultspanel.ResumeLayout(false);
this.ResumeLayout(false);

View file

@ -458,6 +458,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
}
}
}
private void ErrorCheckForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_mapanalysis.html");
}
#endregion
}

View file

@ -284,6 +284,7 @@ namespace CodeImp.DoomBuilder.BuilderModes
this.Text = "Find and Replace";
this.KeyUp += new System.Windows.Forms.KeyEventHandler(this.FindReplaceForm_KeyUp);
this.FormClosing += new System.Windows.Forms.FormClosingEventHandler(this.FindReplaceForm_FormClosing);
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.FindReplaceForm_HelpRequested);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.FindReplaceForm_KeyDown);
this.resultspanel.ResumeLayout(false);
this.resultspanel.PerformLayout();

View file

@ -328,6 +328,11 @@ namespace CodeImp.DoomBuilder.BuilderModes
General.Interface.RedrawDisplay();
}
}
private void FindReplaceForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_findreplace.html");
}
#endregion

View file

@ -137,6 +137,7 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
this.ShowIcon = false;
this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
this.Text = "Make Door";
this.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.MakeDoorForm_HelpRequested);
this.ResumeLayout(false);
}

View file

@ -90,6 +90,11 @@ namespace CodeImp.DoomBuilder.BuilderModes.Interface
this.Close();
}
}
private void MakeDoorForm_HelpRequested(object sender, HelpEventArgs hlpevent)
{
General.ShowHelp("e_sectors.html");
}
#endregion
}

View file

@ -1502,9 +1502,30 @@ namespace CodeImp.DoomBuilder
// This shows the reference manual
public static void ShowHelp(string pagefile)
{
Help.ShowHelp(mainwindow, Path.Combine(apppath, HELP_FILE), HelpNavigator.Topic, pagefile);
ShowHelp(pagefile, HELP_FILE);
}
// This shows the reference manual
public static void ShowHelp(string pagefile, string chmfile)
{
// Check if the file can be found in the root
string filepathname = Path.Combine(apppath, chmfile);
if(!File.Exists(filepathname))
{
// Check if the file exists in the plugins directory
filepathname = Path.Combine(pluginspath, chmfile);
if(!File.Exists(filepathname))
{
// Fail
WriteLogLine("ERROR: Can't find the help file \"" + chmfile + "\"");
return;
}
}
// Show help file
Help.ShowHelp(mainwindow, filepathname, HelpNavigator.Topic, pagefile);
}
// This returns a unique temp filename
internal static string MakeTempFilename(string tempdir)
{