Example #1
0
        protected override void Bind(Maestro.Editors.IEditorService service)
        {
            panelBody.Controls.Clear();

            var webLayoutEditorCtrl = new WebLayoutEditorCtrl();
            webLayoutEditorCtrl.Dock = DockStyle.Fill;
            panelBody.Controls.Add(webLayoutEditorCtrl);

            webLayoutEditorCtrl.Bind(service);
        }
Example #2
0
        private void LoadWebLayoutEditor(string webLayoutId)
        {
            //Tear down existing editor service if needed
            if (_edSvc != null)
            {
                _edSvc.DirtyStateChanged -= OnDirtyStateChanged;
            }

            _edSvc = new MyResourceEditorService(webLayoutId, _conn);
            _edSvc.DirtyStateChanged += OnDirtyStateChanged;
            //Each resource editor is named in the form: [Resource Type]EditorCtrl
            var ed = new WebLayoutEditorCtrl();
            ed.Dock = DockStyle.Fill;

            panel1.Controls.Clear();
            panel1.Controls.Add(ed);

            //Bind() performs all the setup work. Do this after adding the control to whatever parent container
            ed.Bind(_edSvc);
        }