示例#1
0
 public AddObject(GlobalDataList globalDataList, List <object> operationInfo)
 {
     parentIndex         = (int)operationInfo[0];
     child               = operationInfo[1];
     methodIndex         = (int)operationInfo[2];
     this.globalDataList = globalDataList;
 }
 internal AddToResourceDictionary(GlobalDataList globalDataList, int instanceIndex, string key, object value)
 {
     this.instanceIndex  = instanceIndex;
     this.key            = key;
     this.value          = value;
     this.globalDataList = globalDataList;
 }
示例#3
0
 public SetDynamicResource(GlobalDataList globalDataList, int instanceIndex, int propertyIndex, string key)
 {
     this.instanceIndex  = instanceIndex;
     this.propertyIndex  = propertyIndex;
     this.key            = key;
     this.globalDataList = globalDataList;
 }
示例#4
0
        public RootAction(GlobalDataList globalDataList)
        {
            this.globalDataList = globalDataList;

            childAction = new GetValueListAction(')', this);
            childAction.Init();
        }
示例#5
0
 public SetDynamicResource(GlobalDataList globalDataList, List <object> operationInfo)
 {
     instanceIndex       = (int)operationInfo[0];
     propertyIndex       = (int)operationInfo[1];
     key                 = operationInfo[2] as string;
     this.globalDataList = globalDataList;
 }
示例#6
0
 public GatherMethod(GlobalDataList globalDataList, int typeIndex, string methodName, List <object> paramList)
 {
     this.typeIndex      = typeIndex;
     this.methodName     = methodName;
     this.globalDataList = globalDataList;
     this.paramList      = paramList;
 }
示例#7
0
 public GetStaticObject(GlobalDataList globalDataList, List <object> operationInfo)
 {
     typeIndex           = (int)operationInfo[0];
     propertyName        = operationInfo[1] as string;
     fieldName           = operationInfo[2] as string;
     this.globalDataList = globalDataList;
 }
示例#8
0
 public GatherMethod(GlobalDataList globalDataList, List <object> operationInfo)
 {
     typeIndex           = (int)operationInfo[0];
     methodName          = operationInfo[1] as string;
     paramList           = operationInfo[2] as List <object>;
     this.globalDataList = globalDataList;
 }
示例#9
0
 public CreateInstance(GlobalDataList globalDataList, int typeIndex, int xFactoryMethodIndex, List <object> paramList = null)
 {
     this.typeIndex           = typeIndex;
     this.paramList           = paramList;
     this.globalDataList      = globalDataList;
     this.xFactoryMethodIndex = xFactoryMethodIndex;
 }
示例#10
0
 public SetProperty(GlobalDataList globalDataList, List <object> operationInfo)
 {
     instanceIndex       = (int)operationInfo[0];
     propertyIndex       = (int)operationInfo[1];
     value               = operationInfo[2];
     this.globalDataList = globalDataList;
 }
示例#11
0
        internal static GlobalDataList GatherDataList(string xaml)
        {
            var globalDataList = new GlobalDataList();

            Action currentAction = new RootAction(globalDataList);
            var    rootAction    = currentAction;

            int index = 0;

            for (; index < xaml.Length; index++)
            {
                var c = xaml[index];

                if (currentAction == rootAction && '/' == c)
                {
                    break;
                }
                else
                {
                    currentAction = currentAction.DealChar(c);
                }
            }

            for (index++; index < xaml.Length; index++)
            {
                globalDataList.LongStrings += xaml[index];
            }

            foreach (var op in globalDataList.PreLoadOperations)
            {
                op.Do();
            }

            return(globalDataList);
        }
示例#12
0
 public GatherStaticInstance(GlobalDataList globalDataList, int typeIndex, string propertyName, string fieldName)
 {
     this.typeIndex      = typeIndex;
     this.propertyName   = propertyName;
     this.fieldName      = fieldName;
     this.globalDataList = globalDataList;
 }
示例#13
0
 public AddToResourceDictionary(GlobalDataList globalDataList, List <object> operationInfo)
 {
     instanceIndex       = (int)operationInfo[0];
     key                 = operationInfo[1] as string;
     value               = operationInfo[2];
     this.globalDataList = globalDataList;
 }
示例#14
0
 public GatherType(GlobalDataList globalDataList, int assemblyIndex, string typeName, List <int> genericTypeIndexs = null)
 {
     this.assemblyIndex     = assemblyIndex;
     this.typeName          = typeName;
     this.genericTypeIndexs = genericTypeIndexs;
     this.globalDataList    = globalDataList;
 }
示例#15
0
 public SetBindalbeProperty(GlobalDataList globalDataList, int instanceIndex, int bindalbePropertyIndex, object value)
 {
     this.instanceIndex         = instanceIndex;
     this.bindalbePropertyIndex = bindalbePropertyIndex;
     this.value          = value;
     this.globalDataList = globalDataList;
 }
示例#16
0
 public SetBinding(GlobalDataList globalDataList, List <object> operationInfo)
 {
     instanceIndex         = (int)operationInfo[0];
     bindablePropertyIndex = (int)operationInfo[1];
     valueIndex            = (int)operationInfo[2];
     this.globalDataList   = globalDataList;
 }
示例#17
0
 public CallAddMethod(GlobalDataList globalDataList, int parentIndex, object child, int methodIndex)
 {
     this.parentIndex    = parentIndex;
     this.child          = child;
     this.methodIndex    = methodIndex;
     this.globalDataList = globalDataList;
 }
