Ejemplo n.º 1
0
        /// <summary>
        ///     Creates a new editor that can trigger Recompiles for an IDataConnectionComponent
        /// </summary>
        public CompileButtonComponent(IDataConnectionComponent owner)
        {
            _owner = owner;
            InitializeComponent();

            RecompileButton.Enabled           = _owner.NeedsCompile;
            RecompileButton.Text              = _owner.NeedsCompile ? "Compile" : "Component Compiled";
            _owner.OnNeedsCompileChangeEvent += OnNeedsCompileChange;
        }
Ejemplo n.º 2
0
        /// <summary>
        ///     Sets the component that is being viewed
        /// </summary>
        /// <param name="comp">The new component to view</param>
        public void SetComponent(IDataConnectionComponent comp)
        {
            // Unregister previous hooks as needed
            if (_component != null)
            {
                _component.OnErrorStringsChanged -= ErrorStringChanged;
            }

            _component = comp;
            if (_component != null)
            {
                _component.OnErrorStringsChanged += ErrorStringChanged;
            }
            ErrorStringChanged(null, null);
        }