private void OnDescriptionEditButtonClick(object sender, EventArgs e) { DescriptionEditWindow = new TextEditWindow(); DescriptionEditWindow.SetChangeEvent(OnDescriptionEditTextChange); DescriptionEditWindow.SetSaveEvent(OnDescriptionEditSaveButtonClick); DescriptionEditWindow.SetCancelEvent(OnDescriptionEditCancelButtonClick); DescriptionEditWindow.SetCloseEvent(OnDescriptionEditClose); DescriptionEditWindow.SetText(ModelofRace.Description); OldDescription = ModelofRace.Description; DescriptionEditWindow.Show(this); DescriptionEditWindow.Left = this.Left + ChildWindowLocation.X; DescriptionEditWindow.Top = this.Top + ChildWindowLocation.Y; }
static void Init() { TextEditWindow window = (TextEditWindow)EditorWindow.GetWindow(typeof(TextEditWindow), false, "Text Editor Window"); window.Show(); }