示例#18
0
 public SetBinding(GlobalDataList globalDataList, int instanceIndex, int bindablePropertyIndex, int valueIndex)
 {
     this.instanceIndex         = instanceIndex;
     this.bindablePropertyIndex = bindablePropertyIndex;
     this.valueIndex            = valueIndex;
     this.globalDataList        = globalDataList;
 }
示例#19
0
 public SetProperty(GlobalDataList globalDataList, int instanceIndex, int propertyIndex, object value)
 {
     this.instanceIndex  = instanceIndex;
     this.propertyIndex  = propertyIndex;
     this.value          = value;
     this.globalDataList = globalDataList;
 }
示例#20
0
 public AddEvent(GlobalDataList globalDataList, int instanceIndex, int elementIndex, int eventIndex, int valueIndex)
 {
     this.instanceIndex  = instanceIndex;
     this.elementIndex   = elementIndex;
     this.eventIndex     = eventIndex;
     this.valueIndex     = valueIndex;
     this.globalDataList = globalDataList;
 }
        public GetObjectConvertedFromString(GlobalDataList globalDataList, List <object> operationInfo)
        {
            object value0 = operationInfo[0];

            converterIndex      = (value0 is Instance) ? (value0 as Instance).Index : (int)value0;
            value               = operationInfo[1] as string;
            this.globalDataList = globalDataList;
        }
示例#22
0
 public AddEvent(GlobalDataList globalDataList, List <object> operationInfo)
 {
     instanceIndex       = (int)operationInfo[0];
     elementIndex        = (int)operationInfo[1];
     eventIndex          = (int)operationInfo[2];
     valueIndex          = (int)operationInfo[3];
     this.globalDataList = globalDataList;
 }
示例#23
0
 public CreateArrayObject(GlobalDataList globalDataList, List <object> operationInfos)
 {
     this.typeIndex = (int)operationInfos[0];
     if (2 == operationInfos.Count)
     {
         this.items = operationInfos[1] as List <object>;
     }
     this.globalDataList = globalDataList;
 }
示例#24
0
 public CreateObject(GlobalDataList globalDataList, List <object> operationInfos)
 {
     this.typeIndex           = (int)operationInfos[0];
     this.xFactoryMethodIndex = (int)operationInfos[1];
     if (3 == operationInfos.Count)
     {
         this.paramList = operationInfos[2] as List <object>;
     }
     this.globalDataList = globalDataList;
 }
示例#25
0
 public GatherType(GlobalDataList globalDataList, List <object> operationInfo)
 {
     this.assemblyIndex = (int)operationInfo[0];
     this.typeName      = operationInfo[1] as string;
     if (3 == operationInfo.Count)
     {
         this.genericTypeIndexs = operationInfo[2] as List <object>;
     }
     this.globalDataList = globalDataList;
 }
示例#26
0
        internal static void Load(object view, string xaml, out GlobalDataList xamlData)
        {
            var globalDataList = GatherDataList(xaml);

            globalDataList.Root = view;

            foreach (var op in globalDataList.Operations)
            {
                op.Do();
            }

            xamlData = globalDataList;
        }
示例#27
0
        public static object CreateObjectFromEXaml(string eXamlStr)
        {
            if (null == eXamlStr)
            {
                return(null);
            }

            //MainAssembly = view.GetType().Assembly;
            object         temp      = null;
            GlobalDataList eXamlData = null;

            LoadEXaml.Load(temp, eXamlStr, out eXamlData);
            return(eXamlData.Root);
        }
示例#28
0
        internal static GlobalDataList GatherDataList(string xaml)
        {
            var globalDataList = new GlobalDataList();

            Action currentAction = new RootAction(globalDataList);

            foreach (char c in xaml)
            {
                currentAction = currentAction.DealChar(c);
            }

            foreach (var op in globalDataList.PreLoadOperations)
            {
                op.Do();
            }

            return(globalDataList);
        }
示例#29
0
        public static object LoadFromEXamlByRelativePath <T>(this T view, string eXamlPath)
        {
            GlobalDataList eXamlData = null;

            if (null == eXamlPath)
            {
                return(eXamlData);
            }

            MainAssembly = view.GetType().Assembly;

            string resource = Tizen.Applications.Application.Current.DirectoryInfo.Resource;

            Tizen.Log.Fatal("NUI", "the resource path: " + resource);
            int windowWidth  = NUIApplication.GetDefaultWindow().Size.Width;
            int windowHeight = NUIApplication.GetDefaultWindow().Size.Height;

            string likelyResourcePath = resource + eXamlPath;

            //Find the xaml file in the layout folder
            if (File.Exists(likelyResourcePath))
            {
                StreamReader reader = new StreamReader(likelyResourcePath);
                var          xaml   = reader.ReadToEnd();
                reader.Close();
                reader.Dispose();

                LoadEXaml.Load(view, xaml, out eXamlData);
                var filePath = likelyResourcePath.Replace("\\", "/");
                if (filePath.Contains("/"))
                {
                    var xamlName = filePath.Substring(filePath.LastIndexOf("/") + 1, filePath.LastIndexOf(".") - filePath.LastIndexOf("/") - 1);
                    NUIApplication.CurrentLoadedXaml = xamlName;
                }
            }
            else
            {
                throw new Exception($"Can't find examl file {likelyResourcePath}");
            }

            return(eXamlData);
        }
示例#30
0
 public GatherAssembliesBlock(GlobalDataList globalDataList, Action parent)
 {
     this.parent         = parent;
     this.globalDataList = globalDataList;
 }