C# Class AA2Install.formMain

Afficher le fichier Open project: aa2g/AA2Install Class Usage Examples

Méthodes publiques

Свойство Type Description
Plugins List
bench DateTime
cancelPending bool
change formChanges
cmbSorting System.Windows.Forms.ToolStripComboBox
currentOwner Form
imageTimer System.Windows.Forms.Timer
isChecking bool
labelStatus System.Windows.Forms.ToolStripStatusLabel
lsvLog System.Windows.Forms.ListView
lsvMods System.Windows.Forms.ListView
modDict ModDictionary

Méthodes publiques

Méthode Description
CheckInstalled ( ) : bool
FlushCache ( ) : void

Deletes cache and rebuilds configuration file.

GetFilesRegex ( string directory, string regex ) : List
IsEnoughFreeSpace ( string drivePath, long requiredBytes ) : bool

Returns true or false if the drive indicated has enough space for the operation.

TryDeleteDirectory ( string target_dir ) : void

Deletes a directory where it can fail to do so (large directories like TEMP).

UpdateReg ( bool checkAfter = true ) : void
deleteSelectedMods ( bool suppressDialogs = false ) : void

Prompts and deletes selected mods in the list view.

forceSelectedMods ( bool suppressDialogs = false ) : void
formMain ( ) : System
formMain_Shown ( object sender, EventArgs events ) : void
getFiles ( string SourceFolder, string Filter, System searchOption ) : string[]

Returns a list of files in a directory.

getTimeSinceLastCheck ( ) : TimeSpan
initializeBench ( ) : void
inject ( bool createBackup = false, bool checkConflicts = true, bool suppressPopups = false ) : bool

Injects mods as per selected in lsvMods.

loadUIConfiguration ( ) : void

Updates UI to values in configuration.

refreshModList ( bool skipReload = false, string filter = "" ) : void

Refreshes the list from the /mods/ directory.

setEnabled ( bool enabled ) : void

Sets enabled status of essential controls.

tryCancel ( ) : bool

Cancels if cancelPending is set to true.

tryDelete ( string filename ) : TryDeleteResult

Tries to delete file, and prompts user if the file is being accessed.

updateLog ( string l ) : void

Méthodes protégées

Méthode Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Méthode Description
BytesToString ( long bytes ) : string

Converts a length of bytes into a human readable form.

InitializeComponent ( ) : void

Required method for Designer support - do not modify the contents of this method with the code editor.

aboutToolStripMenuItem_Click ( object sender, EventArgs e ) : void
btnAA2EDIT_Click ( object sender, EventArgs e ) : void
btnAA2PLAY_Click ( object sender, EventArgs e ) : void
btnApply_Click ( object sender, EventArgs e ) : void
btnBrowseMigrate_Click ( object sender, EventArgs e ) : void
btnCancel_Click ( object sender, EventArgs e ) : void
btnEDITreg_Click ( object sender, EventArgs e ) : void
btnLoadModpack_Click ( object sender, EventArgs e ) : void
btnMigrate_Click ( object sender, EventArgs e ) : void
btnPLAYreg_Click ( object sender, EventArgs e ) : void
btnRefresh_Click ( object sender, EventArgs e ) : void
btnRegUpdate_Click ( object sender, EventArgs e ) : void
checkAA2EDIT_CheckedChanged ( object sender, EventArgs e ) : void
checkAA2PLAY_CheckedChanged ( object sender, EventArgs e ) : void
checkConflicts_CheckedChanged ( object sender, EventArgs e ) : void
checkSuppress_CheckedChanged ( object sender, EventArgs e ) : void
chkCompatibility_CheckedChanged ( object sender, EventArgs e ) : void
clearLogToolStripMenuItem_Click ( object sender, EventArgs e ) : void
cmbSorting_SelectedIndexChanged ( object sender, EventArgs e ) : void
deleteToolStripMenuItem_Click ( object sender, EventArgs e ) : void
exitToolStripMenuItem_Click ( object sender, EventArgs e ) : void
flushCacheToolStripMenuItem_Click ( object sender, EventArgs e ) : void
forceInstallToolStripMenuItem_Click ( object sender, EventArgs e ) : void
imageTimer_Tick ( object sender, EventArgs e ) : void
lsvMods_DrawColumnHeader ( object sender, DrawListViewColumnHeaderEventArgs e ) : void
lsvMods_DrawItem ( object sender, DrawListViewItemEventArgs e ) : void
lsvMods_ItemChecked ( object sender, ItemCheckedEventArgs e ) : void
lsvMods_KeyPress ( object sender, KeyEventArgs e ) : void
lsvMods_SelectedIndexChanged ( object sender, EventArgs e ) : void
lsvMods_SizeChanged ( object sender, EventArgs e ) : void
pendingChangesToolStripMenuItem_Click ( object sender, EventArgs e ) : void
txtAA2EDIT_TextChanged ( object sender, EventArgs e ) : void
txtAA2PLAY_TextChanged ( object sender, EventArgs e ) : void
txtEDITreg_TextChanged ( object sender, EventArgs e ) : void
txtPLAYreg_TextChanged ( object sender, EventArgs e ) : void
txtSearch_TextChanged ( object sender, EventArgs e ) : void
updateStatus ( string entry, LogIcon icon = LogIcon.Ready, bool displayTime = true, bool onlyStatusBar = false ) : void
updateTaskbarProgress ( TaskbarProgress state = TaskbarProgress.TaskbarStates.Normal ) : void
updateTaskbarProgress ( int value, int maximum, TaskbarProgress state = TaskbarProgress.TaskbarStates.Normal ) : void

