• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Controls.ModernDialog类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中FirstFloor.ModernUI.Windows.Controls.ModernDialog的典型用法代码示例。如果您正苦于以下问题:C# ModernDialog类的具体用法?C# ModernDialog怎么用?C# ModernDialog使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ModernDialog类属于FirstFloor.ModernUI.Windows.Controls命名空间,在下文中一共展示了ModernDialog类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: chk_SalesNavigator_PremiumOption_Checked

 private void chk_SalesNavigator_PremiumOption_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         if (chk_SalesNavigator_PremiumOption.IsChecked==true)
         {
             GlobalsScraper.chkPremiumOptionsSalesNav = true;
             var window = new ModernDialog
                     {
                         Content = new UserControl_SalesNaviagtor_PremiumOption()
                     };
             window.MinWidth = 550;
             window.MinHeight = 350;
             // window.Title = "Upload Follow Details";               
             window.ShowDialog(); 
         }
         else
         {
             GlobalsScraper.chkPremiumOptionsSalesNav = false;
         }
     }
     catch (Exception ex)
     {
         //  GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
     } 
 }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:26,代码来源:UserControlsSalsesNavigator.xaml.cs


示例2: Delete_OnClick

        private async void Delete_OnClick(object sender, RoutedEventArgs e)
        {           
            if (_STOCKS.SelectedItem == null) return;

            try
            {
                var card = ((OilDeliveryCard)_STOCKS.SelectedItem);

                var dialog = new ModernDialog
                {
                    Title = "eStation",
                    Content = "Ete vous sure de supprimer cette livraison de " + card.Supplier + " ?"
                };

                if (dialog.ShowDialogOkCancel() != MessageBoxResult.OK)
                    return;
                if (await App.Store.Oils.DeleteDelivery(card.OilDeliveryGuid))
                    ModernDialog.ShowMessage("Supprimer avec Success !", "eStation", MessageBoxButton.OK);
                else
                    ModernDialog.ShowMessage("Erreur Inconnue !", "eStation", MessageBoxButton.OK);
            }
            catch (Exception ex)
            {
                DebugHelper.WriteException(ex);
                ModernDialog.ShowMessage(ex.Message, "ERREUR", MessageBoxButton.OK);
            }
            await Refresh(_currentOils);
            e.Handled = true;
        }
开发者ID:HalidCisse,项目名称:eStation,代码行数:29,代码来源:OilDelivery.xaml.cs


示例3: DeleteCompany_OnClick

        private async void DeleteCompany_OnClick(object sender, RoutedEventArgs e)
        {
            if (_COMPANIES.SelectedItem == null) return;

            try
            {
                var card = ((CompanyCard)_COMPANIES.SelectedItem);

                var dialog = new ModernDialog
                {
                    Title = "eStation",
                    Content = "Ete vous sure de supprimer " + card.Name + " ?"
                };

                if (dialog.ShowDialogOkCancel() != MessageBoxResult.OK)
                    return;
                if (await App.Store.Sales.Delete(card.CompanyGuid))
                    ModernDialog.ShowMessage("Supprimer avec Success !", "eStation", MessageBoxButton.OK);
                else
                    ModernDialog.ShowMessage("Erreur Inconnue !", "eStation", MessageBoxButton.OK);
            }
            catch (Exception ex)
            {
                DebugHelper.WriteException(ex);
                ModernDialog.ShowMessage(ex.Message, "ERREUR", MessageBoxButton.OK);
            }
            await Refresh();
            e.Handled = true;
        }
开发者ID:HalidCisse,项目名称:eStation,代码行数:29,代码来源:Companies.xaml.cs


示例4: chkSearchByUrl_Checked

 private void chkSearchByUrl_Checked(object sender, RoutedEventArgs e)
 {
     try
     {
         if (LDGlobals.listAccounts.Count>0)
         {
             var window = new ModernDialog
                     {
                         Content = new UserControlLISSearchByUrl()
                     };
             window.MinWidth = 550;
             window.MinHeight = 350;
             // window.Title = "Upload Follow Details";               
             window.ShowDialog();
         }
         else
         {
             MessageBox.Show("Please upload the Accounts.");
         }
     }
     catch (Exception ex)
     {
         //  GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
     } 
 }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:25,代码来源:UserControlsLinkedinScraper.xaml.cs


示例5: Application_Startup

        private void Application_Startup(object sender, StartupEventArgs e)
        {
            if (!IsRunAsAdministrator())
            {
                var processInfo = new ProcessStartInfo(Assembly.GetExecutingAssembly().CodeBase)
                {
                    UseShellExecute = true,
                    Verb = "runas"
                };

                try
                {
                    Process.Start(processInfo);
                }
                catch
                {
                    var messageBox = new ModernDialog
                    {
                        Title = "Woops",
                        Content = new ErrorDialog(new InvalidOperationException("Chocolatey Explorer must be run as an administrator."))
                    };

                    messageBox.ShowDialog();
                }

                this.Shutdown();
            }
        }
