C# Class GitForce.FormMain

Datei anzeigen Open project: gdevic/GitForce Class Usage Examples

Protected Properties

Property Type Description
cmdBox GitForce.TextBoxEx

Public Methods

Method Description
BuildChangelistMenu ( ) : void
BuildFileMenu ( ) : void
FormMain ( ) : System

This is the main entry point to the application main form.

GetMessageColor ( MessageType type ) : Brush
Initialize ( ) : void

Main form initialization method performs operations that may need the main window to have already been shown since we may invoke its UI handlers

ResetViews ( ) : void

Switch the view mode to Local File View and Local Pending Changelists. Needed to be reset that way after creating a new repo.

SelectiveRefresh ( SelectveRefreshFlags flags ) : void

Selectively refreshes only specified panels

SetStatusText ( string infoMessage ) : void

Set the info message into the main form status line (located at the bottom)

SetTitle ( string title ) : void

Set the window title

UpdateRightPaneTabsShowState ( ) : void

Update the state of the tab control (show/hide)

Protected Methods

Method Description
Dispose ( bool disposing ) : void

Clean up any resources being used.

Private Methods

Method Description
AboutToolStripMenuItemClick ( object sender, EventArgs e ) : void

Show the standard About box

BtCancelOperationClick ( object sender, EventArgs e ) : void

Stops any currently executing git command thread

ChangeRightPanel ( string panelName ) : void

Programmatically change the right panel and all related controls

CmdBoxTextReady ( object sender, string cmd ) : void

Callback on the command line text ready. We execute a custom (immediate) command which can be either a direct git command or a shell (command prompt?) command. Several commands may be separated by "&&" token. This accomodates Gerrit code review process and its shortcuts that can be easily pasted.

CustomToolClicked ( object sender, EventArgs e ) : void

A specific custom tool is clicked (selected). Tag contains the tool class.

CustomizeToolMenuItemClick ( object sender, EventArgs e ) : void

User clicked on the Tools' Customize menu item

ExportToolMenuItemClick ( object sender, EventArgs e ) : void

Export current set of custom tools to a file

FormMainDragDrop ( object sender, DragEventArgs e ) : void
FormMainDragEnter ( object sender, DragEventArgs e ) : void

Main application form drag/drop handlers: user can drop workspace files on the application window to open them.

FormMainFormClosing ( object sender, FormClosingEventArgs e ) : void

Form is closing

FormMainRefresh ( ) : void

Refresh main form items, part of the global refresh chain

ImportToolMenuItemClick ( object sender, EventArgs e ) : void

Import a set of custom tools from a file

InitializeComponent ( ) : void

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

ListStatusDrawItem ( object sender, DrawItemEventArgs e ) : void
LogWindowToolStripMenuItemClick ( object sender, EventArgs e ) : void

Toggle the execute window between Show and Hide states. This form should not be closed as it accumulates all log messages even when hidden.

MenuEditRemoteRepos ( object sender, EventArgs e ) : void

Edit the list of remote repositories

MenuExit ( object sender, EventArgs e ) : void

Exit command - route to form closing handler

MenuMainBranchDropDownOpening ( object sender, EventArgs e ) : void

Create Branches menu drop down

MenuMainChangelistDropDownOpening ( object sender, EventArgs e ) : void

Changelist menu drop down

MenuMainFileDropDownOpening ( object sender, EventArgs e ) : void

Main File menu drop down

MenuMainManageKeysClick ( object sender, EventArgs e ) : void

Manage SSH Keys

MenuMainRepositoryDropDownOpening ( object sender, EventArgs e ) : void

Create Repository menu drop down

MenuMainSelectAllClick ( object sender, EventArgs e ) : void

Select all files on the left pane

MenuMainStashClick ( object sender, EventArgs e ) : void

User clicked on the Stash menu item

MenuMainToolsDropDownOpening ( object sender, EventArgs e ) : void

Custom Tools menu drop down, build the menu

MenuMainUnstashClick ( object sender, EventArgs e ) : void

User clicked on the Unstash menu item

MenuMainViewDropDownOpened ( object sender, EventArgs e ) : void

Menu "View" has been opened. Set the bullet next to the current view mode.

MenuOptions ( object sender, EventArgs e ) : void

Settings menu selected

MenuRefreshAll ( object sender, EventArgs e ) : void

Refresh Active Pane (do a global refresh for now)

MenuRepoFetch ( object sender, EventArgs e ) : void

Fetch from one or more remote repositories. If the number of *selected* repos is 2 or more, this function will operate on those selected repos irrespective of the current one. Otherwise, fetch the current repo. Stops if a repo operation fails.

