Exemple #1
0
        static void Main(string[] args)
        {
            Technique     technique     = new Technique(100);
            SemiTechnique semiTechnique = new SemiTechnique(30, 100);

            Boss.Upgrade(technique.AddVoltage100);

            technique.TurnOn(500);

            Boss.Upgrading += semiTechnique.AddVoltage100;
            semiTechnique.TurnOn(100, 350);

            semiTechnique.TurnOn(100, 350);

            String str = "Лабораторная,.,   ,,,номер:! 9;...?";

            StringOperation stringOperation = null;

            stringOperation += DeletePunctuationMark;
            stringOperation += FerstToApperCase;
            stringOperation += AddDote;
            stringOperation += AddAuthor;

            Action_ColorPrint(ref str, CorrectString);

            Console.ReadLine();
        }
Exemple #2
0
        public static void TurnOn(this Technique obj, int volt)
        {
            Upgrading += obj.AddVoltage100;
            if (obj.AllowableVoltage < volt)
            {
                Console.ForegroundColor = ConsoleColor.Red;
                Console.WriteLine("Напряжение велико, процесс улучшения...");
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Blue;
            }

            while (obj.AllowableVoltage < volt && Upgrading != null)
            {
                Upgrading?.Invoke();
            }

            Console.WriteLine("Включено");
            Console.ResetColor();

            Upgrading = null;
        }