Method Details

CheckInstalled() public méthode

public CheckInstalled ( ) : bool
Résultat bool

Dispose() protected méthode

Clean up any resources being used.
protected Dispose ( bool disposing ) : void
disposing bool true if managed resources should be disposed; otherwise, false.
Résultat void

FlushCache() public méthode

Deletes cache and rebuilds configuration file.
public FlushCache ( ) : void
Résultat void

GetFilesRegex() public méthode

public GetFilesRegex ( string directory, string regex ) : List
directory string
regex string
Résultat List

IsEnoughFreeSpace() public méthode

Returns true or false if the drive indicated has enough space for the operation.
public IsEnoughFreeSpace ( string drivePath, long requiredBytes ) : bool
drivePath string The path to the drive (eg. "C:\")
requiredBytes long The amount of bytes required for the operation.
Résultat bool

TryDeleteDirectory() public static méthode

Deletes a directory where it can fail to do so (large directories like TEMP).
public static TryDeleteDirectory ( string target_dir ) : void
target_dir string Target directory.
Résultat void

UpdateReg() public méthode

public UpdateReg ( bool checkAfter = true ) : void
checkAfter bool
Résultat void

deleteSelectedMods() public méthode

Prompts and deletes selected mods in the list view.
public deleteSelectedMods ( bool suppressDialogs = false ) : void
suppressDialogs bool Whether or not to suppress dialogs and prompts.
Résultat void

forceSelectedMods() public méthode

public forceSelectedMods ( bool suppressDialogs = false ) : void
suppressDialogs bool
Résultat void

formMain() public méthode

public formMain ( ) : System
Résultat System

formMain_Shown() public méthode

public formMain_Shown ( object sender, EventArgs events ) : void
sender object
events EventArgs
Résultat void

getFiles() public méthode

Returns a list of files in a directory.
public getFiles ( string SourceFolder, string Filter, System searchOption ) : string[]
SourceFolder string Directory to search.
Filter string Filter; can have multiple filters split by '|'.
searchOption System Option to search by.
Résultat string[]

getTimeSinceLastCheck() public méthode

public getTimeSinceLastCheck ( ) : TimeSpan
Résultat TimeSpan

initializeBench() public méthode

public initializeBench ( ) : void
Résultat void

inject() public méthode

Injects mods as per selected in lsvMods.
public inject ( bool createBackup = false, bool checkConflicts = true, bool suppressPopups = false ) : bool
createBackup bool Creates a backup of modified .pp files if true. Default is false.
checkConflicts bool Checks for conflicts in pending mods. Default is true.
suppressPopups bool If true, does not generate message boxes. Default is false.
Résultat bool

loadUIConfiguration() public méthode

Updates UI to values in configuration.
public loadUIConfiguration ( ) : void
Résultat void

refreshModList() public méthode

Refreshes the list from the /mods/ directory.
public refreshModList ( bool skipReload = false, string filter = "" ) : void
skipReload bool
filter string
Résultat void

setEnabled() public méthode

Sets enabled status of essential controls.
public setEnabled ( bool enabled ) : void
enabled bool Sets enabled status to this.
Résultat void

tryCancel() public méthode

Cancels if cancelPending is set to true.
public tryCancel ( ) : bool
Résultat bool

tryDelete() public méthode

Tries to delete file, and prompts user if the file is being accessed.
public tryDelete ( string filename ) : TryDeleteResult
filename string
Résultat TryDeleteResult

updateLog() public méthode

public updateLog ( string l ) : void
l string
Résultat void

Property Details

Plugins public_oe property

public List Plugins
Résultat List

bench public_oe property

public DateTime bench
Résultat DateTime

cancelPending public_oe property

Flag for if cancellation is pending.
public bool cancelPending
Résultat bool

change public_oe property

public formChanges,AA2Install change
Résultat formChanges

cmbSorting public_oe property

public System.Windows.Forms.ToolStripComboBox cmbSorting
Résultat System.Windows.Forms.ToolStripComboBox

currentOwner public_oe property

public Form currentOwner
Résultat Form

imageTimer public_oe property

public System.Windows.Forms.Timer imageTimer
Résultat System.Windows.Forms.Timer

isChecking public_oe property

public bool isChecking
Résultat bool

labelStatus public_oe property

public System.Windows.Forms.ToolStripStatusLabel labelStatus
Résultat System.Windows.Forms.ToolStripStatusLabel

lsvLog public_oe property

public System.Windows.Forms.ListView lsvLog
Résultat System.Windows.Forms.ListView

lsvMods public_oe property

public System.Windows.Forms.ListView lsvMods
Résultat System.Windows.Forms.ListView

modDict public_oe property

public ModDictionary modDict
Résultat ModDictionary