public PropertiesDocImageDialog(int imageID, int docID) : this() { this.ImageID = imageID; this.docID = docID; newWindowDocumentButton.Set(this.docID); }
private void UpdateControls() { if (InvokeRequired) { BeginInvoke((MethodInvoker)(UpdateControls)); return; } if (Disposing || IsDisposed) { return; } bool editMode = buttonOK.Enabled; try { docTypeBlock.Enabled = editMode && typeEnabled; checkBoxName.Enabled = editMode && typeNameEnable; textBoxName.ReadOnly = !editMode || !typeNameEnable || !checkBoxName.Checked; if (editMode && !typeNameEnable) { checkBoxName.Checked = false; textBoxName.Text = ""; } number.ReadOnly = !editMode || !numberEnabled || checkBoxNoNumber.Checked; dateBlock.Enabled = editMode && dateEnabled; description.ReadOnly = !(editMode && descrEnabled); checkBoxProtected.Enabled = editMode && numberEnabled; personBlock.Able = editMode; checkBoxNoNumber.Enabled = editMode && numberEnabled; newWindowDocumentButton.UnSet(); newWindowDocumentButton.Set(DocID); } catch (Exception ex) { Lib.Win.Data.Env.WriteToLog(ex); } }