private new void LoadXml(XElement InputXml) { base.LoadXml(InputXml); IEnumerable <XElement> xlist; int colIndex = 0; xlist = InputXml.Elements("Column"); if (xlist != null) { foreach (XElement xColumn in xlist) { TsColumn c = new TsColumn(xColumn, colIndex, this); this._columns.Add(c); ColumnDefinition coldef = new ColumnDefinition(); coldef.Width = GridLength.Auto; this._rowpanel.ColumnDefinitions.Add(coldef); Grid.SetColumn(c.Panel, colIndex); this._rowpanel.Children.Add(c.Panel); this._options.AddRange(c.Options); colIndex++; } } }
//constructor public TsTrafficLight(XElement InputXml, TsColumn Parent) : base(Parent) { this.Control = new TsTrafficLightUI(); this._validationtooltiphandler.SetTarget(this.Control); this.LoadXml(InputXml); this.RefreshValue(); }
//constructor public TsHeading(XElement InputXml, TsColumn Parent) : base(Parent) { this.ControlText = string.Empty; this.Control = new TsHeadingUI(); this.Label = new TsLabelUI(); this.UserControl.DataContext = this; this.LoadXml(InputXml); }
//constructor public TsInfoBox(XElement InputXml, TsColumn Parent) : base(Parent) { this.Control = new TsInfoBoxUI(); this.Label = new TsLabelUI(); this.UserControl.DataContext = this; this.SetDefaults(); this._setvaluequerylist = new QueryPriorityList(this); this.LoadXml(InputXml); this.RefreshControlText(); }
public TsTickCross(TsColumn Parent, IDirector MainController) : base(Parent) { this._contentchanger = new ContentChanger(); this._crossui = new TsCrossUI(); this._tickui = new TsTickUI(); this._warnui = new TsWarnUI(); this.Control = this._contentchanger; this._validationtooltiphandler.SetTarget(this.UserControl); this.SetDefaults(); }
//constructor public TsTickCross(XElement InputXml, TsColumn Parent) : base(Parent) { this._contentchanger = new ContentChanger(); this._crossui = new TsCrossUI(); this._tickui = new TsTickUI(); this._warnui = new TsWarnUI(); this.Control = this._contentchanger; this._validationtooltiphandler.SetTarget(this.UserControl); this.SetDefaults(); this.LoadXml(InputXml); this.RefreshValue(); }
//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); }
//Constructor public TsImage(XElement InputXml, TsColumn Parent) : base(Parent) { this.Control = new TsImageUI(); this.Label = new TsLabelUI(); this.UserControl.DataContext = this; this.SetDefaults(); this.LoadXml(InputXml); if (this.Image != null) { this.Image.MultiImage.ImageScalingUpdate += this.OnImageScalingUpdate; } }
//Constructor public TsCheckBox(XElement InputXml, TsColumn Parent) : base(Parent) { this.UserControl.DataContext = this; TsCheckBoxUI cbui = new TsCheckBoxUI(); this.Control = cbui; this._checkboxui = cbui; this.InteractiveControl = cbui.CheckBox; this.Label = new TsLabelUI(); this.ValidationHandler = new ValidationHandler(this); this._validationtooltiphandler = new ValidationToolTipHandler(this); this.SetDefaults(); this._setvaluequerylist = new QueryPriorityList(this); this.LoadXml(InputXml); }
public static IGuiOption CreateGuiOption(XElement OptionXml, TsColumn Parent) { XElement prebuiltx = PrebuiltFactory.GetPrebuiltXElement(OptionXml); if (prebuiltx == null) { return(GetGuiOption(OptionXml, Parent)); } else { XAttribute xtype = OptionXml.Attribute("Type"); prebuiltx.Add(xtype); IGuiOption g = GetGuiOption(prebuiltx, Parent); g.LoadXml(OptionXml); return(g); } }
//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(); }
//Constructor public TsPasswordBox(XElement InputXml, TsColumn Parent) : base(Parent) { this._setvaluequerylist = null; this._passwordboxui = new TsPasswordBoxUI(); this.Control = this._passwordboxui; this.Label = new TsLabelUI(); this._passwordboxui.PasswordBox.KeyDown += this.OnKeyDown; this.UserControl.DataContext = this; this.SetDefaults(); this.ValidationHandler = new ValidationHandler(this); this._validationtooltiphandler = new ValidationToolTipHandler(this); this.LoadXml(InputXml); Director.Instance.ConfigLoadFinished += this.OnConfigLoadFinished; }
//Constructor public TsTreeView(XElement InputXml, TsColumn Parent) : base(Parent) { this._treeviewui = new TsTreeViewUI(); this.Control = this._treeviewui; this.Label = new TsLabelUI(); this.Icon = new TsFolderUI(); this.UserControl.DataContext = this; this.ValidationHandler = new ValidationHandler(this); this._validationtooltiphandler = new ValidationToolTipHandler(this); this.SetDefaults(); this.LoadXml(InputXml); this._builder.Rebuild(); this.SetListViewDefault(); this._treeviewui.TreeView.SelectedItemChanged += this.OnTreeViewSelectedItemChanged; this.UserControl.IsEnabledChanged += this.OnActiveChanged; this.UserControl.IsVisibleChanged += this.OnActiveChanged; }
//Constructor public TsDropDownList(XElement InputXml, TsColumn Parent) : base(Parent) { this._dropdownlistui = new TsDropDownListUI(); this.Control = this._dropdownlistui; this.InteractiveControl = this._dropdownlistui.Control; this.Label = new TsLabelUI(); this.ValidationHandler = new ValidationHandler(this); this._validationtooltiphandler = new ValidationToolTipHandler(this); this.UserControl.DataContext = this; this.SetDefaults(); this.LoadXml(InputXml); this._builder.Rebuild(); this.RegisterForItemGroupEvents(); this.SetComboBoxDefault(); Director.Instance.WindowLoaded += this.OnLoadReload; this._dropdownlistui.Control.SelectionChanged += this.OnSelectionChanged; this._dropdownlistui.Control.LostFocus += this.OnLostFocus; this.UserControl.IsEnabledChanged += this.OnActiveChanged; this.UserControl.IsVisibleChanged += this.OnActiveChanged; }
private static IGuiOption GetGuiOption(XElement OptionXml, TsColumn Parent) { XAttribute xtype = OptionXml.Attribute("Type"); if (xtype == null) { throw new ArgumentException("Missing Type attribute on GuiOption" + Environment.NewLine); } LoggerFacade.Info("Creating GuiOption, type: " + xtype.Value); IGuiOption newoption = null; #region if (xtype.Value == "DropDownList") { newoption = new TsDropDownList(OptionXml, Parent); } else if (xtype.Value == "CheckBox") { newoption = new TsCheckBox(OptionXml, Parent); } else if (xtype.Value == "FreeText") { newoption = new TsFreeText(OptionXml, Parent); } else if (xtype.Value == "ComputerName") { newoption = new TsComputerName(OptionXml, Parent); } else if (xtype.Value == "Heading") { newoption = new TsHeading(OptionXml, Parent); return(newoption); } else if (xtype.Value == "InfoBox") { newoption = new TsInfoBox(OptionXml, Parent); } else if (xtype.Value == "TrafficLight") { newoption = new TsTrafficLight(OptionXml, Parent); } else if (xtype.Value == "TickCross") { newoption = new TsTickCross(OptionXml, Parent); } else if (xtype.Value == "Image") { newoption = new TsImage(OptionXml, Parent); return(newoption); } else if (xtype.Value == "ComplianceRefreshButton") { newoption = new TsComplianceRefreshButton(OptionXml, Parent); return(newoption); } else if (xtype.Value == "PasswordBox") { newoption = new TsPasswordBox(OptionXml, Parent); } else if (xtype.Value == "UsernameBox") { newoption = new TsUsernameBox(OptionXml, Parent); } else if (xtype.Value == "ActionButton") { newoption = new TsActionButton(OptionXml, Parent); } else if (xtype.Value == "TreeView") { newoption = new TsTreeView(OptionXml, Parent); } else if (xtype.Value == "Timeout") { if (GuiTimeout.Instance == null) { throw new TsGuiKnownException("No Timeout section defined in config. Timeout GuiOption type not available", string.Empty); } newoption = new TsTimeout(OptionXml, Parent); } else { return(null); } #endregion Director.Instance.AddOptionToLibary(newoption); return(newoption); }
public GuiOptionBase(TsColumn Parent) : base(Parent) { this.UserControl = new GuiOptionBaseUI(); this.UserControl.Loaded += this.OnRendered; }
public TsUsernameBox(XElement InputXml, TsColumn parent) : base(parent) { this.SetDefaults(); this.LoadXml(InputXml); this.RefreshValue(); }
protected TsFreeText(TsColumn Parent) : base(Parent) { this.Init(); }
//Constructor public TsFreeText(XElement InputXml, TsColumn Parent) : base(Parent) { this.Init(); this.LoadXml(InputXml); this.RefreshValue(); }
public TsComputerName(XElement InputXml, TsColumn Parent) : base(Parent) { base.LoadXml(this.BuildDefaultXml()); base.LoadXml(InputXml); this.RefreshValue(); }
public TsTrafficLight(TsColumn Parent, IDirector MainController) : base(Parent) { this.Control = new TsTrafficLightUI(); this._validationtooltiphandler.SetTarget(this.Control); }
//Constructor public CollectionViewGuiOptionBase(TsColumn Parent) : base(Parent) { this._setvaluequerylist = new QueryPriorityList(this); this._builder = new ListBuilder(this); }