Example #1
0
    public bool SetStudyMaterialVisiblityAndRetrun(StudyMaterial studyMaterial, bool visibleOrNot)
    {
        switch (studyMaterial)
        {
        case StudyMaterial.BoxFilled:

            if (BoxFilled != null)
            {
                BoxFilled.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.YellowPaper:
            if (YellowPaper != null)
            {
                YellowPaper.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.BluePaper:
            if (BluePaper != null)
            {
                BluePaper.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.WorkSheet:
            if (WorkSheet != null)
            {
                WorkSheet.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Book:
            if (Book != null)
            {
                Book.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Tablet:
            if (Tablet != null)
            {
                Tablet.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.NoteBook:
            if (NoteBook != null)
            {
                NoteBook.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.OpenBook:
            if (OpenBook != null)
            {
                OpenBook.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.PencilBox:
            if (PencilBox != null)
            {
                PencilBox.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Pencil:
            if (Pencil != null)
            {
                Pencil.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Pen:
            if (Pen != null)
            {
                Pen.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.LunchBox:
            if (LunchBox != null)
            {
                LunchBox.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.MilkBottle:
            if (MilkBottle != null)
            {
                MilkBottle.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Bag:
            if (Bag != null)
            {
                Bag.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Ruler:
            if (Ruler != null)
            {
                Ruler.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Eraser:
            if (Eraser != null)
            {
                Eraser.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Glue:
            if (Glue != null)
            {
                Glue.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Scissor:
            if (Scissor != null)
            {
                Scissor.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.RippedPaper:
            if (RippedPaper != null)
            {
                RippedPaper.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        case StudyMaterial.Apple:
            if (Apple != null)
            {
                Apple.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;

        default:
            if (BluePaper != null)
            {
                BluePaper.SetActive(visibleOrNot);
            }
            else
            {
                return(false);
            }
            break;
        }
        return(true);
    }
Example #2
0
    public void HideByDefaultStudyMaterials()
    {
        if (BoxFilled != null)
        {
            BoxFilled.SetActive(false);
        }
        if (YellowPaper != null)
        {
            YellowPaper.SetActive(false);
        }
        if (BluePaper != null)
        {
            BluePaper.SetActive(false);
        }
        if (WorkSheet != null)
        {
            WorkSheet.SetActive(false);
        }
        if (NoteBook != null)
        {
            NoteBook.SetActive(false);
        }
        if (Tablet != null)
        {
            Tablet.SetActive(false);
        }
        if (Book != null)
        {
            Book.SetActive(false);
        }
        if (OpenBook != null)
        {
            OpenBook.SetActive(false);
        }
        if (PencilBox != null)
        {
            PencilBox.SetActive(false);
        }
        if (Pencil != null)
        {
            Pencil.SetActive(false);
        }
        if (Pen != null)
        {
            Pen.SetActive(false);
        }
        if (LunchBox != null)
        {
            LunchBox.SetActive(false);
        }
        if (MilkBottle != null)
        {
            MilkBottle.SetActive(false);
        }
        if (Bag != null)
        {
            Bag.SetActive(false);
        }
        if (Ruler != null)
        {
            Ruler.SetActive(false);
        }
        if (Eraser != null)
        {
            Eraser.SetActive(false);
        }
        if (Glue != null)
        {
            Glue.SetActive(false);
        }
        if (Scissor != null)
        {
            Scissor.SetActive(false);
        }
        if (RippedPaper != null)
        {
            RippedPaper.SetActive(false);
        }
        if (Apple != null)
        {
            Apple.SetActive(false);
        }

        if (WeeklyPlan != null)
        {
            WeeklyPlan.SetActive(false);
        }
    }
Example #3
0
    public void SetStudyMaterialVisiblity(StudyMaterial studyMaterial, bool visibleOrNot)
    {
        switch (studyMaterial)
        {
        case StudyMaterial.BoxFilled:
            BoxFilled.SetActive(visibleOrNot);
            break;

        case StudyMaterial.YellowPaper:
            YellowPaper.SetActive(visibleOrNot);
            break;

        case StudyMaterial.BluePaper:
            BluePaper.SetActive(visibleOrNot);
            break;

        case StudyMaterial.WorkSheet:
            WorkSheet.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Book:
            Book.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Tablet:
            Tablet.SetActive(visibleOrNot);
            break;

        case StudyMaterial.NoteBook:
            NoteBook.SetActive(visibleOrNot);
            break;

        case StudyMaterial.OpenBook:
            OpenBook.SetActive(visibleOrNot);
            break;

        case StudyMaterial.PencilBox:
            PencilBox.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Pencil:
            Pencil.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Pen:
            Pen.SetActive(visibleOrNot);
            break;

        case StudyMaterial.LunchBox:
            LunchBox.SetActive(visibleOrNot);
            break;

        case StudyMaterial.MilkBottle:
            MilkBottle.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Bag:
            Bag.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Ruler:
            Ruler.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Eraser:
            Eraser.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Glue:
            Glue.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Scissor:
            Scissor.SetActive(visibleOrNot);
            break;

        case StudyMaterial.RippedPaper:
            RippedPaper.SetActive(visibleOrNot);
            break;

        case StudyMaterial.Apple:
            Apple.SetActive(visibleOrNot);
            break;

        case StudyMaterial.WeeklyPlan:
            WeeklyPlan.SetActive(visibleOrNot);
            break;

        default:
            BluePaper.SetActive(visibleOrNot);
            break;
        }
    }