开发者ID:mmdurrant,项目名称:ChocolateyExplorer,代码行数:28,代码来源:App.xaml.cs


示例6: rdo_UsingPhotoId_ScrapeCommentmessage_Checked

 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);
     }
 }
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:25,代码来源:UserControlScrapeCommentmessage.xaml.cs


示例7: CommonDialog_Click

        private void CommonDialog_Click(object sender, RoutedEventArgs e)
        {
            var dlg = new ModernDialog {
                Title = "Common dialog",
                Content = new LoremIpsum()
            };
            dlg.Buttons = new Button[] { dlg.OkButton, dlg.CancelButton};
            dlg.ShowDialog();

            this.dialogResult.Text = dlg.DialogResult.HasValue ? dlg.DialogResult.ToString() : "<null>";
            this.dialogMessageBoxResult.Text = dlg.MessageBoxResult.ToString();
        }
开发者ID:3A9C,项目名称:ITstep,代码行数:12,代码来源:ControlsModernDialog.xaml.cs


示例8: App_DispatcherUnhandledException

        void App_DispatcherUnhandledException(object sender, System.Windows.Threading.DispatcherUnhandledExceptionEventArgs e)
        {
            var messageBox = new ModernDialog
                             {
                                 Title = "Woops",
                                 Content = new ErrorDialog(e.Exception)
                             };

            messageBox.ShowDialog();

            e.Handled = true;
        }
开发者ID:mmdurrant,项目名称:ChocolateyExplorer,代码行数:12,代码来源:App.xaml.cs


示例9: rdoBtn_HashTagsComment_SingleUser_Checked

        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);
            }
        }
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:53,代码来源:UserControlHashTagsComment.xaml.cs


示例10: chk_GroupStatusUpdate_GetGroups_Checked

        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);
            }



        }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:53,代码来源:UserControlsGroupStatusUpdate.xaml.cs


示例11: rdo_Hashlikecomment_single_Checked

        private void rdo_Hashlikecomment_single_Checked(object sender, RoutedEventArgs e)
        {
            try
            {
                ClGlobul.HashCommentwithlike.Clear();
                ClGlobul.HashCommentMessagewithlike.Clear();
            }
            catch { }
            try
            {
                btu_Browse_hashkey.Visibility = Visibility.Hidden;
                btu_Browse_Message.Visibility = Visibility.Hidden;
                txt_Message_loades.Visibility = Visibility.Hidden;
                txt_hashkey_loades.Visibility = Visibility.Hidden;
                Enter_HashKey.Visibility = Visibility.Hidden;
                Enter_Message.Visibility = Visibility.Hidden;
            }
            catch { };
            try
            {
                txt_Message_loades.IsReadOnly = false;
                txt_hashkey_loades.IsReadOnly = false;

            }
            catch { };
            try
            {
                UsercontrolSingleUser obj = new UsercontrolSingleUser();
                obj.UserControlHeader.Text = "Enter Hash Key Here ";               
                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);
            }
        }
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:52,代码来源:UserControlHashlikewithComment.xaml.cs


示例12: rdoBtn_LikeBy_Username_SingleUser_Checked

        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);
            }

        }
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:49,代码来源:UserControlLikePhotoByUserName.xaml.cs


示例13: rdoBtn_commentMessage_SingleId_Checked

        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);
            }
        }
开发者ID:sumitglobussoft,项目名称:GramDominator-2.0,代码行数:48,代码来源:UserControlScrapeCommentMessagebyPhotoId.xaml.cs


示例14: ShowInputDialog

        /// <summary>Simple input dialog box</summary>
        /// <returns>null if the dialog box was closed with "cancel",
        /// otherwise the user input<returns>
        public static string ShowInputDialog(string initialTitle = "", string initialText = "", string initialInput = null)
        {
            // create the dialog content
            TextBox content = new TextBox()
            {
                VerticalAlignment = VerticalAlignment.Bottom,
                TabIndex = 0
            };
            content.Text = initialInput;
            Label lbl = new Label()
            {
                Content = initialText,
                VerticalAlignment = VerticalAlignment.Top,
                Focusable = false
            };
            Grid g = new Grid()
            {
                Height = 50,
                Focusable = false
            };
            g.Children.Add(content);
            g.Children.Add(lbl);
            // create the ModernUI dialog component with the buttons
            var dlg = new ModernDialog
            {
                Title = initialTitle,
                ShowInTaskbar = false,
                Content = g,
                MinHeight = 0,
                MinWidth = 0,
                MaxHeight = 480,
                MaxWidth = 640,
            };
            FocusManager.SetFocusedElement(g, content);
            content.SelectAll();
            dlg.Buttons = new Button[] { dlg.OkButton, dlg.CancelButton };

            // register the event to retrieve the result of the dialog box
            string result = null;
            dlg.OkButton.Click += (object sender, RoutedEventArgs e) =>
            {
                result = content.Text;
            };

            dlg.ShowDialog();
            return result;
        }
