Exemplo n.º 1
0
        protected static IEnumerable <ICommand> Copy(Por por, DirectoryInfo outputDir, params DirectoryInfo[] inputDirs)
        {
            var fileNames = por == Por.Basic
                ? basicFileNames
                : por == Por.Minified
                    ? minifiedFileNames
                    : AllFileNames;

            return(from inputDir in inputDirs
                   let fromDir = inputDir.MkDir("dist")
                                 let toDir = outputDir.MkDir(inputDir.Name)
                                             from file in fileNames
                                             select new CopyCommand(fromDir.Touch(file), toDir.Touch(file)));
        }
Exemplo n.º 2
0
        private void BtnIgual_Click(object sender, EventArgs e)
        {
            segundo = double.Parse(txtScreen.Text);

            double Sum;
            double Res;
            double Mul;
            double Div;
            double Por;

            switch (operador)
            {
            case "+":
                Sum            = obj.Sumar((primero), (segundo));
                txtScreen.Text = Sum.ToString();
                break;

            case "-":
                Res            = obj2.Restar((primero), (segundo));
                txtScreen.Text = Res.ToString();
                break;

            case "/":
                Div            = obj4.Dividir((primero), (segundo));
                txtScreen.Text = Div.ToString();
                break;

            case "*":
                Mul            = obj3.Multiplicar((primero), (segundo));
                txtScreen.Text = Mul.ToString();
                break;

            case "%":
                Por            = obj5.Porcentaje((primero), (segundo));
                txtScreen.Text = Por.ToString();
                break;
            }
        }
Exemplo n.º 3
0
        private void BttnIgual_Click(object sender, EventArgs e)
        {
            segundo = double.Parse(TxtPantalla.Text);
            double Sum;
            double Res;
            double Mul;
            double Div;
            double Por;

            switch (operador)
            {
            case "+":
                Sum = objt.Suma((first), (segundo));
                TxtPantalla.Text = Sum.ToString();
                break;

            case "-":
                Res = objt1.Resta((first), (segundo));
                TxtPantalla.Text = Res.ToString();
                break;

            case "*":
                Mul = objt2.Multiplicacion((first), (segundo));
                TxtPantalla.Text = Mul.ToString();
                break;

            case "/":
                Div = objt3.Division((first), (segundo));
                TxtPantalla.Text = Div.ToString();
                break;

            case "%":
                Por = objt4.Porcentaje((first), (segundo));
                TxtPantalla.Text = Por.ToString();
                break;
            }
        }