public override void Bind(IEditorService service)
        {
            try
            {
                _edsvc   = service;
                _fsvc    = (IFusionService)_edsvc.GetService((int)ServiceType.Fusion);
                _context = new FlexibleLayoutEditorContext(_fsvc);
                if (service.CurrentConnection.ProviderName.ToUpper() == "MAESTRO.HTTP")
                {
                    _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE

                    if (!_baseUrl.EndsWith("/"))                                //NOXLATE
                    {
                        _baseUrl += "/";                                        //NOXLATE
                    }
                }
            }
            catch
            {
                throw new NotSupportedException(Strings.IncompatibleConnection);
            }
            service.RegisterCustomNotifier(this);
            _flexLayout = (IApplicationDefinition)service.GetEditedResource();
            InitWidgetSet();
        }
Beispiel #2
0
        public NewWidgetDialog(IApplicationDefinition appDef, FlexibleLayoutEditorContext context)
        {
            InitializeComponent();
            _appDef = appDef;
            _context = context;

            cmbWidgets.DisplayMember = "Type"; //NOXLATE
            cmbWidgets.DataSource = _context.GetAllWidgets();
        }
        public NewWidgetDialog(IApplicationDefinition appDef, FlexibleLayoutEditorContext context)
        {
            InitializeComponent();
            _appDef  = appDef;
            _context = context;

            cmbWidgets.DisplayMember = "Type"; //NOXLATE
            cmbWidgets.DataSource    = _context.GetAllWidgets();
        }
Beispiel #4
0
        /// <summary>
        /// Gets the editor for widget.
        /// </summary>
        /// <param name="widget">The widget.</param>
        /// <param name="context">The context.</param>
        /// <param name="edsvc">The edsvc.</param>
        /// <returns></returns>
        public static IWidgetEditor GetEditorForWidget(IWidget widget, FlexibleLayoutEditorContext context, IEditorService edsvc)
        {
            Check.NotNull(widget, "widget"); //NOXLATE
            Check.NotNull(context, "context"); //NOXLATE
            Check.NotNull(edsvc, "edsvc"); //NOXLATE

            IWidgetEditor ed = new GenericWidgetCtrl();
            ed.Setup(widget, context, edsvc);
            return ed;
        }
Beispiel #5
0
        /// <summary>
        /// Gets the editor for widget.
        /// </summary>
        /// <param name="widget">The widget.</param>
        /// <param name="context">The context.</param>
        /// <param name="edsvc">The edsvc.</param>
        /// <returns></returns>
        public static IWidgetEditor GetEditorForWidget(IWidget widget, FlexibleLayoutEditorContext context, IEditorService edsvc)
        {
            Check.ArgumentNotNull(widget, nameof(widget));
            Check.ArgumentNotNull(context, nameof(context));
            Check.ArgumentNotNull(edsvc, nameof(edsvc));

            IWidgetEditor ed = new GenericWidgetCtrl();

            ed.Setup(widget, context, edsvc);
            return(ed);
        }
Beispiel #6
0
        public WidgetReferenceCtrl(IWidgetItem item, IEditorService edsvc)
            : this()
        {
            _widgetRef = item;
            _flexLayout = (IApplicationDefinition)edsvc.GetEditedResource();
            _fsvc = (IFusionService)edsvc.GetService((int)ServiceType.Fusion);
            _context = new FlexibleLayoutEditorContext(_fsvc);
            cmbWidgetRefs.DataSource = _context.GetDockableWidgetNames(_flexLayout);

            cmbWidgetRefs.SelectedItem = item.Widget;
            _init = false;
        }
        public WidgetReferenceCtrl(IWidgetItem item, IEditorService edsvc)
            : this()
        {
            _widgetRef  = item;
            _flexLayout = (IApplicationDefinition)edsvc.GetEditedResource();
            _fsvc       = (IFusionService)edsvc.GetService((int)ServiceType.Fusion);
            _context    = new FlexibleLayoutEditorContext(_fsvc);
            cmbWidgetRefs.DataSource = _context.GetDockableWidgetNames(_flexLayout);

            cmbWidgetRefs.SelectedItem = item.Widget;
            _init = false;
        }
Beispiel #8
0
        public WidgetManagementDialog(IApplicationDefinition appDef, IEditorService edsvc, FlexibleLayoutEditorContext context)
        {
            InitializeComponent();
            edsvc.RegisterCustomNotifier(this);
            grdWidgets.AutoGenerateColumns = false;
            _items = new BindingList<WidgetItem>();
            _appDef = appDef;
            _context = context;
            _edsvc = edsvc;
            grdWidgets.DataSource = _items;
            txtMapWidgetXml.SetHighlighting("XML"); //NOXLATE
            var wset = appDef.GetFirstWidgetSet();
            SetupMapWidget(wset.MapWidget);
            foreach (var wgt in wset.Widgets)
            {
                AddWidgetItem(wgt);
            }

            this.Disposed += new EventHandler(OnDisposed);
        }
        public WidgetManagementDialog(IApplicationDefinition appDef, IEditorService edsvc, FlexibleLayoutEditorContext context)
        {
            InitializeComponent();
            edsvc.RegisterCustomNotifier(this);
            grdWidgets.AutoGenerateColumns = false;
            _items   = new BindingList <WidgetItem>();
            _appDef  = appDef;
            _context = context;
            _edsvc   = edsvc;
            grdWidgets.DataSource = _items;
            txtMapWidgetXml.SetHighlighting("XML"); //NOXLATE
            var wset = appDef.GetFirstWidgetSet();

            SetupMapWidget(wset.MapWidget);
            foreach (var wgt in wset.Widgets)
            {
                AddWidgetItem(wgt);
            }

            this.Disposed += new EventHandler(OnDisposed);
        }
Beispiel #10
0
        public override void Bind(IEditorService service)
        {
            try
            {
                _edsvc = service;
                _fsvc = (IFusionService)_edsvc.GetService((int)ServiceType.Fusion);
                _context = new FlexibleLayoutEditorContext(_fsvc);
                _baseUrl = service.GetCustomProperty("BaseUrl").ToString(); //NOXLATE

                if (!_baseUrl.EndsWith("/")) //NOXLATE
                    _baseUrl += "/"; //NOXLATE
            }
            catch
            {
                throw new NotSupportedException(Strings.IncompatibleConnection);
            }
            service.RegisterCustomNotifier(this);
            _flexLayout = (IApplicationDefinition)service.GetEditedResource();
            InitWidgetSet();
        }