//private static Queue<CustomAlert> queuedAlerts = new Queue<CustomAlert>();

        /// <summary>
        /// Load all CustomNotes
        /// </summary>
        internal static void Load()
        {
            if (!IsLoaded)
            {
                LoadAlerts();
                string AssetPath = Path.Combine(UnityGame.InstallPath, "CustomAlerts");
                Directory.CreateDirectory(AssetPath);

                IEnumerable <string> noteFilter = new List <string> {
                    "*.alert"
                };
                CustomNoteFiles = GetFileNames(AssetPath, noteFilter, SearchOption.AllDirectories, true);
                Logger.log.Debug($"{CustomNoteFiles.Count()} external note(s) found.");

                IList <CustomAlert> TempCustomAlerts = LoadCustomNotes(CustomNoteFiles);
                CustomAlerts = new List <CustomAlert>();
                for (int i = 0; i < TempCustomAlerts.Count; i++)
                {
                    CustomAlert alert = TempCustomAlerts[i];
                    // UnityEngine.Object.DontDestroyOnLoad(alert.gameObject);
                    if (alert.gameObject != null)
                    {
                        Console.WriteLine("Loaded " + alert.Descriptor.AlertName);
                        CustomAlerts.Add(alert);
                    }
                    //TextHelper.TakeCareOfIt(alert);
                }
                Logger.log.Debug($"{CustomAlerts.Count} total note(s) loaded.");
                // load config
                //int loadedFollow = Plugin.config.GetInt("Streamlabs", "SelectedFollowAlert", SelectedFollowAlert);
                //SelectedFollowAlert = loadedFollow;

                /*if (Configuration.CurrentlySelectedAlert != null)
                 * {
                 *  int numberOfNotes = CustomNoteObjects.Count;
                 *  for (int i = 0; i < numberOfNotes; i++)
                 *  {
                 *      if (CustomNoteObjects[i].FileName == Configuration.CurrentlySelectedAlert)
                 *      {
                 *          SelectedAlert = i;
                 *          break;
                 *      }
                 *  }
                 * }*/
                //SelectedAlert = 0;

                IsLoaded = true;
            }
        }
Ejemplo n.º 2
0
        public static async void Logout(ListsViewController view)
        {
            var signedOut = AppData.auth.SignOut(out var error);

            if (signedOut)
            {
                CustomAlert.Alert(view, "Logged Out", "You can still work offline!");

                await view.ReloadData();

                return;
            }

            CustomAlert.Alert(view, "Error on Logout", error?.ToString());
        }
        private void OnEvent(StreamlabsEvent streamlabsEvent)
        {
            CustomAlert alert     = _alertObjectLoader.GetAlertByType(streamlabsEvent.AlertType, streamlabsEvent.AlertType == AlertType.ChannelPoints ? streamlabsEvent?.Message[0]?.ChannelPointsName : null);
            AlertData   alertData = _alertObjectLoader.Process(alert, streamlabsEvent);

            if (alertData.canSpawn)
            {
                CustomAlert newAlert = new CustomAlert(alert.GameObject, alert.Descriptor, streamlabsEvent)
                {
                    Flatline = alertData.delay,
                    Volume   = alertData.volume
                };

                Enqueue(newAlert);
            }
        }
Ejemplo n.º 4
0
        void LokasyonRate(string Ratee)
        {
            WebService webService = new WebService();
            var        Donus      = webService.ServisIslem("locations/rating/" + gelenMekan.id, Ratee);

            if (Donus != "Hata")
            {
                CustomAlert.GetCustomAlert(this, "Değerlendirme için teşekkürler!");
                return;
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu!");
                return;
            }
        }
Ejemplo n.º 5
0
        void TokenAlDevamEt()
        {
            LoginRoot loginRoot = null;

            InvokeOnMainThread(delegate() {
                loginRoot = new LoginRoot()
                {
                    password   = SifreTxt.Text,
                    rememberMe = true,
                    username   = EmailTxt.Text,
                };
            });

            string     jsonString = JsonConvert.SerializeObject(loginRoot);
            WebService webService = new WebService();
            var        Donus      = webService.ServisIslem("authenticate", jsonString, true);

            if (Donus == "Hata")
            {
                CustomLoading.Hide();
                CustomAlert.GetCustomAlert(this, "Giriş Yapılamadı!");
                return;
            }
            else
            {
                JObject obj   = JObject.Parse(Donus);
                string  Token = (string)obj["id_token"];
                if (Token != null && Token != "")
                {
                    APITOKEN.TOKEN = Token;
                    if (GetMemberData())
                    {
                        CustomLoading.Hide();
                        InvokeOnMainThread(delegate() {
                            var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                            appDelegate.SetRootLokasyonlarViewController();
                        });
                    }
                    else
                    {
                        CustomLoading.Hide();
                        CustomAlert.GetCustomAlert(this, "Bir sorun oluştu lütfen daha sonra tekrar deneyin.");
                        return;
                    }
                }
            }
        }
