示例#1
0
        private void SetDisplayModeDS(DisplayModeOptionEnum mode)
        {
            var proc = new Process();

            proc.StartInfo.FileName = "DisplaySwitch.exe";
            switch (mode)
            {
            case DisplayModeOptionEnum.External:
                proc.StartInfo.Arguments = "/external";
                break;

            case DisplayModeOptionEnum.Internal:
                proc.StartInfo.Arguments = "/internal";
                break;

            case DisplayModeOptionEnum.Extend:
                proc.StartInfo.Arguments = "/extend";
                break;

            case DisplayModeOptionEnum.Clone:
                proc.StartInfo.Arguments = "/clone";
                break;
            }
            proc.Start();
        }
示例#2
0
        private void SetDisplayModeDC(DisplayModeOptionEnum mode)
        {
            switch (mode)
            {
            case DisplayModeOptionEnum.External:
                ExternalDisplay();
                break;

            case DisplayModeOptionEnum.Internal:
                InternalDisplay();
                break;

            case DisplayModeOptionEnum.Extend:
                ExtendDisplays();
                break;

            case DisplayModeOptionEnum.Clone:
                CloneDisplays();
                break;
            }
        }