private void LeftPanel_DragEnter(object sender, DragEventArgs e) { Point p = PointToClient(new Point(e.X, e.Y)); Control ctrl = e.Data.GetData(e.Data.GetFormats(true)[0]) as Control; if (ctrl is L_ListCell) { e.Effect = DragDropEffects.Move; rec = new Rectangle(0, p.Y - 2, LeftPanel.Width, 4); onDrag = true; LeftPanel.Refresh(); } else { e.Effect = DragDropEffects.None; } }
private void WorkerDownloadThumbsProgressChanged(object sender, ProgressChangedEventArgs e) { ProgressPanel.Visible = true; CurrentAction.Text = Resources.LoadingThumbnails; Progress.Maximum = 100; Progress.Value = e.ProgressPercentage; if (e.UserState is string) { CurrentAction.Text = (string)e.UserState; } LeftPanel.Refresh(); foreach (var control in LeftPanel.Controls.OfType <MetroTile>()) { control.Refresh(); } Application.DoEvents(); }
private void WorkerDownloadThumbsCompleted(object sender, RunWorkerCompletedEventArgs e) { CurrentAction.Text = Resources.ReadyToCopy; LeftPanel.Refresh(); foreach (var control in LeftPanel.Controls.OfType <MetroTile>()) { control.Refresh(); } Application.DoEvents(); if (!_autoMode) { EnablePanels(); if (!_autoMode) { return; } } CopyFilesAsync(); }
private void LeftPanel_DragLeave(object sender, EventArgs e) { onDrag = false; LeftPanel.Refresh(); }