Ejemplo n.º 1
0
        private void OnLoadExistingDevice()
        {
            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Multiselect      = false;
            ofd.Filter           = " JSON файл (*.json)|*.json" + "|Все файлы (*.*)|*.* ";
            ofd.CheckFileExists  = true;
            ofd.InitialDirectory = _currentFolder;
            if (ofd.ShowDialog() == true)
            {
                ResultingDeviceViewModel.LoadDevice(ofd.FileName);
                _currentFolder = Path.GetDirectoryName(ofd.FileName);
            }
            DeviceEditorValidationViewModel
            .RefreshErrors.Execute(null);
        }