//Constructor
        public TsComplianceRefreshButton(XElement InputXml, TsColumn Parent) : base(Parent)
        {
            this._rootelement = this.GetComplianceRootElement();

            this.UserControl.DataContext = this;
            this._ui               = new TsButtonUI();
            this.Control           = this._ui;
            this._ui.button.Click += this.OnButtonClick;

            this.Label = new TsLabelUI();
            this.SetDefaults();
            this.LoadXml(InputXml);
        }
Esempio n. 2
0
        //constructor
        public ComplianceOptionBase(TsColumn Parent) : base(Parent)
        {
            this.Label        = new TsLabelUI();
            this._rootelement = this.GetComplianceRootElement();
            if (this._rootelement == null)
            {
                throw new TsGuiKnownException("There is prooblem in the compliance tree. Root is null", string.Empty);
            }
            this._rootelement.ComplianceRetry += this.OnComplianceRetry;

            this.FillColor                 = new SolidColorBrush(Colors.Blue);
            this.StrokeColor               = new SolidColorBrush(Colors.Blue);
            this._compliancehandler        = new ComplianceHandler(this);
            this._validationtooltiphandler = new ValidationToolTipHandler(this);
            this._setvaluequerylist        = new QueryPriorityList(this);
            this.UserControl.DataContext   = this;
            this.SetDefaults();
        }
Esempio n. 3
0
        //private GetComplianceRootElement. Keep the last root element as traversing up the tree. When
        //at the top, return the last comliance root element.
        private IComplianceRoot GetComplianceRootElement(IComplianceRoot currentroot)
        {
            IComplianceRoot thisAsRoot = this as IComplianceRoot;

            if (this.Parent == null)
            {
                if (thisAsRoot != null)
                {
                    return(thisAsRoot);
                }
                return(currentroot);
            }
            else
            {
                if (thisAsRoot != null)
                {
                    return(this.Parent.GetComplianceRootElement(thisAsRoot));
                }
                else
                {
                    return(this.Parent.GetComplianceRootElement(currentroot));
                }
            }
        }
Esempio n. 4
0
 public void OnComplianceRetry(IComplianceRoot o, EventArgs e)
 {
     this.RefreshValue();
 }