/// <summary> /// 便签页 /// </summary> /// <param name="id">D</param> public WindowNotepad(WindowSettingsM windowSettings) { _windowSettings = windowSettings; InitializeComponent(); SystemSetting = NotepadManage.SystemSetting; if (_windowSettings == null || string.IsNullOrEmpty(_windowSettings.BackColorName)) { SkinM = new SkinManage().GetRandom(); } }
/// <summary> /// 设置提醒回调函数 /// </summary> private void RemindAction() { if (Dispatcher.Thread != Thread.CurrentThread) { this.Dispatcher.Invoke(new Action(() => { WindowTopmost = true; Activate(); WindowTopmost = false; })); } else { WindowTopmost = true; Activate(); WindowTopmost = false; } SkinM oldSkinM = this.SkinM; System.Collections.Generic.List <SkinM> list = new SkinManage().Init(); foreach (SkinM m in list) { this.SkinM = m; Thread.Sleep(300); } this.SkinM = oldSkinM; if (Dispatcher.Thread != Thread.CurrentThread) { this.Dispatcher.Invoke(new Action(() => { RemindActionShowWindowMessage2(); })); } else { RemindActionShowWindowMessage2(); } }