示例#1
0
        private void StartXml()
        {
            AssetManager assets = this.Assets;

            document.Load(assets.Open("gpu.xml"));
            topNode = document.GetElementsByTagName("root")[0];


            foreach (XmlNode node in topNode.ChildNodes)
            {
                dg = new DaoGpu(node.ChildNodes[0].InnerText,
                                node.ChildNodes[1].InnerText, node.ChildNodes[2].InnerText,
                                node.ChildNodes[3].InnerText);

                gc.Add(dg);
                listG.Add(node.ChildNodes[0].InnerText);
            }

            listA.Add("Ethereum");
            listA.Add("Ethereum Classic");
            listA.Add("Equihash");

            this.DataAdapter = new ArrayAdapter <string>(this,
                                                         Android.Resource.Layout.SimpleSpinnerItem, listG.Distinct().ToList());
            this.DataAdapter.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);

            this.DataAdapter2 = new ArrayAdapter <string>(this,
                                                          Android.Resource.Layout.SimpleSpinnerItem, listA.Distinct().ToList());
            this.DataAdapter2.SetDropDownViewResource(Android.Resource.Layout.SimpleSpinnerDropDownItem);
        }
示例#2
0
文件: DaoGpu.cs 项目: userkittin/cec
 public void Add(DaoGpu newgpu)
 {
     dataArray.Add(newgpu);
 }