Private voidListview1_selectedindexchanged (Objectsender, EventArgs e) {Listview1.fullrowselect=true; Idc_dialog1 menu1=NewIdc_dialog1 (); IC_DIALOG2 datas=Newic_dialog2 (); for(intj = ListView1.SelectedIndices.Count-1; J >=0; j--)//determine which item is selected { stringListName = listview1.selecteditems[0]. Text;//Remove the selected name if(ListName = ="Security Settings") {//Determine which dialog box to use according to the selected name This. Panel1. Controls.clear ();//clear the contents of the panel firstMenu1. TopLevel =false;//Remove the top-level properties of the dialog boxMenu1. Dock = System.Windows.Forms.DockStyle.Fill;//make the dialog box full-screen fit panel This. Panel1. Controls.Add (MENU1);//Add to Container panelMenu1. Show ();//Show this dialog box } Else if(ListName = ="Data Management") { This. Panel1. Controls.clear (); Datas. TopLevel=false; Datas. Dock=System.Windows.Forms.DockStyle.Fill; This. Panel1. Controls.Add (datas); Datas. Show (); }}
C # Imitation Thunderbolt style tab