PropertyGrid 用法 下拉框篇

2021-03-31 15:02:05 字數 1710 閱讀 4771

如果有在propertygrid中用下拉框的朋友有困難的,請參見下面。並希望高手提出意見,

說明:下面的**是不能run的。這是直接copy了我的東西,想用的朋友,需要修一些地方.

using system;

using system.text;

using system.reflection;

using system.collections;

using system.***ponentmodel;

using system.runtime.interopservices;

using system.data;

using system.drawing;

using system.drawing.design;

namespace ***.workflowenginer.entity

public override object editvalue(itypedescriptorcontext context, iserviceprovider provider, object value)

return value;}}

public class dropdownlistrolecontroll : system.windows.forms.listbox

}this._iws = iws;

this.visible = true;

this.height =100;

this.borderstyle = system.windows.forms.borderstyle.none;

//新增事件

this.selectedvaluechanged +=new eventhandler(cb_selectedvaluechanged);

}//此處可以修改

private ***.workflowenginer.entity.role select = null;

public ***.workflowenginer.entity.role selectstring

}private system.windows.forms.design.iwindowsformseditorservice _iws;

private void cb_selectedvaluechanged(object sender, eventargs e)

else

system.windows.forms.messagebox.show("無物件可得","提示",system.windows.forms.messageboxbuttons.ok,system.windows.forms.messageboxicon.error);}}

#endregion

public class activity

[categoryattribute("活動屬性"),

readonlyattribute(false),

browsableattribute(true),

editorattribute(typeof(dropdownlistroleconverter),typeof(system.drawing.design.uitypeeditor)),

descriptionattribute("流程中所需要的角色的名稱."),

showchinese("角色名稱:")

]//此處需要修改

public role role

set

}

Linux下RPM 命令用法

一 rpm介紹 1.什麼是rpm rpm 即redhat package management,是redhat的發明之一 2.為什麼需要rpm 在一個作業系統下,需要安裝實現各種功能的軟體包。這些軟體包一般都有各自的程式,但是同時也有錯綜複雜的依賴關係。同時還需要 解決軟體包的版本,以及安裝,配置,...

linux 下 scp 的用法

copy 本地的檔案到遠端的機器上 scp etc lilo.conf k net67.ee.oit.edu.tw home k 會將本地的 etc lilo.conf 這個檔案 copy 到 net67.ee.oit.edu.tw,使用者 k 的家目錄下。copy遠端機器上的檔案到本地來 scp ...

Linux下scp的用法

scp就是secure copy,一個在linux下用來進行遠端拷貝檔案的命令。有時我們需要獲得遠端伺服器上的某個檔案,該伺服器既沒有配置ftp伺服器,也沒有做共享,無法通過常規途徑獲得檔案時,只需要通過簡單的scp命令便可達到目的。一 將本機檔案複製到遠端伺服器上 scp home adminis...

Linux下vi的用法

linux下vi的用法 linux知識寶庫 pcworld.com.cn 2005 09 01 10 14 引 linux下vi的基本用法指南.一 基本命令介紹 1.游標命令 k j h l 上 下 左 右游標移動命令。雖然您可以在linux中使用鍵盤右邊的4個游標鍵,但是記住這4個命令還是非常有用...

Ubuntu下,grep的用法

grep global search regular expression and print out the line 是一種強大的文字搜尋工具,它能使用正規表示式搜尋文字,並把匹配的行列印出來。unix的grep家族還包括egrep ext 和fgrep fixed grep使用的正規表示式元字...