Beispiel #1
0
        private void listViewDevicesItemChecked(object sender, ItemCheckedEventArgs e)
        {
            var CDevice = e.Item.Tag as ComputeDevice;

            CDevice.Enabled = e.Item.Checked;

            if (SaveToGeneralConfig)
            {
                ConfigManager.GeneralConfigFileCommit();
            }
            var lvi = e.Item as ListViewItem;

            if (lvi != null)
            {
                _listItemCheckColorSetter.LviSetColor(lvi);
            }
            if (_algorithmsListView != null)
            {
                _algorithmsListView.RepaintStatus(CDevice.Enabled, CDevice.UUID);
            }
            if (BenchmarkCalculation != null)
            {
                BenchmarkCalculation.CalcBenchmarkDevicesAlgorithmQueue();
            }
        }
        private void listViewDevicesItemChecked(object sender, ItemCheckedEventArgs e)
        {
            ComputeDeviceEnabledOption G = e.Item.Tag as ComputeDeviceEnabledOption;

            G.IsEnabled = e.Item.Checked;
            if (AutoSaveChange)
            {
                G.SaveOption();
            }
            if (SaveToGeneralConfig)
            {
                ConfigManager.Instance.GeneralConfig.Commit();
            }
            var lvi = e.Item as ListViewItem;

            if (lvi != null)
            {
                _listItemCheckColorSetter.LviSetColor(lvi);
            }
            if (_algorithmsListView != null)
            {
                _algorithmsListView.RepaintStatus(G.IsEnabled, G.CDevice.UUID);
            }
            if (BenchmarkCalculation != null)
            {
                BenchmarkCalculation.CalcBenchmarkDevicesAlgorithmQueue();
            }
        }
        private void ListViewDevicesItemChecked(object sender, ItemCheckedEventArgs e)
        {
            var CDevice = e.Item.Tag as ComputeDevice;

            CDevice.Enabled = e.Item.Checked;

            if (e.Item is ListViewItem lvi)
            {
                _listItemCheckColorSetter.LviSetColor(lvi);
            }
            if (_algorithmsListView != null)
            {
                _algorithmsListView.RepaintStatus(CDevice.Enabled, CDevice.UUID);
            }
            if (BenchmarkCalculation != null)
            {
                BenchmarkCalculation.CalcBenchmarkDevicesAlgorithmQueue();
            }
        }