public static string[] getNames(ElementBase [] elements) { string [] result = new string[elements.Length]; for (int i = 0; i < elements.Length; i++) result[i] = elements[i].getName(); return result; }
public SubrecordStructure(Subrecord node, ElementBase[] elementTree, ElementStructure[] elements) : base(node) { this.notininfo = node.notininfo; this.size = node.size; this.Condition = (!string.IsNullOrEmpty(node.condition)) ? (CondType) Enum.Parse(typeof (CondType), node.condition, true) : CondType.None; this.CondID = node.condid; this.CondOperand = node.condvalue; this.UseHexEditor = node.usehexeditor; this.elementTree = elementTree; this.elements = elements; this.ContainsConditionals = this.elements.Count(x => x.CondID != 0) > 0; }
static AduFormLable() { ElementBase.DefaultStyle <AduFormLable>(DefaultStyleKeyProperty); }
static AduComboBox() { ElementBase.DefaultStyle <AduComboBox>(DefaultStyleKeyProperty); }
static MetroMenuItem() { ElementBase.DefaultStyle <MetroMenuItem>(DefaultStyleKeyProperty); }
void GoToState() { ElementBase.GoToState(this, IconMode ? "EnterIconMode" : "ExitIconMode"); }
static MetroTitleMenu() { ElementBase.DefaultStyle <MetroTitleMenu>(DefaultStyleKeyProperty); }
static AduExpander() { ElementBase.DefaultStyle <AduExpander>(DefaultStyleKeyProperty); }
private void AddUrlAttr(ElementBase element, string url) { if (element.AllowedAttributes == null) element.AllowedAttributes = new List<string>(); element.AllowedAttributes.Add("url"); element.SetAttributeValue("url", url); element.AllowedAttributes.Add("method"); element.SetAttributeValue("method", "GET"); }
public ElementAddedEvent(IAcSession acSession, ElementBase source) : base(acSession, source) { }
public SeleniumRadioButtonBehavior(ElementBase element) { Element = element; }
public override bool MoveToParent() { if (_attrIndex > -1) { _attrIndex = -1; return true; } var parent = _currentElement.Parent; if (parent == null) return false; _currentElement = parent; return true; }
public override bool MoveToPrevious() { if (_attrIndex > -1) return false; var prev = _currentElement.GetPreviousElement(); if (prev == null) return false; _currentElement = prev; return true; }
public override bool MoveToNext() { if (_attrIndex > -1) return false; var next = _currentElement.GetNextElement(); if (next == null) return false; _currentElement = next; return true; }
public override bool MoveToFirstChild() { //_attrIndex = -1; if (_attrIndex > -1) return false; var child = _currentElement.GetFirstChild(); if (child == null) return false; _currentElement = child; return true; }
public override bool MoveTo(XPathNavigator other) { var cnav = other as ContentNavigator; if (cnav == null) return false; if (this._currentElement.Context != cnav._currentElement.Context) return false; //_attrIndex = -1; if (_attrIndex != cnav._attrIndex) _attrIndex = cnav._attrIndex; if (_attrNames != cnav._attrNames) _attrNames = cnav._attrNames; if (_currentElement != cnav._currentElement) _currentElement = cnav._currentElement; return true; }
public void DebugStart(ElementBase b, IChronologicalEvent evt) { dbgMsgs.Add(" ".PadLeft(dbgspaces * 2) + b.Describe() + ((evt == null)?"(Null Event)":evt.Describe())); dbgspaces++; }
public ElementGroup(Xml.ElementGroup node, ElementBase[] items) : base(node) { this.elements = items; }
public void SetMyStateBag(ElementBase Eleme, Object StateBagObj) { StateBag[Eleme] = StateBagObj; }
static MiTabItem() { ElementBase.DefaultStyle <MiTabItem>(DefaultStyleKeyProperty); }
static MetroScrollViewer() { ElementBase.DefaultStyle <MetroScrollViewer>(DefaultStyleKeyProperty); }
public Form(Identifier identifier, ElementBase block) { throw new Exception(identifier + ": " + block + " is not a block"); }
public Expression(ElementBase child, SourceLocation sourceLocation) : this(child) { SourceLocation = sourceLocation; }
static MetroPath() { ElementBase.DefaultStyle <MetroPath>(DefaultStyleKeyProperty); }
static AduSearchBox() { ElementBase.DefaultStyle <AduSearchBox>(DefaultStyleKeyProperty); }
static MetroWindow() { ElementBase.DefaultStyle <MetroWindow>(DefaultStyleKeyProperty); }
static MetroMenuTabControl() { ElementBase.DefaultStyle <MetroMenuTabControl>(DefaultStyleKeyProperty); }
void GoToState() { ElementBase.GoToState(this, IsSubWindowShow ? "Enabled" : "Disable"); }
static MetroTextBox() { ElementBase.DefaultStyle <MetroTextBox>(DefaultStyleKeyProperty); }
public void Push(ElementBase obiekt) { stosWewnetrzny.Push(obiekt); }
static MetroExpander() { ElementBase.DefaultStyle <MetroExpander>(DefaultStyleKeyProperty); }
public ElementRemovedEvent(IAcSession acSession, ElementBase source) : base(acSession, source) { }
public ElementItemViewModel(ElementBase data, ElementItemViewModel parent = null) : this(data.Name, parent) { Data = data; }
static MetroProgressBar() { ElementBase.DefaultStyle <MetroProgressBar>(DefaultStyleKeyProperty); }
public void DebugStart(ElementBase b) { dbgMsgs.Add(" ".PadLeft(dbgspaces * 2) + b.Describe()); dbgspaces++; }
static MiRichButton() { ElementBase.DefaultStyle <MiRichButton>(DefaultStyleKeyProperty); }
public void SaveDBGResult(ElementBase b, MatchResult mr) { dbgMsgs.Add(" ".PadLeft(dbgspaces * 2) + mr.ToString()); dbgspaces--; }
static MetroButton() { ElementBase.DefaultStyle <MetroButton>(DefaultStyleKeyProperty); }
public void RemoveMyStateBag(ElementBase Eleme) { StateBag.Remove(Eleme); }
static AduRadioButtonIcon() { ElementBase.DefaultStyle <AduRadioButtonIcon>(DefaultStyleKeyProperty); }
public SeleniumCheckboxBehavior(ElementBase element) { Element = element; }
/// <summary> /// BrowseMetaData /// </summary> /// <param name="Id"></param> /// <returns></returns> public async Task <ServiceActionReturnMessage> BrowseMetaData(string Id) { try { if (ServiceActions.TryGetValue("BROWSE", out ServiceAction action)) { ElementBase element = null; action.ClearArgumentsValue(); action.SetArgumentValue("ObjectID", Id); action.SetArgumentValue("BrowseFlag", "BrowseMetadata"); action.SetArgumentValue("Filter", "*"); action.SetArgumentValue("StartingIndex", "0"); action.SetArgumentValue("RequestedCount", "0"); action.SetArgumentValue("SortCriteria", ""); ServiceActionReturnMessage message = await action.InvokeAsync(ServiceTypesString.CONTENTDIRECTORY, serviceControls.Select(c => c).Where(c => c.ServiceType == ServiceTypes.CONTENTDIRECTORY).FirstOrDefault().URI); if (message.ActionStatus == ActionStatus.Okay) { string result = action.GetArgumentValue("Result"); DIDLLite didlliteResult = result.Deserialize <DIDLLite>(); if (string.IsNullOrEmpty(result) || didlliteResult == null) { return(new ServiceActionReturnMessage() { ActionStatus = ActionStatus.Error, ActionMessage = string.Format("Parsing error DIDLLite-string") }); } foreach (DIDLContainer container in didlliteResult.Containers) { switch (container.Title) { case "Zones": case "Renderers": case "Search": break; default: //element = PrismUnityApplication.Current.Container.Resolve<ElementContainer>(new ResolverOverride[] // { // new ParameterOverride("didl", container) // }); element = PrismUnityApplication.Current.Container.Resolve <ElementBase>("DIDLContainer", new DependencyOverride(typeof(IEventAggregator), eventAggregator), new DependencyOverride(typeof(ICachingService), cachingService), new DependencyOverride(typeof(DIDLContainer), container)); break; } } foreach (DIDLItem item in didlliteResult.Items) { //element = PrismUnityApplication.Current.Container.Resolve<ElementItem>(new ResolverOverride[] // { // new ParameterOverride("didl", item) // }); element = PrismUnityApplication.Current.Container.Resolve <ElementBase>("DIDLItem", new DependencyOverride(typeof(IEventAggregator), eventAggregator), new DependencyOverride(typeof(ICachingService), cachingService), new DependencyOverride(typeof(DIDLItem), item)); } message.ReturnValue = element; return(message); } else { return(message); } } else { return(new ServiceActionReturnMessage() { ActionStatus = ActionStatus.Error, ActionMessage = string.Format("Action not available: Browse") }); } } catch (Exception exception) { throw new Exception(); return(new ServiceActionReturnMessage() { ActionStatus = ActionStatus.Error, ActionMessage = exception.Message }); } }
/// <summary> /// Search elements /// Important: Search only works within the right containerID /// </summary> /// <param name="containerId"></param> /// <param name="searchCriteria"></param> /// <param name="start"></param> /// <param name="limit"></param> /// <returns></returns> public async Task <ServiceActionReturnMessage> Search(string containerId, string searchCriteria, int start, int limit = 10) { try { if (ServiceActions.TryGetValue("SEARCH", out ServiceAction action)) { List <ElementBase> elements = new List <ElementBase>(); //bool found = false; action.ClearArgumentsValue(); action.SetArgumentValue("ContainerID", containerId); action.SetArgumentValue("SearchCriteria", string.Format("dc:title contains \"{0}\"", searchCriteria)); action.SetArgumentValue("Filter", "*"); action.SetArgumentValue("StartingIndex", start.ToString()); action.SetArgumentValue("RequestedCount", limit.ToString()); action.SetArgumentValue("SortCriteria", ""); ServiceActionReturnMessage message = await action.InvokeAsync(ServiceTypesString.CONTENTDIRECTORY, serviceControls.Select(c => c).Where(c => c.ServiceType == ServiceTypes.CONTENTDIRECTORY).FirstOrDefault().URI); if (message.ActionStatus == ActionStatus.Okay) { string result = action.GetArgumentValue("Result"); DIDLLite didlliteResult = result.Deserialize <DIDLLite>(); if (string.IsNullOrEmpty(result) || didlliteResult == null) { return(null); } foreach (DIDLContainer container in didlliteResult.Containers) { switch (container.Title) { case "Zones": case "Renderers": case "Search": break; default: //ElementBase element = PrismUnityApplication.Current.Container.Resolve<ElementContainer>(new ResolverOverride[] // { // new ParameterOverride("didl", container) // }); ElementBase element = PrismUnityApplication.Current.Container.Resolve <ElementBase>("DIDLContainer", new DependencyOverride(typeof(IEventAggregator), eventAggregator), new DependencyOverride(typeof(ICachingService), cachingService), new DependencyOverride(typeof(DIDLContainer), container)); elements.Add(element); break; } } foreach (DIDLItem item in didlliteResult.Items) { //ElementBase element = PrismUnityApplication.Current.Container.Resolve<ElementItem>(new ResolverOverride[] // { // new ParameterOverride("didl", item) // }); ElementBase element = PrismUnityApplication.Current.Container.Resolve <ElementBase>("DIDLItem", new DependencyOverride(typeof(IEventAggregator), eventAggregator), new DependencyOverride(typeof(ICachingService), cachingService), new DependencyOverride(typeof(DIDLItem), item)); elements.Add(element); } message.ReturnValue = elements; return(message); } else { return(message); } } else { return(new ServiceActionReturnMessage() { ActionStatus = ActionStatus.Error, ActionMessage = string.Format("Action not available: Browse") }); } } catch (Exception exception) { throw new Exception(); return(new ServiceActionReturnMessage() { ActionStatus = ActionStatus.Error, ActionMessage = exception.Message }); } }
static AduDataGrid() { ElementBase.DefaultStyle <AduDataGrid>(DefaultStyleKeyProperty); }
protected static int GetElementSize(ElementBase e) { if (e.DeclarationType != DeclarationType.Skip) return e.DeclarationType.GetSize(); return e.GetUsageData(); }
public Expression(ElementBase child) { Child = child; }