Esempio n. 1
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));
        }
Esempio n. 2
0
      private void reload()
      {
          try
          { int i = 0;
            foreach (var n in viewcoll.Subviews)
            {
                viewcoll.Delete(n);
            }
          }
          catch { }
          local cal = new local();

          DataSql = new DataSql();



          //foreach (var view in scoll.Subviews)
          //{
          //    view.RemoveFromSuperview();
          //}

          UIbutton = cal.retUIbutton();

          bool isEmpty = UIbutton.Any();

          if (isEmpty)
          {
              Nettab.bar.Change(isEmpty);
          }

          else
          {
              Nettab.bar.Change(false);
          }


          viewcoll.RegisterClassForCell(typeof(CollectionViewCell1), CollectionViewCell1.Key);

          viewcoll.Source = new sourcecollection(UIbutton);
          //   scoll.ContentSize = new CGSize(uiv.Frame.Width - 20, ImageView.Count * 15);



          //}
      }
Esempio n. 3
0
      void todatabese()
      {
          List <byte[]> Imagebyeds = new List <byte[]>();
          List <string> strimg     = new List <string>();

          foreach (UIImage image1 in Imagedata)
          {
              DataSql = new DataSql();

              Byte[] myByteArray;
              using (NSData imageData = image1.AsPNG())
              {
                  myByteArray = new Byte[imageData.Length];
                  System.Runtime.InteropServices.Marshal.Copy(imageData.Bytes, myByteArray, 0, Convert.ToInt32(imageData.Length));
              }
              string random = GeneratePassword(7);
              Imagebyeds.Add(myByteArray);
              strimg.Add(random);
              DataSql.process(library.File(2), library.INSERT(2), DataSql_Parameters(random, myByteArray, "jpg/png"));
          }
          foreach (string stringUrl in UrlVideoString)
          {
              DataSql = new DataSql();

              byte[] myByteArray;
              using (NSData data = NSData.FromUrl(NSUrl.FromString(stringUrl)))
              {
                  myByteArray = new byte[data.Length];

                  System.Runtime.InteropServices.Marshal.Copy(data.Bytes, myByteArray, 0, Convert.ToInt32(data.Length));
              }
              string random = GeneratePassword(7);
              // this.Title = videoUrl.ToString(); ;

              DataSql.process(library.File(2), library.INSERT(2), DataSql_Parameters(random, myByteArray, "mov"));
          }

          reload();
          //cal.addbutton(Imagebyeds, strimg);
          // Imagebyeds.Clear();
          // strimg.Clear();
          UrlVideoString.Clear();
          Imagedata.Clear();
      }
Esempio n. 4
0
        private void Btn_Clicked(object sender, int d)
        {
            UITextField field  = new UITextField();
            UITextField field2 = new UITextField();

            if (d == 0)
            {
                //throw new NotImplementedException();
                var messbox = UIAlertController.Create(library.Messages(0), string.Empty, UIAlertControllerStyle.Alert);
                messbox.View.BackgroundColor = UIColor.White;
                //   UITextField field = null;
                // UITextField field2 = null;
                messbox.AddTextField((textField1) =>
                {
                    field = textField1;
                    //field.Text = "5564";
                    //  field.Text = "";
                    // Initialize field
                    //  field.Placeholder = placeholder;
                    field.Placeholder = library.Messages(0);

                    // field.BackgroundColor = UIColor.Yellow;
                    //    field.Layer.BorderColor = UIColor.Gray.CGColor;

                    field.Font = library.Font();

                    field.Layer.BorderWidth = 1;
                    //   field.Layer.CornerRadius = 20;
                    //  field = new UITextField(new CoreGraphics.CGRect(10, 60, 300, 60));
                    //  field.SecureTextEntry = true;
                });
                var frame = new CGRect(40, 40, 300, 60);
                messbox.AddTextField((text) =>
                {
                    field2       = text;
                    txtport      = text.Text;
                    field2.Frame = frame;
                    // field2.Placeholder = "100";
                    // field2.KeyboardType = UIKeyboardType.Default;
                    //  field2 = new UITextField(new CoreGraphics.CGRect(10, 40, 30, 10));
                    //   field2.Layer.BackgroundColor = UIColor.Red.CGColor;
                    field2.Layer.BorderWidth = 1;
                    field2.Font = library.Font();

                    field2.Text = 9.ToString();

                    // field.Layer.CornerRadius = 40;
                    //  field2.SecureTextEntry = true;
                });
                //Add Actions
                var cancelAction = UIAlertAction.Create(library.StrForm(4), UIAlertActionStyle.Cancel, alertAction => { });
                var okayAction   = UIAlertAction.Create(library.StrForm(3), UIAlertActionStyle.Default, alertAction => {
                    int j;
                    if (Int32.TryParse(field2.Text, out j))
                    {
                        txt     = field.Text;
                        txtport = field2.Text;
                        //  field.Text = txt;
                        DataSql dataSql = new DataSql();
                        dataSql.process(library.File(2), library.INSERT(1), DataSql_Parameters());
                        //listdns.Add(field.Text);
                        Sourcetabview();
                    }

                    else
                    {
                        var armAlert      = UIAlertController.Create(library.ErorMessages(0), string.Empty, UIAlertControllerStyle.Alert);
                        var cancelAction1 = UIAlertAction.Create(library.StrForm(3), UIAlertActionStyle.Cancel, alertAction1 => { });

                        armAlert.AddAction(cancelAction1);


                        PresentViewController(armAlert, true, null);
                    }



                    //  tabview.InsertRows(new NSIndexPath[] {  }, UITableViewRowAnimation.Fade);
                });

                messbox.AddAction(cancelAction);
                messbox.AddAction(okayAction);

                //Present Alert
                PresentViewController(messbox, true, null);
            }
        }