Beispiel #1
0
        public IHttpActionResult GetActionResult()
        {
            Entities                 db             = new Entities();
            List <Countries>         countries_list = db.Countries.ToList();
            List <Cities>            cities_list    = db.Cities.ToList();
            List <ski_jumpers>       jumpers_list   = db.ski_jumpers.ToList();
            List <ski_jumping_hills> hills_list     = db.ski_jumping_hills.ToList();
            List <ski_jumps>         jumps_list     = db.ski_jumps.ToList();

            var query = from jump in jumps_list
                        join jumper in jumpers_list on jump.JumperID equals jumper.JumperID into TR1
                        from jumper in TR1.DefaultIfEmpty()
                        join hill in hills_list on jump.JumpinhHillID equals hill.JumpingHillID into TR2
                        from hill in TR2.DefaultIfEmpty()
                        join ci in cities_list on hill.CityID equals ci.CityID into TR3
                        from ci in TR3.DefaultIfEmpty()
                        join c in countries_list on jumper.CountryID equals c.CountryID into TR4
                        from c in TR4.DefaultIfEmpty()
                        join co in countries_list on hill.CountryID equals co.CountryID into TR5
                        from co in TR5.DefaultIfEmpty()

                        select new JumpsResult
            {
                GetJumpersCountries = c,
                GetHillsCountries   = co,
                GetCities           = ci,
                GetJumpers          = jumper,
                GetJumps            = jump,
                GetHills            = hill
            };

            return(Ok(query));
        }
Beispiel #2
0
        private void Button4_Click(object sender, EventArgs e)
        {
            double RP3, RP4, RP5, TR4;

            try
            {
                RP3 = double.Parse(textBox8.Text);
                RP4 = double.Parse(textBox9.Text);
                RP5 = double.Parse(textBox10.Text);
            }
            catch
            {
                MessageBox.Show("INPUT ERROR");
                RP3 = 0.0;
                RP4 = 0.0;
                RP5 = 0.0;
            }
            TR4 = 1.0 / ((1.0 / RP3) + (1.0 / RP4) + (1.0 / RP5));
            MessageBox.Show(TR4.ToString());
        }
Beispiel #3
0
		/// <summary>
		/// Initializes a new instance of the <see cref="libtr.TR5.RoomLight"/> struct.
		/// </summary>
		/// <param name="x">The x coordinate.</param>
		/// <param name="y">The y coordinate.</param>
		/// <param name="z">The z coordinate.</param>
		/// <param name="color">The light color.</param>
		/// <param name="_in">Hotspot?</param>
		/// <param name="_out">Falloff?</param>
		/// <param name="radin">2 * rad (IN)</param>
		/// <param name="radout">2 * rad (OUT)</param>
		/// <param name="range">The range.</param>
		/// <param name="dx">The target X coordinate.</param>
		/// <param name="dy">The target Y coordinate.</param>
		/// <param name="dz">The target Z coordinate.</param>
		/// <param name="type">The light type.</param>
		public RoomLight (
			Single x, Single y, Single z, Color color,
			Single _in, Single _out, Single radin, Single radout,
			Single range, Single dx, Single dy, Single dz, TR4.RoomLightType type) : this (
			x, y, z, color, _in, _out, radin, radout,
			range, dx, dy, dz, (Byte) type) {
		}