示例#1
0
        public IEDLoad GetEDLoad(string name)
        {
            IEDLoad load = null;
            IEDSett set  = GetEDSett();
            Port    port;


            switch (name)
            {
            case "I":
                port = new Port()
                {
                    CellHelper  = new CellHelperI(),
                    EvFile      = new FileValidation(),
                    EvTarget    = new TargetValidation(),
                    EvSample    = new SampleValidation(),
                    Group       = new GroupI(),
                    Calculation = new CalculateI(),
                    Output      = new OutPutI(),
                    ExcIns      = excIns,
                    DbIns       = dbIns,
                    JoinDb      = Convert.ToBoolean(set.Read("JoinDb"))
                };
                port.CqHelper = new CqHelperI(port.EvTarget, port.EvSample);
                load          = new Load.LoadI(port);
                break;

            case "II":
                port = new Port()
                {
                    CellHelper  = new CellHelperI(),
                    EvFile      = new FileValidation(),
                    EvTarget    = new TargetValidation(),
                    EvSample    = new SampleValidation(),
                    Group       = new GroupII(),
                    Calculation = new CalculateI(),
                    Output      = new OutPutII(),
                    ExcIns      = excIns,
                    DbIns       = dbIns,
                    JoinDb      = Convert.ToBoolean(set.Read("JoinDb"))
                };
                port.CqHelper = new CqHelperII(port.EvTarget, port.EvSample);

                load = new LoadII(port); break;

            default:
                break;
            }

            return(load);
        }
示例#2
0
        private void cbType_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            string value = set.Read("OutType");

            if (value != bs.SelectedItem)
            {
                set.Write("OutType", bs.SelectedItem);
            }
        }
示例#3
0
        public MainWindow()
        {
            instance = new Export();
            set      = instance.GetEDSett();
            //set.Write("OutTypeList", "I,II");

            string value = set.Read("OutTypeList");

            bs = new BindSoure()
            {
                Items        = value?.Split(','),
                SelectedItem = set.Read("OutType"),
                Title        = _titlehead,
                JoinDb       = Convert.ToBoolean(set.Read("JoinDb"))
            };

            InitializeComponent();
            this.DataContext = bs;

            //bar.Visibility = Visibility.Collapsed;
            //cbType.ItemsSource = lt;
            //cbType.SelectedItem = value;
        }