Esempio n. 1
0
 public DataToClassOperator(ICaomaoHeader header)
 {
     this.Header = header;
     this.TemplateNoNamespaceFilePath   = CaomaoDataExportGobalConfig.Instance.NoNamespaceTemplate;
     this.TemplateWithNamespaceFilePath = CaomaoDataExportGobalConfig.Instance.WithNamespaceTemplate;
     this.ExportFolderPath = CaomaoDataExportGobalConfig.Instance.ExportClassPath;
 }
Esempio n. 2
0
        public CaomaoLocalizationOperator(ICaomaoHeader header)
        {
            this.Header = header;
            var path = CaomaoLocalizationGobalConfig.Instance.LocalizationExcelFolderPath;

            if (string.IsNullOrEmpty(path))
            {
                path = "Assets/Editor/LocalizationWindow/LocalizationExcel";
                CaomaoLocalizationGobalConfig.Instance.LocalizationExcelFolderPath =
                    path;
            }
            this.ExcelFolderPath = path;
            path = CaomaoLocalizationGobalConfig.Instance.LocalizationScriptableObjectPath;
            if (string.IsNullOrEmpty(path))
            {
                path = "Assets/CaomaoFramework/LocalizationModule/LocalizationData";
                CaomaoLocalizationGobalConfig.Instance.LocalizationScriptableObjectPath =
                    path;
            }
            this.SBFolderPath = path;
            path = CaomaoLocalizationGobalConfig.Instance.LocalizationTemplatePath;
            if (string.IsNullOrEmpty(path))
            {
                path = "Assets/Editor/LocalizationWindow/LocalizationConstTemplate.txt";
                CaomaoLocalizationGobalConfig.Instance.LocalizationTemplatePath =
                    path;
            }
            this.TemplateFilePath = path;
            this.ExcelFilePath    = this.ExcelFolderPath + "/Localization.xlsx";
            this.Config           = CaomaoLocalizationGobalConfig.Instance.SBConfig;
            this.InitSbData();
        }
Esempio n. 3
0
 protected override void OnEnable()
 {
     base.OnEnable();
     this.id       = serializedObject.FindProperty("ID");
     this.redPoint = serializedObject.FindProperty("RedPointImage");
     //this.idLayer = serializedObject.FindProperty("LayerIds");
     this.idcontent       = EditorGUIUtility.TrTextContent("红点树节点ID");
     this.redPointContent = EditorGUIUtility.TrTextContent("红点Image");
     this.header          = new CaomaoHeader("普通红点按钮(不带数字)");
 }
Esempio n. 4
0
 protected override void Initialize()
 {
     this.pager = new SlidePageNavigationHelper <Page>();
     this.pager.TabGroup.ExpandHeight = false;
     this.InitMainPage();
     this.Header = new CaomaoCallbackHeader("Caomao Framework", this.DrawPaging);
     this.pager.PushPage(MainPage, "预览");
     this.WindowPadding = Vector4.zero;
     this.InitStyles();
 }
Esempio n. 5
0
 protected override void OnEnable()
 {
     base.OnEnable();
     this.id              = serializedObject.FindProperty("ID");
     this.redPoint        = serializedObject.FindProperty("RedPointImage");
     this.number          = serializedObject.FindProperty("lb_number");
     this.idcontent       = EditorGUIUtility.TrTextContent("红点树节点ID");
     this.redPointContent = EditorGUIUtility.TrTextContent("红点Image");
     this.numberContent   = EditorGUIUtility.TrTextContent("数字Text");
     this.header          = new CaomaoHeader("带数字红点按钮");
 }
Esempio n. 6
0
        protected override void Initialize()
        {
            base.Initialize();
            this.LoadPlayerPrefs();
            this.m_optionGui       = new GUIContent("选项");
            this.m_selectAll       = new GUIContent("全选");
            this.m_cancelSelectAll = new GUIContent("不选择");
            this.m_sort            = new GUIContent("排序");
            btnStyle               = new GUIStyle(EditorStyles.toolbarDropDown);
            btnStyle.fixedHeight   = 21f;
            btnStyle.stretchHeight = false;
            m_oOptionSeletor.EnableSingleClickToSelect();
            m_oOptionSeletor.SelectionConfirmed += delegate(IEnumerable <int> types)
            {
                var type = (EOpptionType)types.FirstOrDefault <int>();
                switch (type)
                {
                case EOpptionType.新建:

                    break;
                }
            };
            this.Header = new CaomaoCallbackHeader("PlayerPrefs工具", this.DrawOpeartorPlayerPrefsData);
        }
Esempio n. 7
0
    protected override void Initialize()
    {
        base.Initialize();

        if (this.Header == null)
        {
            this.Header = new CaomaoCallbackHeader("天气预报模块", this.DrawToolbar);
        }
        if (this.CardList == null)
        {
            this.CardList = new CaomaoCardList <CaomaoWeatherCard>("实时天气预报", true);
        }
        if (this.toolbar == null)
        {
            this.toolbar = new GUIStyle()
            {
                padding       = new RectOffset(0, 1, 0, 0),
                stretchHeight = true,
                stretchWidth  = true,
                fixedHeight   = 0f
            };
        }
        if (this.m_bHasWeatherData == false)
        {
            var data = CaomaoWeatherGlobalConfig.Instance.WeatherData;
            if (data != null && data.data != null && data.status == 1000 && data.IsToday(DateTime.Now.Day))
            {
                this.m_bHasWeatherData = true;
                this.weatherData       = data;
                this.LoadWeatherData();
                return;
            }
            //加载天气数据
            var task = this.GetWeatherTask();
        }
    }
Esempio n. 8
0
 public DataToDataOperator(ICaomaoHeader header)
 {
     this.Header           = header;
     this.ExportFolderPath = CaomaoDataExportGobalConfig.Instance.ExportFolderPath;
 }