C# Class Common.UIAssistant

Datei anzeigen Open project: magicdict/MongoCola

Public Methods

Method Description
FillComberWithArray ( ComboBox combox, IEnumerable enumList, bool ExcludeAllItem = true ) : void

使用字符填充combox

FillComberWithArray ( ComboBox combox, string enumList, bool ExcludeAllItem = true ) : void

使用字符填充combox

FillComberWithEnum ( ComboBox combox, Type enumType, bool ExcludeAllItem = true ) : void

枚举填充Combox

InputBox ( string prompt, string title = "中和软件" ) : string

输入框

ListViewColumnResize ( ListView lstview ) : void

自动调整列宽度

OpenForm ( Form mfrm, bool isUseAppIcon ) : void

对话框子窗体的统一管理

OpenModalForm ( Form mfrm, bool isDispose, bool isUseAppIcon ) : void

对话框子窗体的统一管理(模态)

PickFile ( FileDialogMode mode, string filter = "*.*(All Files)|*.*" ) : string

选取文件

PickFolder ( ) : string

选择文件夹

SetUp ( Form orgForm, bool showDialog = true ) : void

格式化窗体

Method Details

FillComberWithArray() public static method

使用字符填充combox
public static FillComberWithArray ( ComboBox combox, IEnumerable enumList, bool ExcludeAllItem = true ) : void
combox System.Windows.Forms.ComboBox
enumList IEnumerable
ExcludeAllItem bool
return void

FillComberWithArray() public static method

使用字符填充combox
public static FillComberWithArray ( ComboBox combox, string enumList, bool ExcludeAllItem = true ) : void
combox System.Windows.Forms.ComboBox
enumList string
ExcludeAllItem bool
return void

FillComberWithEnum() public static method

枚举填充Combox
public static FillComberWithEnum ( ComboBox combox, Type enumType, bool ExcludeAllItem = true ) : void
combox System.Windows.Forms.ComboBox
enumType System.Type
ExcludeAllItem bool
return void

InputBox() public static method

输入框
public static InputBox ( string prompt, string title = "中和软件" ) : string
prompt string
title string
return string

ListViewColumnResize() public static method

自动调整列宽度
public static ListViewColumnResize ( ListView lstview ) : void
lstview System.Windows.Forms.ListView
return void

OpenForm() public static method

对话框子窗体的统一管理
public static OpenForm ( Form mfrm, bool isUseAppIcon ) : void
mfrm System.Windows.Forms.Form
isUseAppIcon bool
return void

OpenModalForm() public static method

对话框子窗体的统一管理(模态)
public static OpenModalForm ( Form mfrm, bool isDispose, bool isUseAppIcon ) : void
mfrm System.Windows.Forms.Form
isDispose bool 有些时候需要使用被打开窗体产生的数据,所以不能Dispose
isUseAppIcon bool
return void

PickFile() public static method

选取文件
public static PickFile ( FileDialogMode mode, string filter = "*.*(All Files)|*.*" ) : string
mode FileDialogMode 模式
filter string 过滤器
return string

PickFolder() public static method

选择文件夹
public static PickFolder ( ) : string
return string

SetUp() public static method

格式化窗体
public static SetUp ( Form orgForm, bool showDialog = true ) : void
orgForm System.Windows.Forms.Form
showDialog bool
return void