コード例 #1
0
ファイル: BuildSystem.cs プロジェクト: capnmidnight/Juniper
        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)));
        }
コード例 #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;
            }
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: Johanna26/calculadora
        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;
            }
        }