private void rdo_UsingPhotoId_ScrapeCommentmessage_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         UserControlScrapeCommentMessagebyPhotoId obj_UserControlScrapeCommentMessagebyPhotoId = new UserControlScrapeCommentMessagebyPhotoId();
         var window = new ModernDialog
         {
             Content = obj_UserControlScrapeCommentMessagebyPhotoId
         };
         window.MinHeight = 300;
         window.MinWidth = 700;
         // window.Topmost = true;
         Button customButton = new Button() { Content = "Save" };
         Button customButton1 = new Button() { Content = "Close" };
         customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
         customButton.Click += (sa, pa) => { SaveAllData(ref obj_UserControlScrapeCommentMessagebyPhotoId); window.Close(); };
         window.Buttons = new Button[] { customButton, customButton1 };
         window.ShowDialog();
         string s1 = string.Empty;
     }
     catch(Exception ex)
     {
         GlobusLogHelper.log.Error("Error:" + ex.StackTrace);
     }
 }
        private void rdoBtn_HashTagsComment_SingleUser_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                ClGlobul.HashComment.Clear();
                ClGlobul.HashCommentMessage.Clear();
            }
            catch { }
            try
            {
                btn_HashTags_Comment_BrowseUsers.Visibility = Visibility.Hidden;
                btn_HashTags_Comment_messagebrwer.Visibility = Visibility.Hidden;
                txt_HashTags_Comment_Message.Visibility = Visibility.Hidden;
                txt_HashTags_Comment_UserName.Visibility = Visibility.Hidden;
                Username_Copy.Visibility = Visibility.Hidden;
                Message.Visibility = Visibility.Hidden;
            }
            catch { };
            try
            {
                txt_HashTags_Comment_Message.IsReadOnly = false;
                txt_HashTags_Comment_UserName.IsReadOnly = false;
               
            }
            catch { };
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Hash Key Here ";
                // obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (ss, ee) => { SaveAllDataHashkey(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };

                window.ShowDialog();


            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
        private void rdoBtn_LikeBy_Username_SingleUser_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                ClGlobul.PhotoList.Clear();
            }
            catch { }
            try
            {
                btn_LikePhoto_Username_BrowseUsers.Visibility = Visibility.Hidden;
                txt_LikePhoto_Username_LoadUsersPath.Visibility = Visibility.Hidden;
                Likeby_Username.Visibility = Visibility.Hidden;
            }
            catch { };
            try
            {
                txt_LikePhoto_Username_LoadUsersPath.IsReadOnly = false;

            }
            catch { };
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Username Here : ";
               // obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (ss, ee) => { SaveAllData2(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };

                window.ShowDialog();

                
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }

        }
        private void rdoBtn_commentMessage_SingleId_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                ClGlobul.lst_ScrapeCommentMessagePhotoId.Clear();
                txt_PhotoId_Commentmessage.Text = string.Empty;
            }
            catch { }
            try
            {
                btn_PhotoId_Commentmessage.Visibility = Visibility.Hidden;
                txt_PhotoId_Commentmessage.Visibility = Visibility.Hidden;
                Photo_ID.Visibility = Visibility.Hidden;

            }
            catch { };
            try
            {
                txt_PhotoId_Commentmessage.IsReadOnly = false;


            }
            catch { };
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Photo ID here to Scrape there Comment Message : ";
                // obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "Save" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (sa, pa) => { SaveAllData(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };
                window.ShowDialog();
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
        private void chk_GroupStatusUpdate_GetGroups_Checked(object sender, RoutedEventArgs e)
        {
            //try
            //{
            //    if (LDGlobals.listAccounts.Count > 0)
            //    {
            //        var window = new ModernDialog
            //        {
            //            Content = new UserControlGEtGroupsForStatusUpdate()
            //        };
            //        window.MinWidth = 550;
            //        window.MinHeight = 350;
            //        window.Title = "Upload Follow Details";                    
            //        window.ShowDialog();
            //    }
            //    else
            //    {
            //        MessageBox.Show("Please upload accounts.");
            //        return;
            //    }
            //}
            //catch (Exception ex)
            //{
            //    //  GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
            //}

            try
            {
                UserControlGEtGroupsForStatusUpdate obj = new UserControlGEtGroupsForStatusUpdate();
                
              
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                Button customButton = new Button() { Content = "Save" };
                customButton.Click += (ss, ee) => { closeEvent(); window.Close(); };
                window.Buttons = new Button[] { customButton };

                window.ShowDialog();


            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : 55" + ex.Message);
            }



        }