Ejemplo n.º 6
0
 bool ControlUserAction()
 {
     if (isValidEmail(EmailTxt.Text) == false)
     {
         CustomAlert.GetCustomAlert(this, "Lütfen emalinizi kontrol edin!");
         return(false);
     }
     else if (SifreTxt.Text.Length < 6 == true)
     {
         CustomAlert.GetCustomAlert(this, "Şifreniz 6 karakterden az olamaz!");
         return(false);
     }
     else
     {
         return(true);
     }
 }
Ejemplo n.º 7
0
        void KategoriyeGoreHediyeleriGetir()
        {
            var        MeID       = DataBase.MEMBER_DATA_GETIR()[0].id;
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("locations/user/" + MeID);

            if (Donus != null)
            {
                var LokasyonCatids = Newtonsoft.Json.JsonConvert.DeserializeObject <EnSonLokasyonCategoriler>(Donus.ToString());
                if (LokasyonCatids.catIds.Count > 0)
                {
                    for (int i = 0; i < LokasyonCatids.catIds.Count; i++)
                    {
                        ResimleriGetir(LokasyonCatids.catIds[i].ToString());
                    }
                    if (GaleriDataModel1.Count > 0)
                    {
                        InvokeOnMainThread(() => {
                            CreateScrollView();
                        });
                        CustomLoading.Hide();
                    }
                    else
                    {
                        InvokeOnMainThread(() => {
                            CustomAlert.GetCustomAlert(this, "Hediye bulunamadı...");
                            this.DismissModalViewController(true);
                        });
                    }
                }
                else
                {
                    InvokeOnMainThread(() => {
                        CustomAlert.GetCustomAlert(this, "Hediye bulunamadı...");
                        this.DismissModalViewController(true);
                    });
                }
            }
            else
            {
                InvokeOnMainThread(() => {
                    CustomAlert.GetCustomAlert(this, "Hediye bulunamadı...");
                    this.DismissModalViewController(true);
                });
            }
        }
Ejemplo n.º 8
0
 bool BosVarmi()
 {
     //textField.Text.Trim())
     if (string.IsNullOrEmpty(textField.Text.Trim()))
     {
         CustomAlert.GetCustomAlert(this, "Lütfen konuyu belirtin..");
         return(false);
     }
     else if (string.IsNullOrEmpty(MesajTextView.Text.Trim()))
     {
         CustomAlert.GetCustomAlert(this, "Lütfen mesajınızı belirtin..");
         return(false);
     }
     else
     {
         return(true);
     }
 }
        public AlertValue ValueFromAlert(CustomAlert alert)
        {
            AlertValue value = _config.Alerts.FirstOrDefault(a => a.AlertType == alert.AlertType && a.Value == (string.IsNullOrEmpty(alert.Descriptor.channelPointsName) ? alert.Descriptor.alertName : alert.Descriptor.channelPointsName));

            if (value == null)
            {
                value = new AlertValue
                {
                    Enabled           = false,
                    OverrideDelay     = false,
                    AlertType         = alert.AlertType,
                    DelayOverrideTime = _config.AlertDelay,
                    Value             = string.IsNullOrEmpty(alert.Descriptor.channelPointsName) ? alert.Descriptor.alertName : alert.Descriptor.channelPointsName
                };
                _config.Alerts.Add(value);
            }
            return(value);
        }
Ejemplo n.º 10
0
        void GirisYapMetod(string email, string sifre)
        {
            CustomLoading.Show(this, "Lütfen Bekleyin...");
            new System.Threading.Thread(new System.Threading.ThreadStart(delegate
            {
                WebService webService = new WebService();
                LoginRoot loginRoot   = null;
                InvokeOnMainThread(delegate() {
                    loginRoot = new LoginRoot()
                    {
                        password   = sifre,
                        rememberMe = true,
                        username   = email
                    };
                });

                string jsonString = JsonConvert.SerializeObject(loginRoot);
                var Donus         = webService.ServisIslem("authenticate", jsonString, true);
                if (Donus == "Hata")
                {
                    CustomLoading.Hide();
                    CustomAlert.GetCustomAlert(this, "Giriş Yapılamadı!");
                    return;
                }
                else
                {
                    JObject obj  = JObject.Parse(Donus);
                    string Token = (string)obj["id_token"];
                    if (Token != null && Token != "")
                    {
                        APITOKEN.TOKEN = Token;
                        if (GetMemberData())
                        {
                            CustomLoading.Hide();
                            InvokeOnMainThread(delegate() {
                                var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                                appDelegate.SetRootLokasyonlarViewController();
                            });
                        }
                    }
                }
            })).Start();
        }
