示例#1
0
bool VDUIDialogPlugins::OnCommand(uint32 id, uint32 extcode) {
	switch(id) {
		case IDC_CONFIGURE:
			{
				ListItem *item = static_cast<ListItem *>(mList.GetSelectedItem());

				if (item && item->HasConfigure()) {
					item->Configure(mhdlg);
				}
			}
			return true;

		case IDC_ABOUT:
			{
				ListItem *item = static_cast<ListItem *>(mList.GetSelectedItem());

				if (item && item->HasAbout()) {
					item->About(mhdlg);
				}
			}
			return true;
	}
	return false;
}
示例#2
0
void VDUIDialogPlugins::OnItemSelectionChanged(VDUIProxyListView *source, int index) {
	ListItem *item = static_cast<ListItem *>(mList.GetSelectedItem());

	EnableControl(IDC_ABOUT, item && item->HasAbout());
	EnableControl(IDC_ABOUT, item && item->HasConfigure());
}