Example #1
0
        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);
        }
 public WB(string bottleLenght, string bottlewidth, int bottleradius, WBType matType
           )
 {
     Length = bottleLenght;
     Width  = bottlewidth;
     Radius = bottleradius;
 }