private void CreateCommonModuleDialog(UiTreeNode node)
        {
            if (node == null || !(node.ContextObject is CommonModule))
            {
                MessageBox.Show("请选择结点");
                return;
            }

            WindowDlg dlg = new WindowDlg();

            dlg.Text = "添加窗口信息";
            foreach (TableInfo table in this.project.Database.Tables)
            {
                dlg.cmbEntity.Items.Add(table);
            }
            foreach (ViewInfo view in this.project.Database.Views)
            {
                dlg.cmbEntity.Items.Add(view);
            }

            dlg.cmbEntity.SelectedIndex = 0;
            if (dlg.ShowDialog() == DialogResult.OK)
            {
                CommonModule module = node.ContextObject as CommonModule;
                if (module == null)
                {
                    return;
                }

                GUIDialog window = new GUIDialog(module);
                window.Caption     = dlg.txtCaption.Text.Trim();
                window.Name        = dlg.txtName.Text.Trim();
                window.Description = dlg.txtDescription.Text.Trim();
                module.Dialogs.Add(window);

                EntityInfo entityInfo = null;
                TableInfo  tableInfo  = null;
                ViewInfo   viewInfo   = null;
                tableInfo  = this.project.Database.Tables.Find(e => e.Name == dlg.cmbEntity.SelectedItem.ToString());
                entityInfo = tableInfo;

                if (entityInfo != null)
                {
                    entityInfo = (EntityInfo)((TableInfo)entityInfo).Clone();
                }
                else
                {
                    viewInfo   = this.project.Database.Views.Find(e => e.Name == dlg.cmbEntity.SelectedItem.ToString());
                    entityInfo = viewInfo;
                    entityInfo = (EntityInfo)((ViewInfo)entityInfo).Clone();
                }

                window.Entities.Add(entityInfo);
                window.ResultTableName = entityInfo.Name;

                BuildEntities(entityInfo);
                UiTreeNode windowNode = new UiTreeNode(window);
                node.Nodes.Add(windowNode);
            }
        }
Example #2
0
    public override void Initialize()
    {
        GUIRadarScan.Hide();

        // tzz added
        // close the EXIT_COPY dialog to prevent from click ok to send exit copy scene
        //
        GUIDialog.Destroy();
    }
