Esempio n. 1
0
        private void FillGoodKoan()
        {
            // clear current koan
            m_pImageRowGood.RemoveAllViews();
            m_pGoodKoan.SetBackgroundColor(Android.Graphics.Color.DarkGray);

            string sKoan = "T" + m_pGoodKoan.Text;

            // get the list of pieces and for each one insert the image into the layout
            List <string> lPieces = Master.GetPieceParts(sKoan);

            foreach (string sPiece in lPieces)
            {
                int iRes = Master.GetPieceImage(sPiece);
                if (iRes == 0)
                {
                    m_pGoodKoan.SetBackgroundColor(Android.Graphics.Color.Red);
                    continue;
                }

                ImageView pView = new ImageView(this);
                pView.SetImageResource(iRes);
                m_pImageRowGood.AddView(pView);
            }
        }
        private void FillKoan()
        {
            m_pKoanDisplay.RemoveAllViews();
            m_pKoanTextEditor.SetBackgroundColor(Android.Graphics.Color.DarkGray);

            string sKoan = m_pKoanTextEditor.Text;

            // get list of pieces and insert image into layout for each one
            List <string> lPieces = Master.GetPieceParts(sKoan);

            foreach (string sPiece in lPieces)
            {
                int iRes = Master.GetPieceImage(sPiece);
                if (iRes == 0)
                {
                    m_pKoanTextEditor.SetBackgroundColor(Android.Graphics.Color.Red);
                    continue;
                }

                ImageView pView = new ImageView(this);
                pView.SetImageResource(iRes);
                m_pKoanDisplay.AddView(pView);
            }
        }