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


C# MessageDialog.ShowDialog方法代码示例

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


在下文中一共展示了MessageDialog.ShowDialog方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RegisterAssembly

        /// <summary>
        ///     Registers the assembly into the Global Assembly Cache
        /// </summary>
        /// <param name="m_fileName">The File name</param>
        public static void RegisterAssembly(string m_fileName)
        {
            string result = string.Empty;
            try
            {   // register the assembly
                result = RegisterAssemblyCode(m_fileName);
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }

            MessageDialog msgDialog = new MessageDialog();

            if (result.ToLower().Contains("success"))
            {   // if the success contains into the message then its okay
                msgDialog.MessageText = "Successfully added to the Global Assembly Cache.";
            }
            else
            {   // failureMessageDetails
                msgDialog.MessageText = "Failed to register the assembly.";
            }

            msgDialog. = result;
            msgDialog.ShowDialog();
        }
开发者ID:Nazario-DApote,项目名称:ShellGacUtil,代码行数:30,代码来源:GacManager.cs

示例2: Show

 public static MsgDlgRslt Show(string message, string yesButtonText, string noButtonText, string cancelButtonText, UIElement fromElem, Window fromWin)
 {
     MessageDialog msgDlg = new MessageDialog(message, yesButtonText, noButtonText, cancelButtonText, fromElem, fromWin);
     msgDlg.ShowDialog();
     return msgDlg.dlgResult;
 }
开发者ID:robdobsn,项目名称:RobsPdfEditor,代码行数:6,代码来源:MessageDialog.xaml.cs

示例3: listViewCtxtInfo_Click

        private void listViewCtxtInfo_Click(object sender, RoutedEventArgs e)
        {
            DocCompareRslt selectedRow = listMatchResults.SelectedItem as DocCompareRslt;
            if (selectedRow != null)
            {
                // Doc info
                ScanDocAllInfo scanDocAllInfo = _scanDocHandler.GetScanDocAllInfo(selectedRow.uniqName);

                string infoStr = "ScanDocInfo\n-----------\n" + ScanDocHandler.GetScanDocInfoText(scanDocAllInfo.scanDocInfo);
                infoStr += "\n\nFiledDocInfo\n------------\n" + ScanDocHandler.GetFiledDocInfoText(scanDocAllInfo.filedDocInfo);
                MessageDialog msgDlg = new MessageDialog(infoStr, "OK", "", "", null, this);
                msgDlg.ShowDialog();
            }
        }
开发者ID:robdobsn,项目名称:ScanMonitor,代码行数:14,代码来源:DocTypeView.xaml.cs

示例4: ShowAssemblyInfo

        /// <summary>
        ///     Displays the assembly informations
        /// </summary>
        /// <param name="fileName"></param>
        public static void ShowAssemblyInfo(string m_fileName)
        {
            string message = string.Empty;
            string messageDetails = string.Empty;
            try
            {
                Assembly assmbly = Assembly.LoadFile(m_fileName);

                message = assmbly.FullName;
                StringBuilder sb = new StringBuilder();

                sb.AppendFormat("Codebase : {0}\n", assmbly.CodeBase);
                sb.AppendFormat("EscapedCodeBase : {0}\n", assmbly.EscapedCodeBase);
                sb.AppendFormat("FullName : {0}\n", assmbly.FullName);
                sb.AppendFormat("Location : {0}\n", assmbly.Location);

                messageDetails = sb.ToString();
            }
            catch (Exception ex)
            {
                message = "Failed to read assembly info.";
                messageDetails = ex.Message;
            }

            MessageDialog msgDlg = new MessageDialog();
            msgDlg.MessageText = message;
            msgDlg.MessageDetails = messageDetails;
            msgDlg.QualifiedName = message;
            msgDlg.EnableClipboardCopy = true;
            msgDlg.ShowDialog();
        }
开发者ID:Nazario-DApote,项目名称:ShellGacUtil,代码行数:35,代码来源:GacManager.cs

示例5: UnregisterAssembly

        /// <summary>
        ///     Unregisters an assembly from the GAC
        /// </summary>
        /// <param name="m_fileName"></param>
        public static void UnregisterAssembly(string m_fileName)
        {
            Logger.WriteLog("Inside Unregister()");
            string result = string.Empty;
            try
            {
                result = UnregisterCore(m_fileName);
            }
            catch (Exception ex)
            {
                result = ex.Message;
            }

            MessageDialog msgDialog = new MessageDialog();

            if (result.ToLower().Contains("uninstalled = 1"))
            {
                msgDialog.MessageText = "Successfully removed from the Global Assembly Cache.";
            }
            else
            {
                msgDialog.MessageText = "Failed to unregister the assembly.";
            }

            msgDialog.MessageDetails = result;
            msgDialog.ShowDialog();
        }
开发者ID:Nazario-DApote,项目名称:ShellGacUtil,代码行数:31,代码来源:GacManager.cs

示例6: goToPageButton_MouseDown

 void goToPageButton_MouseDown(object sender, MouseEventArgs e)
 {
     report = (ReportSource as CrystalDecisions.CrystalReports.Engine.ReportClass);
     CodeHelper.UI.MessageDialog<NumericUpDown> mesDialog = new MessageDialog<NumericUpDown>("Переход на страницу", "Перейти на сраницу №:", "");
     mesDialog[0].Minimum = 1;
     switch (mesDialog.ShowDialog())
     {
         case DialogResult.OK:
             ShowNthPage((int)mesDialog[0].Value);
             break;
         default: break;
     }
 }
开发者ID:UGTU,项目名称:UGTUKadrProject,代码行数:13,代码来源:CrystalReportVeiwerRus.cs

示例7: SetZoom

 void SetZoom(object sender, EventArgs e)
 {
     report = (ReportSource as CrystalDecisions.CrystalReports.Engine.ReportClass);
     CodeHelper.UI.MessageDialog<NumericUpDown> mesDialog = new MessageDialog<NumericUpDown>("Масштаб", "Масштаб (25-400%):", "");
     mesDialog[0].Minimum = 25;
     mesDialog[0].Maximum = 400;
     switch (mesDialog.ShowDialog())
     {
         case DialogResult.OK:
             Zoom((int)mesDialog[0].Value);
             break;
         default: break;
     }
 }
开发者ID:UGTU,项目名称:UGTUKadrProject,代码行数:14,代码来源:CrystalReportVeiwerRus.cs

示例8: searchButton_MouseDown

 void searchButton_MouseDown(object sender, MouseEventArgs e)
 {
     report = (ReportSource as CrystalDecisions.CrystalReports.Engine.ReportClass);
     CodeHelper.UI.MessageDialog<TextBox> mesDialog = new MessageDialog<TextBox>("Поиск", "Слово или фраза в документе:", "");
     switch (mesDialog.ShowDialog())
     {
         case DialogResult.OK:
             while (SearchForText(mesDialog[0].Text))
                 mesDialog.ShowDialog();
             MessageBox.Show("Поиск в документе окончен", "Результаты поиска");
             break;
         default: break;
     }
 }
开发者ID:UGTU,项目名称:UGTUKadrProject,代码行数:14,代码来源:CrystalReportVeiwerRus.cs


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