コード例 #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
ファイル: AduFormLable.cs プロジェクト: yslwjj/AduSkin
 static AduFormLable()
 {
     ElementBase.DefaultStyle <AduFormLable>(DefaultStyleKeyProperty);
 }
コード例 #4
0
ファイル: AduComboBox.cs プロジェクト: NGBCODER/AduSkin
 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
ファイル: AduExpander.cs プロジェクト: zxbe/AduSkin
 static AduExpander()
 {
     ElementBase.DefaultStyle <AduExpander>(DefaultStyleKeyProperty);
 }
コード例 #9
0
        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
ファイル: ContentNavigator.cs プロジェクト: jhuntsman/FlexNet
 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
ファイル: ContentNavigator.cs プロジェクト: jhuntsman/FlexNet
        public override bool MoveToPrevious()
        {
            if (_attrIndex > -1)
                return false;

            var prev = _currentElement.GetPreviousElement();
            if (prev == null)
                return false;
            _currentElement = prev;
            return true;
        }
コード例 #14
0
ファイル: ContentNavigator.cs プロジェクト: jhuntsman/FlexNet
        public override bool MoveToNext()
        {
            if (_attrIndex > -1)
                return false;

            var next = _currentElement.GetNextElement();
            if (next == null)
                return false;
            _currentElement = next;
            return true;
        }
コード例 #15
0
ファイル: ContentNavigator.cs プロジェクト: jhuntsman/FlexNet
        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
ファイル: ContentNavigator.cs プロジェクト: jhuntsman/FlexNet
        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
ファイル: ElementGroup.cs プロジェクト: figment/tesvsnip
 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
ファイル: Form.cs プロジェクト: javachengwc/many-ql
 public Form(Identifier identifier, ElementBase block)
 {
     throw new Exception(identifier + ": " + block + " is not a block");
 }
コード例 #23
0
ファイル: Expression.cs プロジェクト: javachengwc/many-ql
 public Expression(ElementBase child, SourceLocation sourceLocation)
     : this(child)
 {
     SourceLocation = sourceLocation;
 }
コード例 #24
0
 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
ファイル: MetroTextBox.cs プロジェクト: op07n/test15
 static MetroTextBox()
 {
     ElementBase.DefaultStyle <MetroTextBox>(DefaultStyleKeyProperty);
 }
コード例 #30
0
 public void Push(ElementBase obiekt)
 {
     stosWewnetrzny.Push(obiekt);
 }
コード例 #31
0
ファイル: MetroExpander.cs プロジェクト: msh2050/MoalemYar
 static MetroExpander()
 {
     ElementBase.DefaultStyle <MetroExpander>(DefaultStyleKeyProperty);
 }
コード例 #32
0
ファイル: ElementRemovedEvent.cs プロジェクト: zszqwe/anycmd
 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
ファイル: MiRichButton.cs プロジェクト: wc123hange/zfjl_media
 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
ファイル: MediaServer.cs プロジェクト: jc-design/raumPlayer
        /// <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
ファイル: MediaServer.cs プロジェクト: jc-design/raumPlayer
        /// <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
ファイル: Expression.cs プロジェクト: javachengwc/many-ql
 public Expression(ElementBase child)
 {
     Child = child;
 }