public void IncrementProgress(object o) { if (Progress.InvokeRequired) { SetValueCallBack callBack = new SetValueCallBack(IncrementProgress); Progress.Invoke(callBack, o); } else { Progress.Increment((int)o); } }
public void SetProgressValue(object o) { if (Progress.InvokeRequired) { SetValueCallBack callBack = new SetValueCallBack(SetProgressValue); Progress.Invoke(callBack, o); } else { Progress.Value = (int)o; } }
public void SetProgressMax(object o) { if (Progress.InvokeRequired) { SetValueCallBack callBack = new SetValueCallBack(SetProgressMax); Progress.Invoke(callBack, o); } else { Console.WriteLine("Updateting"); Progress.Maximum = (int)o; } }
public void updateProgress(int value) { Thread.Sleep(10); if (label8.InvokeRequired) { SetValueCallBack d = new SetValueCallBack(updateProgress); this.Invoke(d, new object[] { value }); } else { this.label8.Text = value.ToString(); this.label8.Visible = true; } }
public void HideProgress(object o) { if (Progress.InvokeRequired) { SetValueCallBack callBack = new SetValueCallBack(HideProgress); Progress.Invoke(callBack, o); } else { Progress.Visible = (bool)o; //Kør kode der gør at man kan trykke på knapperne igen filmToolStripMenuItem.Enabled = true; toolStripMenuItem1.Enabled = true; settingsToolStripMenuItem.Enabled = true; helpToolStripMenuItem.Enabled = true; FilmGrid.Enabled = true; } }
public void showWindow(GenericProperties prop, SetValueCallBack valueCallBack, bool ForceToTshow) { try { setCallback = valueCallBack; propertyGrid1.SelectedObject = prop; Text = "Properties of " + prop.Form_Text; } catch (Exception e) { LogManager.Log("Properties Windows error: " + e.Message); } if (ForceToTshow) { Show(); if (this.WindowState == FormWindowState.Minimized) { this.WindowState = FormWindowState.Normal; } } }