static void ShowLockScreen() { Utils.ToCardLog(String.Format("ShowLockScreen")); HideLockScreen(); try { LockScreeen = new frmLockScreeen(); LockScreeen.Show(); } catch (Exception e) { Utils.ToCardLog(String.Format("[Error] ShowLockScreen " + e.Message)); } }
static void HideLockScreen() { if (LockScreeen != null) { Utils.ToCardLog(String.Format("HideLockScreen")); try { try { LockScreeen.mClose(); } catch (Exception e) { Utils.ToCardLog(String.Format("Error HideLockScreen " + e.Message)); } /* * LockScreeen.Dispatcher.BeginInvoke(((Action)(() => * { * try * { * Utils.ToCardLog(String.Format("LockScreeen.Dispatcher.BeginInvoke")); * LockScreeen.Close(); * } * catch (Exception e) * { * Utils.ToCardLog(String.Format("Error LockScreeen.Dispatcher.BeginInvoke " +e.Message)); * } * }))); * */ } catch (Exception) { } LockScreeen = null; } }