C# 클래스 GitForce.Main.Right.Panels.PanelRepos

파일 보기 프로젝트 열기: gdevic/GitForce

공개 메소드들

메소드 설명
GetContextMenu ( ToolStrip owner ) : ToolStripItemCollection

Builds ands returns a context menu for branches

GetSelectedRepos ( ) : List

Returns a list of repos which are selected (not necessarily the "current" or "default")

NewRepoWizard ( ClassRepo repoToClone, ClassRepo repoRemote ) : string

Global static function that executes a new repo wizard If successful, returns the path to the new local repo If failed, returns null

PanelRepos ( ) : System
ReposRefresh ( ) : void

Fill in the list of repositories.

보호된 메소드들

메소드 설명
Dispose ( bool disposing ) : void

Clean up any resources being used.

비공개 메소드들

메소드 설명
AddNewRepo ( string path, bool openEdit ) : void

This internal function adds a new repo After the repo has been added to the list, the repo edit dialog will open to let the user have a chance to modify its settings. This behavior can be disabled by setting openEdit to false.

ColumnWidthChanged ( object sender, ColumnWidthChangedEventArgs e ) : void

Save columns' widths every time they change. This will happen when the form loads for the first time and then every time a user drags and resizes a column

GetSelectedRepo ( ) : ClassRepo

Return the selected repo object or null if no repo is selected (no repos in the list)

InitializeComponent ( ) : void

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

ListReposDoubleClick ( object sender, EventArgs e ) : void

Double-clicking on a repository will switch to it.

ListReposDragDrop ( object sender, DragEventArgs e ) : void

This method handles dropping objects into our listview and reordiring the list of repos We handle 2 cases: 1. Dropping one or more folders that contain roots of the git repos in order to add repos to the list 2. Dropping an existing repo name from the listbox itself in order to reorder the list

ListReposDragEnter ( object sender, DragEventArgs e ) : void

This method is called when an object is being dragged onto the control If the user drags in one or more valid git root directories, we will add corresponding repos

ListReposMouseUp ( object sender, MouseEventArgs e ) : void

Right-mouse button opens a popup with the context menu

ListReposVisibleChanged ( object sender, EventArgs e ) : void

The only purpose of this handler is to fix a Linux listview issue where the header is sometimes not visible when a tab is switched to

MenuDeleteRepoClick ( object sender, EventArgs e ) : void

Delete selected repository and optionally more files (if a single repo is selected) If multiple repos are selected, simply remove them from our list.

MenuNewRepoClick ( object sender, EventArgs e ) : void

Create or clone a new git repository. If the Tag field is non-empty, it contains the Repo to clone.

MenuRefreshClick ( object sender, EventArgs e ) : void

Full refresh of the workspace repos. Every repo in the list is checked and invalid ones are removed from the list.

MenuRepoEditClick ( object sender, EventArgs e ) : void

Edit a selected repository specification

MenuScanRepoClick ( object sender, EventArgs e ) : void

Scan the file system and find Git repositories to add to the workspace

MenuSetDefaultRepoToClick ( object sender, EventArgs e ) : void

Set the default repo to the one selected. The default repo is automatically selected after program loads.

MenuViewCommandClick ( object sender, EventArgs e ) : void

Open a command prompt at the root directory of a selected repo, not necessarily the current repo

ValidGitRepos ( string data ) : List

Create a list of valid git repos from the array of potential repo paths Input data can be null but the output list may only be empty (not null)

메소드 상세

Dispose() 보호된 메소드

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

GetContextMenu() 공개 메소드

Builds ands returns a context menu for branches
public GetContextMenu ( ToolStrip owner ) : ToolStripItemCollection
owner ToolStrip
리턴 ToolStripItemCollection

GetSelectedRepos() 공개 메소드

Returns a list of repos which are selected (not necessarily the "current" or "default")
public GetSelectedRepos ( ) : List
리턴 List

NewRepoWizard() 공개 정적인 메소드

Global static function that executes a new repo wizard If successful, returns the path to the new local repo If failed, returns null
public static NewRepoWizard ( ClassRepo repoToClone, ClassRepo repoRemote ) : string
repoToClone ClassRepo
repoRemote ClassRepo
리턴 string

PanelRepos() 공개 메소드

public PanelRepos ( ) : System
리턴 System

ReposRefresh() 공개 메소드

Fill in the list of repositories.
public ReposRefresh ( ) : void
리턴 void