Пример #1
0
        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;
        }
Пример #2
0
        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;
        }
Пример #3
0
 static AduFormLable()
 {
     ElementBase.DefaultStyle <AduFormLable>(DefaultStyleKeyProperty);
 }
Пример #4
0
 static AduComboBox()
 {
     ElementBase.DefaultStyle <AduComboBox>(DefaultStyleKeyProperty);
 }
Пример #5
0
 static MetroMenuItem()
 {
     ElementBase.DefaultStyle <MetroMenuItem>(DefaultStyleKeyProperty);
 }
Пример #6
0
 void GoToState()
 {
     ElementBase.GoToState(this, IconMode ? "EnterIconMode" : "ExitIconMode");
 }
Пример #7
0
 static MetroTitleMenu()
 {
     ElementBase.DefaultStyle <MetroTitleMenu>(DefaultStyleKeyProperty);
 }
Пример #8
0
 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");
        }
Пример #10
0
 public ElementAddedEvent(IAcSession acSession, ElementBase source)
     : base(acSession, source)
 {
 }
 public SeleniumRadioButtonBehavior(ElementBase element)
 {
     Element = element;
 }
Пример #12
0
 public override bool MoveToParent()
 {
     if (_attrIndex > -1)
     {
         _attrIndex = -1;
         return true;
     }
     var parent = _currentElement.Parent;
     if (parent == null)
         return false;
     _currentElement = parent;
     return true;
 }
Пример #13
0
        public override bool MoveToPrevious()
        {
            if (_attrIndex > -1)
                return false;

            var prev = _currentElement.GetPreviousElement();
            if (prev == null)
                return false;
            _currentElement = prev;
            return true;
        }
Пример #14
0
        public override bool MoveToNext()
        {
            if (_attrIndex > -1)
                return false;

            var next = _currentElement.GetNextElement();
            if (next == null)
                return false;
            _currentElement = next;
            return true;
        }
Пример #15
0
        public override bool MoveToFirstChild()
        {
            //_attrIndex = -1;
            if (_attrIndex > -1)
                return false;

            var child = _currentElement.GetFirstChild();
            if (child == null)
                return false;

            _currentElement = child;
            return true;
        }
Пример #16
0
        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;
        }
Пример #17
0
 public void DebugStart(ElementBase b, IChronologicalEvent evt)
 {
     dbgMsgs.Add(" ".PadLeft(dbgspaces * 2) + b.Describe() + ((evt == null)?"(Null Event)":evt.Describe()));
     dbgspaces++;
 }
Пример #18
0
 public ElementGroup(Xml.ElementGroup node, ElementBase[] items)
     : base(node)
 {
     this.elements = items;
 }
Пример #19
0
 public void SetMyStateBag(ElementBase Eleme, Object StateBagObj)
 {
     StateBag[Eleme] = StateBagObj;
 }
Пример #20
0
 static MiTabItem()
 {
     ElementBase.DefaultStyle <MiTabItem>(DefaultStyleKeyProperty);
 }
Пример #21
0
 static MetroScrollViewer()
 {
     ElementBase.DefaultStyle <MetroScrollViewer>(DefaultStyleKeyProperty);
 }
Пример #22
0
 public Form(Identifier identifier, ElementBase block)
 {
     throw new Exception(identifier + ": " + block + " is not a block");
 }
Пример #23
0
 public Expression(ElementBase child, SourceLocation sourceLocation)
     : this(child)
 {
     SourceLocation = sourceLocation;
 }
 static MetroPath()
 {
     ElementBase.DefaultStyle <MetroPath>(DefaultStyleKeyProperty);
 }
Пример #25
0
 static AduSearchBox()
 {
     ElementBase.DefaultStyle <AduSearchBox>(DefaultStyleKeyProperty);
 }
Пример #26
0
 static MetroWindow()
 {
     ElementBase.DefaultStyle <MetroWindow>(DefaultStyleKeyProperty);
 }
Пример #27
0
 static MetroMenuTabControl()
 {
     ElementBase.DefaultStyle <MetroMenuTabControl>(DefaultStyleKeyProperty);
 }
Пример #28
0
 void GoToState()
 {
     ElementBase.GoToState(this, IsSubWindowShow ? "Enabled" : "Disable");
 }
Пример #29
0
 static MetroTextBox()
 {
     ElementBase.DefaultStyle <MetroTextBox>(DefaultStyleKeyProperty);
 }
Пример #30
0
 public void Push(ElementBase obiekt)
 {
     stosWewnetrzny.Push(obiekt);
 }
Пример #31
0
 static MetroExpander()
 {
     ElementBase.DefaultStyle <MetroExpander>(DefaultStyleKeyProperty);
 }
Пример #32
0
 public ElementRemovedEvent(IAcSession acSession, ElementBase source) : base(acSession, source)
 {
 }
Пример #33
0
 public ElementItemViewModel(ElementBase data, ElementItemViewModel parent = null)
     : this(data.Name, parent)
 {
     Data = data;
 }
Пример #34
0
 static MetroProgressBar()
 {
     ElementBase.DefaultStyle <MetroProgressBar>(DefaultStyleKeyProperty);
 }
Пример #35
0
 public void DebugStart(ElementBase b)
 {
     dbgMsgs.Add(" ".PadLeft(dbgspaces * 2) + b.Describe());
     dbgspaces++;
 }
Пример #36
0
 static MiRichButton()
 {
     ElementBase.DefaultStyle <MiRichButton>(DefaultStyleKeyProperty);
 }
Пример #37
0
 public void SaveDBGResult(ElementBase b, MatchResult mr)
 {
     dbgMsgs.Add(" ".PadLeft(dbgspaces * 2) + mr.ToString());
     dbgspaces--;
 }
Пример #38
0
 static MetroButton()
 {
     ElementBase.DefaultStyle <MetroButton>(DefaultStyleKeyProperty);
 }
Пример #39
0
 public void RemoveMyStateBag(ElementBase Eleme)
 {
     StateBag.Remove(Eleme);
 }
Пример #40
0
 static AduRadioButtonIcon()
 {
     ElementBase.DefaultStyle <AduRadioButtonIcon>(DefaultStyleKeyProperty);
 }
 public SeleniumCheckboxBehavior(ElementBase element)
 {
     Element = element;
 }
Пример #42
0
        /// <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
                });
            }
        }
Пример #43
0
        /// <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
                });
            }
        }
Пример #44
0
 static AduDataGrid()
 {
     ElementBase.DefaultStyle <AduDataGrid>(DefaultStyleKeyProperty);
 }
Пример #45
0
				protected static int GetElementSize(ElementBase e)
				{
					if (e.DeclarationType != DeclarationType.Skip)
						return e.DeclarationType.GetSize();

					return e.GetUsageData();
				}
Пример #46
0
 public Expression(ElementBase child)
 {
     Child = child;
 }