Пример #1
0
 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));
 }
Пример #2
0
 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));
 }
Пример #3
0
 /// <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>();
 }
Пример #4
0
 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));
 }
Пример #5
0
 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));
     }
 }
Пример #6
0
 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));
     }
 }
Пример #7
0
        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");
        }
Пример #9
0
 public CompleteGraph(Itemvm parent)
     : base("布线总图", null, "", parent)
 {
 }
 public LogicLoopGenerator(Itemvm parent)
     : base("逻辑回路", null, "", parent)
 {
 }
Пример #11
0
 public VccToGndGraph(Itemvm parent)
     : base("总正至总负", null, "", parent)
 {
 }
Пример #12
0
 public GndTestGenerator(Itemvm parent)
     : base("地线导通测试", null, "", parent)
 {
 }
Пример #13
0
 public CFToGndGraph(Itemvm parent)
     : base("测试点至总负", null, "", parent)
 {
 }
Пример #14
0
 public CptRelationDisplay(Itemvm parent)
     : base("元件清单表", null, "", parent)
 {
 }
Пример #15
0
 public CptDisplay(Itemvm parent)
     : base("元件名称表", null, "", parent)
 {
 }
Пример #16
0
 public ConTactorLibDisplay(Itemvm parent)
     : base("接触器库", null, "", parent)
 {
 }
Пример #17
0
 public RelayLibDisplay(Itemvm parent)
     : base("继电器库", null, "", parent)
 {
 }
Пример #18
0
 public IndicatorLibDisplay(Itemvm parent)
     : base("指示灯模块库", null, "", parent)
 {
 }
Пример #19
0
 public HandShake(Itemvm parent)
     : base("上电测试", null, "", parent)
 {
 }
Пример #20
0
 public CellListConfig(Itemvm parent)
     : base("元件清单", null, "/Image/list.png", parent)
 {
 }
Пример #21
0
 public LinkerCfg(Itemvm parent)
     : base("接口配置", null, "/Image/linker.png", parent)
 {
 }
 public LinkerCfgGenerator(Itemvm parent)
     : base("接口生成", null, "", parent)
 {
 }
Пример #23
0
 public VoltDisplay(Itemvm parent)
     : base("电压给定表", null, "", parent)
 {
 }
Пример #24
0
 /// <summary>
 /// 构造父节点菜单
 /// </summary>
 public MenuType(string name, Itemvm vm)
 {
     this.childMenus = new List <MenuType>();
     this.name       = name;
     this.vm         = vm;
 }
Пример #25
0
 public TBDisplay(Itemvm parent)
     : base("端子排短接表", null, "", parent)
 {
 }
Пример #26
0
 public VccTestGenerator(Itemvm parent)
     : base("110V导通测试", null, "", parent)
 {
 }
 public NormalTestGenerator(Itemvm parent)
     : base("普通导通测试", null, "", parent)
 {
 }
Пример #28
0
 public VccToCFGraph(Itemvm parent)
     : base("总正至测试点", null, "", parent)
 {
 }
 public LogicTestGenerator(Itemvm parent)
     : base("逻辑测试", null, "", parent)
 {
 }