コード例 #1
0
ファイル: Tests.cs プロジェクト: oneasonly/TVSender
        private static bool FormCallWhiteBalance(Func <bool> func, WBType type)
        {
            bool         retry = false;
            bool         final = false;
            DialogResult result;

            switch (type)
            {
            case WBType.Chroma:
                result = new WhiteBalanceChroma().ShowDialog();
                break;

            case WBType.Minolta:
                result = new WhiteBalanceMinolta().ShowDialog();
                break;

            default:
                return(false);
            }

            switch (result)
            {
            case DialogResult.Retry: PlayerSound.Stop(); retry = true; break;

            case DialogResult.OK: return(true);

            default: PlayerSound.Stop(); return(false);
            }
            if (retry)
            {
                return(func());
            }
            return(final);
        }
コード例 #2
0
 public WB(string bottleLenght, string bottlewidth, int bottleradius, WBType matType
           )
 {
     Length = bottleLenght;
     Width  = bottlewidth;
     Radius = bottleradius;
 }