Пример #1
0
        private void ReadLockBitsCommand(object sender, ExecutedRoutedEventArgs e)
        {
            var dlg = new ReadLockBitsWindow {
                DataContext = new FlasherOperationModel(_model),
                Owner       = this
            };

            dlg.ShowDialog();
        }
Пример #2
0
        private void LockBitsWindow_OnLoaded(object sender, RoutedEventArgs e)
        {
            var dlg = new ReadLockBitsWindow {
                DataContext = new FlasherOperationModel(Model),
                Owner       = this
            };

            dlg.ShowDialog();

            var settings = Model.Config;
            var lockBits = settings.Device.LockBits;

            var locksData = Model.LocksHexBoard;

            lockBits.ApplyFrom(locksData);

            DeviceBitsView.DataContext = new DeviceBitsModel {
                HexBoard   = Model.LocksHexBoard.Clone(),
                DeviceBits = lockBits
            };
        }