当前位置: 首页>>代码示例>>C#>>正文


C# ModernDialog.ShowDialog方法代码示例

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


在下文中一共展示了ModernDialog.ShowDialog方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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

示例3: 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

示例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: 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

示例6: 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

示例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_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

示例10: 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

示例11: 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

示例12: 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

示例13: 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

示例14: 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

示例15: 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


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