private JsonNetDemo GetSelectJsonNetDemo() { OLVListItem item = olvFast.SelectedItem; JsonNetDemo demo = item.RowObject as JsonNetDemo; return(demo); }
private void olvFast_DoubleClick(object sender, EventArgs e) { JsonNetDemo demo = GetSelectJsonNetDemo(); if (demo != null) { switch (demo.Id) { case 1: //系列化一个对象 case 2: //系列化一个Collection case 3: //系列化一个Dictionary SetUi(demo); break; } } }
private void SetUi(JsonNetDemo demo) { btnDemo.Text = demo.Name; btnDemo.Name = demo.Id.ToString(); splitContainer3.Visible = true; }