Ejemplo n.º 11
0
        void FavoriIslemleri(string Message)
        {
            var        MeID       = DataBase.MEMBER_DATA_GETIR()[0].id;
            WebService webService = new WebService();
            FavoriDTO  favoriDTO  = new FavoriDTO()
            {
                userId    = MeID,
                favUserId = SecilenKisi.SecilenKisiDTO.id
            };
            string jsonString = JsonConvert.SerializeObject(favoriDTO);
            var    Donus      = webService.ServisIslem("users/fav", jsonString);

            if (Donus != "Hata")
            {
                CustomAlert.GetCustomAlert(this, Message);

                GetFavorite();
                return;
            }
        }
Ejemplo n.º 12
0
 bool BosVarmi()
 {
     if (EmailTxt.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen Emailinizi Girin");
         return(false);
     }
     else
     {
         if (SifreTxt.Text.Trim() == "")
         {
             CustomAlert.GetCustomAlert(this, "Lütfen Şifrenizi yazın");
             return(false);
         }
         else
         {
             return(true);
         }
     }
 }
Ejemplo n.º 13
0
        public override void ViewDidAppear(bool animated)
        {
            base.ViewDidAppear(animated);
            //if (!Actinmi)
            //{
            //locationManager = new CLLocationManager();
            //locationManager.RequestWhenInUseAuthorization();
            //CustomMapView = new MKMapView() { ShowsUserLocation = true };
            var UserInfoVarmidur = DataBase.MEMBER_DATA_GETIR();

            if (UserInfoVarmidur.Count > 0)
            {
                if (new GetUserInformation().isActive())
                {
                    InvokeOnMainThread(delegate()
                    {
                        var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                        appDelegate.SetRootLokasyonlarViewController();
                    });
                }
                else
                {
                    InvokeOnMainThread(delegate()
                    {
                        CustomAlert.GetCustomAlert(this, "Hesabınız pasifleştirildi.");
                        this.DismissViewController(true, null);
                    });
                }
            }
            else
            {
                InvokeOnMainThread(delegate()
                {
                    var appDelegate = UIApplication.SharedApplication.Delegate as AppDelegate;
                    appDelegate.SetRootSplashViewController();
                });
            }

            Actinmi = true;
            //}
        }
        private IList <CustomAlert> LoadCustomAlerts(IEnumerable <string> customAlertFiles)
        {
            IList <CustomAlert> customAlerts = new List <CustomAlert>();

            foreach (string caf in customAlertFiles)
            {
                try
                {
                    CustomAlert newAlert = new CustomAlert(caf);
                    if (newAlert != null && newAlert.GameObject != null)
                    {
                        customAlerts.Add(newAlert);
                    }
                }
                catch (Exception e)
                {
                    Plugin.Log.Warn($"Failed to load Custom Alert with the name {caf}. {e.Message}");
                }
            }
            return(customAlerts);
        }
Ejemplo n.º 15
0
        void SonMesajlariGetir()
        {
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("chats/user");

            if (Donus != null)
            {
                var MeID = DataBase.MEMBER_DATA_GETIR()[0].id;
                var aa   = Donus.ToString();
                mFriends = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MesajKisileri> >(Donus.ToString());
                mFriends = mFriends.FindAll(item => item.request == true);
                if (mFriends.Count > 0)
                {
                    mFriends.Where(item => item.receiverId == MeID).ToList().ForEach(item2 => item2.unreadMessageCount = 0);
                    SaveKeys();
                    SonMesajKiminKontrolunuYap();
                    InvokeOnMainThread(() =>
                    {
                        //Geçmiş gelecekten daha büyüktür
                        mFriends.Sort((x, y) => DateTime.Compare(x.lastModifiedDate, y.lastModifiedDate));
                        mFriends.Reverse();
                        Tablo.Source = new MesajlarCustomTableCellSoruce(mFriends, this, FavorileriCagir());
                        Tablo.ReloadData();
                        Tablo.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
                        Tablo.TableFooterView = new UIView();
                        CustomLoading.Hide();
                        BoostUygula();
                    });
                }
                else
                {
                    CustomAlert.GetCustomAlert(GelenBase1, "Hiç Mesaj Bulunamadı...");
                    CustomLoading.Hide();
                }
            }
            else
            {
                CustomLoading.Hide();
            }
        }
