Пример #1
0
      void alertsure(string mess)
      {
          Action <UIAlertAction> okaction     = null;
          Action <UIAlertAction> Cancelaction = null;

          switch (mess)
          {
          case "Save": { okaction = (UIAlertAction => { saveFilesGarelly(); });


                         Cancelaction = (UIAlertAction => {
                        //  Nettab.bar.changebuttonclick();


                        ViewDidLoad();
                    }); } break;

          case "Delete All": { okaction = (UIAlertAction => {
                        DataSql.process(library.File(2), library.detleteAll(), null);
                        ViewDidLoad();
                        _Select = false;
                    });//end

                               Cancelaction = (UIAlertAction => { _Select = false; }); } break;

          case "Delete": { okaction = (UIAlertAction => { DeleteSection(); });

                           Cancelaction = (UIAlertAction => {
                        //  Nettab.bar.changebuttonclick();


                        ViewDidLoad();
                    }); } break;
          }



          var alert = UIAlertController.Create(string.Empty, "are you sure" + " " + mess, UIAlertControllerStyle.Alert);

          var ok = UIAlertAction.Create("Ok", UIAlertActionStyle.Default, okaction);

          var Cancel = UIAlertAction.Create("Cancel", UIAlertActionStyle.Cancel, Cancelaction);

          alert.AddAction(ok);
          alert.AddAction(Cancel);
          PresentViewController(alert, true, null);
      }                            //messgebox ask are you sure
Пример #2
0
        public void dete()
        {
            Network_App.LibraryWords library = new Network_App.LibraryWords();


            Network_App.DataSql DataSql = new Network_App.DataSql();
            DataSql.process(library.File(2), library.DELETE(1), DataSql_Parameters(text));
        }
Пример #3
0
        public void fileSql(string filename)
        {
            pathName(filename);
            string docFolder = Environment.GetFolderPath(Environment.SpecialFolder.Personal);
            string libFolder = Path.Combine(docFolder, WLibrary.listWords(0), WLibrary.listWords(1), WLibrary.listWords(2));

            if (!Directory.Exists(libFolder))
            {
                Directory.CreateDirectory(libFolder);
            }

            // dbPath = Path.Combine(libFolder, filename);

            if (!File.Exists(dbPath))
            {
                var existingDb = NSBundle.MainBundle.PathForResource(WLibrary.File(0), WLibrary.File(1));
                File.Copy(existingDb, dbPath);
            }
        }
Пример #4
0
        public List <string> retDataString(int row, int table) //retturn string
        {
            List <string> Datastring = new List <string>();
            // data();
            DataSql dataSql = new DataSql();

            //  DataSql.data.Clear();
            dataSql.Rowdata(row);
            dataSql.lop = "string";
            //  DataSql dataSql = new DataSql();
            dataSql.process(library.File(2), library.SELECT(table), null);
            Datastring = dataSql.return_string();



            return(Datastring);
        }