public JLinkSettingsFormViewModel(IProject model) : base(model)
        {
            settings = JLinkDebugAdaptor.GetSettings(model);

            //InterfaceOptions = new List<string>(Enum.GetNames(typeof(JlinkInterfaceType)));
            interfaceSelectedIndex = (int)settings.Interface;
            interfaceType          = settings.Interface;

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

            deviceList = new ObservableCollection <JLinkTargetDeviceViewModel>();

            if (System.IO.File.Exists(devPath))
            {
                LoadDeviceList(devPath);
            }
        }
Esempio n. 2
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);
            }
        }
Esempio n. 3
0
        public static JLinkSettings GetSettings(IProject project)
        {
            JLinkSettings result = null;

            try
            {
                if (project.DebugSettings.JLinkSettings is ExpandoObject)
                {
                    result = (project.DebugSettings.JLinkSettings as ExpandoObject).GetConcreteType <JLinkSettings>();
                }
                else
                {
                    result = project.DebugSettings.JLinkSettings;
                }
            }
            catch (Exception)
            {
                result = project.DebugSettings.JLinkSettings = new JLinkSettings();
            }

            return(result);
        }
        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);
        }
Esempio n. 5
0
 public static void SetSettings(IProject project, JLinkSettings settings)
 {
     project.DebugSettings.JLinkSettings = settings;
 }
		public static void SetSettings(IProject project, JLinkSettings settings)
		{
			project.DebugSettings.JLinkSettings = settings;
		}