Exemplo n.º 1
0
        public FmCfg(Form1 fm, string cfgDir, int index)
        {
            InitializeComponent();
            _fm     = fm;
            _cfgDir = cfgDir;
            _index  = index;

            _batches = RepConfig.LoadDir(_cfgDir);
        }
Exemplo n.º 2
0
        private bool HasChanged()
        {
            var olds = RepConfig.LoadDir(_cfgDir);

            for (int i = 0; i < olds.Count; i++)
            {
                if (i >= _batches.Count || JSON.Stringify(_batches[i]) != JSON.Stringify(olds[i]))
                {
                    return(true);
                }
            }
            return(false);
        }
Exemplo n.º 3
0
        public void LoadConfig()
        {
            var index = tComboBox.SelectedIndex;

            _batches = RepConfig.LoadDir(_cfgDir);
            Invoke(new ClearItemsD(ClearItems));
            for (int i = 0; i < _batches.Count; i++)
            {
                Invoke(new AddItemD(AddItem), _batches[i].Title);
            }
            if (tComboBox.Items.Count > index && index != -1)
            {
                tComboBox.SelectedIndex = index;
            }
        }