Ejemplo n.º 16
0
        void GetLocation()
        {
            WebService         webService = new WebService();
            var                Donus      = webService.OkuGetir("users/location/" + GelenMekan.id + "/waiting");
            var                Donus2     = webService.OkuGetir("users/location/" + GelenMekan.id + "/online");
            List <MEMBER_DATA> List1      = new List <MEMBER_DATA>();
            List <MEMBER_DATA> List2      = new List <MEMBER_DATA>();
            List <MEMBER_DATA> Toplanmis  = new List <MEMBER_DATA>();
            var                MEDID      = DataBase.MEMBER_DATA_GETIR()[0].id;

            if (Donus != null)
            {
                var aa = Donus.ToString();
                List1 = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MEMBER_DATA> >(Donus.ToString());
            }
            if (Donus2 != null)
            {
                var aa = Donus2.ToString();
                List2 = Newtonsoft.Json.JsonConvert.DeserializeObject <List <MEMBER_DATA> >(Donus2.ToString());
            }

            var l2 = List2.ToList();

            List1.AddRange(l2);

            LokasyondakiKisilerList = new List <MEMBER_DATA>();
            LokasyondakiKisilerList = List1.Where(p => p.id != -1).GroupBy(p => p.id).Select(grp => grp.FirstOrDefault()).ToList();
            LokasyondakiKisilerList = LokasyondakiKisilerList.FindAll(item => item.id != MEDID);
            if (LokasyondakiKisilerList.Count > 0)
            {
                FilterUsers();
                SuperBoostKullaniminaGoreSirala();
                FillDataModel();
            }
            else
            {
                CustomAlert.GetCustomAlert(gelenbase, "Henüz bu lokasyonda kimse bulunamıyor...");
                CustomLoading.Hide();
            }
        }
Ejemplo n.º 17
0
        private void KayitOlButton_TouchUpInside(object sender, EventArgs e)
        {
            if (BosVarmi())
            {
                if (ControlUserAction())
                {
                    CustomLoading.Show(this, "Lütfen Bekleyin...");
                    new System.Threading.Thread(new System.Threading.ThreadStart(delegate
                    {
                        WebService webService       = new WebService();
                        KayitIcinRoot kayitIcinRoot = null;
                        InvokeOnMainThread(delegate() {
                            kayitIcinRoot = new KayitIcinRoot()
                            {
                                firstName = AdText.Text.Trim(),
                                lastName  = SoyadText.Text.Trim(),
                                password  = SifreTxt.Text,
                                login     = EmailTxt.Text,
                                email     = EmailTxt.Text
                            };
                        });

                        string jsonString = JsonConvert.SerializeObject(kayitIcinRoot);
                        var Responsee     = webService.ServisIslem("register", jsonString, true);
                        if (Responsee != "Hata")
                        {
                            TokenAlDevamEt();
                        }
                        else
                        {
                            CustomLoading.Hide();
                            CustomAlert.GetCustomAlert(this, " Bir sorun oluştu lütfen internet bağlantınızı kontrol edin.");
                            return;
                        }
                    })).Start();
                }
            }
        }
Ejemplo n.º 18
0
        private void OkButon_TouchUpInside(object sender, EventArgs e)
        {
            var MinValue = Math.Round(rangeSlider.LowerValue, 0);
            var MaxValue = Math.Round(rangeSlider.UpperValue, 0);

            maxText.Text = MinValue.ToString() + " - " + MaxValue.ToString();
            FILTRELER fILTRELER = new FILTRELER()
            {
                Cinsiyet = SonCinsiyetSecim,
                minAge   = (int)Math.Round(Convert.ToDouble(MinValue), 0),
                maxAge   = (int)Math.Round(Convert.ToDouble(MaxValue), 0)
            };

            if (DataBase.FILTRELER_TEMIZLE())
            {
                if (DataBase.FILTRELER_EKLE(fILTRELER))
                {
                    //CustomAlert.GetCustomAlert(this, "Filtreler kaydedildi.");
                    this.View.BackgroundColor = UIColor.Clear;
                    Task.Run(delegate()
                    {
                        InvokeOnMainThread(delegate()
                        {
                            SlideVerticaly(FilterTabView, false, true);
                            this.DismissViewController(true, null);
                        });
                    });
                }
                else
                {
                    CustomAlert.GetCustomAlert(this, "Bir sorun oluştu.");
                }
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu.");
            }
        }
