Пример #1
0
        private string GetUMeta(string displayName, bool bHidden)
        {
            string temp = GTCS_GTL.EMPTYSTRING;

            if (GTCS_GTL.ConfirmFalse(GTCS_GTL.ConfirmEmptyStringSP(displayName)))
            {
                temp += "DisplayName=" + GTCS_GTL.DecorateString(displayName, "\"");
                temp += ",";
            }
            if (GTCS_GTL.ConfirmTrue(bHidden))
            {
                temp += "Hidden";
            }

            // 各それぞれに最後コンマを含めているので最後だけは要らないのであれば取り除いておく
            if (temp.EndsWith(","))
            {
                temp = temp.Remove(temp.Length - 1);
            }

            // FinalGatheringString..
            if (GTCS_GTL.ConfirmFalse(GTCS_GTL.ConfirmEmptyStringSP(temp)))
            {
                return(GTCS_GTL.DecorateString(temp, "UMETA(", ")"));
            }

            // Return Empty..
            return(temp);
        }
Пример #2
0
        private void MakeAndCopyUMacro(bool bFuncOrProp)
        {
            string macroU = (bFuncOrProp) ? "UFUNCTION" : "UPROPERTY";

            macroU += "(";
            var indexAvailables = (bFuncOrProp) ? gtFunctionCheckedListBoxControl.CheckedIndices : gtPropertyCheckedListBoxControl.CheckedIndices;

            //GTCS_GTL.ForLoopGT(indexAvailables, delegate (int i, IList<int> val){ }, delegate (){ } );
            for (int i = 0; i < indexAvailables.Count; i++)
            {
                int index = indexAvailables[i];
                macroU += (bFuncOrProp) ? GetFunctionDomain(index) : GetPropertyDomain(index);
                if (index < (indexAvailables.Count - 1))
                {
                    macroU += ", ";
                }
            }

            // カテゴリー名を連結させる
            {
                string [] category  = GTCS_GTL.DivideString(CategoryTextBox.Text, ",");
                int       nCategory = category.Length;
                if (nCategory > 0)
                {
                    macroU += ", ";
                    macroU += "Category = ";

                    string tempCate = string.Empty;
                    for (int i = 0; i < nCategory; i++)
                    {
                        if (GTCS_GTL.ConfirmEmptyStringSP(category[i]) == false)
                        {
                            tempCate += category[i];
                            if (i < (nCategory - 1))
                            {
                                tempCate += "|";
                            }
                        }
                    }
                    macroU += GTCS_GTL.DecorateString(tempCate, "\"");
                }
            }
            // metaを連結させる
            {
            }

            macroU += ")";
            Clipboard.SetText(macroU);
        }