// click Button Add Stickers
        private void Button_Add_Stickers_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                var mi = (Button)sender;
                Stickers_name = mi.CommandParameter.ToString();

                var selectedGroup = ListTrending.FirstOrDefault(a => a.S_name == Stickers_name);

                if (selectedGroup != null)
                {
                    selectedGroup.S_Visibility = "Visible";

                    SQLiteCommandSender.Update_To_StickersTable(selectedGroup.S_name, selectedGroup.S_Visibility);

                    var delete_Stickers = ListTrending.FirstOrDefault(a => a.S_name == selectedGroup.S_name);
                    ListTrending.Remove(delete_Stickers);
                    TrendingListview.ItemsSource = ListTrending;

                    ListStickers.Add(selectedGroup);
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
        //Click Button Close
        private void closeButton_Click(object sender, RoutedEventArgs e)
        {
            var Chek1 = "false";
            var Chek2 = "false";

            if (Chk_Enable_Sound_notifications.IsChecked == true)
            {
                Chek1 = "true";
            }

            if (Chk_Receive_notifications.IsChecked == true)
            {
                Chek2 = "true";
            }

            var s = SQLite_Entity.Connection.Table <DataBase.UsersContactProfileTable>().FirstOrDefault(a => a.UCP_Id == user_id);

            if (s != null)
            {
                s.UCP_Notifications_Message_Sound_user = Chek1;
                s.UCP_Notifications_Message_user       = Chek2;

                SQLiteCommandSender.Update_one_UsersContactTable(s);
            }
            var sss = SQLite_Entity.Connection.Table <DataBase.UsersContactProfileTable>().FirstOrDefault(a => a.UCP_Id == user_id);

            this.Close();
        }
Example #3
0
        private async void Btn_cancel_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                mediaPlayer.Stop();
                var Callsound = Functions.Main_Destination + "Decline_Call.mp3";
                if (Directory.Exists(Callsound) == false)
                {
                    File.WriteAllBytes(Callsound, Properties.Resources.Decline_Call);
                }

                mediaPlayer.Open(new Uri(Callsound));
                mediaPlayer.Volume = 1;
                mediaPlayer.Play();

                string AvatarSplit = Main_avatar.Split('/').Last();

                Classes.Call_Video CV = new Classes.Call_Video();

                CV.Call_Video_user_id       = Main_IDuser;
                CV.Call_Video_Avatar        = Functions.Get_image(Main_IDuser, AvatarSplit, Main_avatar);
                CV.Call_Video_User_Name     = Main_Name;
                CV.Call_Video_Call_id       = Main_callID;
                CV.Call_Video_Tupe_icon     = "CallMissed";
                CV.Call_Video_Color_icon    = "red";
                CV.Call_Video_User_DataTime = Functions.Get_datatime();
                if (MainWindow.ModeDarkstlye)
                {
                    CV.S_Color_Background = "#232323";
                    CV.S_Color_Foreground = "#efefef";
                }
                else
                {
                    CV.S_Color_Background = "#ffff";
                    CV.S_Color_Foreground = "#444";
                }

                MainWindow.ListCall.Insert(0, CV);
                _MainWindow.Calls_list.ItemsSource = MainWindow.ListCall;

                SQLiteCommandSender.Insert_To_CallVideoTable(CV);
                if (_MainWindow.No_call.Visibility == Visibility.Visible)
                {
                    _MainWindow.No_call.Visibility = Visibility.Collapsed;
                }

                timer.Stop();

                await WoWonderClient.Requests.RequestsAsync.Send_Video_Call_Answer_Web("decline", Main_callID).ConfigureAwait(false);

                this.Close();
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
        private void Btn_cancel_Click(object sender, RoutedEventArgs e)
        {
            mediaPlayer.Stop();

            var Callsound = Functions.Main_Destination + "Decline_Call.mp3";

            if (Directory.Exists(Callsound) == false)
            {
                File.WriteAllBytes(Callsound, Properties.Resources.Decline_Call);
            }
            mediaPlayer.Open(new Uri(Callsound));
            mediaPlayer.Volume = 1;
            mediaPlayer.Play();

            Classes.Call_Video CV = new Classes.Call_Video();

            CV.Call_Video_user_id       = recipt_ID;
            CV.Call_Video_User_Name     = User_Name;
            CV.Call_Video_Call_id       = Call_ID;
            CV.Call_Video_Avatar        = main_avatar;
            CV.Call_Video_Tupe_icon     = "CallMissed";
            CV.Call_Video_Color_icon    = "red";
            CV.Call_Video_User_DataTime = Functions.Get_datatime();
            if (MainWindow.ModeDarkstlye)
            {
                CV.S_Color_Background = "#232323";
                CV.S_Color_Foreground = "#efefef";
            }
            else
            {
                CV.S_Color_Background = "#ffff";
                CV.S_Color_Foreground = "#444";
            }

            MainWindow.ListCall.Insert(0, CV);
            Main_Window.Calls_list.ItemsSource = MainWindow.ListCall;
            SQLiteCommandSender.Insert_To_CallVideoTable(CV);
            if (Main_Window.No_call.Visibility == Visibility.Visible)
            {
                Main_Window.No_call.Visibility = Visibility.Collapsed;
            }


            WoWonderClient.Requests.RequestsAsync.Send_Video_Call_Answer_Web("close", Call_ID).ConfigureAwait(false);


            timer2.Stop();
            timer.Stop();
            this.Close();
        }
Example #5
0
        private async void Btn_Accept_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                timer.Stop();

                var data = await WoWonderClient.Requests.RequestsAsync.Send_Video_Call_Answer_Web("answer", Main_callID);

                if (data.Item1 == 200)
                {
                    string AvatarSplit = Main_avatar.Split('/').Last();

                    Classes.Call_Video CV = new Classes.Call_Video();

                    CV.Call_Video_user_id       = Main_IDuser;
                    CV.Call_Video_Avatar        = Functions.Get_image(Main_IDuser, AvatarSplit, Main_avatar);
                    CV.Call_Video_User_Name     = Main_Name;
                    CV.Call_Video_Call_id       = Main_callID;
                    CV.Call_Video_Tupe_icon     = "CallReceived";
                    CV.Call_Video_Color_icon    = "green";
                    CV.Call_Video_User_DataTime = Functions.Get_datatime();
                    if (MainWindow.ModeDarkstlye)
                    {
                        CV.S_Color_Background = "#232323";
                        CV.S_Color_Foreground = "#efefef";
                    }
                    else
                    {
                        CV.S_Color_Background = "#ffff";
                        CV.S_Color_Foreground = "#444";
                    }

                    MainWindow.ListCall.Insert(0, CV);
                    _MainWindow.Calls_list.ItemsSource = MainWindow.ListCall;
                    SQLiteCommandSender.Insert_To_CallVideoTable(CV);
                    if (_MainWindow.No_call.Visibility == Visibility.Visible)
                    {
                        _MainWindow.No_call.Visibility = Visibility.Collapsed;
                    }
                    Video_Call_Window VideoCallFrm = new Video_Call_Window(data.Item2["url"], _MainWindow, CV); //maybe bug check
                    VideoCallFrm.Show();
                    this.Close();
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
Example #6
0
        // Run background worker : bgd_Worker_Block_User
        async void bgd_Worker_Block_User_DoWork(object sender, System.ComponentModel.DoWorkEventArgs e)
        {
            try
            {
                var response = await WoWonderClient.Requests.RequestsAsync.Block_User(UserDetails.User_id, Id_user);

                if (response.Item1 == 200)
                {
                    if (bgd_Worker_Block_User.CancellationPending == true)
                    {
                        e.Cancel = true;
                    }

                    if (response.Item2 is BlockUserObject result)
                    {
                        SQLiteCommandSender.removeUser_All_Table(Id_user, Id_from, Id_to);

                        Functions.Delete_dataFile_user(Id_user);

                        var delete = MainWindow.ListUsers.FirstOrDefault(a => a.U_Id == Id_user);
                        if (delete != null)
                        {
                            App.Current.Dispatcher.Invoke((Action) delegate // <--- HERE
                            {
                                MainWindow.ListUsers.Remove(delete);
                                MainWindow.ListMessages.Clear();
                                MainWindow.ListSharedFiles.Clear();
                                MainWindow.ListUsersProfile.Clear();

                                _MainWindow.ChatActivityList.SelectedIndex = 0;

                                //Scroll Top >>
                                _MainWindow.ChatActivityList.ScrollIntoView(_MainWindow.ChatActivityList.SelectedItem);
                                _MainWindow.RightMainPanel.Visibility = Visibility.Collapsed;
                            });
                        }
                    }
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
        //########################## My Stickers ##########################

        #region My Stickers

        // Functions Get Stickers */ Visible /*
        public void GetStickers()
        {
            try
            {
                ListStickers.Clear();
                var data_s = SQLiteCommandSender.Get_From_StickersTable();
                if (data_s != null)
                {
                    foreach (var item in data_s)
                    {
                        if (item.S_Visibility == "Visible")
                        {
                            Classes.Setting_Stickers ss = new Classes.Setting_Stickers();
                            ss.S_name       = item.S_name;
                            ss.S_Visibility = item.S_Visibility;
                            ss.S_image      = item.S_image;
                            ss.S_cuont      = item.S_cuont + " " + LocalResources.label_Item_My_Stickers;
                            if (MainWindow.ModeDarkstlye)
                            {
                                ss.S_Color_Background = "#232323";
                                ss.S_Color_Foreground = "#efefef";
                            }
                            else
                            {
                                ss.S_Color_Background = "#ffff";
                                ss.S_Color_Foreground = "#444";
                            }

                            ListStickers.Add(ss);
                        }
                    }
                    StickersListview.ItemsSource = ListStickers;
                }
            }
            catch (Exception exception)
            {
                Console.WriteLine(exception);
            }
        }
        //Function Edit data My Profile in tap and DataBase
        public void Edit_My_profile()
        {
            var data = SQLite_Entity.Connection.Table <DataBase.ProfilesTable>()
                       .FirstOrDefault(a => a.pm_UserId == UserDetails.User_id);

            if (data != null)
            {
                if (data.pm_Birthday != Txt_Birthday.Text)
                {
                    data.pm_Birthday = Txt_Birthday.Text;
                    main_Window.Lbl_Birthday.Text = Txt_Birthday.DisplayDate.ToString("dd-MM-yyyy");
                }
                if (data.pm_Phone_number != Txt_Phone_number.Text)
                {
                    data.pm_Phone_number = Txt_Phone_number.Text;
                    main_Window.Lbl_Phone_number.Text = Txt_Phone_number.Text;
                }
                if (data.pm_Website != Txt_Website.Text)
                {
                    data.pm_Website = Txt_Website.Text;
                    main_Window.Lbl_Website.Text = Txt_Website.Text;
                }
                if (data.pm_Address != Txt_Address.Text)
                {
                    data.pm_Address = Txt_Address.Text;
                    main_Window.Lbl_Address.Text = Txt_Address.Text;
                }
                if (data.pm_School != Txt_School.Text)
                {
                    data.pm_School = Txt_School.Text;
                    main_Window.Lbl_School.Text = Txt_Address.Text;
                }
                if (data.pm_Gender != Sel_Gender.Text)
                {
                    data.pm_Gender = Sel_Gender.Text;
                    main_Window.Lbl_Gender.Text = Sel_Gender.Text;
                }
                if (data.pm_Facebook != Txt_Facebook.Text)
                {
                    data.pm_Facebook = Txt_Facebook.Text;
                    main_Window.Lbl_Facebook.Text = Txt_Facebook.Text;
                }
                if (data.pm_Google != Txt_Google.Text)
                {
                    data.pm_Google = Txt_Google.Text;
                    main_Window.Lbl_Google.Text = Txt_Google.Text;
                }
                if (data.pm_Twitter != Txt_Twitter.Text)
                {
                    data.pm_Twitter = Txt_Twitter.Text;
                    main_Window.Lbl_Twitter.Text = Txt_Twitter.Text;
                }
                if (data.pm_Youtube != Txt_Youtube.Text)
                {
                    data.pm_Youtube = Txt_Youtube.Text;
                    main_Window.Lbl_Youtube.Text = Txt_Youtube.Text;
                }
                if (data.pm_Linkedin != Txt_Linkedin.Text)
                {
                    data.pm_Linkedin = Txt_Linkedin.Text;
                    main_Window.Lbl_Linkedin.Text = Txt_Linkedin.Text;
                }
                if (data.pm_Instagram != Txt_Instagram.Text)
                {
                    data.pm_Instagram = Txt_Instagram.Text;
                    main_Window.Lbl_Instagram.Text = Txt_Instagram.Text;
                }
                if (data.pm_Vk != Txt_Vk.Text)
                {
                    data.pm_Vk = Txt_Vk.Text;
                    main_Window.Lbl_Vk.Text = Txt_Vk.Text;
                }
                SQLiteCommandSender.Insert_Or_Replace_To_ProfileTable(data);
            }
        }
        public async Task Checke_Video_Call_Answer(string Call_ID)  //begovsky maybe change
        {
            try
            {
                var response =
                    await WoWonderClient.Requests.RequestsAsync.API_Check_For_Video_Answer(UserDetails.User_id,
                                                                                           Send_Video_Call.Call_ID);

                if (response.Item1 == 200)
                {
                    timer2.Stop();
                    timer.Stop();

                    App.Current.Dispatcher.Invoke((Action) delegate // <--- HERE
                    {
                        mediaPlayer.Stop();

                        Classes.Call_Video CV = new Classes.Call_Video();

                        CV.Call_Video_user_id       = recipt_ID;
                        CV.Call_Video_User_Name     = User_Name;
                        CV.Call_Video_Avatar        = main_avatar;
                        CV.Call_Video_Call_id       = Call_ID;
                        CV.Call_Video_Tupe_icon     = "CallMade";
                        CV.Call_Video_Color_icon    = "green";
                        CV.Call_Video_User_DataTime = Functions.Get_datatime();
                        if (MainWindow.ModeDarkstlye)
                        {
                            CV.S_Color_Background = "#232323";
                            CV.S_Color_Foreground = "#efefef";
                        }
                        else
                        {
                            CV.S_Color_Background = "#ffff";
                            CV.S_Color_Foreground = "#444";
                        }

                        MainWindow.ListCall.Insert(0, CV);
                        Main_Window.Calls_list.ItemsSource = MainWindow.ListCall;

                        SQLiteCommandSender.Insert_To_CallVideoTable(CV);

                        Video_Call_Window Video_CallFrm = new Video_Call_Window(Url, Main_Window, CV);
                        Video_CallFrm.Show();
                        this.Close();
                    });
                }
                else
                {
                    App.Current.Dispatcher.Invoke((Action) delegate // <--- HERE
                    {
                        mediaPlayer.Stop();
                        TextOfcall.Text = User_Name + LocalResources.label_Declined_your_call;

                        Task.Run(() =>
                        {
                            Thread.Sleep(4500);
                            App.Current.Dispatcher.Invoke((Action) delegate // <--- HERE
                            {
                                mediaPlayer.Close();
                                this.Close();
                            });
                        });
                    });
                }
            }
            catch (Exception ex)
            {
                var ff = ex.ToString();
                this.Close();
            }
        }
Example #10
0
        void App_Startup(object sender, StartupEventArgs e)
        {
            try
            {
                SQLite_Entity.Connect();

                ////language codes operating system windows
                CultureInfo ci = CultureInfo.CurrentCulture;

                try
                {
                    var data_lang = SQLite_Entity.Connection.Table <DataBase.SettingsTable>().FirstOrDefault();
                    if (data_lang != null)
                    {
                        if (data_lang.Lang_Resources != "")
                        {
                            if (data_lang.Lang_Resources == "ar" || data_lang.Lang_Resources == "Arabic" ||
                                data_lang.Lang_Resources == "ar-AR")
                            {
                                Settings.FlowDirection_RightToLeft = true;
                            }

                            LocalResources.Culture = new System.Globalization.CultureInfo(data_lang.Lang_Resources);

                            System.Threading.Thread.CurrentThread.CurrentUICulture =
                                new CultureInfo(data_lang.Lang_Resources);
                            System.Threading.Thread.CurrentThread.CurrentCulture =
                                new CultureInfo(data_lang.Lang_Resources);
                        }
                    }
                    else
                    {
                        //language codes operating system windows
                        var Lang_OS_windows2    = Settings.Lang_Resources;
                        var Name_LocalResources = @"pack://*****:*****@"\Locales";
                Cef.Initialize(cefSettings);


                if (user != null)
                {
                    if (user.Status == "Active")
                    {
                        WoWonderClient.Current.AccessToken = user.Session;
                        UserDetails.User_id = user.UserId;

                        // INSERT DATA PROFILE USER TO LIST
                        SQLiteCommandSender.Select_From_ProfileTable_By_ID(user.UserId);
                        SQLiteCommandSender.GetUsersSettings();

                        var client = new Client(Settings.TripleDesAppServiceProvider);

                        //var first_rofile = MemoryVariables.UsersProfileList.First();
                        MainWindow wn = new MainWindow();
                        wn.Show();
                    }
                    else if (user.Status == "Pending")
                    {
                        WoWonderClient.Current.AccessToken = user.Session;
                        UserDetails.User_id = user.UserId;
                        MainWindow wn = new MainWindow();
                        wn.Show();
                    }
                }
                else
                {
                    Login_Window fff = new Login_Window();
                    fff.Show();
                }
            }
            catch (Exception exception)
            {
                MessageBox.Show(exception.Message);
                Console.WriteLine(exception);
            }
        }
Example #11
0
        // check Hash id  available to website
        public async Task <string> checkHash()
        {
            try
            {
                using (var client = new HttpClient())
                {
                    var response = await client.GetAsync(WoWonderClient.Client.WebsiteUrl + "/app_api.php?type=check_hash&hash_id=" + HashSet);

                    response.EnsureSuccessStatusCode();
                    string json = await response.Content.ReadAsStringAsync();

                    var    data      = JsonConvert.DeserializeObject <Dictionary <string, object> >(json);
                    string apiStatus = data["api_status"].ToString();

                    if (apiStatus == "200")
                    {
                        JObject userdata = JObject.FromObject(data["user_data"]);
                        UserDetails.User_id = userdata["user_id"].ToString();
                        Current.AccessToken = userdata["session_id"].ToString();

                        // Insert data user in database
                        DataBase.LoginTable LoginData = new DataBase.LoginTable();
                        LoginData.Session = Current.AccessToken;
                        LoginData.UserId  = UserDetails.User_id;
                        LoginData.Status  = "Active";
                        SQLiteCommandSender.Insert_To_LoginTable(LoginData);

                        //Get Setting
                        var Data = await WoWonderClient.Current.GetSettings();

                        if (Data.Item1 == 200)
                        {
                            if (Data.Item2 is GetSiteSettingsObject.Config res)
                            {
                                DataBase.SettingsTable Settingstable = new DataBase.SettingsTable
                                {
                                    S_SiteName           = res.SiteName,
                                    S_SiteTitle          = res.SiteTitle,
                                    S_SiteKeywords       = res.SiteKeywords,
                                    S_SiteDesc           = res.SiteDesc,
                                    S_DefaultLang        = res.DefualtLang,
                                    S_FileSharing        = res.FileSharing,
                                    S_ChatSystem         = res.ChatSystem,
                                    S_User_lastseen      = res.UserLastseen,
                                    S_Age                = res.Age,
                                    S_DeleteAccount      = res.DeleteAccount,
                                    S_ConnectivitySystem = res.ConnectivitySystem,
                                    S_MaxUpload          = res.MaxUpload,
                                    S_MaxCharacters      = res.MaxCharacters,
                                    S_Message_seen       = res.MessageSeen,
                                    S_Message_typing     = res.MessageTyping,
                                    S_AllowedExtenstion  = res.AllowedExtenstion,
                                    S_Theme              = res.Theme,
                                    //S_DefaulColor = res.HeaderColor,  // ??
                                    S_Header_hover_border = res.HeaderHoverBorder,
                                    S_Header_color        = res.HeaderColor,
                                    S_Body_background     = res.BodyBackground,
                                    S_btn_color           = res.BtnColor,
                                    //S_SecondryColor = res.SiteName,
                                    S_btn_hover_color                 = res.BtnHoverColor,
                                    S_btn_hover_background_color      = res.BtnHoverBackgroundColor,
                                    Setting_Header_color              = res.SettingHeaderColor,
                                    Setting_Header_background         = res.SettingHeaderBackground,
                                    Setting_Active_sidebar_color      = res.SettingActiveSidebarColor,
                                    Setting_Active_sidebar_background = res.SettingActiveSidebarBackground,
                                    Setting_Sidebar_background        = res.SettingActiveSidebarBackground,
                                    Setting_Sidebar_color             = res.SettingSidebarColor,
                                    S_Logo_extension           = res.LogoExtension,
                                    S_Background_extension     = res.BackgroundExtension,
                                    S_Video_upload             = res.VideoUpload,
                                    S_Audio_upload             = res.AudioUpload,
                                    S_Header_search_color      = res.HeaderSearchColor,
                                    S_Header_button_shadow     = res.HeaderButtonShadow,
                                    S_btn_disabled             = res.BtnDisabled,
                                    S_User_registration        = res.UserRegistration,
                                    S_Favicon_extension        = res.FaviconExtension,
                                    S_Chat_outgoing_background = res.ChatOutgoingBackground,
                                    S_Windows_app_version      = res.WindowsAppVersion,
                                    S_Credit_card       = res.CreditCard,
                                    S_Bitcoin           = res.Bitcoin,
                                    S_m_withdrawal      = res.Withdrawal,
                                    S_Affiliate_type    = res.AffiliateType,
                                    S_Affiliate_system  = res.AffiliateSystem,
                                    S_Classified        = res.Classified,
                                    S_Bucket_name       = res.BucketName,
                                    S_Region            = res.Region,
                                    S_Footer_background = res.footerBackground,
                                    S_Is_utf8           = res.IsUtf8,
                                    S_Alipay            = res.Alipay,
                                    S_Audio_chat        = res.AudioChat,
                                    S_Sms_provider      = res.SmsProvider,
                                    // Settingstable.S_Updated_latest = settings_updated_latest;
                                    S_Footer_background_2 = res.footerBackground2,
                                    S_Footer_background_n = res.footerBackground_n,
                                    S_Blogs                 = res.Blogs,
                                    S_Can_blogs             = res.CanBlogs,
                                    S_Push                  = res.Push,
                                    S_Push_id               = res.pushId,
                                    S_Push_key              = res.pushKey,
                                    S_Events                = res.Events,
                                    S_Forum                 = res.Forum,
                                    S_Last_update           = res.LastUpdate,
                                    S_Movies                = res.Movies,
                                    S_Yndex_translation_api = res.YandexTranslationApi,
                                    S_Update_db_15          = res.UpdateDb15,
                                    S_Ad_v_price            = res.adPrice_v,
                                    S_Ad_c_price            = res.adPrice_c,
                                    S_Emo_cdn               = res.EmoCdn,
                                    S_User_ads              = res.UserAds,
                                    S_User_status           = res.UserStatus,
                                    S_Date_style            = res.DateStyle,
                                    S_Stickers              = res.Stickers,
                                    S_Giphy_api             = res.GiphyApi,
                                    S_Find_friends          = res.FindFriends,
                                    //S_Update_available = res.ava,
                                    S_Logo_url = res.LogoUrl,
                                    //S_User_messages = res.SiteName,

                                    //stye
                                    S_NotificationDesktop   = Settings.NotificationDesktop,
                                    S_NotificationPlaysound = Settings.NotificationPlaysound,

                                    S_BackgroundChats_images = Settings.BackgroundChats_images,
                                    Lang_Resources           = Settings.Lang_Resources
                                };

                                SQLiteCommandSender.Insert_To_SettingsTable(Settingstable);
                            }
                        }

                        //Get User Profile
                        var data_Profile = await WoWonderClient.Requests.RequestsAsync.Get_User_Profile_Http(UserDetails.User_id);

                        if (data_Profile.Item1 == 200)
                        {
                            if (data_Profile.Item2 is GetUserDataObject.UserData userData)
                            {
                                #region Insert_Or_Replace_To_ProfileTable

                                DataBase.ProfilesTable ProfilesTable =
                                    new DataBase.ProfilesTable
                                {
                                    pm_UserId     = userData.UserId,
                                    pm_Username   = userData.Username,
                                    pm_Email      = userData.Email,
                                    pm_First_name = userData.FirstName,
                                    pm_Last_name  = userData.LastName,
                                    pm_Avatar     = Functions.Get_image(UserDetails.User_id,
                                                                        userData.Avatar.Split('/').Last(), userData.Avatar),
                                    pm_Cover           = userData.Cover,
                                    pm_Relationship_id = userData.RelationshipId,
                                    pm_Address         = userData.Address,
                                    pm_Working         = userData.Working,
                                    pm_Working_link    = userData.WorkingLink,
                                    pm_About           = userData.About,
                                    pm_School          = userData.School,
                                    pm_Gender          = userData.Gender,
                                    pm_Birthday        = userData.Birthday,
                                    pm_Website         = userData.Website,
                                    pm_Facebook        = userData.Facebook,
                                    pm_Google          = userData.Google,
                                    pm_Twitter         = userData.Twitter,
                                    pm_Linkedin        = userData.Linkedin,
                                    pm_Youtube         = userData.Youtube,
                                    pm_Vk                  = userData.Vk,
                                    pm_Instagram           = userData.Instagram,
                                    pm_Language            = userData.Language,
                                    pm_Ip_address          = userData.IpAddress,
                                    pm_Verified            = userData.Verified,
                                    pm_Lastseen            = userData.Lastseen,
                                    pm_Showlastseen        = userData.Showlastseen,
                                    pm_Status              = userData.Status,
                                    pm_Active              = userData.Active,
                                    pm_Admin               = userData.Admin,
                                    pm_Registered          = userData.Registered,
                                    pm_Phone_number        = userData.PhoneNumber,
                                    pm_Is_pro              = userData.IsPro,
                                    pm_Pro_type            = userData.ProType,
                                    pm_Joined              = userData.Joined,
                                    pm_Timezone            = userData.Timezone,
                                    pm_Referrer            = userData.Referrer,
                                    pm_Balance             = userData.Balance,
                                    pm_Paypal_email        = userData.PaypalEmail,
                                    pm_Notifications_sound = userData.NotificationsSound,
                                    pm_Order_posts_by      = userData.OrderPostsBy,
                                    pm_Social_login        = userData.SocialLogin,
                                    pm_Device_id           = userData.DeviceId,
                                    pm_Url                 = userData.Url,
                                    pm_Name                = userData.FirstName
                                };

                                SQLiteCommandSender.Insert_Or_Replace_To_ProfileTable(
                                    ProfilesTable);

                                #endregion
                            }
                        }

                        SQLiteCommandSender.Insert_To_StickersTable();
                        Login_Window.DisplayWorkthrothPages = true;
                        // Open windows main
                        this.Hide();
                        MainWindow mw = new MainWindow();
                        mw.Show();

                        this.Close();
                    }
                }
            }
            catch
            {
            }
            return("true");
        }