Example #3
0
    public static void PayForCommodity(CommodityData data)
    {
#if OPEN_PPSDK
        string orderId = data.orderId;

        string productId   = data.ItemID.ToString();
        string productName = data.BasicData.Name;

        // Convert to 91Bean unit
        float exchangeRatio = RmbYuan2NdBeanExchangeRatio;
        if (data.currency == CurrencyType.RmbYuan)
        {
            exchangeRatio = RmbYuan2NdBeanExchangeRatio;
        }
        else if (data.currency == CurrencyType.RmbJiao)
        {
            exchangeRatio = 0.1f * RmbYuan2NdBeanExchangeRatio;
        }
        else if (data.currency == CurrencyType.RmbFen)
        {
            exchangeRatio = 0.01f * RmbYuan2NdBeanExchangeRatio;
        }

        float productPrice         = exchangeRatio * data.currPrice;
        float productOriginalPrice = exchangeRatio * data.originalPrice;

        int    productCnt     = data.BasicData.Count;
        string payDescription = data.BasicData.Description;

        productPrice         *= productCnt;
        productOriginalPrice *= productCnt;

        Debug.Log("[GUIVipStore]: PayForCommodity PPPlatform " + productPrice.ToString() + " and count " + productCnt);

        float blanceMoney = pp_SYPPMoneyRequest();
        if (blanceMoney >= productPrice)
        {
            string prompt = string.Format(Globals.Instance.MDataTableManager.GetWordText(24700036), blanceMoney.ToString("F2"), productPrice.ToString("F2"));

            GUIDialog.PopupYesNoDlg(prompt, delegate() {
                pp_uniPayAsyn(orderId, productId, productName, productPrice, productCnt, payDescription);
            }, null);
        }
        else
        {
            pp_uniPayAsyn(orderId, productId, productName, productPrice, productCnt, payDescription);
        }
#endif
    }
    //// Use this for initialization
    //void Start () {
	
    //}
	
    //// Update is called once per frame
    //void Update () {
	
    //}

    virtual public void OnMouseUp()
    {
		/*
        if(ObjectInteractionMgr.GetInstance() != null)
            if (ObjectInteractionMgr.GetInstance().Clickable == false)
                return; */

        if (WithinRange() == false || IsActive() == false || Enabled == false || guiType == null || file == null)
            return;

        // Pop up GUI
        GUIManager guiMgr = GUIManager.GetInstance();
        if (guiMgr != null)
        {
            DialogMsg msg = new DialogMsg();
            msg.command = DialogMsg.Cmd.open;
            msg.modal = true;
            msg.xmlName = file.name;
            msg.className = guiType;
            dialog = guiMgr.LoadDialog(msg) as GUIDialog;
        }
    }
    void CalculateRect()
    {
        TitleLabel   = new Rect(0, 0, screenX, 30);
        AddDialogBtn = new Rect(screenX - 310, 0, 150, TitleLabel.height);
        SaveBtn      = new Rect(AddDialogBtn.x + AddDialogBtn.width + 5, 0, 150, TitleLabel.height);

        guiDialogs = new List <GUIDialog>();

        ScrollViewRect = new Rect(0, AddDialogBtn.height + 5, screenX, screenY - AddDialogBtn.height - 5);

        DialogRect    = new Rect(0, 0, screenX - 20, dialogHeight);
        DialogLabel   = new Rect(10, 10, 200, 40);
        personIDLabel = new Rect(210, 10, 100, 20);
        personIDInput = new Rect(300, 10, 100, 20);

        timeStateLabel = new Rect(410, 10, 100, 20);
        timeStateInput = new Rect(timeStateLabel.x + timeStateLabel.width, 10, 100, 20);

        AddQuestionBtn = new Rect(DialogRect.width - 310, 10, 150, 30);

        Rect prevDialogRect = new Rect(0, 0, 0, 0);

        for (int i = 0; i < dialogues.Count; i++)
        {
            Dialog    dialog = ((Dialog)dialogues[i]);
            GUIDialog d      = new GUIDialog();

            Rect tmp = new Rect(0, prevDialogRect.y + prevDialogRect.height, screenX - 10, dialogHeight);

            d.DeleteDialogBtn = new Rect(tmp.width - 165, 10, 150, 30);

            d.PersonID  = dialog.personId;
            d.TimeState = (int)dialog.timeState;

            d.StartingStatement = GenerateStatement(((Dialog)dialogues[i]).startingStatement, DialogLabel, tmp);
            dialogHeight        = d.StartingStatement.StatementGroupRect.height + 5;

            Rect prevQuestionRect = d.StartingStatement.StatementGroupRect;

            for (int j = 0; j < dialog.questions.Count; j++)
            {
                GUIQuestion question      = new GUIQuestion();
                Rect        questionGroup = new Rect(prevQuestionRect.x, prevQuestionRect.y + prevQuestionRect.height + 5, prevQuestionRect.width, 300);
                Rect        questionBG    = new Rect(0, 0, questionGroup.width, questionGroup.height);

                question.DeleteQuestionBtn = new Rect(questionGroup.width - 155, 5, 150, 30);

                question.QuestionGroup  = questionGroup;
                question.QuestionBGRect = questionBG;

                question.titleRect             = new Rect(10, 0, 150, 40);
                question.AddEnablingKeywordBtn = new Rect(questionGroup.width - 310, 5, 150, 30);
                Rect offsetRect = question.titleRect;

                for (int k = 0; k < ((Question)dialog.questions[j]).enablingKeywords.Count; k++)
                {
                    question.EnablingKeywords.Add(((Keyword)((Question)dialog.questions[j]).enablingKeywords[k]));

                    Rect enablingKeywordLabel  = new Rect(question.titleRect.x, question.titleRect.y + question.titleRect.height + k * (25), 200, 25);
                    Rect enablingKeywordInput  = new Rect(enablingKeywordLabel.x + enablingKeywordLabel.width, enablingKeywordLabel.y, questionGroup.width - enablingKeywordLabel.x - enablingKeywordLabel.width - 30, 20);
                    Rect removeEnablingKeyword = new Rect(enablingKeywordInput.x + enablingKeywordInput.width + 5, enablingKeywordInput.y, 20, 20);

                    question.EnablingKeywordsLabelList.Add(enablingKeywordLabel);
                    question.EnablingKeywordsInputList.Add(enablingKeywordInput);
                    question.RemoveEnablingKeyword.Add(removeEnablingKeyword);

                    offsetRect = enablingKeywordLabel;
                }


                question.question = GenerateStatement(((Question)dialog.questions[j]).question, offsetRect, questionGroup, "Question");

                Rect questionTmpRect = new Rect(question.question.StatementGroupRect);
                questionTmpRect.height += 5;
                question.answer         = GenerateStatement(((Question)dialog.questions[j]).answer, questionTmpRect, questionGroup, "Answer");

                questionGroup.height    = question.titleRect.y + question.titleRect.height + question.question.StatementGroupRect.height + question.answer.StatementGroupRect.height + question.EnablingKeywords.Count * 25 + 10 + 20;
                question.QuestionGroup  = questionGroup;
                questionBG.height       = questionGroup.height;
                question.QuestionBGRect = questionBG;

                d.questions.Add(question);
                Rect tmpQuestion = new Rect(questionGroup);
                //tmpQuestion.height += 30 * (j + 1);
                prevQuestionRect = tmpQuestion;
                dialogHeight    += prevQuestionRect.height + 5;
            }


            tmp.height        = dialogHeight + 50;
            d.DialogGroup     = tmp;
            DialogRect.height = d.DialogGroup.height;
            d.DialogBG        = DialogRect;

            guiDialogs.Add(d);
            tmp.height    += 5;
            prevDialogRect = tmp;
        }



        float dialogsHeight = 0.0f;

        foreach (GUIDialog guiDialog in guiDialogs)
        {
            dialogsHeight += guiDialog.DialogGroup.height;
        }

        dialogsHeight += guiDialogs.Count * 5;
        ScrollViewArea = new Rect(0, 0, screenX - 20, dialogsHeight);
    }
