示例#1
0
        public void addbutton(List <byte[]> Imagedata, List <string> strimg)
        {
            for (int icount = 0; icount < Imagedata.Count; icount++)
            {
                iEbutton button = new iEbutton();
                // button.creation(icount, Imagedata[icount]);
                button.getText(strimg[icount]);

                button.click += Button_click;

                UIbutton.Add(button);
            }
        }
示例#2
0
        private void setbutton()
        {
            for (int icount = 0; icount <= DataSql.databyet.Count; icount++)
            {
                iEbutton button = new iEbutton();
                button.ext(extfile[icount]);
                button.whate_is_byte(listByete[icount], icount);
                //    button.creation(icount, DataSql.databyet[icount]);
                button.getText(nameimage[icount]);

                button.click += Button_click;

                if (button._isvideor())
                {//change
                 //string documentsPath = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
                 //string localFilename = nameimage[icount] + ".mov"; //same if I save the file as .mp4
                 //string localPath = Path.Combine(documentsPath, localFilename);

                    //File.WriteAllBytes(localPath, DataSql.databyet[icount].ToArray());

                    //var avasset = AVAsset.FromUrl(NSUrl.FromFilename(localPath));
                    //var avplayerItem = new AVPlayerItem(avasset);
                    //var avplayer = new AVPlayer(avplayerItem);
                    //var avplayerLayer = AVPlayerLayer.FromPlayer(avplayer);
                    //button.localstring(localPath);
                    //File.Delete(localPath);


                    button.creatFilemov(tumbmaillist[icount]);

                    // var capture = UIScreen.MainScreen.Capture();
                }

                else
                {
                    button.creationimge();
                }


                UIbutton.Add(button);
                //  Thread.Sleep(1000);
            }
        }