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


C# Controls.ModernDialog类代码示例

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


ModernDialog类属于FirstFloor.ModernUI.Windows.Controls命名空间,在下文中一共展示了ModernDialog类的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: 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


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