AlphaFramework API  1.0.3
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Public Member Functions | Protected Member Functions | Protected Attributes | Properties | List of all members
AlphaFramework.Editor.MainFormBase Class Reference

An extendable basis for an editor main window. More...

Inheritance diagram for AlphaFramework.Editor.MainFormBase:
AlphaFramework.Editor.IToastProvider

Public Member Functions

void ShowToast (string message)
 Displays a new toast messages to the user. Any exisiting messages are replaced.
Parameters
messageThe message text to be displayed.
A toast message is a message that pops up from a corner of the screen or window and vanishes after a few seconds without the user needing to confirm it.
 

Protected Member Functions

 MainFormBase ()
 
void AddTab (Tab tab)
 
void ShowTab (Tab tab)
 
virtual void Restart ()
 Restarts the editor to allow the user to choose a different mod. More...
 
virtual void LaunchGame (string arguments)
 Launches the main game with the currently active mod. More...
 
virtual void ChangeLanguage (string language)
 Applies a new language to the editor GUI, game logic, etc.. More...
 
void OpenFileTab< T > (string type, string extension, Func< string, bool, T > getInstance)
 Displays a file-editing tab. More...
 
void ShowSingleInstanceTab< T > ()
 Displays a single-instance tab. More...
 
override void Dispose (bool disposing)
 Clean up any resources being used. More...
 

Protected Attributes

readonly Dictionary< Tab,
ToolStripButton > 
Tabs = new Dictionary<Tab, ToolStripButton>()
 
Tab CurrentTab => (from pair in Tabs where pair.Value.Checked select pair.Key).FirstOrDefault()
 The currently visible tab More...
 
System.Windows.Forms.ToolStripMenuItem menuFileModProperties
 
System.Windows.Forms.ToolStripMenuItem menuFilePackageMod
 
System.Windows.Forms.ToolStripMenuItem menuLanguageEnglish
 
System.Windows.Forms.ToolStripMenuItem menuLanguageGerman
 
System.Windows.Forms.ToolStrip toolStrip
 

Properties

bool Loading [get, set]
 Indicates the editor is currently loading something and the user must wait. More...
 

Detailed Description

An extendable basis for an editor main window.

Implement the hooks Restart, LaunchGame and ChangeLanguage.

Member Function Documentation

virtual void AlphaFramework.Editor.MainFormBase.ChangeLanguage ( string  language)
inlineprotectedvirtual

Applies a new language to the editor GUI, game logic, etc..

Parameters
languageA two-letter ISO language code.
override void AlphaFramework.Editor.MainFormBase.Dispose ( bool  disposing)
inlineprotected

Clean up any resources being used.

Parameters
disposingtrue if managed resources should be disposed; otherwise, false.
virtual void AlphaFramework.Editor.MainFormBase.LaunchGame ( string  arguments)
inlineprotectedvirtual

Launches the main game with the currently active mod.

Parameters
argumentsAdditional arguments to be passed; may be null.
Exceptions
Win32ExceptionThe game executable could not be launched.
BadImageFormatExceptionThe game executable is damaged.
void AlphaFramework.Editor.MainFormBase.OpenFileTab< T > ( string  type,
string  extension,
Func< string, bool, T >  getInstance 
)
inlineprotected

Displays a file-editing tab.

Template Parameters
TThe tab type to display.
Parameters
typeThe type of file the tab edits (e.g. Textures, Sounds, ...).
extensionThe file extension of the file type with a dot, but without a asterisk (e.g. .xml, .png, ...).
getInstanceA callback for creating an instance of the tab.
Type Constraints
T :Tab 
virtual void AlphaFramework.Editor.MainFormBase.Restart ( )
inlineprotectedvirtual

Restarts the editor to allow the user to choose a different mod.

void AlphaFramework.Editor.MainFormBase.ShowSingleInstanceTab< T > ( )
inlineprotected

Displays a single-instance tab.

Template Parameters
TThe tab type to display.
Type Constraints
T :Tab 
T :new() 

Member Data Documentation

Tab AlphaFramework.Editor.MainFormBase.CurrentTab => (from pair in Tabs where pair.Value.Checked select pair.Key).FirstOrDefault()
protected

The currently visible tab

Property Documentation

bool AlphaFramework.Editor.MainFormBase.Loading
getset

Indicates the editor is currently loading something and the user must wait.


The documentation for this class was generated from the following files: