private void DiscardAndLoadCallback(IAsyncResult ar) { _discardFramesDel.EndInvoke(ar); Dispatcher.Invoke(() => { FilledList = false; FrameListView.SelectionChanged += FrameListView_SelectionChanged; }); _loadFramesDel = Load; _loadFramesDel.BeginInvoke(LoadCallback, null); GC.Collect(); }
/// <summary> /// Loads the new frames and clears the old ones. /// </summary> /// <param name="listFrames">The new list of frames.</param> private void LoadNewFrames(List<FrameInfo> listFrames, bool clear = true) { Cursor = Cursors.AppStarting; IsLoading = true; FrameListView.Items.Clear(); ZoomBoxControl.Zoom = 1; #region Discard if (ListFrames != null && ListFrames.Any() && clear) { _discardFramesDel = Discard; _discardFramesDel.BeginInvoke(ListFrames, DiscardAndLoadCallback, null); ListFrames = listFrames; return; } #endregion ListFrames = listFrames; _loadFramesDel = Load; _loadFramesDel.BeginInvoke(LoadCallback, null); }
/// <summary> /// Loads the new frames and clears the old ones. /// </summary> /// <param name="listFrames">The new list of frames.</param> private void LoadNewFrames(List<FrameInfo> listFrames) { Cursor = Cursors.AppStarting; EnableDisable(false); ListFrames = listFrames; _loadFramesDel = Load; _loadFramesDel.BeginInvoke(LoadCallback, null); }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (ListFrames != null) { Cursor = Cursors.AppStarting; FrameListView.IsEnabled = false; RibbonTabControl.IsEnabled = false; ActionStack.Prepare(ListFrames[0].ImageLocation); _loadFramesDel = Load; _loadFramesDel.BeginInvoke(LoadCallback, null); } KeyUp += Editor_KeyUp; }
private void Window_Loaded(object sender, RoutedEventArgs e) { if (ListFrames != null) { Cursor = Cursors.AppStarting; FrameListView.IsEnabled = false; RibbonTabControl.IsEnabled = false; ActionStack.Prepare(ListFrames[0].ImageLocation); _loadFramesDel = Load; _loadFramesDel.BeginInvoke(LoadCallback, null); } KeyUp += Editor_KeyUp; //TODO: Check with High dpi. if (Settings.Default.EditorExtendChrome) Glass.ExtendGlassFrame(this, new Thickness(0, 26, 0, 0)); }