Ejemplo n.º 19
0
        void GetUserInfo(string UserID, string keyy)
        {
            WebService webService = new WebService();
            var        Donus2     = webService.OkuGetir("blocked-user/block-list");

            if (Donus2 != null)
            {
                var EngelliKul = Newtonsoft.Json.JsonConvert.DeserializeObject <List <EngelliKullanicilarDTO> >(Donus2.ToString());

                if (EngelliKul.Count > 0)
                {
                    InvokeOnMainThread(delegate()
                    {
                        Engelliler = EngelliKul[0].blockUserId;
                    });
                }
            }
            var Donus = webService.OkuGetir("users/" + UserID);

            if (Donus != null)
            {
                var Userrr = Newtonsoft.Json.JsonConvert.DeserializeObject <MEMBER_DATA>(Donus.ToString());
                MesajlarIcinSecilenKullanici.Kullanici = Userrr;
                MesajlarIcinSecilenKullanici.key       = keyy;
                if (Engelliler == Userrr.id)
                {
                    CustomAlert.GetCustomAlert(GelenBase1, "Bu kullanıcıyı engellediğiniz için mesaj atamazsınız!");
                }
                else
                {
                    var    LokasyonKisilerStory = UIStoryboard.FromName("MesajlarBaseVC", NSBundle.MainBundle);
                    ChatVC controller           = LokasyonKisilerStory.InstantiateViewController("ChatVC") as ChatVC;
                    controller.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
                    this.GelenBase1.PresentViewController(controller, true, null);
                }
            }
        }
Ejemplo n.º 20
0
 void BizeYazinGonder()
 {
     if (BosVarmi())
     {
         var        Me         = DataBase.MEMBER_DATA_GETIR()[0];
         WebService webService = new WebService();
         ContactDTO contactDTO = new ContactDTO()
         {
             text   = MesajTextView.Text,
             topic  = textField.Text,
             userId = Me.id
         };
         string jsonString = JsonConvert.SerializeObject(contactDTO);
         var    Donus      = webService.ServisIslem("contacts", jsonString);
         if (Donus != "Hata")
         {
             var alert = new UIAlertView();
             alert.Title = "Buptis";
             alert.AddButton("Tamam");
             alert.Message        = "Destek talebiniz iletildi. Teşekkürler...";
             alert.AlertViewStyle = UIAlertViewStyle.Default;
             alert.Clicked       += (object s, UIButtonEventArgs ev) =>
             {
                 alert.Dispose();
                 this.DismissViewController(true, null);
             };
             alert.Show();
             textField.Text     = "";
             MesajTextView.Text = "";
         }
         else
         {
             CustomAlert.GetCustomAlert(this, "Bir sorun oluştu...");
             return;
         }
     }
 }
Ejemplo n.º 21
0
 bool BosVarmi()
 {
     if (AdText.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen Adınızı Girin");
         return(false);
     }
     else if (SoyadText.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen Soyadınızı Girin");
         return(false);
     }
     else if (EmailTxt.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen Email Girin");
         return(false);
     }
     else if (SifreTxt.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen bir şifre belirtin");
         return(false);
     }
     else if (SifreTekrarTxt.Text.Trim() == "")
     {
         CustomAlert.GetCustomAlert(this, "Lütfen şifre tekrarını girin");
         return(false);
     }
     else if (SifreTxt.Text != SifreTekrarTxt.Text)
     {
         CustomAlert.GetCustomAlert(this, "Şifreler uyuşmuyor lütfen tekrar kontrol edin.");
         return(false);
     }
     else
     {
         return(true);
     }
 }
Ejemplo n.º 22
0
 bool ControlUserAction()
 {
     if (AdText.Text.Length < 2)
     {
         CustomAlert.GetCustomAlert(this, "Lütfen adınızı kontrol edin!");
         return(false);
     }
     else if (SoyadText.Text.Length < 2)
     {
         CustomAlert.GetCustomAlert(this, "Lütfen soyadınızı kontrol edin!");
         return(false);
     }
     else if (isValidEmail(EmailTxt.Text) == false)
     {
         CustomAlert.GetCustomAlert(this, "Lütfen emalinizi kontrol edin!");
         return(false);
     }
     else if (SifreTxt.Text.Length < 6 == true)
     {
         CustomAlert.GetCustomAlert(this, "Şifreniz 6 karakterden az olamaz!");
         return(false);
     }
     else if (SifreTekrarTxt.Text.Length < 6 == true)
     {
         CustomAlert.GetCustomAlert(this, "Şifreniz 6 karakterden az olamaz!");
         return(false);
     }
     else if (SifreTxt.Text != SifreTekrarTxt.Text)
     {
         CustomAlert.GetCustomAlert(this, "Şifreler uyu?muyor lütfen tekrar kontrol edin.");
         return(false);
     }
     else
     {
         return(true);
     }
 }
