Ejemplo n.º 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);
        }
Ejemplo n.º 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);
        }
Ejemplo n.º 3
0
        private void AddEnumeratorButton_Click(object sender, EventArgs e)
        {
            string text = gtEnumeratorTextBoxControl.Text;

            // テキストが空だと列挙に追加できないのでreturn
            if (GTCS_GTL.ConfirmEmptyStringSP(text))
            {
                return;
            }
            // 既に存在している列挙名の場合return
            foreach (string item in EnumeratorListBox.Items)
            {
                if (text == item)
                {
                    return;
                }
            }

            // 未だ追加されていない列挙名なので列挙体リストに追加する
            GTCS_GTL.AddItemListBox(EnumeratorListBox, text);
        }