/// <summary> /// /// </summary> /// <param name="sender"></param> /// <param name="e"></param> void t_AfterSelect(object sender, TreeViewEventArgs e) { TreeNode node = e.Node; Model model = null; if (node is DeviceTreeNode) { DeviceTreeNode deviceNode = node as DeviceTreeNode; IDevice device = deviceNode.Device; //this.UCTaskViewer.Device = deviceNode.Device; //this.ViewerWrapper.View(device); model = new DeviceMode(device); } else if (node is StationTreeNode) { StationTreeNode stationNode = node as StationTreeNode; IStation station = stationNode.Station; //this.ViewerWrapper.View(station); model = new StationModel(station); } this.ControllerManager.Act(model); }