Exemplo n.º 1
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (provider != null)
            {
                service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            }

            if (service != null)
            {
                if (value is LinkBFBB[])
                {
                    LinkBFBB[] events = LinkEditor.GetEvents((LinkBFBB[])value, endianness, IsTimed, thisAssetID);

                    if (events != null)
                    {
                        value = events;
                    }
                }
                else if (value is LinkTSSM[])
                {
                    LinkTSSM[] events = LinkEditor.GetEvents((LinkTSSM[])value, endianness, IsTimed, thisAssetID);

                    if (events != null)
                    {
                        value = events;
                    }
                }
            }

            IsTimed = false;
            return(value);
        }
Exemplo n.º 2
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            if (provider != null)
            {
                service = (IWindowsFormsEditorService)provider.GetService(typeof(IWindowsFormsEditorService));
            }

            if (service != null)
            {
                if (value is LinkBFBB[])
                {
                    LinkBFBB[] events = LinkEditor.GetEvents((LinkBFBB[])value, out bool success, IsTimed);

                    if (success)
                    {
                        value = events;
                    }
                }
                else if (value is LinkTSSM[])
                {
                    LinkTSSM[] events = LinkEditor.GetEvents((LinkTSSM[])value, out bool success, IsTimed);

                    if (success)
                    {
                        value = events;
                    }
                }
                else if (value is LinkIncredibles[])
                {
                    LinkIncredibles[] events = LinkEditor.GetEvents((LinkIncredibles[])value, out bool success, IsTimed);

                    if (success)
                    {
                        value = events;
                    }
                }
            }

            IsTimed = false;
            return(value);
        }