public ISecurityAccessAlgorithm GetSecurityAccessAlgorithm() { DcmCanConfig config = propertyGrid.SelectedObject as DcmCanConfig; return(SecurityAccessAlgorithManager.Instance(). GetSecurityAccessAlgorithm(config.SecurityAccessType)); }
public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context) { var names = SecurityAccessAlgorithManager.Instance().GetSecurityAccessAlgorithNames(); List <string> ret = new List <string>(); foreach (var name in names) { ret.Add(name); } return(new StandardValuesCollection(ret.ToArray())); }
public static SecurityAccessAlgorithManager Instance() { if (instance == null) { lock (syncRoot) { if (instance == null) { instance = new SecurityAccessAlgorithManager(); } } } return(instance); }
public DcmCanConfig() { CanPhysicalRequestId = 0x766; CanFunctionRequestId = 0x7DF; CanResponseId = 0x706; CanTickEnabled = false; CanTickPeriod = 3; SuppressResponse = true; foreach (var name in SecurityAccessAlgorithManager.Instance() .GetSecurityAccessAlgorithNames()) { SecurityAccessType = name; break; } }