Example #1
0
        public static void EditScript(EditorController controller, ref IEditableScripts scripts, string attribute, string element, bool isReadOnly, Action dirtyAction)
        {
            ScriptEditorPopOut popOut = new ScriptEditorPopOut();

            popOut.ctlScriptEditor.HidePopOutButton();
            popOut.ctlScriptEditor.Helper.DoInitialise(controller, null);
            popOut.ctlScriptEditor.Populate(scripts);
            popOut.ctlScriptEditor.Helper.Dirty += (object sender, DataModifiedEventArgs e) => dirtyAction.Invoke();

            popOut.ShowDialog();
            scripts = popOut.ctlScriptEditor.Scripts;
            popOut.ctlScriptEditor.Save();
        }
Example #2
0
 void ctlToolbar_PopOut()
 {
     ScriptEditorPopOut popOut = new ScriptEditorPopOut();
     popOut.ScriptEditor.Helper.Dirty += PopOut_Dirty;
     popOut.ScriptEditor.Helper.RequestParentElementEditorSave += PopOut_RequestParentElementEditorSave;
     popOut.ScriptEditor.Helper.DoInitialise(m_helper.Controller, m_helper.ControlDefinition);
     popOut.ScriptEditor.ReadOnly = m_readOnly;
     popOut.ScriptEditor.Populate(m_scripts);
     popOut.ShowDialog();
     m_scripts = popOut.ScriptEditor.m_scripts;
 }