Ejemplo n.º 1
0
    public void Clear()
    {
        PlatformText ptext = null;
        SystemText   stext = null;
        DialogueText dtext = null;
        ItemText     itext = null;

        if (Platform != null)
        {
            for (int i = 0; i < Platform.Length; i++)
            {
                ptext = Platform[i];
                if (ptext != null)
                {
                    ptext.Clear();
                    Platform[i] = null;
                }
            }
            Platform = null;
        }
        if (System != null)
        {
            for (int i = 0; i < System.Length; i++)
            {
                stext = System[i];
                if (stext != null)
                {
                    stext.Clear();
                    System[i] = null;
                }
            }
            System = null;
        }
        if (Dialogue != null)
        {
            for (int i = 0; i < Dialogue.Length; i++)
            {
                dtext = Dialogue[i];
                if (dtext != null)
                {
                    dtext.Clear();
                    Dialogue[i] = null;
                }
            }
            Dialogue = null;
        }
        if (Items != null)
        {
            for (int i = 0; i < Items.Length; i++)
            {
                itext = Items[i];
                if (itext != null)
                {
                    itext.Clear();
                    Items[i] = null;
                }
            }
            Items = null;
        }
    }
        public void Clear()
        {
            GameText.Clear();
            CategoryText.Clear();
            RunnerNamesText.Clear();
            PlatformText.Clear();
            EstimateText.Clear();
            TimeText.Clear();

            if (curRun != null)
            {
                curRun.PropertyChanged -= Run_PropertyChanged;
                curRun = null;
            }
        }
Ejemplo n.º 3
0
    public string GetPlatformText(int textID, TextPlatform platform, ref bool autoClose)
    {
        PlatformText[] psourceSet = null;
        PlatformText   psource    = null;
        int            platformId = INVALID_PLATFORM_ID;

        if (gameText != null)
        {
            psourceSet = gameText.Platform;
            if (psourceSet != null)
            {
                switch (platform)
                {
                case TextPlatform.Android:
                    platformId = TEXT_PLATFORM_ID_ANDROID;
                    break;

                case TextPlatform.PC:
                    platformId = TEXT_PLATFORM_ID_PC;
                    break;
                }
                if (platformId != INVALID_PLATFORM_ID)
                {
                    for (int i = 0; i < psourceSet.Length; i++)
                    {
                        psource = psourceSet[i];
                        if (psource != null)
                        {
                            if ((psource.Id == textID) && (psource.PlatformId == platformId))
                            {
                                autoClose = psource.AutoClose;
                                return(psource.Text);
                            }
                        }
                    }
                }
            }
        }
        return(null);
    }