private void manageGuiState() { if (this.pbGo.InvokeRequired) { GuiStateDelegate d = new GuiStateDelegate(manageGuiState); this.Invoke(d, new object[] { }); } if (busy) { pbGo.Enabled = false; pbCancel.Enabled = true; return; } pbCancel.Enabled = false; try { pbGo.Enabled = this.tbFirstFile.Text.Length > 0 && System.IO.File.Exists(this.tbFirstFile.Text) && this.tbOutPath.Text.Length > 0 && System.IO.Directory.Exists(this.tbOutPath.Text); //&& (this.restoThread == null || !this.restoThread.IsAlive); } catch (Exception) { pbGo.Enabled = false; } }
private void manageGuiState() { if (this.pbGo.InvokeRequired) { GuiStateDelegate d = new GuiStateDelegate(manageGuiState); this.Invoke(d, new object[] { }); } if (busy) { pbGo.Enabled = false; pbCancel.Enabled = true; return; } pbCancel.Enabled = false; try { pbGo.Enabled = this.tbFirstFile.Text.Length > 0 && System.IO.File.Exists(this.tbFirstFile.Text) && this.tbOutPath.Text.Length > 0 && System.IO.Directory.Exists(this.tbOutPath.Text); //&& (this.restoThread == null || !this.restoThread.IsAlive); } catch (Exception) { pbGo.Enabled = false; } }