global.cs

来自「通过手机蓝牙控制个人电脑上的幻灯片的播放」· CS 代码 · 共 45 行

CS
45
字号
#region Using directives

using System;
using System.Windows.Forms;
using System.Reflection;
using System.Globalization;
#endregion

namespace UI
{
    /// <summary>
    /// Summary description for Global.
    /// </summary>
    public class Global
    {
        public static readonly string PROFILE_PATH = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().GetModules()[0].FullyQualifiedName) + "\\profile.xml";
        //public static readonly string PROFILE_PATH = "\\\\profile.xml";
        public static readonly string DEVICE_PATH = "\\Storage\\device.xml";
        public static void ShowCaution(string strContent, string strTitle)
        {
            MessageBox.Show(strContent, strTitle, MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
        }

        public static bool  ShowYNChoice(string strContent,string strTitle)
        {
            if (DialogResult.Yes == MessageBox.Show(strContent, strTitle, MessageBoxButtons.YesNo, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1))
            {
                return true;
            }
            return false;
        }

        public static bool ShowOCChoice(string strContent, string strTitle)
        {

            if (DialogResult.OK == MessageBox.Show(strContent, strTitle, MessageBoxButtons.OKCancel, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1))
            {
                return true;
            }
            return false;
        }

    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?