Esempio n. 1
0
        public JLinkSettingsFormViewModel(IProject model) : base(model)
        {
            settings = JLinkDebugAdaptor.GetSettings(model);

            interfaceSelectedIndex = (int)settings.Interface;
            interfaceType          = settings.Interface;

            speedSelectedIndex = SpeedOptions.IndexOf(settings.SpeedkHz.ToString());

            speed = settings.SpeedkHz.ToString();

            string devPath = Path.Combine(JLinkDebugAdaptor.BaseDirectory, "devices.csv");

            deviceList = new ObservableCollection <JLinkTargetDeviceViewModel>();

            if (System.IO.File.Exists(devPath))
            {
                LoadDeviceList(devPath);
            }
        }
        public JLinkSettingsFormViewModel(IProject model) : base(model)
        {
            settings = model.GetDebuggerSettings <JLinkSettings>();

            interfaceSelectedIndex = (int)settings.Interface;
            interfaceType          = settings.Interface;
            _download          = settings.Download;
            _reset             = settings.Reset;
            _useRemote         = settings.UseRemote;
            _ipAddress         = settings.RemoteIPAddress;
            _postDownloadReset = settings.PostDownloadReset;
            _run = settings.Run;

            speedSelectedIndex = SpeedOptions.IndexOf(settings.SpeedkHz.ToString());

            speed = settings.SpeedkHz.ToString();

            string devPath = Path.Combine(JLinkDebugger.BaseDirectory, "devices.csv");

            deviceList = new ObservableCollection <JLinkTargetDeviceViewModel>();

            LoadDeviceList(devPath);
        }