Ejemplo n.º 23
0
        public void SetPhoto(UIImage impath)
        {
            string _base64String;
            NSData imageData = impath.AsJPEG(compressionQuality: 0.1f);

            _base64String = imageData.GetBase64EncodedString(NSDataBase64EncodingOptions.None);

            var UserId = DataBase.MEMBER_DATA_GETIR()[0].id;
            GalleryDataModel fotografEkleDataModel = new GalleryDataModel()
            {
                imagePath        = _base64String,
                userId           = UserId,
                createdDate      = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ssZ"),
                lastModifiedDate = DateTime.Now.ToString("yyyy-MM-dd'T'HH:mm:ssZ")
            };

            WebService webService = new WebService();
            string     jsonString = JsonConvert.SerializeObject(fotografEkleDataModel);
            var        Donus      = webService.ServisIslem("images", jsonString);

            if (Donus != "Hata")
            {
                for (int i = 0; i < Noktalar.Length; i++)
                {
                    Noktalar[i].RemoveFromSuperview();
                }
                GetPhotos();
                CreateScrollViews();
                CustomLoading.Hide();
                GenelBase.GetUserImage(UserId);
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Fotoğraf Yüklenemedi!...");
                CustomLoading.Hide();
            }
        }
Ejemplo n.º 24
0
        void CheckInYap(string statuss, string startprogresstext, string alert)
        {
            CustomLoading.Show(this, startprogresstext);
            new System.Threading.Thread(new System.Threading.ThreadStart(delegate
            {
                WebService webService = new WebService();

                CheckInIslemiIcinDataModel checkInIslemiIcinDataModel = new CheckInIslemiIcinDataModel()
                {
                    locationId = Convert.ToInt32(GelenMekan.id),
                    status     = statuss
                };
                var jsonstring = JsonConvert.SerializeObject(checkInIslemiIcinDataModel);
                var Donus      = webService.ServisIslem("locations/check-in", jsonstring);
                if (Donus != "Hata")
                {
                    InvokeOnMainThread(delegate()
                    {
                        CustomAlert.GetCustomAlert(this, alert);
                        CustomLoading.Hide();
                        var LokasyonKisilerStory             = UIStoryboard.FromName("LokasyondakiKisilerBaseVC", NSBundle.MainBundle);
                        LokasyondakiKisilerBaseVC controller = LokasyonKisilerStory.InstantiateViewController("LokasyondakiKisilerBaseVC") as LokasyondakiKisilerBaseVC;
                        controller.gelenMekan = GelenMekan;
                        this.PresentViewController(controller, true, null);
                    });
                }
                else
                {
                    InvokeOnMainThread(delegate()
                    {
                        CustomAlert.GetCustomAlert(this, "Bir sorun oluştu...");
                        CustomLoading.Hide();
                    });
                }
            })).Start();
        }
Ejemplo n.º 25
0
        void PaketSatinAlmaUzakDBAyarla(int Miktar)
        {
            LicenceBuyDTO licenceBuyDTO = new LicenceBuyDTO()
            {
                count       = Miktar,
                credit      = 0,
                licenceType = "SUPER_BOOST"
            };

            WebService webService = new WebService();
            string     jsonString = JsonConvert.SerializeObject(licenceBuyDTO);
            var        Donus      = webService.ServisIslem("licences/buy", jsonString);

            if (Donus != "Hata")
            {
                CustomAlert.GetCustomAlert(this, Miktar + " Super Boost Satın Aldınız.");
                PrivateProfileVC1.GetUserLicence();
                this.DismissViewController(true, null);
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu. Lütfen tekrar deneyin.");
            }
        }
Ejemplo n.º 26
0
        async void OnAuthCompleted(object sender, AuthenticatorCompletedEventArgs e)
        {
            var authenticator = sender as OAuth2Authenticator;

            if (authenticator != null)
            {
                authenticator.Completed -= OnAuthCompleted;
                authenticator.Error     -= OnAuthError;
            }

            User user = null;

            if (e.IsAuthenticated)
            {
                // If the user is authenticated, request their basic user data from Google
                // UserInfoUrl = https://www.googleapis.com/oauth2/v2/userinfo
                var request  = new OAuth2Request("GET", new Uri("https://www.googleapis.com/oauth2/v2/userinfo"), null, e.Account);
                var response = await request.GetResponseAsync();

                if (response != null)
                {
                    // The users email address will be used to identify data in SimpleDB
                    string userJson = await response.GetResponseTextAsync();

                    var aaa = userJson.ToString();
                    user = JsonConvert.DeserializeObject <User>(userJson);

                    SosyalKullaniciKaydet(user.given_name, user.family_name, user.email, "Buptis2019@@");
                }
                else
                {
                    CustomAlert.GetCustomAlert(this, "Giriş Yapılamadı. Başka bir yöntem deneyebilirsiniz.");
                    return;
                }
            }
        }
