private void OnPropertyDlgClose(object dialog)
        {
            _parentTemplate = null;

            AddPropertyDialog dlg = dialog as AddPropertyDialog;

            dlg.onAddClick -= OnAddPropertyClick;
            dlg.onClose    -= OnValueDlgClose;
        }
        private void AddPropertyDialog(BaseTemplate parent)
        {
            _parentTemplate = parent;

            AddPropertyDialog dialog = EditorWindow.CreateInstance <AddPropertyDialog>();

            dialog.onAddClick += OnAddPropertyClick;
            dialog.onClose    += OnPropertyDlgClose;

#if UNITY_5 && !UNITY_5_0
            dialog.titleContent.text = "Add Property";
#else
            dialog.title = "Add Property";
#endif

            dialog.ShowAuxWindow();
        }