示例#6
0
        public static string ShowMessage(string text, string title, Window owner, params ButtonDef[] buttons)
        {
            string result = null;

            var dialog = new ModernDialog {
                Title = title,
                Content = new BBCodeBlock {BBCode = text, Margin = new Thickness(0, 0, 0, 8)},
                MinHeight = 0,
                MinWidth = 0,
                MaxHeight = 480,
                MaxWidth = 640,
                Owner = owner
            };

            dialog.Buttons = buttons.Select(def => CreateButton(def, () => {
                result = def.Name;
                dialog.Close();
            }));

            dialog.ShowDialog();

            return result;
        }
 private void AddUserAgent_UploadAcc(object sender, RoutedEventArgs e)
 {
     try
     {
         this.Dispatcher.Invoke((Action)delegate
         {
             var modernDialog = new ModernDialog
             {
                 Content = new AddNewUserAgen_UploadAccount()
             };
             modernDialog.MinWidth = 500;
             modernDialog.MinHeight = 300;
             //modernDialog.Topmost = true;
             Button customButton = new Button() { Content = "SUBMIT" };
             customButton.Click += (ss, ee) => { closeEvent(); modernDialog.Close(); };
             modernDialog.Buttons = new Button[] { customButton };
             modernDialog.ShowDialog();
         });
         AccounLoad();
     }
     catch (Exception ex)
     {
         GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
     }
 }
        private void Rdo_Using_HashTag_Checked(object sender, RoutedEventArgs e)
        {
            txtblock_Activity_photoDownload.Text = "Using Hashkey Report :";
            Username_Hashkey_Uploaded.Content = "No. Of Hashkey Uploaded :";
            UserControlPhotoDownload_Hashtag obj_UserControlPhotoDownload_Hashtag = new UserControlPhotoDownload_Hashtag();
            var window = new ModernDialog
            {

                Content = obj_UserControlPhotoDownload_Hashtag
            };
            window.ShowInTaskbar = true;
            window.MinHeight = 300;
            window.MinWidth = 700;
            Button customButton = new Button() { Content = "SAVE" };
            Button customButton1 = new Button() { Content = "Close" };
            customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
            customButton.Click += (ss, ee) => { SaveAllData1(ref obj_UserControlPhotoDownload_Hashtag); window.Close(); };
            window.Buttons = new Button[] { customButton, customButton1 };

            window.ShowDialog();

            string s1 = string.Empty;
           
        }
        private void chkBox_ScrapeUsers_DailyScheduleTask_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                GlobalDeclration.objMentionUser.IsDailySchedule = true;
                var dialog = new ModernDialog
                {
                    Content = new UserControlScheduleMentionUsers()
                };
                dialog.MinHeight = 300;
                dialog.MinWidth = 750;

                var customButton = new Button() { Content = "Close" };
                customButton.Click += (ee, vv) => { dialog.Close(); };
                dialog.Buttons = new Button[] { customButton };
                dialog.ShowDialog();

            }
            catch (Exception ex)
            {

            }
        }
 private void chkBox_Like_DivideData_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         LikeManagers.chkBox_Like_DivideData = true;
         UserControl_Like_DivideData objUserControl_Like_DivideData = new UserControl_Like_DivideData();
             var modernDialog = new ModernDialog
             {
                 Content = objUserControl_Like_DivideData
             };
             modernDialog.MinWidth = 600;
             modernDialog.MinHeight = 300;
             Button customButton = new Button() { Content = "SAVE" };
             customButton.Click += (ss, ee) => { closeEvent(); modernDialog.Close(); };
             modernDialog.Buttons = new Button[] { customButton };
             modernDialog.ShowDialog();
             string s1 = string.Empty;
             try
             {
                 if (LikeManagers.rdbDivideEqually == true || LikeManagers.rdbDivideByUser == true)
                 {
                     if (LikeManagers.rdbDivideByUser == true)
                     {
                         if (!string.IsNullOrEmpty(objUserControl_Like_DivideData.txtGiveByUser_Like.Text))
                         {
                             LikeManagers.CountGivenByUser = Convert.ToInt32(objUserControl_Like_DivideData.txtGiveByUser_Like.Text);
                         }
                         else
                         {
                             GlobusLogHelper.log.Info("Please Give Count Given By User");
                             ModernDialog.ShowMessage("Please Give Count Given By User", "Count Given By User", MessageBoxButton.OK);
                             return;
                         }
                     }
                     ModernDialog.ShowMessage("Notice", "Data Successfully Save", MessageBoxButton.OK);
                     GlobusLogHelper.log.Info("=> [ Your Data Successfully Save ]");
                 }
                 else
                 {
                     GlobusLogHelper.log.Info("=> [ Please Select Divide Equally Or Divide Given By User First ]");
                     ModernDialog.ShowMessage("Please Select Divide Equally Or Divide Given By User First", "Select First", MessageBoxButton.OK);
                 }
             }
             catch (Exception ex)
             {
                 GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
             }        
     }
     catch (Exception ex)
     {
         GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
     }
 }
        private void rdo_SingleUser_Unfollower(object sender, RoutedEventArgs e)
        {
            txt_UnfollowerUser.Clear();
            ClGlobul.lstUnfollowerList.Clear();
            try
            {
                ClGlobul.lstUnfollowerList.Clear();
            }
            catch { }
            try
            {
                Unfollower_browser.Visibility = Visibility.Hidden;
                txt_UnfollowerUser.Visibility = Visibility.Hidden;
                lbe_Userunfollow.Visibility = Visibility.Hidden;

            }
            catch { };
            try
            {
                txt_UnfollowerUser.IsReadOnly = false;
            }
            catch { };
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Unsername To Unfollow Here ";
                //obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (ss, ee) => { SaveAllData(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };
                window.ShowDialog();               
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
        private void rdo_DownloadSingle_ByHashtag_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                btu_Downloadphoto_loadByuserhash.Visibility = Visibility.Hidden;
                txt_downloadphoto_Hashtag.Visibility = Visibility.Hidden;
                lbe_hashtag_user.Visibility = Visibility.Hidden;
            }
            catch { };
            try
            {
                txt_downloadphoto_Hashtag.IsReadOnly = false;
            }
            catch { };
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Hashtag User Here ";
                //obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (ss, ee) => { SaveAllData(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };
                window.ShowDialog();                
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }

        }
        private void rdo_CommentInput_SingleUser_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                ClGlobul.commentMsgList.Clear();
                ClGlobul.CommentIdsForMSG.Clear();
                txtMessage_Comment_LoadMessages.Clear();
                txtMessage_Comment_PhotoID.Clear();               
            }
            catch { }
            try
            {
                btnMessage_Comment_LoadMessages.Visibility = Visibility.Hidden;
                btnMessage_Comment_LoadPhotoID.Visibility = Visibility.Hidden;
                txtMessage_Comment_PhotoID.Visibility = Visibility.Hidden;
                txtMessage_Comment_LoadMessages.Visibility = Visibility.Hidden;
                lbe_PhotoId.Visibility = Visibility.Hidden;
                lbe_message.Visibility = Visibility.Hidden;

            }
            catch { };
            try
            {
                txtMessage_Comment_LoadMessages.IsReadOnly = false;
                txtMessage_Comment_PhotoID.IsReadOnly = false;
            }
            catch { };
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Image ID/Url Here ";
               // obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (ss, ee) => { SaveAllPhotoIdData(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };
                window.ShowDialog();              
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }

        }
 private void rdo_UnlikeBy_Id_Checked(object sender, RoutedEventArgs e)
 {
     txt_block_Selected_likeoption.Text = "Photo Unlike By ID Report";
     Number_of_ID_Username_loaded.Content = "No. Of Photo ID Loaded :";
     UserControlUnlikePhotoByPhotoId obj_UserControlUnlikePhotoByPhotoId = new UserControlUnlikePhotoByPhotoId();
     var window = new ModernDialog
     {
         Content = obj_UserControlUnlikePhotoByPhotoId
     };
     window.MinHeight = 300;
     window.MinWidth = 700;
     //  window.Topmost = true;
     Button customButton = new Button() { Content = "SAVE" };
     Button customButton1 = new Button() { Content = "Close" };
     customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
     customButton.Click += (ss, ee) => { SaveAllData(ref obj_UserControlUnlikePhotoByPhotoId); window.Close(); };
     window.Buttons = new Button[] { customButton, customButton1 };
     window.ShowDialog();
     string s1 = string.Empty;          
 }
        private void rdo_SingleUser_Follow_like(object sender, RoutedEventArgs e)
        {
            Txt_Photo_ID.Text = string.Empty;
            ClGlobul.lstphotoId_Followwithlike.Clear();
            try
            {
                Btu_Follow_With_like_browser.Visibility = Visibility.Hidden;
                Txt_Photo_ID.Visibility = Visibility.Hidden;
                lblLoadPhotoId.Visibility = Visibility.Hidden;
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
            }
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Photo Id/Url Here ";
                //obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (ss, ee) => { SaveAllData(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };

                window.ShowDialog();
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
 private void ExecuteGetMyBookmarkCommand(object sender, ExecutedRoutedEventArgs e)
 {
     ModernDialog d = new ModernDialog();
     d.Content = "Loading data...";
     var closeHandler = new EventHandler((s, ex) => { ViewData.Status = "Still loading..."; });
     d.Closed += closeHandler;
     var ctx = SynchronizationContext.Current;
     System.Threading.ThreadPool.QueueUserWorkItem(
      (x) =>
      {
          if (ViewData.BookmarkType == BookmarkType.Member)
          {
              ViewData.GetMyMemberBookmark(ctx);
              this.Dispatcher.BeginInvoke(
                  new Action<BookmarkPage>((y) =>
                  {
                      this.DataContext = ViewData;
                      d.Closed -= closeHandler;
                      d.Close();
                      if (ViewData.Members != null)
                          ViewData.Status = String.Format("Loaded: {0} members.", ViewData.Members.Count); ;
                  }),
                  new object[] { this }
               );
          }
          else
          {
              ViewData.GetMyImagesBookmark(ctx);
              this.Dispatcher.BeginInvoke(
                  new Action<BookmarkPage>((y) =>
                  {
                      this.DataContext = ViewData;
                      d.Closed -= closeHandler;
                      d.Close();
                      if (ViewData.Images != null)
                          ViewData.Status = String.Format("Loaded: {0} images.", ViewData.Images.Count); ;
                  }),
                  new object[] { this }
               );
          }
      }, null
     );
     d.ShowDialog();
 }
 private void ChkFollowCertainAmtofValue_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         if (ChkFollowCertainAmtofValue.IsChecked == true)
         {
             objFollowByKeywordManager.ChkboxFollowCertainAmtofValue = true;
         }
         UserControl_FollowByKeyword obj = new UserControl_FollowByKeyword();
         var window = new ModernDialog
         {
             Content = obj
         };
         window.ShowInTaskbar = true;
         window.MinWidth = 500;
         window.MinHeight = 500;
         Button customButton = new Button() { Content = "SAVE" };
         Button customButton1 = new Button() { Content = "CLOSE" };
         customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
         customButton.Click += (ss, ee) => { SaveAllData(ref obj); window.Close(); };
         //customButton.Click += (ss, ee) => { closeEvent(); window.Close(); };
         window.Buttons = new Button[] { customButton, customButton1 };
         window.ShowDialog();              
     }
     catch (Exception ex)
     {
         GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
     }
 }
