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); } }
private void updateLoginStatus(bool result, string message) { lblLoginStatus.Text = message; if (result) { Properties.Settings.Default.Username = txtUserName.Text; using (var secureString = txtPassword.Password.ToSecureString()) { Properties.Settings.Default.Password = secureString.EncryptString(); } MainWindow.SaveAllSettings(); dialog.Close(); var uri = new Uri("/Main/" + Properties.Settings.Default.StartPage + "Page.xaml", UriKind.RelativeOrAbsolute); var frame = NavigationHelper.FindFrame(null, this); if (frame != null) { frame.Source = uri; } } dialog.Close(); }
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 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 ExecuteSearchCommand(object sender, ExecutedRoutedEventArgs e) { // note: different way to refresh the binding. ModernDialog d = new ModernDialog(); d.Content = "Loading data..."; d.Closed += new EventHandler((s, ex) => { ViewData.Status = "Still loading..."; }); var ctx = SynchronizationContext.Current; System.Threading.ThreadPool.QueueUserWorkItem( (x) => { ViewData.DoSearch(ctx); this.Dispatcher.BeginInvoke( new Action <SearchPage>((y) => { //this.DataContext = null; this.DataContext = ViewData; d.Close(); if (ViewData.Images != null) { ViewData.Status = String.Format("Loaded: {0} images.", ViewData.Images.Count); } else { ViewData.Status = String.Format("No Image Found!"); } }), new object[] { this } ); }, null ); d.ShowDialog(); }
public static T WithLongActionWarning <T>(Window owner, string title, string text, Func <T> action) { var dlg = new ModernDialog { Title = title, Content = new BBCodeBlock { BBCode = text, Margin = new Thickness(0, 0, 0, 8) }, MinHeight = 0, MinWidth = 0, MaxHeight = 480, MaxWidth = 640, }; if (owner != null) { dlg.Owner = owner; } dlg.Buttons = new Button[0]; T[] result = new T[1]; dlg.ContentRendered += (sender, args) => { result[0] = action.Invoke(); dlg.Close(); }; dlg.ShowDialog(); return(result[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 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(); }
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); } }
public void SingleUserLike() { try { objLikeManagers.rdbSingleUserLike = true; objLikeManagers.rdbMultipleUserLike = false; btnPinUrls_Like_Browse.Visibility = Visibility.Hidden; lblPinNo_Like.Visibility = Visibility.Hidden; txtLikePinUrl.Visibility = Visibility.Hidden; ClGlobul.lstAddToBoardUserNames.Clear(); UserControl_SingleUser obj = new UserControl_SingleUser(); obj.UserControlHeader.Text = "Enter Pins 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.lstAddToBoardUserNames.Add(arr_item); } } } GlobusLogHelper.log.Info(" => [ Pins Loaded : " + ClGlobul.lstAddToBoardUserNames.Count + " ]"); GlobusLogHelper.log.Debug("Pins : " + ClGlobul.lstAddToBoardUserNames.Count); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
private void chkDivideData_FollowByUsername_Checked(object sender, RoutedEventArgs e) { try { FollowByUsernameManager.chkDivideDataFollowByUsername = true; UserControl_FollowByUsername_DivideData obj_UserControl_FollowByUsername_DivideData = new UserControl_FollowByUsername_DivideData(); var modernDialog = new ModernDialog() { Content = obj_UserControl_FollowByUsername_DivideData }; modernDialog.MinWidth = 600; modernDialog.MinHeight = 200; //modernDialog.Topmost = true; 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 (FollowByUsernameManager.rdbDivideEquallyFollowByUsername == true || FollowByUsernameManager.rdbDivideGivenByUserFollowByUsername == true) { if (FollowByUsernameManager.rdbDivideGivenByUserFollowByUsername == true) { if (!string.IsNullOrEmpty(obj_UserControl_FollowByUsername_DivideData.txtCountGivenByUser_FollowByUsername.Text)) { FollowByUsernameManager.CountGivenByUserFollowByUsename = Convert.ToInt32(obj_UserControl_FollowByUsername_DivideData.txtCountGivenByUser_FollowByUsername.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); } }
public void SingleUSerFollowUserUpload() { try { ClGlobul.ListOfFollowUsersFollowers.Clear(); ClGlobul.lstFollowUsername.Clear(); UserControl_SingleUser obj = new UserControl_SingleUser(); obj.UserControlHeader.Text = "Enter UserName 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.ListOfFollowUsersFollowers.Add(arr_item); } } } GlobusLogHelper.log.Info(" => [ UserName Loaded : " + ClGlobul.ListOfFollowUsersFollowers.Count + " ]"); GlobusLogHelper.log.Debug("UserName : "******" Error :" + ex.StackTrace); } }
//保存单体模型更改 protected virtual void SaveModel() { ModelFromControlDataSource();//解析页面返回的内容,为数据模型赋值 //处理操作用户和时间 string res = Service.SaveModel(JsonUtility.SerializeObject(this.OperationObject)); dynamic result = new { message = string.Empty, operaResult = false }; JsonUtility.DeserializeAnonymousType <dynamic>(res, result); if (result.operaResult) { this.ResultMessage = new CustomerMessageData(EnDic_MessageType.浮出, "成功提示", "您已成功保存了数据!", null); editdialog.Close(); this.Query(); } else { Window win = Activator.LoginCache == null ? null : Activator.LoginCache.GetCurrentMainWindow(); string message = result.message; this.ResultMessage = new CustomerMessageData(EnDic_MessageType.对话框, "错误提示", string.Format("提示:{0}", message), win); } }
public bool?CsDesigner(string content, string title = "generating...") { var dlg = new ModernDialog() { Content = content, Title = title }; var rc = new RelayCommand((x) => { dlg.DialogResult = true; dlg.Close(); }); dlg.Buttons = new[] { dlg.CancelButton, new Button() { Content = "okay", Command = rc, IsDefault = true } }; return(dlg.ShowDialog()); }
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); } }
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); } }
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(); }
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 chkBox_ScrapeUser_WhereToMentionUsers_Checked(object sender, RoutedEventArgs e) { try { var dialog = new ModernDialog { Content = new UserControlScrapeUserWhereToMention() }; dialog.MinWidth = 700; dialog.MinHeight = 300; var customButton = new Button() { Content = "Save" }; customButton.Click += (ee, vv) => { dialog.Close(); }; dialog.Buttons = new Button[] { customButton }; dialog.ShowDialog(); } catch (Exception ex) { } }
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) { } }
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); } }
public virtual void Close() { Dialog.Close(); }
public SerialsPage() { InitializeComponent(); NameScope.SetNameScope(dgcm, NameScope.GetNameScope(this)); VM = MainViewModel.Default.SerialsViewModel; VM.ConfirmationShow = (s1, s2) => { var dialog = new ModernDialog { Title = s1, Content = s2 }; MessageBoxResult result = MessageBoxResult.Cancel; var yesButton = new Button() { Content = "Да", Margin = new Thickness(2, 0, 2, 0) }; yesButton.Click += (o, ea) => { result = MessageBoxResult.Yes; dialog.Close(); }; var noButton = new Button() { Content = "Нет", Margin = new Thickness(2, 0, 2, 0), FontWeight = FontWeights.Bold, IsDefault = true }; noButton.Click += (o, ea) => { result = MessageBoxResult.No; dialog.Close(); }; dialog.Buttons = new Button[] { yesButton, noButton }; dialog.ShowDialog(); if (result == MessageBoxResult.Yes) { return(true); } else { return(false); } }; VM.TextSearchStarted = () => { tbFilter.Focus(); Keyboard.Focus(tbFilter); }; dg.Focus(); Dispatcher.BeginInvoke( System.Windows.Threading.DispatcherPriority.ContextIdle, new Action(() => Keyboard.Focus(dg))); dg.SyncSortWithView(); VM.Refreshed = () => dg.ScrollToCurrentItem(); DataContext = VM; }
private void ModernWindow_Closing(object sender, System.ComponentModel.CancelEventArgs e) { if (VM.NeedSave) { StringBuilder sb = new StringBuilder(); sb.AppendLine("Сохранить изменения перед выходом?").Append("Требуется сохранить: "); if (VM.MoviesViewModel.NeedSave) { sb.Append("[b]Фильмы[/b], "); } if (VM.SerialsViewModel.NeedSave) { sb.Append("[b]Сериалы[/b], "); } if (VM.GamesViewModel.NeedSave) { sb.Append("[b]Игры[/b], "); } if (VM.BooksViewModel.NeedSave) { sb.Append("[b]Книги[/b], "); } sb.Length = sb.Length - 2; var dialog = new ModernDialog() { Title = "Выход", Content = new BBCodeBlock() { BBCode = sb.ToString() } }; MessageBoxResult result = MessageBoxResult.None; var saveAndExitButton = new Button() { Content = "Сохранить и выйти", Margin = new Thickness(2, 0, 2, 0), FontWeight = FontWeights.Bold, IsDefault = true }; saveAndExitButton.Click += (o, ea) => { result = MessageBoxResult.Yes; dialog.Close(); }; var dontSaveAndExitButton = new Button() { Content = "Не сохранять и выйти", Margin = new Thickness(2, 0, 2, 0) }; dontSaveAndExitButton.Click += (o, ea) => { result = MessageBoxResult.No; dialog.Close(); }; var cancelExitButton = new Button() { Content = "Отмена", Margin = new Thickness(2, 0, 2, 0), IsCancel = true }; cancelExitButton.Click += (o, ea) => { result = MessageBoxResult.Cancel; dialog.Close(); }; dialog.Buttons = new Button[] { saveAndExitButton, dontSaveAndExitButton, cancelExitButton }; dialog.ShowDialog(); if (result == MessageBoxResult.Cancel) { e.Cancel = true; return; } else if (result == MessageBoxResult.Yes) { VM.SaveUnsaved(); } } VM.SaveSettings(); }
public void rdbSingleUserBoards() { try { objBoardsManager.rdbSingleUserBoards = true; objBoardsManager.rdbMultipleUserBoards = false; btnBoardUrl_Boards_Browse.Visibility = Visibility.Hidden; //btnBoardName_Board_Browse.Visibility = Visibility.Hidden; btnMessage_Board_Browse.Visibility = Visibility.Hidden; txtBoardUrl.Visibility = Visibility.Hidden; //txtBoardName.IsReadOnly = false; txtMessage.Visibility = Visibility.Hidden; lblBoardUrlToRepinFrom_Boards.Visibility = Visibility.Hidden; lblMessage_Boards.Visibility = Visibility.Hidden; lblHints_Boards.Visibility = Visibility.Hidden; ClGlobul.CommentNicheMessageList.Clear(); ClGlobul.lstListOfBoardNames.Clear(); ClGlobul.lstBoardRepinMessage.Clear(); #region BoardUrl try { UserControl_SingleUser obj = new UserControl_SingleUser(); obj.UserControlHeader.Text = "Enter BoardName and BoardUrl 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.lstListOfBoardNames.Add(arr_item); } } } GlobusLogHelper.log.Info(" => [ BoardName and BoardUrl with Niche Loaded : " + ClGlobul.lstListOfBoardNames.Count + " ]"); GlobusLogHelper.log.Debug("BoardName and BoardUrl with Niche : " + ClGlobul.lstListOfBoardNames.Count); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } #endregion SingleUserMessage(); } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
public void CloseDialog() { m_closeRequested = true; Dialog.Close(); }
public void rdbSingleUser_EditPinDesc() { try { objEditPinDiscriptionManager.rdbSingleUserEditPinDisc = true; objEditPinDiscriptionManager.rdbMultipleUserEditPinDisc = false; btu_Browse_PinDescription.Visibility = Visibility.Hidden; lblDescription.Visibility = Visibility.Hidden; txtPinDescription.Visibility = Visibility.Hidden; lblHints_EditDesc.Visibility = Visibility.Hidden; try { ClGlobul.CommentNicheMessageList.Clear(); UserControl_SingleUser obj = new UserControl_SingleUser(); obj.UserControlHeader.Text = "Enter Description With Niche Here "; obj.txtEnterSingleMessages.ToolTip = "Format :- Niche::Description"; 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.CommentNicheMessageList.Add(arr_item); } } } GlobusLogHelper.log.Info(" => [ Description Loaded : " + ClGlobul.CommentNicheMessageList.Count + " ]"); GlobusLogHelper.log.Debug("Description : " + ClGlobul.CommentNicheMessageList.Count); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }
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); } }
private void SingleUserAddUserToBoard() { try { objAddUsersToBoardManager.rdbSingleUserAddUserToBoard = true; objAddUsersToBoardManager.rdbMultipleUserAddUserToBoard = false; btnUserNames_AddUsersToBoard_Browse.Visibility = Visibility.Hidden; txtEmailOrUserNames.Visibility = Visibility.Hidden; lblEmailOrUsername.Visibility = Visibility.Hidden; ClGlobul.lstAddToBoardUserNames.Clear(); #region Email or Username try { UserControl_SingleUser obj = new UserControl_SingleUser(); obj.UserControlHeader.Text = "Enter Email or UserName Here "; //obj.txtEnterSingleMessages.ToolTip = "Format :- Niche:Board Name 1 , Board Name 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.lstAddToBoardUserNames.Add(arr_item); } } } else { GlobusLogHelper.log.Info("Please Upload Email or Username"); ModernDialog.ShowMessage("Please Upload Email or Username", "Upload Email or Username", MessageBoxButton.OK); return; } GlobusLogHelper.log.Info("Email or UserName Loaded : " + ClGlobul.lstAddToBoardUserNames.Count); GlobusLogHelper.log.Debug("Email or UserName Loaded : " + ClGlobul.lstAddToBoardUserNames.Count); } } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } #endregion } catch (Exception ex) { GlobusLogHelper.log.Error(" Error :" + ex.StackTrace); } }