private void PropertyForm_Load(object sender, EventArgs e) { AnnObject annObject = TifEditor.GetCurrentEditor().AnnAutomation.CurrentEditObject; AnnTextObject obj = annObject as AnnTextObject; if (obj != null && obj.GetType() != typeof(AnnStampObject)) { this.Opacity = 100; InitializeValue(); } else { /* if (obj != null && obj.GetType() == typeof(AnnStampObject)) * { * */ if (obj == null) { MessageBox.Show("The property form is not supported for selected object in this version."); } /* * }*/ this.Close(); } }
private void PropertyForm_FormClosed(object sender, FormClosedEventArgs e) { try { TifEditor.GetCurrentEditor().Viewer.Invalidate(); } catch (Exception ex) { } }
private void SetObjectValue() { AnnObject annObject = TifEditor.GetCurrentEditor().AnnAutomation.CurrentEditObject; AnnTextObject obj = annObject as AnnTextObject; if (obj != null) { obj.Text = txtData.Text; } }