示例#18
0
        private void ExecuteGetImageCommand(object sender, ExecutedRoutedEventArgs e)
        {
            ViewData = new NijieImageViewModel() { ImageId = ViewData.ImageId };
            ModernDialog d = new ModernDialog();
            d.Content = "Loading data...";
            //d.Closed += new EventHandler((s, ex) => { ViewData.Message = "Still loading..."; });
            System.Threading.ThreadPool.QueueUserWorkItem(
             (x) =>
             {
                 ViewData.GetImage();
                 this.Dispatcher.BeginInvoke(
                          new Action<ImagePage>((y) =>
                          {
                              this.DataContext = ViewData;
                              d.Close();
                              //ViewData.Message = "Image(s) Loaded";
                          }),
                          new object[] { this }
                       );
             }, null
            );

            d.ShowDialog();
        }
        public void SingleUserRepin()
        {
            try
            {
                lblRepinNo.Visibility = Visibility.Hidden;
                txtRepinNo_Repin.Visibility = Visibility.Hidden;
                btnRepinUrlUplaod.Visibility = Visibility.Hidden;
                lblMessage_Repin.Visibility = Visibility.Hidden;
                txtRepinMessage_Repin.Visibility = Visibility.Hidden;
                Brow_Repin_Messge.Visibility = Visibility.Hidden;
                ClGlobul.RepinMessagesList.Clear();
                ClGlobul.lstRepinUrl.Clear();

                if (rbo_RepinUserRepin.IsChecked == true)
                {
                    try
                    {
                        MessageRepin();
                    }
                    catch (Exception ex)
                    {
                        GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
                    }                    
                }
                if (rdo_UsePinNo.IsChecked  == true)
                {
                     try
                    {
                       
                        UserControl_SingleUser obj = new UserControl_SingleUser();
                        obj.UserControlHeader.Text = "Enter Pin Here ";
                        //obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::Keyword 1 ,Keyword 2";
                        var window = new ModernDialog
                        {

                            Content = obj
                        };
                        window.ShowInTaskbar = true;
                        window.MinWidth = 100;
                        window.MinHeight = 300;
                        Button customButton = new Button() { Content = "SAVE" };
                        customButton.Click += (ss, ee) => { closeEvent(); window.Close(); };
                        window.Buttons = new Button[] { customButton };

                        window.ShowDialog();

                        MessageBoxButton btnC = MessageBoxButton.YesNo;
                        var result = ModernDialog.ShowMessage("Are you sure want to save ?", "Message Box", btnC);

                        if (result == MessageBoxResult.Yes)
                        {
                            TextRange textRange = new TextRange(obj.txtEnterSingleMessages.Document.ContentStart, obj.txtEnterSingleMessages.Document.ContentEnd);

                            if (!string.IsNullOrEmpty(textRange.Text))
                            {
                                string enterText = textRange.Text;
                                string[] arr = Regex.Split(enterText, "\r\n");

                                foreach (var arr_item in arr)
                                {
                                    if (!string.IsNullOrEmpty(arr_item) || !arr_item.Contains(""))
                                    {
                                        ClGlobul.lstRepinUrl.Add(arr_item);
                                    }

                                }
                            }
                            GlobusLogHelper.log.Info(" => [ Pin Loaded : " + ClGlobul.lstRepinUrl.Count + " ]");
                            GlobusLogHelper.log.Debug("Pin : " + ClGlobul.lstRepinUrl.Count);
                        }
                        MessageRepin();
                    }
                    catch (Exception ex)
                    {
                        GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
                    }    
                }
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
        public void SingleUserAddPinWithNewBoard()
        {
            try
            {
                btnUploadPinFile_AddPinWithnewBoard.Visibility = Visibility.Hidden;
                txtaddPinwithNewBoard.Visibility = Visibility.Hidden;
                lblPinFile_AddPinWithnewBoard.Visibility = Visibility.Hidden;
                lblHint_AddPinWithnewBoard.Visibility = Visibility.Hidden;
                lstBoardDesc.Clear();

                UserControl_SingleUser obj = new UserControl_SingleUser();
                obj.UserControlHeader.Text = "Enter User Here ";
                obj.txtEnterSingleMessages.ToolTip = "Format :- BoardName,Description,ImageUrl,Niche";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                customButton.Click += (ss, ee) => { closeEvent(); window.Close(); };
                window.Buttons = new Button[] { customButton };

                window.ShowDialog();

                MessageBoxButton btnC = MessageBoxButton.YesNo;
                var result = ModernDialog.ShowMessage("Are you sure want to save ?", "Message Box", btnC);

                if (result == MessageBoxResult.Yes)
                {
                    TextRange textRange = new TextRange(obj.txtEnterSingleMessages.Document.ContentStart, obj.txtEnterSingleMessages.Document.ContentEnd);

                    if (!string.IsNullOrEmpty(textRange.Text))
                    {
                        string enterText = textRange.Text;
                        string[] arr = Regex.Split(enterText, "\r\n");

                        foreach (var arr_item in arr)
                        {
                            if (!string.IsNullOrEmpty(arr_item) || !arr_item.Contains(""))
                            {
                                lstBoardDesc.Add(arr_item);
                            }

                        }
                      
                    }
                    GlobusLogHelper.log.Info(" => [ User Loaded : " + lstBoardDesc.Count + " ]");
                    GlobusLogHelper.log.Debug("User : "******" Error :" + ex.StackTrace);
            }
        }
 private void rdo_UnlikeBy_Username_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         txt_block_Selected_likeoption.Text = "Photo Unlike By Username Report";
         Number_of_ID_Username_loaded.Content = "No. of Username Loaded :";
         ObjPhotoManager_new.Isulike_username = true;
         UserControlUnlikePhotoByUsername obj_UserControlUnlikePhotoByUsername = new UserControlUnlikePhotoByUsername();
         var window = new ModernDialog
         {
             Content = obj_UserControlUnlikePhotoByUsername
         };
         window.MinHeight = 300;
         window.MinWidth = 700;
         //  window.Topmost = true;
         Button customButton = new Button() { Content = "SAVE" };
         Button customButton1 = new Button() { Content = "Close" };
         customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
         customButton.Click += (ss, ee) => { SaveAllData1(ref obj_UserControlUnlikePhotoByUsername); window.Close(); };
         window.Buttons = new Button[] { customButton, customButton1 };
         window.ShowDialog();
         string s1 = string.Empty;
         
     }
     catch(Exception ex)
     {
         GlobusLogHelper.log.Error("Error:" + ex.StackTrace);
     }
 }
        private void chkBox_ScrapeUser_Loasuser_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                GlobalDeclration.objMentionUser.IsRandomNoUserMention = false;
                GlobalDeclration.objMentionUser.IsNoOfUserToMention = false;
                GlobalDeclration.objMentionUser.IsLoadUser = true;
                chkBox_ScrapeUser_LoadMessage.IsEnabled = false;
                lblNoUserToBeMention.IsEnabled = false;
                lblRangeToRandomMention.IsEnabled = false;
                txt_ScrapeUser_NoOfUserToBeMention.IsEnabled = true;
                txt_ScrapeUser_RangeToRandomMention.IsEnabled = false;
                try
                {
                    var dialog = new ModernDialog
                    {
                        Content = new UserControlLoadUserMentionuser()
                    };
                    dialog.MinHeight = 200;
                    dialog.MinWidth = 750;

                    var customButton = new Button() { Content = "Close" };
                    customButton.Click += (ee, vv) => { dialog.Close(); };
                    dialog.Buttons = new Button[] { customButton };
                    dialog.ShowDialog();

                }
                catch (Exception ex)
                {

                }
                
            }
            catch(Exception ex)
            {
                GlobusLogHelper.log.Error("Error :" + ex.StackTrace);
            }
        }
        public void LoadComment_message()
        {
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Message Here ";
                //obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (ss, ee) => { SaveAllMessageData(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };
                window.ShowDialog();
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
 private void chkUploadUnFollowList_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         UnFollowManager.chkUploadUnFollowList = true;
         UserControl_UnFollow_UploadUnFollowList objUserControl_UnFollow_UploadUnFollowList = new UserControl_UnFollow_UploadUnFollowList();
             var modernDialog = new ModernDialog()
             {
                 Content = objUserControl_UnFollow_UploadUnFollowList
             };
             modernDialog.MinWidth = 600;
             modernDialog.MinHeight = 200;
             Button customButton = new Button() { Content = "SAVE" };
             customButton.Click += (ss, ee) => { closeEvent(); modernDialog.Close(); };
             modernDialog.Buttons = new Button[] { customButton };
             modernDialog.ShowDialog();
             string s1 = string.Empty;
             try
             {
                 if (string.IsNullOrEmpty(objUserControl_UnFollow_UploadUnFollowList.txtUnFollowList_UnFollow.Text))
                 {
                     GlobusLogHelper.log.Info("Please Upload UnFollow list");
                     ModernDialog.ShowMessage("Please Upload UnFollow list", "Upload UnFollow list", MessageBoxButton.OK);
                     return;
                 }
                 else if (!string.IsNullOrEmpty(objUserControl_UnFollow_UploadUnFollowList.txtUnFollowList_UnFollow.Text))
                 {
                     ModernDialog.ShowMessage("Notice", "Data Successfully Save", MessageBoxButton.OK);
                     GlobusLogHelper.log.Info("=> [ Your Data Successfully Save ]");
                 }
             }
             catch (Exception ex)
             {
                 GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
             }
     }
     catch(Exception ex)
     {
         GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
     }
 }
