public Config(Itemvm parent) : base("配置", null, "/Image/config.png", parent) { this.Itemvms.Add(new CellConfig(this)); this.Itemvms.Add(new CellLibConfig(this)); this.Itemvms.Add(new CellListConfig(this)); }
public GraphGenerator(Itemvm parent) : base("布线图生成", null, "/Image/graph.png", parent) { base.Itemvms.Add(new CompleteGraph(this)); base.Itemvms.Add(new VccToGndGraph(this)); base.Itemvms.Add(new VccToCFGraph(this)); base.Itemvms.Add(new CFToGndGraph(this)); }
/// <summary> /// 创建非根节点 /// </summary> /// <param name="type">新建目录项的类型</param> /// <param name="parcatalog">新建目录项的父目录项</param> public Itemvm(string name, List <MenuType> mns, string icon, Itemvm parcatalog) { this._parent = parcatalog; this._name = name; this.Menus = mns; this.Icon = icon; this._itemvms = new ObservableCollection <Itemvm>(); }
public Operation(Itemvm parent) : base("命令", null, "/Image/download.png", parent) { base.Itemvms.Add(new HandShake(this)); base.Itemvms.Add(new GndTestGenerator(this)); base.Itemvms.Add(new VccTestGenerator(this)); base.Itemvms.Add(new NormalTestGenerator(this)); base.Itemvms.Add(new LogicLoopGenerator(this)); base.Itemvms.Add(new LogicTestGenerator(this)); base.Itemvms.Add(new LinkerCfgGenerator(this)); base.Itemvms.Add(new GraphGenerator(this)); }
public CellLibConfig(Itemvm parent) : base("元件库文件", null, "/Image/lamp.png", parent) { if (config.ContactorPins != null && config.ContactorPins.Count != 0) { base.Itemvms.Add(new ConTactorLibDisplay(this)); } if (config.RelayPins != null && config.RelayPins.Count != 0) { base.Itemvms.Add(new RelayLibDisplay(this)); } if (config.IndicatorPins != null && config.IndicatorPins.Count != 0) { base.Itemvms.Add(new IndicatorLibDisplay(this)); } }
public CellConfig(Itemvm parent) : base("元件配置", null, "/Image/component.png", parent) { if (config.Vsets != null && config.Vsets.Count != 0) { base.Itemvms.Add(new VoltDisplay(this)); } if (config.Cptlib != null && config.Cptlib.Count != 0) { base.Itemvms.Add(new CptDisplay(this)); } if (config.Tblib != null && config.Tblib.Count != 0) { base.Itemvms.Add(new TBDisplay(this)); } }
public static Itemvm findItem(Collection <Itemvm> src, Type type) { Itemvm rst = null; foreach (Itemvm vm in src) { if (vm.GetType() == type) { rst = vm; break; } else { rst = findItem(vm.Itemvms, type); } if (rst != null) { break; } } return(rst); }
public override void DoubleClick(Action <string> showMsg) { Action waitForFinish = () => { Itemvm p = Parent; while (p.Parent != null) { p = p.Parent; } Itemvm cfgItem = p.Itemvms.FirstOrDefault(q => q is Config); Itemvm lg = cfgItem.Itemvms.FirstOrDefault(q => q is LinkerCfg); if (lg == null && config.GenerateLinkerConfig()) { Application.Current.Dispatcher.BeginInvoke( new Action(() => { cfgItem.Itemvms.Add(new LinkerCfg(cfgItem)); showMsg(String.Format("生成连接器与插座映射信息{0}条。\r\n", config.LinkerRelation.LinkerRelation.Count)); })); } }; Messenger.Default.Send <Action>(waitForFinish, "WaitForFinish"); }
public CompleteGraph(Itemvm parent) : base("布线总图", null, "", parent) { }
public LogicLoopGenerator(Itemvm parent) : base("逻辑回路", null, "", parent) { }
public VccToGndGraph(Itemvm parent) : base("总正至总负", null, "", parent) { }
public GndTestGenerator(Itemvm parent) : base("地线导通测试", null, "", parent) { }
public CFToGndGraph(Itemvm parent) : base("测试点至总负", null, "", parent) { }
public CptRelationDisplay(Itemvm parent) : base("元件清单表", null, "", parent) { }
public CptDisplay(Itemvm parent) : base("元件名称表", null, "", parent) { }
public ConTactorLibDisplay(Itemvm parent) : base("接触器库", null, "", parent) { }
public RelayLibDisplay(Itemvm parent) : base("继电器库", null, "", parent) { }
public IndicatorLibDisplay(Itemvm parent) : base("指示灯模块库", null, "", parent) { }
public HandShake(Itemvm parent) : base("上电测试", null, "", parent) { }
public CellListConfig(Itemvm parent) : base("元件清单", null, "/Image/list.png", parent) { }
public LinkerCfg(Itemvm parent) : base("接口配置", null, "/Image/linker.png", parent) { }
public LinkerCfgGenerator(Itemvm parent) : base("接口生成", null, "", parent) { }
public VoltDisplay(Itemvm parent) : base("电压给定表", null, "", parent) { }
/// <summary> /// 构造父节点菜单 /// </summary> public MenuType(string name, Itemvm vm) { this.childMenus = new List <MenuType>(); this.name = name; this.vm = vm; }
public TBDisplay(Itemvm parent) : base("端子排短接表", null, "", parent) { }
public VccTestGenerator(Itemvm parent) : base("110V导通测试", null, "", parent) { }
public NormalTestGenerator(Itemvm parent) : base("普通导通测试", null, "", parent) { }
public VccToCFGraph(Itemvm parent) : base("总正至测试点", null, "", parent) { }
public LogicTestGenerator(Itemvm parent) : base("逻辑测试", null, "", parent) { }