Ejemplo n.º 27
0
        bool HesabiSilApi()
        {
            WebService    webService     = new WebService();
            var           Mee            = DataBase.MEMBER_DATA_GETIR()[0];
            UpdateUserDto UpdateUserDto1 = new UpdateUserDto()
            {
                activated = false,
                birthDay  = Convert.ToDateTime(Mee.birthDayDate).ToString("yyyy-MM-dd'T'HH:mm:ssZ"),
                gender    = Mee.gender,
                userJob   = Mee.userJob
            };
            string jsonString = JsonConvert.SerializeObject(UpdateUserDto1);
            var    Donus      = webService.ServisIslem("users/update", jsonString);

            if (Donus != "Hata")
            {
                return(true);
            }
            else
            {
                CustomAlert.GetCustomAlert(this, "Bir sorun oluştu. ");
                return(false);
            }
        }
Ejemplo n.º 28
0
 void MesajGonderGenericMetod(string Message)
 {
     if (!string.IsNullOrEmpty(Message.Trim()))
     {
         if (!KullaniciEngellemeDurumu)
         {
             if (!KisiBilgileriTammi())
             {
                 UIAlertView alert = new UIAlertView();
                 alert.Title = "Buptis";
                 alert.AddButton("Evet");
                 alert.AddButton("Hayır");
                 alert.Message        = "Yaş ve Cinsiyet bilgilerinizi tamamlamadan mesaj gönderemezsiniz. Bilgilerini güncellemek ister misiniz?";
                 alert.AlertViewStyle = UIAlertViewStyle.Default;
                 alert.Clicked       += (object s, UIButtonEventArgs ev) =>
                 {
                     if (ev.ButtonIndex == 0)
                     {
                         var             AyarlarBaseVC1 = UIStoryboard.FromName("AyarlarBaseVC", NSBundle.MainBundle);
                         TemelBilgilerVC controller     = AyarlarBaseVC1.InstantiateViewController("TemelBilgilerVC") as TemelBilgilerVC;
                         controller.ModalPresentationStyle = UIModalPresentationStyle.FullScreen;
                         this.PresentViewController(controller, true, null);
                         alert.Dispose();
                     }
                     else
                     {
                         alert.Dispose();
                     }
                 };
                 alert.Show();
             }
             else
             {
                 ChatDetayDTO chatRecyclerViewDataModel = new ChatDetayDTO()
                 {
                     userId     = MeDTO.id,
                     receiverId = MesajlarIcinSecilenKullanici.Kullanici.id,
                     text       = Message,
                     key        = MesajlarIcinSecilenKullanici.key
                 };
                 WebService webService = new WebService();
                 string     jsonString = JsonConvert.SerializeObject(chatRecyclerViewDataModel);
                 var        Donus      = webService.ServisIslem("chats", jsonString);
                 if (Donus != "Hata")
                 {
                     var Icerikk = Newtonsoft.Json.JsonConvert.DeserializeObject <KeyIslemleriIcinDTO>(Donus.ToString());
                     MesajText.Text = "";
                     SaveKeys(Icerikk);
                 }
                 else
                 {
                     KredisimiBitti();
                     return;
                 }
             }
         }
         else
         {
             CustomAlert.GetCustomAlert(this, "Kullanıcı Engelli");
         }
     }
 }