示例#25
0
        private void ExecuteGetMemberCommand(object sender, ExecutedRoutedEventArgs e)
        {
            //ViewData = new NijieMemberViewModel() { MemberId = ViewData.MemberId };
            ModernDialog d = new ModernDialog();
            d.Content = "Loading data...";
            d.Closed += new EventHandler((s, ex) => {
                if(!ViewData.HasError)
                    ViewData.Status = "Still loading...";
            });

            var ctx = SynchronizationContext.Current;
            System.Threading.ThreadPool.QueueUserWorkItem(
             (x) =>
             {
                 ViewData.GetMember(ctx);
                 this.Dispatcher.BeginInvoke(
                     new Action<MemberPage>((y) =>
                     {
                         this.DataContext = ViewData;
                         d.Close();
                         if (ViewData.Images != null)
                         {
                             ViewData.Status = String.Format("Loaded: {0} images.", ViewData.Images.Count);
                             ViewData.HasError = false;
                         }
                         else if (!ViewData.HasError)
                         {
                             // unknown error
                             ViewData.Status = "Failed to parse images.";
                             ViewData.HasError = true;
                         }
                     }),
                     new object[] { this }
                  );
             }, null
            );
            d.ShowDialog();
        }
        private void rdoBtn_MentionUsers_UseScrapedToMention_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                rdoBtn_MentionUsers_InsertUrlToMention.IsChecked = false;
                rdoBtn_MentionUsers_UseScrapedToMention.IsChecked = true;
                rdoBtn_MentionUsers_UploadUrlsToMention.IsChecked = false;
                GlobalDeclration.objMentionUser.IsInsertUrlToMention = false;
                GlobalDeclration.objMentionUser.IsUseScrapedurlToMention = true;
                GlobalDeclration.objMentionUser.IsUploadUrlToMention = false;

                var dialog = new ModernDialog
                {
                    Content = new UserControlMentionUsersUseScrapedUrl()
                };
                dialog.MinHeight = 200;
                dialog.MinWidth = 650;

                var customButton = new Button() { Content = "Close" };
                customButton.Click += (ee, vv) => { dialog.Close(); };
                dialog.Buttons = new Button[] { customButton };
                dialog.ShowDialog();
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error("Error ==> " + ex.StackTrace);
            }
        }
        private void chkBox_Scraper_ScrapeUserFollowing_SingleUsername_Checked(object sender, RoutedEventArgs e)
        {
            GlobalDeclration.objScrapeUser.listOfFollowing.Clear();
            try
            {
                btn_ScrapeUserFollowing_Browse.Visibility = Visibility.Hidden;
                lblLoadUsername.Visibility = Visibility.Hidden;
                Txt_ScrapeFollowing.Visibility = Visibility.Hidden;

            }
            catch(Exception ex)
            {
                
            }
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Username Here ";
                // obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                var window = new ModernDialog
                {

                    Content = obj
                };
                window.ShowInTaskbar = true;
                window.MinWidth = 100;
                window.MinHeight = 300;
                Button customButton = new Button() { Content = "SAVE" };
                Button customButton1 = new Button() { Content = "Close" };
                customButton1.Click += (ss, ee) => { closeEvent(); window.Close(); };
                customButton.Click += (ss, ee) => { SaveAllData(ref obj); window.Close(); };
                window.Buttons = new Button[] { customButton, customButton1 };

                window.ShowDialog();


            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
        public void ShowDilogUploadUrls()
        {
            var dialog = new ModernDialog
            {
                Content = new UserControlMentionUsersUploadUrls()
            };
            dialog.MinHeight = 200;
            dialog.MinWidth = 650;

            var customButton = new Button() { Content = "Close" };
            customButton.Click += (ee, vv) => { dialog.Close(); };
            dialog.Buttons = new Button[] { customButton };
            dialog.ShowDialog();
        }
        public void rdbSingleUserComment()
        {
            try
            {
                objCommentManagers.rdbSingleUserComment = true;
                objCommentManagers.rdbMultipleUserComment = false;
                btnMessage_Comment_Browse.Visibility = Visibility.Hidden;
                txtCommentMessage.Visibility = Visibility.Hidden;
                lbMsg_Comment.Visibility = Visibility.Hidden;
                ClGlobul.CommentMessagesList.Clear();
                try
                {
                    UserControl_SingleUser obj = new UserControl_SingleUser();
                    obj.UserControlHeader.Text = "Enter Message Here ";
                   // obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::BoardName::BoardUrl";
                    var window = new ModernDialog
                    {

                        Content = obj
                    };
                    window.ShowInTaskbar = true;
                    window.MinWidth = 100;
                    window.MinHeight = 300;
                    Button customButton = new Button() { Content = "SAVE" };
                    customButton.Click += (ss, ee) => { closeEvent(); window.Close(); };
                    window.Buttons = new Button[] { customButton };

                    window.ShowDialog();

                    MessageBoxButton btnC = MessageBoxButton.YesNo;
                    var result = ModernDialog.ShowMessage("Are you sure want to save ?", "Message Box", btnC);

                    if (result == MessageBoxResult.Yes)
                    {
                        TextRange textRange = new TextRange(obj.txtEnterSingleMessages.Document.ContentStart, obj.txtEnterSingleMessages.Document.ContentEnd);

                        if (!string.IsNullOrEmpty(textRange.Text))
                        {
                            string enterText = textRange.Text;
                            string[] arr = Regex.Split(enterText, "\r\n");

                            foreach (var arr_item in arr)
                            {
                                if (!string.IsNullOrEmpty(arr_item) || !arr_item.Contains(""))
                                {
                                     ClGlobul.CommentMessagesList.Add(arr_item);
                                }
                            }
                        }
                        GlobusLogHelper.log.Info(" => [ Message Loaded : " + ClGlobul.CommentMessagesList.Count + " ]");
                        GlobusLogHelper.log.Debug("Message : " + ClGlobul.CommentMessagesList.Count);
                    }
                }
                catch (Exception ex)
                {
                    GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
                }                                         
            }
            catch (Exception ex)
            {
                GlobusLogHelper.log.Error(" Error :" + ex.StackTrace);
            }
        }
        private void chkBox_ScrapeUser_LoadMessage_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                var dialog = new ModernDialog
                {
                    Content = new UserControlMentionUserLoadMessage()
                };
                dialog.MinHeight = 200;
                dialog.MinWidth = 750;

                var customButton = new Button() { Content = "Close" };
                customButton.Click += (ee, vv) => { dialog.Close(); };
                dialog.Buttons = new Button[] { customButton };
                dialog.ShowDialog();

            }
            catch(Exception ex)
            {

            }
        }