public LyricEditor() { InitializeComponent(); Current = this; autoEvent = new AutoResetEvent(false); ApplicationView.GetForCurrentView().Consolidated += LyricEditor_Consolidated; }
public LyricEditor() { InitializeComponent(); RequestedTheme = Settings.Current.Theme; Current = this; autoEvent = new AutoResetEvent(false); ApplicationView.GetForCurrentView().Consolidated += LyricEditor_Consolidated; RequestedTheme = Settings.Current.Theme; }
private void LyricEditor_Consolidated(ApplicationView sender, ApplicationViewConsolidatedEventArgs args) { PlaybackEngine.PlaybackEngine.Current.PositionUpdated -= Current_PositionUpdated; LyricModified?.Invoke(null, Model); var previous = StampCanvas.Children.Where(a => a is Thumb).ToList(); foreach (var item in previous) { StampCanvas.Children.Remove(item); (item as Thumb).DragStarted -= T_DragStarted; (item as Thumb).DragCompleted -= T_DragCompleted; (item as Thumb).DragDelta -= T_DragDelta; } previous.Clear(); previous = null; Dispose(); Current = null; Window.Current.Close(); }