Example #6
0
    // Use this for initialization
    void Awake()
    {
        //ItemPageSize  = new Vector2(IconItemParentScroll.viewableArea.x - ItemInterval,
        //	IconItemParentScroll.viewableArea.y - ItemInterval);

        // create the item
        int        t_pageIdx     = 0;
        GameObject t_containerGO = null;
        //UIDragPanelContents t_container = null;

        int t_addItemSlotNum = PageTotalNum * ItemsNumInOnePage;

        for (int i = 0; i < t_addItemSlotNum; i++)
        {
            ItemSlotData t_data = null;

            if (i % ItemsNumInOnePage == 0)
            {
                t_containerGO      = Instantiate(ListContainer) as GameObject;
                t_containerGO.name = "Page" + t_pageIdx;
                t_containerGO.transform.localPosition = Vector3.zero;

                //t_container								= t_containerGO.GetComponent<UIDragPanelContents>() as UIDragPanelContents;

                //mListItemContainer.Add(t_container);
                t_pageIdx++;
            }

            //	mCurrIconItemList.Add(CreateItem(t_container,t_data,i));
        }

        t_pageIdx = 0;

        // the EZGUI must fill all item in container and than
        // addItem in to scroll(UIGrid)
        //
        //foreach(UIDragPanelContents c in mListItemContainer){
        //	//IconItemParentScroll.AddItem(c);
        //
        //	// add page indicator
        //	//
        //	GameObject t_indicator      = Instantiate(PageIndicator) as GameObject;
        //	UIToggle t_checkBtn	= t_indicator.GetComponent<UIToggle>();
        //
        //	t_indicator.transform.parent	= PageIndicatorParent;
        //	//t_checkBtn.SetInputDelegate(OnPageIndicatorTapped);
        //
        //	float t_indicatorWidth		= PageIndicatoerInterval + t_checkBtn.width;
        //
        //	float t_totalWidth			= t_indicatorWidth * PageTotalNum;
        //	float t_position_x          = t_pageIdx * t_indicatorWidth - (t_totalWidth - t_indicatorWidth) / 2;
        //
        //	t_indicator.transform.localPosition = new Vector3(t_position_x,0,-1);
        //
        //	//mListPageIndicator.Add(t_checkBtn);
        //
        //	if(t_pageIdx == 0){
        //		t_checkBtn.isChecked = true;
        //	}
        //
        //	t_pageIdx++;
        //}

        // Default Scroll to the first item
        //IconItemParentScroll.ScrollToItem(0, 0.1f);
        //IconItemParentScroll.SetScrollChangeDelegate(ItemScrollChangeDelegateEvent);

        if (PageTotalNum == 1)
        {
            PageIndicatorParent.gameObject.SetActiveRecursively(false);
        }

        // add the button event
        //OperationBtn.SetInputDelegate(OnOpBtnTapEvent);
        //SellBtn.SetInputDelegate(OnOpBtnTapEvent);
        OperationBtn.transform.localScale = Vector3.zero;
        SellBtn.transform.localScale      = Vector3.zero;

        smPackageUnitList.Add(this);

        // set the default event
        mSellBtnDelegateEvent = delegate(IconData iData) {
            if (iData != null && iData.itemData != null && iData.itemData.MItemData != null)
            {
                if (iData.itemData.MItemData.BasicData.IsPermitSell)
                {
                    GUIDialog.PopupSellItemConfigDlg(iData.itemData);
                }
                else
                {
                    Globals.Instance.MGUIManager.ShowSimpleCenterTips(21000014, true);
                }
            }
        };
    }
