示例#1
0
 public Audi(AudiModel Model, ConsoleColor Color) : base("Germany", Color)
 {
     this.Model = Model;
     if (RegistrationNumber != "")
     {
         TransportInfo = ToString(Model) + "[" + RegistrationNumber + "]";
         AudiNotify.Invoke(TransportInfo + " get the registration number [" + RegistrationNumber + "]");
     }
     else
     {
         TransportInfo = ToString(Model) + " without registration number";
     }
 }
示例#2
0
        public void Facing()
        {
            CountOfDesignActions++;
            switch (CountOfDesignActions)
            {
            case 1:
                DesignInfo += "\n1. Print '" + ToString(Model) + "' on the left side";
                AudiNotify?.Invoke("'" + ToString(Model) + "' has been printed on the left side of " + TransportInfo);
                break;

            case 2:
                DesignInfo += "\n2. Print '" + ToString(Model) + "' on the right side";
                AudiNotify?.Invoke("'" + ToString(Model) + "' has been printed on the right side of " + TransportInfo);
                break;

            case 3:
                DesignInfo += "\n3. Print 'Audi' on the wheels";
                AudiNotify?.Invoke("'Audi' has been printed on the wheels of " + TransportInfo);
                break;

            case 4:
                if (GetBodyType() == BodyType.Sedan)
                {
                    DesignInfo += "\n4. Print 'Audi sport' on the back window";
                    AudiNotify?.Invoke("'Audi sport' has been printed on the back window of " + TransportInfo);
                }
                else
                {
                    DesignInfo += "\n4. Print 'Audi' on the back window";
                    AudiNotify?.Invoke("'Audi' has been printed on the back window of " + TransportInfo);
                }
                break;

            default:
                AudiNotify?.Invoke("There is no more print for " + TransportInfo);
                CountOfDesignActions--;
                break;
            }
        }
示例#3
0
 public override void SetRegistrationNumber(string RegistrationNumber)
 {
     this.RegistrationNumber = RegistrationNumber;
     AudiNotify?.Invoke(TransportInfo + " get the registration number [" + RegistrationNumber + "]");
     TransportInfo = ToString(Model) + "[" + RegistrationNumber + "]";
 }