开发者ID:StormyCode,项目名称:TimeLogger,代码行数:50,代码来源:CustomDialog.cs


示例15: ShowOkMessage

        public bool? ShowOkMessage(string message, string title)
        {
            var dlg = new ModernDialog
            {
                Title = title,
                Content = new BBCodeBlock { BBCode = message, Margin = new Thickness(0, 0, 0, 8) },
                MinHeight = 0,
                MinWidth = 0,
                MaxHeight = 480,
                MaxWidth = 640,
            };

            // Localize buttons
            dlg.OkButton.Content = LocalizationService.Localize("Ok");

            dlg.Buttons = new List<Button> { dlg.OkButton };
            return dlg.ShowDialog();
        }
开发者ID:lycilph,项目名称:Projects,代码行数:18,代码来源:DialogService.cs


示例16: CheckBox_Checked_2

 private void CheckBox_Checked_2(object sender, RoutedEventArgs e)
 {
     try
     {
         var window = new ModernDialog
         {
             Content = new UserControlMessageInputForGroups()
         };
         window.MinWidth = 550;
         window.MinHeight = 350;
         // window.Title = "Upload Follow Details";               
         window.ShowDialog();
     }
     catch (Exception ex)
     {
         //  GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
     } 
 }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:18,代码来源:UserControlsMessageGroupMember.xaml.cs


示例17: UserControl_Initialized

        private async void UserControl_Initialized(object sender, EventArgs e)
        {
            this.mpr.IsActive = true;

            try
            {
                this._sent = await Task.Run(() => getSent());
                displayMails();
            }
            catch (Exception ex)
            {
                ModernDialog md = new ModernDialog();
                md.Title = "Error";
                md.Content = ex.Message;
                md.Buttons = new List<Button>() { md.OkButton };
                md.ShowDialog();
            }
            this.mpr.IsActive = false;
        }
开发者ID:granigd,项目名称:Mail-Project,代码行数:19,代码来源:Sent.xaml.cs


示例18: CheckBox_Checked_1

 private void CheckBox_Checked_1(object sender, RoutedEventArgs e)
 {
     try
     {
         GlobalsAddConn.selectedManageConnKeyword = true;
         var window = new ModernDialog
         {
             Content = new UserControlAddConnectionByKeyword()
         };
         window.MinWidth = 550;
         window.MinHeight = 350;
         // window.Title = "Upload Follow Details";               
         window.ShowDialog();
     }
     catch (Exception ex)
     {
         //  GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
     } 
 }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:19,代码来源:UserControlsAddConnection.xaml.cs


示例19: CheckBox_Checked

        private void CheckBox_Checked(object sender, RoutedEventArgs e)
        {

         try
            {
                var window = new ModernDialog
                {
                    Content = new UserControlGetFirstConnectionForMessageSending()
                };
                window.MinWidth = 550;
                window.MinHeight = 350;
                window.Title = "Get The First Connection";               
                window.ShowDialog();
            }
            catch (Exception ex)
            {
              //  GlobusLogHelper.log.Error("Error : " + ex.StackTrace);
            } 
          //  new  UserControlGetFirstConnectionForMessageSending()
        }
开发者ID:sumitglobussoft,项目名称:LinkedDominator-3.0,代码行数:20,代码来源:UserControlsComposeMessage.xaml.cs


示例20: ShowInputMessage

        public static ModernInputDialogMessageBoxResult ShowInputMessage(string text, string title, MessageBoxButton button, Window owner = null)
        {
            var dlg = new ModernDialog
            {
                Title = title,
                Content = CreateContent(text),
                MinHeight = 0,
                MinWidth = 0,
                MaxHeight = 480,
                MaxWidth = 640,
            };
            if (owner != null)
            {
                dlg.Owner = owner;
            }

            dlg.Buttons = GetButtons(dlg, button);
            dlg.ShowDialog();

            return new ModernInputDialogMessageBoxResult() { MessageBoxResult = dlg.MessageBoxResult, Input = textBox.Text};
        }
开发者ID:karczewskip,项目名称:Waiter-Management-2,代码行数:21,代码来源:ModernInputDialog.cs



注:本文中的FirstFloor.ModernUI.Windows.Controls.ModernDialog类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Navigation.NavigationEventArgs类代码示例发布时间:2022-05-24
下一篇:
C# Messages.ServerMessage类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap