Пример #1
0
 internal Mapping(VarEnum vt, string varFieldName, string name, TypeStyle style)
 {
     this.vt           = vt;
     this.varFieldName = varFieldName;
     this.name         = name;
     this.style        = style;
 }
        internal ITemplate CreateTemplate(string typeName, object model)
        {
            if (ClassTypes != null && ClassTypes.Contains(typeName))
            {
                return(TemplateFactory.CreateTemplate("TypeScript", "Class", model));
            }

            return(TemplateFactory.CreateTemplate("TypeScript", TypeStyle.ToString(), model));
        }
Пример #3
0
 protected CppType(int vt, string name, ArrayType array, TypeStyle style, bool optional, wsdlParser.qname xmlType)
 {
     this.cppName  = name;
     this.Array    = array;
     this.Style    = style;
     this.Optional = optional;
     this.XmlType  = xmlType;
     this.vt       = vt;
 }
Пример #4
0
        public void UpdateContents()
        {
            UpdateItemsList();

            if (uiItems == null)
            {
                uiItems = new List <UiNameKeyBrowserItem>();
            }

            int itemCount    = filteredItems != null ? filteredItems.Count : 0;
            int excessCount  = Mathf.Max(uiItems.Count - itemCount, 0);
            int itemsCovered = Mathf.Min(itemCount, uiItems.Count);

            for (int i = 0; i < itemCount; ++i)
            {
                Item                 item   = filteredItems[i];
                TypeStyle            style  = (from s in contentTypeStyles where s.type == item.type select s).FirstOrDefault() ?? contentTypeStyles[0];
                UiNameKeyBrowserItem uiItem = null;
                if (i < itemsCovered)
                {
                    item.uiItem = uiItems[i];
                }
                else
                {
                    uiItem = Instantiate <UiNameKeyBrowserItem>(itemPrefab, contentParent);
                    uiItems.Add(uiItem);
                }
                item.uiItem = uiItem;
                item.uiItem.SetContent(this, item, style, i);
            }
            for (int i = 0; i < excessCount; ++i)
            {
                int index = itemCount + i;
                uiItems[index].gameObject.SetActive(false);
            }
        }
Пример #5
0
        private static CppType Factory(int vt, string name, ArrayType array, TypeStyle style, bool optional, wsdlParser.qname xmlType)
        {
            if (name == "BSTR")
            {
                return(new CppTypeBSTR(vt, name, array, style, optional, xmlType));
            }

            if (name == "DATE")
            {
                return(new CppTypeDate(vt, name, array, style, optional, xmlType));
            }

            if (name == "VARIANT_BOOL")
            {
                return(new CppTypeBool(vt, name, array, style, optional, xmlType));
            }

            if (style == TypeStyle.Object)
            {
                return(new CppTypeInterface(vt, name, array, style, optional, xmlType));
            }

            return(new CppType(vt, name, array, style, optional, xmlType));
        }
Пример #6
0
 internal CppTypeInterface(int vt, string name, ArrayType array, TypeStyle style, bool optional, wsdlParser.qname xmlType) : base(vt, name, array, style, optional, xmlType)
 {
 }
Пример #7
0
        /// <summary>
        /// 헬퍼를 출력한다.(대분류)
        /// </summary>
        private DialogResult ShowHelper(TypeStyle ts)
        {
            try
            {
                Erp.Facility.JZHA.JZHAH12 f;
                DialogResult ds = DialogResult.Abort;
                switch (ts)
                {
                case TypeStyle.LARGE:
                    f = new Erp.Facility.JZHA.JZHAH12(this.txtTypecodeL.Text.Trim(),
                                                      this.txtTypecodeM.Text.Trim(),
                                                      this.txtTypecodeS.Text.Trim(),
                                                      "GetTypecodeL");
                    f.Owner = this;
                    ds      = f.ShowDialog();
                    ////Erp.Facility.JZHA.JZHAH12 f = new Erp.Facility.JZHA.JZHAH12(this.txtTypecodeL.Text.Trim(),
                    //                                                             this.txtTypecodeM.Text.Trim(),
                    //                                                             this.txtTypecodeS.Text.Trim(),
                    //                                                             "GetTypecodeL");
                    //f.Owner = this;
                    //f.ShowDialog();
                    break;

                case TypeStyle.MEDIUM:
                    f = new Erp.Facility.JZHA.JZHAH12(this.txtTypecodeL.Text.Trim(),
                                                      this.txtTypecodeM.Text.Trim(),
                                                      this.txtTypecodeS.Text.Trim(),
                                                      "GetTypecodeM");
                    f.Owner = this;
                    ds      = f.ShowDialog();
                    ////Erp.Facility.JZHA.JZHAH12 f1 = new Erp.Facility.JZHA.JZHAH12(this.txtTypecodeL.Text.Trim(),
                    //                                                            this.txtTypecodeM.Text.Trim(),
                    //                                                            this.txtTypecodeS.Text.Trim(),
                    //                                                            "GetTypecodeM");
                    //f1.Owner = this;
                    //f1.ShowDialog();
                    break;

                case TypeStyle.SMALL:
                    f = new Erp.Facility.JZHA.JZHAH12(this.txtTypecodeL.Text.Trim(),
                                                      this.txtTypecodeM.Text.Trim(),
                                                      this.txtTypecodeS.Text.Trim(),
                                                      "GetTypecodeS");
                    f.Owner = this;
                    ds      = f.ShowDialog();
                    ////Erp.Facility.JZHA.JZHAH12 f2 = new Erp.Facility.JZHA.JZHAH12(this.txtTypecodeL.Text.Trim(),
                    //                                                            this.txtTypecodeM.Text.Trim(),
                    //                                                            this.txtTypecodeS.Text.Trim(),
                    //                                                            "GetTypecodeS");
                    //f2.Owner = this;
                    //f2.ShowDialog();

                    break;
                }
                return(ds);
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Пример #8
0
 public static CppType Create(int vt, string name, ArrayType array, TypeStyle style, bool optional, wsdlParser.qname xmlType)
 {
     return(Factory(vt, name, array, style, optional, xmlType));
 }
Пример #9
0
 public static CppType Create(int vt, string name, wsdlParser.qname xmlType, TypeStyle style)
 {
     return(Factory(vt, name, ArrayType.NotArray, style, false, xmlType));
 }
Пример #10
0
 // todo: fix all the VarEnum/int casting nonsense
 private static CppType Factory(CppType arrayItem, ArrayType array, TypeStyle style, bool optional, wsdlParser.qname xmlType)
 {
     return(new CppTypeArray((int)VarEnum.VT_ARRAY, arrayItem, array, style, optional, xmlType));
 }
Пример #11
0
 public CppType(string name)
 {
     style = TypeStyle.Struct;
     Name  = name;
 }
Пример #12
0
 public CppTypeArray(int vt, CppType arrayItem, ArrayType array, TypeStyle style, bool optional, wsdlParser.qname xmlType) : base(vt, "SAFEARRAY *", array, style, optional, xmlType)
 {
     this.arrayItemType = arrayItem;
 }