Exemple #1
0
        public LayerViewModel(string tc, string paramFilePath, Configs.LayerViewModel layerConfig, Config config)
        {
            this.tc                = tc;
            this.paramFilePath     = paramFilePath;
            this.layerConfig       = layerConfig;
            this.sysConfig         = config;
            this.Name              = layerConfig.Name;
            this.RunDataCollection = new ObservableCollection <DeveInfo>();
            deveInfo               = new DeveInfo
            {
                sbbh   = layerConfig.Name,
                sm     = 1,
                lhcsdy = System.IO.Path.GetFileNameWithoutExtension(paramFilePath),
                acsr   = "380.00",
                aczt   = "OFF",
                zs     = layerConfig.UUTList.Count,
                hg     = 0,
                bl     = 0,
                bll    = "0%"
            };
            this.RunDataCollection.Add(deveInfo);
            this.lhsjEnum = LHSJEnum.LHZSJ;
            this.LHSJName = FunExt.GetDescription(lhsjEnum);

            this.IsSDJCEnable = true;
            this.IsKSCSEnable = true;
            this.IsZTCSEnable = false;
            this.IsTZCSEnable = false;

            this.Lhzsj = (int)((layerConfig.LHSJ.ToFloat()) * 60 * 60);
            this.Lhbfb = "等待测试 0%";
        }
        private TCViewModel getTC(Configs.LayerViewModel model)
        {
            TCViewModel ok = null;

            foreach (var tc in TCList)
            {
                foreach (var layer in tc.LayerList)
                {
                    if (layer.Code == model.Code)
                    {
                        ok = tc;
                    }
                }
            }
            return(ok);
        }
Exemple #3
0
        private void ModifyLayer(Configs.LayerViewModel layer)
        {
            var window = new LayerParamWindow(layer);
            var dialog = window.ShowDialog().GetValueOrDefault();

            if (dialog)
            {
                if (window.IsAllLayer)
                {
                    foreach (var item in TCList.First().LayerList)
                    {
                        item.LHSJ = layer.LHSJ;
                    }
                }
            }
        }
        private void AddUUT(Configs.LayerViewModel layerSource)
        {
            if (layerSource == null)
            {
                return;
            }

            var window = new UUTConfigWindow();
            var dialog = window.ShowDialog();

            if (dialog.GetValueOrDefault())
            {
                if (window.IsAllTC && window.IsAllLayer)
                {
                    int max = window.MaxCode.ToInt32();
                    foreach (var tc in TCList)
                    {
                        foreach (var layer in tc.LayerList)
                        {
                            layer.UUTList.Clear();
                            for (int i = 1; i <= max; i++)
                            {
                                var uut = new UUTViewModel {
                                    Code = i.ToString()
                                };
                                uut.Init();
                                layer.UUTList.Add(uut);
                            }
                        }
                    }
                }
                else if (window.IsAllTC == false && window.IsAllLayer)
                {
                    var tc  = getTC(layerSource);
                    int max = window.MaxCode.ToInt32();
                    if (max > 0)
                    {
                        foreach (var layer in tc.LayerList)
                        {
                            layer.UUTList.Clear();
                            for (int i = 1; i <= max; i++)
                            {
                                var uut = new UUTViewModel {
                                    Code = i.ToString()
                                };
                                uut.Init();
                                layer.UUTList.Add(uut);
                            }
                        }
                    }
                }
                else
                {
                    int max = window.MaxCode.ToInt32();
                    if (max > 0)
                    {
                        for (int i = 1; i <= max; i++)
                        {
                            var uut = new UUTViewModel {
                                Code = i.ToString()
                            };
                            uut.Init();
                            layerSource.UUTList.Add(uut);
                        }
                    }
                    else
                    {
                        layerSource.UUTList.Add(window.UUTViewModel);
                    }
                }
            }
        }
Exemple #5
0
 private void DeleteLayer(Configs.LayerViewModel layer)
 {
 }