MenuRepoPull ( object sender, EventArgs e ) : void

Pull from one or more remote repositories. If the number of *selected* repos is 2 or more, this function will operate on those selected repos irrespective of the current one. Otherwise, pull the current repo. Stops if a repo operation fails.

MenuRepoPush ( object sender, EventArgs e ) : void

Push to one or more remote repositories. If the number of *selected* repos is 2 or more, this function will operate on those selected repos irrespective of the current one. Otherwise, push the current repo. Stops if a repo operation fails. Use either the standard form (example: "origin master"), or the user override

MenuSelectClearClick ( object sender, EventArgs e ) : void

Right-click on the status menu selected Clear command

MenuStatusCopyClick ( object sender, EventArgs e ) : void

Right-click on the status menu selected Copy command

MenuStatusSelectAllClick ( object sender, EventArgs e ) : void

Right-click on the status menu selected Select-All command

MenuViewCommandLineClick ( object sender, EventArgs e ) : void

Toggle the Command Line edit box between Show and Hide states.

NewVersionButtonClick ( object sender, EventArgs e ) : void

User clicked on a 'new version available' button

PrintStatus ( string message, MessageType type ) : void

Print into the status pane (and the aux log window). It is ok to send null or empty string. Strings that contain Newline will be broken into separate lines. This function is thread-safe.

RemoteChanged ( object sender, EventArgs e ) : void

Switch the remote repo. The new repo name is given as sender name.

RightPanelSelectionEvent ( object sender, EventArgs e ) : void

Handler for right panel change events from various controls: * Menu item selections (sender is ToolStripDropDownItem) * Toolbar buttons (sender is ToolStripItem) * Tab control of the right panel (sender is TabEx)

SetBusy ( bool isBusy ) : void

Set or clear the busy flag (small "stop" icon on the toolbar) Use timer to turn the GUI elements off to avoid rapid on/off cycles caused by a number of successive toggles. Store the true state of busy-ness in the timerTick.Tag, so when the tick triggers, it will know what was the true busy state.

TimerBusyTick ( object sender, EventArgs e ) : void

Busy signal timer tick handler

VersionCheckTimerTick ( object sender, EventArgs e ) : void

Handler for delayed version check event

ViewSetByMenuItem ( object sender, EventArgs e ) : void

Set the view mode by sending a menu item whose Tag contains the mode number. This function is called from a menu handlers that select view mode.

WebsiteClick ( object sender, EventArgs e ) : void

User clicked on a Website menu item, open the website

WorkspaceClearMenuItem ( object sender, EventArgs e ) : void

Clear current workspace

WorkspaceCreateMenuItem ( object sender, EventArgs e ) : void

Create a new workspace at the specified (workspace) file location

WorkspaceImportMenuItem ( object sender, EventArgs e ) : void

Select and import a specific workspace Workspace import merges existing repos with the ones being imported

WorkspaceLoadLruMenuItem ( object sender, EventArgs e ) : void

Load a workspace selected by the last recently used menu

WorkspaceLoadMenuItem ( object sender, EventArgs e ) : void

Select and load a specific workspace

WorkspaceSaveMenuItem ( object sender, EventArgs e ) : void

Save current workspace

Method Details

BuildChangelistMenu() public method

public BuildChangelistMenu ( ) : void
return void

BuildFileMenu() public method

public BuildFileMenu ( ) : void
return void

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

FormMain() public method

This is the main entry point to the application main form.
public FormMain ( ) : System
return System

GetMessageColor() public static method

public static GetMessageColor ( MessageType type ) : Brush
type MessageType
return Brush

Initialize() public method

Main form initialization method performs operations that may need the main window to have already been shown since we may invoke its UI handlers
public Initialize ( ) : void
return void

ResetViews() public method

Switch the view mode to Local File View and Local Pending Changelists. Needed to be reset that way after creating a new repo.
public ResetViews ( ) : void
return void

SelectiveRefresh() public method

Selectively refreshes only specified panels
public SelectiveRefresh ( SelectveRefreshFlags flags ) : void
flags SelectveRefreshFlags
return void

SetStatusText() public method

Set the info message into the main form status line (located at the bottom)
public SetStatusText ( string infoMessage ) : void
infoMessage string
return void

SetTitle() public method

Set the window title
public SetTitle ( string title ) : void
title string
return void

UpdateRightPaneTabsShowState() public method

Update the state of the tab control (show/hide)
public UpdateRightPaneTabsShowState ( ) : void
return void

Property Details

cmdBox protected_oe property

protected TextBoxEx,GitForce cmdBox
return GitForce.TextBoxEx