C# Class ThoughtWorks.VisualStudio.ViewModel

Supports the ExplorerViewControl window
Inheritance: IViewModel
显示文件 Open project: ThoughtWorksStudios/vs-connector Class Usage Examples

Private Properties

Property Type Description
GetMqlFromCardTypeList string
Initialize void
InnerPanel System.Windows.Controls.StackPanel
MakeChooseCardButton System.Windows.Controls.Button
MakeComboBox System.Windows.Controls.ComboBox
MakeTextBox System.Windows.Controls.TextBox
PropertyIsEditable bool
UserIsProjectAdmin bool
ValueNotSetButton System.Windows.Controls.Button
ViewModel System
ViewModel System

Public Methods

Method Description
ClearProjectList ( ) : void

Clear the project list

CreateCard ( string type, string name ) : Card

Creates a new Card

GetCardList ( IEnumerable types ) : IEnumerable

Given a list of card type names, return card number/type/name list

GetCardsForFavorite ( string view ) : CardBasicInfo>.SortedList

Get collection of CardsCollection for a particular favorite

This list is sorted using a concatenated string of (card type name + card name + card number) as the key.

GetCardsOfType ( string type ) : CardsCollection

Gets cards for type

GetCommentsForCard ( int number ) : IEnumerable

Returns comments for a card

GetOneCard ( int cardNo ) : Card

Returns the card for cardNo

PostComment ( int number, string comment ) : void

Posts a comment to a card

Project ( ) : Project

Returns the project object

SelectProject ( object projectId ) : bool

Set the value of the project

SendMurmur ( string murmur ) : void

Sends a murmur

ViewModel ( string host, string login, string password ) : System

Constructs a new ViewModel

Private Methods

Method Description
GetMqlFromCardTypeList ( IEnumerable types ) : string

Given a list of types, returns card number, type, name

Initialize ( string host, string login, string password ) : void
InnerPanel ( CardProperty cardProperty, Card thisCard, RoutedEventHandler onButtonChooseCardClick, RoutedEventHandler onPropertyTextBoxLostFocus, SelectionChangedEventHandler onPropertyComboBoxSelectionChanged, RoutedEventHandler onButtonNotSetClick ) : StackPanel
MakeChooseCardButton ( CardProperty cardProperty ) : System.Windows.Controls.Button
MakeComboBox ( CardProperty cardProperty ) : ComboBox
MakeTextBox ( CardProperty cardProperty, Card thisCard ) : TextBox
PropertyIsEditable ( CardProperty property ) : bool
UserIsProjectAdmin ( ) : bool

returns true/false whether the user is an admin on the project

ValueNotSetButton ( CardProperty cardProperty, FrameworkElement control ) : System.Windows.Controls.Button
ViewModel ( ) : System

Constructs a naked ViewModel

ViewModel ( IMingleServer mingle ) : System

Testable constructor used to inject a Mingle fixture

Method Details

ClearProjectList() public method

Clear the project list
public ClearProjectList ( ) : void
return void

CreateCard() public method

Creates a new Card
public CreateCard ( string type, string name ) : Card
type string
name string One line card name
return Card

GetCardList() public method

Given a list of card type names, return card number/type/name list
public GetCardList ( IEnumerable types ) : IEnumerable
types IEnumerable
return IEnumerable

GetCardsForFavorite() public method

Get collection of CardsCollection for a particular favorite
This list is sorted using a concatenated string of (card type name + card name + card number) as the key.
public GetCardsForFavorite ( string view ) : CardBasicInfo>.SortedList
view string
return CardBasicInfo>.SortedList

GetCardsOfType() public method

Gets cards for type
public GetCardsOfType ( string type ) : CardsCollection
type string
return CardsCollection

GetCommentsForCard() public method

Returns comments for a card
public GetCommentsForCard ( int number ) : IEnumerable
number int
return IEnumerable

GetOneCard() public method

Returns the card for cardNo
public GetOneCard ( int cardNo ) : Card
cardNo int
return Card

PostComment() public method

Posts a comment to a card
public PostComment ( int number, string comment ) : void
number int
comment string
return void

Project() public method

Returns the project object
public Project ( ) : Project
return Project

SelectProject() public method

Set the value of the project
public SelectProject ( object projectId ) : bool
projectId object
return bool

SendMurmur() public method

Sends a murmur
public SendMurmur ( string murmur ) : void
murmur string
return void

ViewModel() public method

Constructs a new ViewModel
public ViewModel ( string host, string login, string password ) : System
host string
login string
password string
return System