public void Reset() { IEnumerator enumerator = deviceCollection.GetEnumerator(); while (enumerator.MoveNext()) { HardwareSupport device1 = (HardwareSupport)enumerator.Current; device1.Reset(); } }
public void Close() { try { IEnumerator enumerator = deviceCollection.GetEnumerator(); while (enumerator.MoveNext()) { HardwareSupport device1 = (HardwareSupport)enumerator.Current; device1.Close(); } deviceCollection.Clear(); } catch { } }
// void posPrinter_StatusEvent(object sender) // { // throw new NotImplementedException(); // } public HardwareSupport CheckHealth() { IEnumerator enumerator = deviceCollection.GetEnumerator(); while (enumerator.MoveNext()) { HardwareSupport device1 = (HardwareSupport)enumerator.Current; bool ok = device1.CheckHealth(); if (!ok) { errorText = device1.DeviceText() + device1.StatusText(); MessageBox.Show("Hardware error" + errorText); return(device1); } } return(null); }
public static extern int core_checkHardwareSupport([MarshalAs(UnmanagedType.I4)] HardwareSupport feature);
public static bool checkHardwareSupport(HardwareSupport feature) { return CppInvoke.cv_checkHardwareSupport(feature); }
/// <summary> /// /// </summary> /// <param name="feature"></param> /// <returns></returns> public static bool CheckHardwareSupport(HardwareSupport feature) { return NativeMethods.core_checkHardwareSupport(feature) != 0; }