Ejemplo n.º 29
0
        void BanaYakinLokasyonlariGetir()
        {
            if (locationManager.Location != null)
            {
                WebService webService = new WebService();
                var        x          = locationManager.Location.Coordinate.Latitude.ToString().Replace(",", ".");
                var        y          = locationManager.Location.Coordinate.Longitude.ToString().Replace(",", ".");
                InvokeOnMainThread(delegate { LokasyonlarTableCell.UserLastloc = locationManager.Location; });

                var Donus = webService.OkuGetir("locations/near?x=" + x + "&y=" + y);
                if (Donus != null)
                {
                    var aa = Donus.ToString();
                    Mekanlar_Locations = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Mekanlar_Location> >(Donus.ToString());
                    if (Mekanlar_Locations.Count > 0)
                    {
                        InvokeOnMainThread(delegate() {
                            Tablo.Source = new LokasyonlarCustomTableCellSoruce(Mekanlar_Locations, this);
                            Tablo.ReloadData();
                            Tablo.BackgroundColor = UIColor.Clear;
                            Tablo.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
                            CustomLoading.Hide();
                        });
                    }
                    else
                    {
                        CustomAlert.GetCustomAlert(GelenBase1, "Çevrenizde hiç lokasyon bulunamadı...");
                        InvokeOnMainThread(delegate() {
                            Tablo.BackgroundColor = UIColor.Clear;
                            Tablo.SeparatorStyle  = UITableViewCellSeparatorStyle.None;
                            Tablo.TableFooterView = new UIView();
                            CustomLoading.Hide();
                        });
                    }
                }
                else
                {
                    CustomLoading.Hide();
                }
            }
            else
            {
                CustomLoading.Hide();
                CustomAlert.GetCustomAlert(GelenBase1, "Çevrenizde hiç lokasyon bulunamadı...");
                return;

                var durum = CheckLocationPermission();
                if (!(bool)durum)
                {
                    InvokeOnMainThread(delegate()
                    {
                        var alert   = new UIAlertView();
                        alert.Title = "Buptis";
                        alert.AddButton("Evet");
                        alert.AddButton("Hayır");
                        alert.Message        = "Buptis konumunuzu kullanarak çevrenizde size yakın mekanları listelemektedir.\nKonum ayarlarını açmak istiyor musunuz?";
                        alert.AlertViewStyle = UIAlertViewStyle.Default;
                        alert.Clicked       += (object s, UIButtonEventArgs ev) =>
                        {
                            if (ev.ButtonIndex == 0)
                            {
                                alert.Dispose();
                                UIApplication.SharedApplication.OpenUrl(new NSUrl(UIApplication.OpenSettingsUrlString));
                            }
                            else
                            {
                                alert.Dispose();
                            }
                        };
                        alert.Show();
                    });
                }
            }
        }
Ejemplo n.º 30
0
        void BanaYakinLokasyonlariGetir()
        {
            WebService webService = new WebService();
            var        Donus      = webService.OkuGetir("locations");

            if (Donus != null)
            {
                var aa = Donus.ToString();
                mekanlar_list = Newtonsoft.Json.JsonConvert.DeserializeObject <List <Mekanlar_Location> >(Donus.ToString());
                if (mekanlar_list.Count > 0)
                {
                    InvokeOnMainThread(delegate()
                    {
                        if (mekanlar_list.Count > 0)
                        {
                            GetMap(Mapview);
                        }

                        for (int i = 0; i < mekanlar_list.Count; i++)
                        {
                            var xamMarker = new Marker()
                            {
                                Title    = "",
                                Snippet  = "",
                                Position = new CLLocationCoordinate2D(mekanlar_list[i].coordinateX, mekanlar_list[i].coordinateY),
                                Map      = mapView,
                                Icon     = UIImage.FromBundle("Images/mapmarkerrr.png"),
                            };
                            OlusanMarkerlar.Add(xamMarker);
                        }
                        if (mekanlar_list.Count > 0)
                        {
                            mapView.SelectedMarker = OlusanMarkerlar[0];
                            var newCamera          = CameraPosition.FromCamera(OlusanMarkerlar[0].Position, 10, mapView.Camera.Bearing + 10, mapView.Camera.ViewingAngle + 10);
                            mapView.Animate(newCamera);
                            this.mapView.TappedMarker = (map, marker) =>
                            {
                                var id = OlusanMarkerlar.FindIndex(item => item == marker);
                                try
                                {
                                    var IndexConvert = Convert.ToInt32(id);
                                    Scrolll.SetContentOffset(new CGPoint(Noktalar[IndexConvert].Frame.X, 0), true);
                                    var PageeIndex = (nint)(Scrolll.ContentOffset.X / Scrolll.Frame.Width);
                                    Console.WriteLine("OK");
                                }
                                catch
                                {
                                }
                                return(false);
                            };
                        }
                        CreateScrollViews();
                        Scrolll.PagingEnabled = true;
                        CustomLoading.Hide();
                    });
                }
                else
                {
                    CustomAlert.GetCustomAlert(GelenBase1, "Çevrenizde hiç lokasyon bulunamadı...");
                    CustomLoading.Hide();
                }
            }
            else
            {
                CustomLoading.Hide();
            }
        }