상속: MonoBehaviour
예제 #1
0
    private void populateFields()
    {
        GameObject go = Selection.activeGameObject;
        //Hidden Area
        HiddenArea ha = go.GetComponent <HiddenArea>();

        if (!ha)
        {
            ha = go.GetComponentInParent <HiddenArea>();
        }
        if (ha)
        {
            hac.hiddenArea = ha;
        }
        //Lantern Activator
        LanternActivator la = go.GetComponent <LanternActivator>();

        if (!la)
        {
            la = go.GetComponentInParent <LanternActivator>();
        }
        if (la)
        {
            hac.lanternActivator = la;
        }
    }
예제 #2
0
        private void SaveChanges()
        {
            for (int i = 0; i < data.Count; i++)
            {
                string value;
                if (i < baseValues.Count && baseValues[i].Equals("BrowserType"))
                {
                    value = drpList.SelectedItem.Text;
                    data[baseValues[i]] = value;
                }
                else
                {
                    if (i < baseValues.Count)
                    {
                        value = ((TextBox)Area1.FindControl("txt" + baseValues[i])).Text;
                        data[baseValues[i]] = value;
                    }
                    else
                    {
                        value = ((TextBox)Area1.FindControl("txt" + data.ElementAt(i).Key)).Text;
                        data[data.ElementAt(i).Key] = value;
                    }
                }
            }

            for (int i = 0; i < noOfNewControls; i++)
            {
                TextBox tmpKey   = (TextBox)HiddenArea.FindControl("txtKey" + i);
                TextBox tmpValue = (TextBox)HiddenArea.FindControl("txtValue" + i);
                String  str      = tmpKey.Text;
                str = str.Replace(" ", "");

                canContinue = Validate(tmpKey.Text);

                if (canContinue)
                {
                    string key   = str;
                    string value = tmpValue.Text;

                    data.Add(key, value);

                    tmpKey.Text        = str;
                    tmpKey.Enabled     = false;
                    tmpKey.BorderWidth = 0;
                    tmpKey.BackColor   = System.Drawing.Color.White;
                }
            }
        }