Example #7
0
        private static List <OutputFile> GenerateTempleteFiles(Project pro, string directory, string matchValue, string charset, bool native)
        {
            List <OutputFile> outputFileList = new List <OutputFile>();

            if (pro == null)
            {
                return(outputFileList);
            }

            if (!Directory.Exists(directory))
            {
                return(outputFileList);
            }

            string[] files = Directory.GetFiles(directory);



            foreach (string file in files)
            {
                string tempCharset = charset;
                bool   tempNative  = native;

                FileInfo fileInfo = new FileInfo(file);

                string fileName = Regex.Replace(fileInfo.Name, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);

                MatchCollection matchs = Regex.Matches(fileName, "\\[.*?\\]");

                foreach (Match match in matchs)
                {
                    if (match.Value.ToUpper().StartsWith("[CHARSET="))
                    {
                        tempCharset = match.Value.ToUpper().Replace("[CHARSET=", string.Empty).Trim(']');
                    }
                    else if (match.Value.ToUpper().StartsWith("[NATIVE="))
                    {
                        tempNative = bool.Parse(match.Value.ToUpper().Replace("[NATIVE=", string.Empty).Trim(']'));
                    }
                }

                if (matchs.Count < 1)
                {
                    OutputFile outputFile = new PageModel();
                    outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(fileName);
                    outputFile.ContextObject = pro;
                    outputFile.Name          = string.Empty;
                    outputFile.Charset       = tempCharset;
                    outputFile.Native        = tempNative;
                    outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                    outputFile.FileText      = File.ReadAllBytes(file);
                    outputFileList.Add(outputFile);
                }


                foreach (Match match in matchs)
                {
                    if (match.Value.ToUpper() == "[TABLES]")
                    {
                        foreach (EntityInfo entity in pro.Database.Tables)
                        {
                            OutputFile outputFile = new PageModel();
                            outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[TABLES\\]", entity.Name, RegexOptions.IgnoreCase));
                            outputFile.ContextObject = entity;
                            outputFile.Name          = entity.Name;
                            outputFile.Charset       = tempCharset;
                            outputFile.Native        = tempNative;
                            outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                            outputFile.FileText      = File.ReadAllBytes(file);
                            outputFileList.Add(outputFile);
                        }
                    }
                    else if (match.Value.ToUpper() == "[VIEWS]")
                    {
                        foreach (EntityInfo entity in pro.Database.Views)
                        {
                            OutputFile outputFile = new PageModel();
                            outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[VIEWS\\]", entity.Name, RegexOptions.IgnoreCase));
                            outputFile.ContextObject = entity;
                            outputFile.Name          = entity.Name;
                            outputFile.Charset       = tempCharset;
                            outputFile.Native        = tempNative;
                            outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                            outputFile.FileText      = File.ReadAllBytes(file);
                            outputFileList.Add(outputFile);
                        }
                    }
                    else if (match.Value.ToUpper() == "[ENTITIES]")
                    {
                        foreach (EntityInfo entity in pro.Database.Tables)
                        {
                            OutputFile outputFile = new PageModel();
                            outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[ENTITIES\\]", entity.Name, RegexOptions.IgnoreCase));
                            outputFile.ContextObject = entity;
                            outputFile.Name          = entity.Name;
                            outputFile.Charset       = tempCharset;
                            outputFile.Native        = tempNative;
                            outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                            outputFile.FileText      = File.ReadAllBytes(file);
                            outputFileList.Add(outputFile);
                        }

                        foreach (EntityInfo entity in pro.Database.Views)
                        {
                            OutputFile outputFile = new PageModel();
                            outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[ENTITIES\\]", entity.Name, RegexOptions.IgnoreCase));
                            outputFile.ContextObject = entity;
                            outputFile.Name          = entity.Name;
                            outputFile.Charset       = tempCharset;
                            outputFile.Native        = tempNative;
                            outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                            outputFile.FileText      = File.ReadAllBytes(file);
                            outputFileList.Add(outputFile);
                        }
                    }
                    else if (match.Value.ToUpper() == "[MODULES]")
                    {
                        foreach (var module in pro.UI.SystemModule.Modules)
                        {
                            OutputFile outputFile = new PageModel();
                            outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[MODULES\\]", module.Name, RegexOptions.IgnoreCase));
                            outputFile.ContextObject = module;
                            outputFile.Name          = module.Name;
                            outputFile.Charset       = tempCharset;
                            outputFile.Native        = tempNative;
                            outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                            outputFile.FileText      = File.ReadAllBytes(file);
                            outputFileList.Add(outputFile);
                        }
                    }
                    else if (match.Value.ToUpper() == "[WINDOWS]")
                    {
                        if (matchValue != string.Empty)
                        {
                            var module = pro.UI.SystemModule.Modules.Find(e => e.Name == matchValue);

                            if (module != null)
                            {
                                foreach (GUIWindow window in module.Windows)
                                {
                                    OutputFile outputFile = new PageModel();
                                    outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[WINDOWS\\]", window.Name, RegexOptions.IgnoreCase));
                                    outputFile.ContextObject = window;
                                    outputFile.Name          = window.Name;
                                    outputFile.Charset       = tempCharset;
                                    outputFile.Native        = tempNative;
                                    outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                                    outputFile.FileText      = File.ReadAllBytes(file);
                                    outputFileList.Add(outputFile);
                                }
                            }
                        }
                        else
                        {
                            foreach (var module in pro.UI.SystemModule.Modules)
                            {
                                foreach (GUIWindow window in module.Windows)
                                {
                                    OutputFile outputFile = new PageModel();
                                    outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[WINDOWS\\]", window.Name, RegexOptions.IgnoreCase));
                                    outputFile.ContextObject = window;
                                    outputFile.Name          = window.Name;
                                    outputFile.Charset       = tempCharset;
                                    outputFile.Native        = tempNative;
                                    outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                                    outputFile.FileText      = File.ReadAllBytes(file);
                                    outputFileList.Add(outputFile);
                                }
                            }
                        }
                    }
                    else if (match.Value.ToUpper() == "[DIALOGS]")
                    {
                        foreach (GUIDialog dialog in pro.UI.CommonModule.Dialogs)
                        {
                            OutputFile outputFile = new PageModel();
                            outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[DIALOGS\\]", dialog.Name, RegexOptions.IgnoreCase));
                            outputFile.Name          = dialog.Name;
                            outputFile.ContextObject = dialog;
                            outputFile.Charset       = tempCharset;
                            outputFile.Native        = tempNative;
                            outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                            outputFile.FileText      = File.ReadAllBytes(file);
                            outputFileList.Add(outputFile);
                        }
                    }
                    else if (match.Value.ToUpper() == "[TABLE]")
                    {
                        TableInfo entityInfo = pro.Database.Tables.Find(e => e.Name == matchValue);

                        OutputFile outputFile = new PageModel();
                        outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[TABLE\\]", matchValue, RegexOptions.IgnoreCase));
                        outputFile.ContextObject = (entityInfo == null) ? (ContextObject)pro : (ContextObject)entityInfo;
                        outputFile.Name          = matchValue;
                        outputFile.Charset       = tempCharset;
                        outputFile.Native        = tempNative;
                        outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                        outputFile.FileText      = File.ReadAllBytes(file);
                        outputFileList.Add(outputFile);
                    }
                    else if (match.Value.ToUpper() == "[VIEW]")
                    {
                        ViewInfo entityInfo = pro.Database.Views.Find(e => e.Name == matchValue);

                        OutputFile outputFile = new PageModel();
                        outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[VIEW\\]", matchValue, RegexOptions.IgnoreCase));
                        outputFile.ContextObject = (entityInfo == null) ? (ContextObject)pro : (ContextObject)entityInfo;
                        outputFile.Name          = matchValue;
                        outputFile.Charset       = tempCharset;
                        outputFile.Native        = tempNative;
                        outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                        outputFile.FileText      = File.ReadAllBytes(file);
                        outputFileList.Add(outputFile);
                    }
                    else if (match.Value.ToUpper() == "[ENTITY]")
                    {
                        EntityInfo entityInfo = null;

                        ViewInfo  viewInfo  = null;
                        TableInfo tableInfo = pro.Database.Tables.Find(e => e.Name == matchValue);
                        entityInfo = tableInfo;

                        if (entityInfo == null)
                        {
                            viewInfo   = pro.Database.Views.Find(e => e.Name == matchValue);
                            entityInfo = viewInfo;
                        }

                        OutputFile outputFile = new PageModel();
                        outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[ENTITY\\]", matchValue, RegexOptions.IgnoreCase));
                        outputFile.ContextObject = (entityInfo == null) ? (ContextObject)pro : (ContextObject)entityInfo;
                        outputFile.Name          = matchValue;
                        outputFile.Charset       = tempCharset;
                        outputFile.Native        = tempNative;
                        outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                        outputFile.FileText      = File.ReadAllBytes(file);
                        outputFileList.Add(outputFile);
                    }
                    else if (match.Value.ToUpper() == "[MODULE]")
                    {
                        var module = pro.UI.SystemModule.Modules.Find(e => e.Name == matchValue);

                        OutputFile outputFile = new PageModel();
                        outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[MODULE\\]", matchValue, RegexOptions.IgnoreCase));
                        outputFile.ContextObject = (module == null) ? (ContextObject)pro : (ContextObject)module;
                        outputFile.Name          = matchValue;
                        outputFile.Charset       = tempCharset;
                        outputFile.Native        = tempNative;
                        outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                        outputFile.FileText      = File.ReadAllBytes(file);
                        outputFileList.Add(outputFile);
                    }
                    else if (match.Value.ToUpper() == "[WINDOW]")
                    {
                        GUIWindow window = null;
                        foreach (var module in pro.UI.SystemModule.Modules)
                        {
                            window = module.Windows.Find(e => e.Name == matchValue);
                            if (window != null)
                            {
                                break;
                            }
                        }

                        OutputFile outputFile = new PageModel();
                        outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[WINDOW\\]", matchValue, RegexOptions.IgnoreCase));
                        outputFile.ContextObject = (window == null) ? (ContextObject)pro : (ContextObject)window;
                        outputFile.Name          = matchValue;
                        outputFile.Charset       = tempCharset;
                        outputFile.Native        = tempNative;
                        outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                        outputFile.FileText      = File.ReadAllBytes(file);
                        outputFileList.Add(outputFile);
                    }
                    else if (match.Value.ToUpper() == "[DIALOG]")
                    {
                        GUIDialog dialog = pro.UI.CommonModule.Dialogs.Find(e => e.Name == matchValue);

                        OutputFile outputFile = new PageModel();
                        outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(Regex.Replace(fileName, "\\[DIALOG\\]", matchValue, RegexOptions.IgnoreCase));
                        outputFile.ContextObject = (dialog == null) ? (ContextObject)pro : (ContextObject)dialog;
                        outputFile.Name          = matchValue;
                        outputFile.Charset       = tempCharset;
                        outputFile.Native        = tempNative;
                        outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                        outputFile.FileText      = File.ReadAllBytes(file);
                        outputFileList.Add(outputFile);
                    }
                    else
                    {
                        if (!match.Value.ToUpper().StartsWith("[CHARSET=") && !match.Value.ToUpper().StartsWith("[NATIVE="))
                        {
                            OutputFile outputFile = new PageModel();
                            outputFile.FileName      = NomenclatureHelper.ConvertToPascalCase(fileName);
                            outputFile.ContextObject = pro;
                            outputFile.Name          = string.Empty;
                            outputFile.Charset       = tempCharset;
                            outputFile.Native        = tempNative;
                            outputFile.RelativePath  = Regex.Replace(fileInfo.DirectoryName, "\\[PROJECTNAME\\]", pro.Name, RegexOptions.IgnoreCase);
                            outputFile.FileText      = File.ReadAllBytes(file);
                            outputFileList.Add(outputFile);
                        }
                    }
                }
            }
            return(outputFileList);
        }