示例#1
0
 public static Automobile getInstance(Engine eng, Kuzov kuz, string fac)
 {
     if (instance == null)
     {
         instance = new Automobile(eng, kuz, fac);
     }
     return(instance);
 }
示例#2
0
 public void CreateAutomobile(Engine eng, Kuzov kuz, string fac)
 {
     Automobile = Automobile.getInstance(eng, kuz, fac);
     Automobile.Engine.Show();
     Console.WriteLine(Automobile.Kuzov.ToString(), Automobile.Factory);
 }
示例#3
0
 protected Automobile(Engine eng, Kuzov kuz, string fac)
 {
     this.Engine  = eng;
     this.Kuzov   = kuz;
     this.Factory = fac;
 }
示例#4
0
 public KuzovViewModel()
 {
     kuzov = new Kuzov();
 }