C# Class AwbUpdater.Updater

Show file Open project: reedy/AutoWikiBrowser

Private Properties

Property Type Description
AWBVersion void
AppendLine void
CloseAwb void
CopyFile void
CopyFiles void
CreatePath void
CreateTempDir void
DeleteAbsoluteIfExists void
DeleteIfExists void
ExitEarly void
Extract void
Fail void
GetAwbFromInternet void
InitializeComponent void
KillTempDir void
ReadyToExit void
StartAwb void
StringToVersion int
UnzipAwb void
UpdateAwb void
UpdateUI void
Updater_Load void
actuallyDownloadAWB void
btnCancel_Click void
tmrTimer_Tick void

Public Methods

Method Description
Updater ( ) : System

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
AWBVersion ( ) : void

Checks and compares the current AWB version with the version listed on the checkpage

AppendLine ( string line ) : void
CloseAwb ( ) : void

Looks if AWB is open. If it is, tell the user

CopyFile ( string source, string destination ) : void
CopyFiles ( ) : void

Copies files from the temporary to the working directory

CreatePath ( string path ) : void

Creates all subdirectories in the path, if needed

CreateTempDir ( ) : void

Creates the temporary folder if it doesnt already exist. If it does exist, delete all the contents

DeleteAbsoluteIfExists ( string path ) : void
DeleteIfExists ( string name ) : void
ExitEarly ( ) : void

Close the updater early due to lack of updates

Extract ( string file ) : void

Code used to unzip the zip files to the temporary directory

Fail ( ) : void
GetAwbFromInternet ( ) : void

Check the addresses for the files are valid (not null or empty), and downloads the files from the internet

InitializeComponent ( ) : void

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

KillTempDir ( ) : void

Deletes the temporary directory

ReadyToExit ( ) : void

Sets UI to "ready to exit" state

StartAwb ( ) : void

Starts AWB if exists and is not already running

StringToVersion ( string version ) : int
UnzipAwb ( ) : void

Checks the zip files exist and calls the functions to unzip them

UpdateAwb ( ) : void

Main program function

UpdateUI ( string currentStatus, bool newLine ) : void

Multiple use function to update the GUI items

Updater_Load ( object sender, EventArgs e ) : void
actuallyDownloadAWB ( WebClient client, string source, string target ) : void
btnCancel_Click ( object sender, EventArgs e ) : void
tmrTimer_Tick ( object sender, EventArgs e ) : void

Method Details

Dispose() protected method

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

Updater() public method

public Updater ( ) : System
return System