コード例 #1
0
    public static bool BuildCity(Vector3 Pos)
    {
        RaycastHit[] Hits     = Physics.RaycastAll(Pos + Vector3.up * 100, Vector3.down);
        bool         CanBuild = false;

        foreach (RaycastHit hit in Hits)
        {
            if (hit.collider.tag == TerrainTag)
            {
                CanBuild = true;
            }
//            if (hit.collider.tag == Cityprefab.tag)
//            {
//                CanBuild = false;
//                break;
//            }
        }
        if (CanBuild && Kapital >= KostenProStadt * Cities.Count)
        {
            Stadt city = Instantiate(Cityprefab, Pos, Quaternion.identity).GetComponent <Stadt>();
            Cities.Add(city);
            Spawnscript.AddCity(city.gameObject);
            IncreaseKapital(-KostenProStadt * Cities.Count);
            ChatMessage("Tower built!");
        }
        else
        {
            if (CanBuild)
            {
                ChatMessage("Dude, you're boke!");
            }
            else
            {
                ChatMessage("Can't build here.");
            }
        }

        return(CanBuild);
    }
コード例 #2
0
        static void Main(string[] args)
        {
            Land deutschland = new Land("Deutschland");

            Stadt bielefeld = new Stadt("Bielefeld", deutschland);
            Stadt muehlheim = new Stadt("Mühlheim", deutschland);
            Stadt essen     = new Stadt("Essen", deutschland);
            Stadt berlin    = new Stadt("Berlin", deutschland);
            Stadt frankfurt = new Stadt("Frankfurt", deutschland);

            deutschland.HauptStadt = berlin;

            Fluss ruhr  = new Fluss("Ruhr", false);
            Fluss spree = new Fluss("Spree", false);
            Fluss havel = new Fluss("Havel", false);
            Fluss main  = new Fluss("Main", true);

            muehlheim.LiegtAn.Add(ruhr);
            essen.LiegtAn.Add(ruhr);

            berlin.LiegtAn.Add(havel);
            berlin.LiegtAn.Add(spree);

            frankfurt.LiegtAn.Add(main);

            Person otto = new Person(
                "Otto",
                "Müller",
                bielefeld,
                new[] { essen });

            Person erwin = new Person(
                "Erwin",
                "Schmitt",
                bielefeld,
                new[] { berlin });

            Person jan = new Person(
                "Jan",
                "Meier",
                muehlheim,
                new[] { berlin });

            Person klaas = new Person(
                "Klaas",
                "Schulze",
                essen,
                new[] { frankfurt });

            Person hein = new Person(
                "Hein",
                "Blöd",
                berlin,
                new[] { bielefeld });

            Person pitt = new Person(
                "Pitt",
                "Fischer",
                frankfurt,
                new[] { muehlheim, frankfurt });



            Console.Write(pitt.Vorname + " ");
            Console.Write(pitt.Familienname);
            Console.Write(" ist geboren in ");
            Console.Write(pitt.GeborenIn.Name);
            bool first = true;

            foreach (var fluss in pitt.GeborenIn.LiegtAn)
            {
                if (first)
                {
                    Console.Write(" gelegen ");
                    first = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                if (fluss.Male)
                {
                    Console.Write("am ");
                }
                else
                {
                    Console.Write("an der ");
                }
                Console.Write(fluss.Name);
            }
            Console.Write(" gelegen in ");
            Console.Write(pitt.GeborenIn.LiegtIn.Name);

            Console.Write(" dessen Hauptstadt ist ");
            Console.Write(pitt.GeborenIn.LiegtIn.HauptStadt.Name);
            first = true;
            foreach (var fluss in pitt.GeborenIn.LiegtIn.HauptStadt.LiegtAn)
            {
                if (first)
                {
                    Console.Write(" gelegen ");
                    first = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                if (fluss.Male)
                {
                    Console.Write("am ");
                }
                else
                {
                    Console.Write("an der ");
                }
                Console.Write(fluss.Name);
            }

            bool firstWohnort = true;

            foreach (var wohnort in pitt.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                Console.Write(wohnort.Name);
                bool firstFluss = true;
                foreach (var fluss in wohnort.LiegtAn)
                {
                    if (firstFluss)
                    {
                        Console.Write(" gelegen ");
                        firstFluss = false;
                    }
                    else
                    {
                        Console.Write(" und ");
                    }

                    if (fluss.Male)
                    {
                        Console.Write("am ");
                    }
                    else
                    {
                        Console.Write("an der ");
                    }
                    Console.Write(fluss.Name);
                }
                Console.Write(" gelegen in ");
                Console.Write(wohnort.LiegtIn.Name);

                Console.Write(" dessen Hauptstadt ist ");
                Console.Write(wohnort.LiegtIn.HauptStadt.Name);
                first = true;
                foreach (var fluss in wohnort.LiegtIn.HauptStadt.LiegtAn)
                {
                    if (first)
                    {
                        Console.Write(" gelegen ");
                        first = false;
                    }
                    else
                    {
                        Console.Write(" und ");
                    }

                    if (fluss.Male)
                    {
                        Console.Write("am ");
                    }
                    else
                    {
                        Console.Write("an der ");
                    }
                    Console.Write(fluss.Name);
                }
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();

            Console.Write(hein.Vorname + " ");
            Console.Write(hein.Familienname);
            Console.Write(" ist geboren in ");
            Console.Write(hein.GeborenIn.getShortDescription());
            Console.Write(" gelegen in ");
            Console.Write(hein.GeborenIn.LiegtIn.Name);

            Console.Write(" dessen Hauptstadt ist ");
            Console.Write(hein.GeborenIn.LiegtIn.HauptStadt.getShortDescription());
            firstWohnort = true;
            foreach (var wohnort in hein.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                Console.Write(wohnort.getShortDescription());
                Console.Write(" gelegen in ");
                Console.Write(wohnort.LiegtIn.Name);

                Console.Write(" dessen Hauptstadt ist ");
                Console.Write(wohnort.LiegtIn.HauptStadt.getShortDescription());
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();

            Console.Write(klaas.Vorname + " ");
            Console.Write(klaas.Familienname);
            Console.Write(" ist geboren in ");
            Console.Write(klaas.GeborenIn.getShortDescription());
            Console.Write(" gelegen in ");
            Console.Write(klaas.GeborenIn.LiegtIn.getDescription());

            firstWohnort = true;
            foreach (var wohnort in klaas.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                Console.Write(wohnort.getShortDescription());
                Console.Write(" gelegen in ");
                Console.Write(wohnort.LiegtIn.getDescription());
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();


            Console.Write(jan.Vorname + " ");
            Console.Write(jan.Familienname);
            Console.Write(" ist geboren in ");
            Console.Write(jan.GeborenIn.getDescription());

            firstWohnort = true;
            foreach (var wohnort in jan.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }
                Console.Write(wohnort.getDescription());
            }
            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();

            Console.Write(erwin.getFullname());
            Console.Write(" ist geboren in ");
            Console.Write(erwin.GeborenIn.getDescription());

            firstWohnort = true;
            foreach (var wohnort in erwin.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }
                Console.Write(wohnort.getDescription());
            }
            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();

            Console.WriteLine(otto.getDescription());
            Console.WriteLine();
            Console.ReadKey();

            Console.WriteLine(otto.getDescription());
            Console.WriteLine();
            Console.WriteLine(erwin.getDescription());
            Console.WriteLine();
            Console.WriteLine(jan.getDescription());
            Console.WriteLine();
            Console.WriteLine(klaas.getDescription());
            Console.WriteLine();
            Console.WriteLine(hein.getDescription());
            Console.WriteLine();
            Console.WriteLine(pitt.getDescription());
            Console.WriteLine();
            Console.ReadKey();

            DemoData demoData = new DemoData();

            StadtLandFlussModelContainer context = new StadtLandFlussModelContainer();

            Console.WriteLine("Empty Database");

            try
            {
                using (var dbContextTransaction = context.Database.BeginTransaction())
                {
                    foreach (var stadt in context.Staedte.ToArray())
                    {
                        stadt.Einwohner.Clear();
                    }
                    context.SaveChanges();

                    context.People.RemoveRange(context.People.ToArray());
                    context.SaveChanges();
                    foreach (var stadt in context.Staedte.ToArray())
                    {
                        stadt.LiegtAn.Clear();
                        context.Staedte.Remove(stadt);
                    }
                    context.SaveChanges();
                    context.Staedte.RemoveRange(context.Staedte.ToArray());
                    context.SaveChanges();
                    context.Fluesse.RemoveRange(context.Fluesse.ToArray());
                    context.SaveChanges();
                    context.Laender.RemoveRange(context.Laender.ToArray());
                    context.SaveChanges();

                    dbContextTransaction.Commit();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
            Console.ReadKey();


            Console.WriteLine("Fill Database");
            try
            {
                using (var dbContextTransaction = context.Database.BeginTransaction())
                {
                    context.People.AddRange(demoData.Personen);
                    context.Fluesse.AddRange(demoData.Fluesse);
                    context.Staedte.AddRange(demoData.Staedte);
                    context.Laender.AddRange(demoData.Laender);

                    context.SaveChanges();

                    dbContextTransaction.Commit();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex);
            }
            Console.ReadKey();

            var Data = context;

            Console.WriteLine("List People with tt");
            var personen = (
                from person in Data.People
                where person.Vorname.Contains("tt")
                select person
                );

            foreach (Person person in personen)
            {
                Console.WriteLine(person.getFullname());
            }
            Console.ReadKey();

            Console.WriteLine("List People with tt's residence ");
            var wohnOrte =
                (from person in Data.People
                 where person.Vorname.Contains("tt")
                 from wi in person.WohntIn
                 orderby wi.Name
                 select wi)
                .Distinct();

            foreach (Stadt wohnOrt in wohnOrte)
            {
                Console.WriteLine(wohnOrt.getShortDescription());
            }
            Console.ReadKey();

            Console.WriteLine("List People living in first country");
            personen =
                (from person in Data.People
                 where person.WohntIn.Any(
                     wi => wi.LiegtIn == Data.Laender.FirstOrDefault())
                 orderby person.Familienname
                 select person);

            foreach (Person person in personen)
            {
                Console.WriteLine(person.getFullname());
            }
            Console.ReadKey();

            Console.WriteLine("List Cities next to first river");
            Fluss flussToQuery = Data.Fluesse.FirstOrDefault();

            if (flussToQuery == null)
            {
                return;
            }

            var staedte =
                from stadt in flussToQuery.Durchfließt
                select stadt;

            foreach (var stadt in staedte)
            {
                Console.WriteLine(stadt.getDescription());
            }
            Console.ReadKey();

            Console.WriteLine("List People living next to first river");


            personen =
                (
                    from person in Data.People
                    where person.WohntIn.Any(
                        wi => wi.LiegtAn.Any(
                            la => la == Data.Fluesse.FirstOrDefault()))
                    orderby person.Familienname ascending
                    select person
                )
                .Distinct();


            foreach (var person in personen)
            {
                Console.WriteLine(person.getFullname());
            }
            Console.ReadKey();

            Land landToQuery = Data.Laender.FirstOrDefault();

            if (landToQuery == null)
            {
                return;
            }

            Console.WriteLine("List cities in first country");
            var staedteInLand = landToQuery.Staedte;

            foreach (var stadt in staedteInLand)
            {
                Console.WriteLine(stadt.getShortDescription());
            }
            Console.ReadKey();

            Random rnd = new Random();
            var    staedteToExclude = staedteInLand.Where(s => rnd.NextDouble() < 0.33);

            Console.WriteLine("Auszuschließende Städte");
            staedteToExclude.ToList().ForEach(Console.WriteLine);

            var otherStaedte =
                (from stadt in landToQuery.Staedte
                 where !staedteToExclude.Any(s => s == stadt)
                 select stadt
                ).ToArray();


            Console.WriteLine("Restliche Städte");
            otherStaedte.ToList().ForEach(Console.WriteLine);

            var persons =
                (
                    from stadt in otherStaedte
                    from einw in stadt.Einwohner
                    orderby einw.Familienname
                    select einw)
                .Distinct();

            Console.WriteLine("Bewohner der restlichen Städte");
            persons.ToList().ForEach(Console.WriteLine);

            Console.ReadKey();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: schlingensiepen/sw-eng
        static void Main(string[] args)
        {
            Land deutschland = new Land("Deutschland");

            Stadt bielefeld = new Stadt("Bielefeld", deutschland);
            Stadt muehlheim = new Stadt("Mühlheim", deutschland);
            Stadt essen     = new Stadt("Essen", deutschland);
            Stadt berlin    = new Stadt("Berlin", deutschland);
            Stadt frankfurt = new Stadt("Frankfurt", deutschland);

            deutschland.HauptStadt = berlin;

            Fluss ruhr  = new Fluss("Ruhr", false);
            Fluss spree = new Fluss("Spree", false);
            Fluss havel = new Fluss("Havel", false);
            Fluss main  = new Fluss("Main", true);

            muehlheim.LiegtAn.Add(ruhr);
            essen.LiegtAn.Add(ruhr);

            berlin.LiegtAn.Add(havel);
            berlin.LiegtAn.Add(spree);

            frankfurt.LiegtAn.Add(main);

            Person otto = new Person(
                "Otto",
                "Müller",
                bielefeld,
                new [] { essen });

            Person erwin = new Person(
                "Erwin",
                "Schmitt",
                bielefeld,
                new[] { berlin });

            Person jan = new Person(
                "Jan",
                "Meier",
                muehlheim,
                new [] { berlin });

            Person klaas = new Person(
                "Klaas",
                "Schulze",
                essen,
                new [] { frankfurt });

            Person hein = new Person(
                "Hein",
                "Blöd",
                berlin,
                new[] { bielefeld });

            Person pitt = new Person(
                "Pitt",
                "Fischer",
                frankfurt,
                new[] { muehlheim, frankfurt });

            Console.Write(pitt.Vorname + " ");
            Console.Write(pitt.Familienname);
            Console.Write(" ist geboren in ");
            Console.Write(pitt.GeborenIn.Name);
            bool first = true;

            foreach (var fluss in pitt.GeborenIn.LiegtAn)
            {
                if (first)
                {
                    Console.Write(" gelegen ");
                    first = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                if (fluss.Male)
                {
                    Console.Write("am ");
                }
                else
                {
                    Console.Write("an der ");
                }
                Console.Write(fluss.Name);
            }
            Console.Write(" gelegen in ");
            Console.Write(pitt.GeborenIn.LiegtIn.Name);

            Console.Write(" dessen Hauptstadt ist ");
            Console.Write(pitt.GeborenIn.LiegtIn.HauptStadt.Name);
            first = true;
            foreach (var fluss in pitt.GeborenIn.LiegtIn.HauptStadt.LiegtAn)
            {
                if (first)
                {
                    Console.Write(" gelegen ");
                    first = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                if (fluss.Male)
                {
                    Console.Write("am ");
                }
                else
                {
                    Console.Write("an der ");
                }
                Console.Write(fluss.Name);
            }

            bool firstWohnort = true;

            foreach (var wohnort in pitt.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                Console.Write(wohnort.Name);
                bool firstFluss = true;
                foreach (var fluss in wohnort.LiegtAn)
                {
                    if (firstFluss)
                    {
                        Console.Write(" gelegen ");
                        firstFluss = false;
                    }
                    else
                    {
                        Console.Write(" und ");
                    }

                    if (fluss.Male)
                    {
                        Console.Write("am ");
                    }
                    else
                    {
                        Console.Write("an der ");
                    }
                    Console.Write(fluss.Name);
                }
                Console.Write(" gelegen in ");
                Console.Write(wohnort.LiegtIn.Name);

                Console.Write(" dessen Hauptstadt ist ");
                Console.Write(wohnort.LiegtIn.HauptStadt.Name);
                first = true;
                foreach (var fluss in wohnort.LiegtIn.HauptStadt.LiegtAn)
                {
                    if (first)
                    {
                        Console.Write(" gelegen ");
                        first = false;
                    }
                    else
                    {
                        Console.Write(" und ");
                    }

                    if (fluss.Male)
                    {
                        Console.Write("am ");
                    }
                    else
                    {
                        Console.Write("an der ");
                    }
                    Console.Write(fluss.Name);
                }
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();

            Console.Write(hein.Vorname + " ");
            Console.Write(hein.Familienname);
            Console.Write(" ist geboren in ");
            Console.Write(hein.GeborenIn.getShortDescription());
            Console.Write(" gelegen in ");
            Console.Write(hein.GeborenIn.LiegtIn.Name);

            Console.Write(" dessen Hauptstadt ist ");
            Console.Write(hein
                          .GeborenIn
                          .LiegtIn
                          .HauptStadt
                          .getShortDescription());
            firstWohnort = true;
            foreach (var wohnort in hein.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                Console.Write(wohnort.getShortDescription());
                Console.Write(" gelegen in ");
                Console.Write(wohnort.LiegtIn.Name);

                Console.Write(" dessen Hauptstadt ist ");
                Console.Write(wohnort
                              .LiegtIn
                              .HauptStadt
                              .getShortDescription());
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();

            Console.Write(klaas.Vorname + " ");
            Console.Write(klaas.Familienname);
            Console.Write(" ist geboren in ");
            Console.Write(klaas.GeborenIn.getShortDescription());
            Console.Write(" gelegen in ");
            Console.Write(klaas.GeborenIn.LiegtIn.getDescription());

            firstWohnort = true;
            foreach (var wohnort in klaas.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }

                Console.Write(wohnort.getShortDescription());
                Console.Write(" gelegen in ");
                Console.Write(wohnort.LiegtIn.getDescription());
            }

            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();


            Console.Write(jan.Vorname + " ");
            Console.Write(jan.Familienname);
            Console.Write(" ist geboren in ");
            Console.Write(jan.GeborenIn.getDescription());

            firstWohnort = true;
            foreach (var wohnort in jan.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }
                Console.Write(wohnort.getDescription());
            }
            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();

            Console.Write(erwin.getFullname());
            Console.Write(" ist geboren in ");
            Console.Write(erwin.GeborenIn.getDescription());

            firstWohnort = true;
            foreach (var wohnort in erwin.WohntIn)
            {
                if (firstWohnort)
                {
                    Console.Write(" wohnhaft in ");
                    firstWohnort = false;
                }
                else
                {
                    Console.Write(" und ");
                }
                Console.Write(wohnort.getDescription());
            }
            Console.WriteLine();
            Console.WriteLine();
            Console.ReadKey();

            Console.WriteLine(otto.getDescription());
            Console.WriteLine();
            Console.ReadKey();

            Console.WriteLine(otto.getDescription());
            Console.WriteLine();
            Console.WriteLine(erwin.getDescription());
            Console.WriteLine();
            Console.WriteLine(jan.getDescription());
            Console.WriteLine();
            Console.WriteLine(klaas.getDescription());
            Console.WriteLine();
            Console.WriteLine(hein.getDescription());
            Console.WriteLine();
            Console.WriteLine(pitt.getDescription());
            Console.WriteLine();
            Console.ReadKey();
        }
コード例 #4
0
        void ReleaseDesignerOutlets()
        {
            if (AdvancedSearchBox != null)
            {
                AdvancedSearchBox.Dispose();
                AdvancedSearchBox = null;
            }

            if (AngebotNr != null)
            {
                AngebotNr.Dispose();
                AngebotNr = null;
            }

            if (ArchiveButton1 != null)
            {
                ArchiveButton1.Dispose();
                ArchiveButton1 = null;
            }

            if (AufWunsch != null)
            {
                AufWunsch.Dispose();
                AufWunsch = null;
            }

            if (AusstattungDo != null)
            {
                AusstattungDo.Dispose();
                AusstattungDo = null;
            }

            if (AusstattungOd != null)
            {
                AusstattungOd.Dispose();
                AusstattungOd = null;
            }

            if (Bezeichnung != null)
            {
                Bezeichnung.Dispose();
                Bezeichnung = null;
            }

            if (Binderabstand != null)
            {
                Binderabstand.Dispose();
                Binderabstand = null;
            }

            if (Binderabstand2 != null)
            {
                Binderabstand2.Dispose();
                Binderabstand2 = null;
            }

            if (BinderabstandCa != null)
            {
                BinderabstandCa.Dispose();
                BinderabstandCa = null;
            }

            if (Breite != null)
            {
                Breite.Dispose();
                Breite = null;
            }

            if (Breite2 != null)
            {
                Breite2.Dispose();
                Breite2 = null;
            }

            if (BreiteCa != null)
            {
                BreiteCa.Dispose();
                BreiteCa = null;
            }

            if (BreiteN != null)
            {
                BreiteN.Dispose();
                BreiteN = null;
            }

            if (Cena1 != null)
            {
                Cena1.Dispose();
                Cena1 = null;
            }

            if (CenaMontaz != null)
            {
                CenaMontaz.Dispose();
                CenaMontaz = null;
            }

            if (ComboBox1 != null)
            {
                ComboBox1.Dispose();
                ComboBox1 = null;
            }

            if (ComboBox2 != null)
            {
                ComboBox2.Dispose();
                ComboBox2 = null;
            }

            if (ComboBox5 != null)
            {
                ComboBox5.Dispose();
                ComboBox5 = null;
            }

            if (ComboBoxRaport != null)
            {
                ComboBoxRaport.Dispose();
                ComboBoxRaport = null;
            }

            if (Dach != null)
            {
                Dach.Dispose();
                Dach = null;
            }

            if (Data != null)
            {
                Data.Dispose();
                Data = null;
            }

            if (DataOferty != null)
            {
                DataOferty.Dispose();
                DataOferty = null;
            }

            if (DataPotwierdzenia != null)
            {
                DataPotwierdzenia.Dispose();
                DataPotwierdzenia = null;
            }

            if (DeleteButton0 != null)
            {
                DeleteButton0.Dispose();
                DeleteButton0 = null;
            }

            if (DeleteButton1 != null)
            {
                DeleteButton1.Dispose();
                DeleteButton1 = null;
            }

            if (DeleteButton2 != null)
            {
                DeleteButton2.Dispose();
                DeleteButton2 = null;
            }

            if (DeleteButton3 != null)
            {
                DeleteButton3.Dispose();
                DeleteButton3 = null;
            }

            if (DeleteButton5 != null)
            {
                DeleteButton5.Dispose();
                DeleteButton5 = null;
            }

            if (Down1 != null)
            {
                Down1.Dispose();
                Down1 = null;
            }

            if (Down2 != null)
            {
                Down2.Dispose();
                Down2 = null;
            }

            if (Down3 != null)
            {
                Down3.Dispose();
                Down3 = null;
            }

            if (Firma != null)
            {
                Firma.Dispose();
                Firma = null;
            }

            if (Firsthohe != null)
            {
                Firsthohe.Dispose();
                Firsthohe = null;
            }

            if (Firsthohe2 != null)
            {
                Firsthohe2.Dispose();
                Firsthohe2 = null;
            }

            if (FirsthoheCa != null)
            {
                FirsthoheCa.Dispose();
                FirsthoheCa = null;
            }

            if (FirsthoheN != null)
            {
                FirsthoheN.Dispose();
                FirsthoheN = null;
            }

            if (Gesamtpreis != null)
            {
                Gesamtpreis.Dispose();
                Gesamtpreis = null;
            }

            if (Gewicht != null)
            {
                Gewicht.Dispose();
                Gewicht = null;
            }

            if (Gewicht2 != null)
            {
                Gewicht2.Dispose();
                Gewicht2 = null;
            }

            if (Hauptprofil1 != null)
            {
                Hauptprofil1.Dispose();
                Hauptprofil1 = null;
            }

            if (Hauptprofil2 != null)
            {
                Hauptprofil2.Dispose();
                Hauptprofil2 = null;
            }

            if (Hauptprofil3 != null)
            {
                Hauptprofil3.Dispose();
                Hauptprofil3 = null;
            }

            if (HauptProfilGewicht != null)
            {
                HauptProfilGewicht.Dispose();
                HauptProfilGewicht = null;
            }

            if (Ilosc1 != null)
            {
                Ilosc1.Dispose();
                Ilosc1 = null;
            }

            if (InfoLabel1 != null)
            {
                InfoLabel1.Dispose();
                InfoLabel1 = null;
            }

            if (Kedernut != null)
            {
                Kedernut.Dispose();
                Kedernut = null;
            }

            if (Komentarz != null)
            {
                Komentarz.Dispose();
                Komentarz = null;
            }

            if (KWert1 != null)
            {
                KWert1.Dispose();
                KWert1 = null;
            }

            if (LabelTest1 != null)
            {
                LabelTest1.Dispose();
                LabelTest1 = null;
            }

            if (LabelTest2 != null)
            {
                LabelTest2.Dispose();
                LabelTest2 = null;
            }

            if (Lange2 != null)
            {
                Lange2.Dispose();
                Lange2 = null;
            }

            if (Lange3 != null)
            {
                Lange3.Dispose();
                Lange3 = null;
            }

            if (LangeCa != null)
            {
                LangeCa.Dispose();
                LangeCa = null;
            }

            if (LangeN != null)
            {
                LangeN.Dispose();
                LangeN = null;
            }

            if (Leichbauhalle != null)
            {
                Leichbauhalle.Dispose();
                Leichbauhalle = null;
            }

            if (Liefertermin != null)
            {
                Liefertermin.Dispose();
                Liefertermin = null;
            }

            if (Lieferungskosten != null)
            {
                Lieferungskosten.Dispose();
                Lieferungskosten = null;
            }

            if (Lieferzeit != null)
            {
                Lieferzeit.Dispose();
                Lieferzeit = null;
            }

            if (ListaOferty != null)
            {
                ListaOferty.Dispose();
                ListaOferty = null;
            }

            if (Mail != null)
            {
                Mail.Dispose();
                Mail = null;
            }

            if (Mail_cena != null)
            {
                Mail_cena.Dispose();
                Mail_cena = null;
            }

            if (Mail_miasto != null)
            {
                Mail_miasto.Dispose();
                Mail_miasto = null;
            }

            if (Mail_mm != null)
            {
                Mail_mm.Dispose();
                Mail_mm = null;
            }

            if (MontageAGB != null)
            {
                MontageAGB.Dispose();
                MontageAGB = null;
            }

            if (MontageBox != null)
            {
                MontageBox.Dispose();
                MontageBox = null;
            }

            if (MontageSwitch != null)
            {
                MontageSwitch.Dispose();
                MontageSwitch = null;
            }

            if (Name != null)
            {
                Name.Dispose();
                Name = null;
            }

            if (NHN != null)
            {
                NHN.Dispose();
                NHN = null;
            }

            if (NrPotwierdzenia != null)
            {
                NrPotwierdzenia.Dispose();
                NrPotwierdzenia = null;
            }

            if (OpenButton1 != null)
            {
                OpenButton1.Dispose();
                OpenButton1 = null;
            }

            if (Plec != null)
            {
                Plec.Dispose();
                Plec = null;
            }

            if (Postlietzahl != null)
            {
                Postlietzahl.Dispose();
                Postlietzahl = null;
            }

            if (PriceText1 != null)
            {
                PriceText1.Dispose();
                PriceText1 = null;
            }

            if (PriceText2 != null)
            {
                PriceText2.Dispose();
                PriceText2 = null;
            }

            if (RaportType != null)
            {
                RaportType.Dispose();
                RaportType = null;
            }

            if (ReadyButton1 != null)
            {
                ReadyButton1.Dispose();
                ReadyButton1 = null;
            }

            if (SaveButton1 != null)
            {
                SaveButton1.Dispose();
                SaveButton1 = null;
            }

            if (Schneelast != null)
            {
                Schneelast.Dispose();
                Schneelast = null;
            }

            if (Schneelast2 != null)
            {
                Schneelast2.Dispose();
                Schneelast2 = null;
            }

            if (SearchCheckBox != null)
            {
                SearchCheckBox.Dispose();
                SearchCheckBox = null;
            }

            if (SearchDlugosc != null)
            {
                SearchDlugosc.Dispose();
                SearchDlugosc = null;
            }

            if (SearchSchneelast != null)
            {
                SearchSchneelast.Dispose();
                SearchSchneelast = null;
            }

            if (SearchSzerokosc != null)
            {
                SearchSzerokosc.Dispose();
                SearchSzerokosc = null;
            }

            if (SearchText != null)
            {
                SearchText.Dispose();
                SearchText = null;
            }

            if (SearchTextField != null)
            {
                SearchTextField.Dispose();
                SearchTextField = null;
            }

            if (SearchTypHali != null)
            {
                SearchTypHali.Dispose();
                SearchTypHali = null;
            }

            if (SearchWindlast != null)
            {
                SearchWindlast.Dispose();
                SearchWindlast = null;
            }

            if (SearchWysokosc != null)
            {
                SearchWysokosc.Dispose();
                SearchWysokosc = null;
            }

            if (Select2 != null)
            {
                Select2.Dispose();
                Select2 = null;
            }

            if (Stadt != null)
            {
                Stadt.Dispose();
                Stadt = null;
            }

            if (Stallhalle != null)
            {
                Stallhalle.Dispose();
                Stallhalle = null;
            }

            if (Starke1 != null)
            {
                Starke1.Dispose();
                Starke1 = null;
            }

            if (Starke2 != null)
            {
                Starke2.Dispose();
                Starke2 = null;
            }

            if (StraBe != null)
            {
                StraBe.Dispose();
                StraBe = null;
            }

            if (Suma1 != null)
            {
                Suma1.Dispose();
                Suma1 = null;
            }

            if (Switch3 != null)
            {
                Switch3.Dispose();
                Switch3 = null;
            }

            if (SwitchTab1 != null)
            {
                SwitchTab1.Dispose();
                SwitchTab1 = null;
            }

            if (Tab0 != null)
            {
                Tab0.Dispose();
                Tab0 = null;
            }

            if (Tab1 != null)
            {
                Tab1.Dispose();
                Tab1 = null;
            }

            if (Tab2 != null)
            {
                Tab2.Dispose();
                Tab2 = null;
            }

            if (Tab3 != null)
            {
                Tab3.Dispose();
                Tab3 = null;
            }

            if (Tab4 != null)
            {
                Tab4.Dispose();
                Tab4 = null;
            }

            if (Tab5 != null)
            {
                Tab5.Dispose();
                Tab5 = null;
            }

            if (Tab6 != null)
            {
                Tab6.Dispose();
                Tab6 = null;
            }

            if (Tab7 != null)
            {
                Tab7.Dispose();
                Tab7 = null;
            }

            if (Tabela1 != null)
            {
                Tabela1.Dispose();
                Tabela1 = null;
            }

            if (Tabela2 != null)
            {
                Tabela2.Dispose();
                Tabela2 = null;
            }

            if (Tabela3 != null)
            {
                Tabela3.Dispose();
                Tabela3 = null;
            }

            if (Tabela5 != null)
            {
                Tabela5.Dispose();
                Tabela5 = null;
            }

            if (TabNavi != null)
            {
                TabNavi.Dispose();
                TabNavi = null;
            }

            if (TechnischeDaten != null)
            {
                TechnischeDaten.Dispose();
                TechnischeDaten = null;
            }

            if (Telefonnummer != null)
            {
                Telefonnummer.Dispose();
                Telefonnummer = null;
            }

            if (ToreUndTuren != null)
            {
                ToreUndTuren.Dispose();
                ToreUndTuren = null;
            }

            if (Traufhohe != null)
            {
                Traufhohe.Dispose();
                Traufhohe = null;
            }

            if (Traufhohe2 != null)
            {
                Traufhohe2.Dispose();
                Traufhohe2 = null;
            }

            if (TraufhoheCa != null)
            {
                TraufhoheCa.Dispose();
                TraufhoheCa = null;
            }

            if (TraufhoheN != null)
            {
                TraufhoheN.Dispose();
                TraufhoheN = null;
            }

            if (Unterlagen != null)
            {
                Unterlagen.Dispose();
                Unterlagen = null;
            }

            if (UnterlagenBox != null)
            {
                UnterlagenBox.Dispose();
                UnterlagenBox = null;
            }

            if (UnterlagenSwitch != null)
            {
                UnterlagenSwitch.Dispose();
                UnterlagenSwitch = null;
            }

            if (Up1 != null)
            {
                Up1.Dispose();
                Up1 = null;
            }

            if (Up2 != null)
            {
                Up2.Dispose();
                Up2 = null;
            }

            if (Up3 != null)
            {
                Up3.Dispose();
                Up3 = null;
            }

            if (UWert1 != null)
            {
                UWert1.Dispose();
                UWert1 = null;
            }

            if (UWert2 != null)
            {
                UWert2.Dispose();
                UWert2 = null;
            }

            if (Vat2 != null)
            {
                Vat2.Dispose();
                Vat2 = null;
            }

            if (Vorname != null)
            {
                Vorname.Dispose();
                Vorname = null;
            }

            if (Windlast != null)
            {
                Windlast.Dispose();
                Windlast = null;
            }

            if (Windlast2 != null)
            {
                Windlast2.Dispose();
                Windlast2 = null;
            }

            if (WypChange1 != null)
            {
                WypChange1.Dispose();
                WypChange1 = null;
            }

            if (WypChange2 != null)
            {
                WypChange2.Dispose();
                WypChange2 = null;
            }

            if (WypChange3 != null)
            {
                WypChange3.Dispose();
                WypChange3 = null;
            }

            if (X1 != null)
            {
                X1.Dispose();
                X1 = null;
            }

            if (Y1 != null)
            {
                Y1.Dispose();
                Y1 = null;
            }

            if (Zugbandhohe != null)
            {
                Zugbandhohe.Dispose();
                Zugbandhohe = null;
            }

            if (Zugbandhohe2 != null)
            {
                Zugbandhohe2.Dispose();
                Zugbandhohe2 = null;
            }

            if (ZugbandhoheCa != null)
            {
                ZugbandhoheCa.Dispose();
                ZugbandhoheCa = null;
            }

            if (SearchList != null)
            {
                SearchList.Dispose();
                SearchList = null;
            }

            if (SearchEmail != null)
            {
                SearchEmail.Dispose();
                SearchEmail = null;
            }
        }