Пример #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));
        }
Пример #2
0
		/// <summary>
		/// Initializes a new instance of the <see cref="libtr.TR2.RoomVertex"/> struct.
		/// </summary>
		/// <param name="vertex">The vertex.</param>
		/// <param name="lighting1">The first lighting value.</param>
		/// <param name="rawattributes">The rendering flags.</param>
		/// <param name="lighting2">The second lighting value.</param>
		public RoomVertex (
			TR1.Vertex vertex, Int16 lighting1,
			UInt16 rawattributes, Int16 lighting2) : this () {
			Vertex = vertex;
			Lighting1 = lighting1;
			Lighting2 = lighting2;
			RawAttributes = rawattributes;
		}
Пример #3
0
		/// <summary>
		/// Initializes a new instance of the <see cref="libtr.TR1.RoomLight"/> struct.
		/// </summary>
		/// <param name="x">The x coordinate in world coordinates.</param>
		/// <param name="y">The y coordinate in world coordinates.</param>
		/// <param name="z">The z coordinate in world coordinates.</param>
		/// <param name="color">The light color.</param>
		/// <param name="intensity">The intensity of the light.</param> 
		/// <param name="fade">The falloff value.</param>
		public RoomLight (
			Int32 x, Int32 y, Int32 z, TR1.Color4 color,
			UInt32 intensity, UInt32 fade) : this () {
			X = x;
			Y = y;
			Z = z;
			Color = color;
			Intensity = intensity;
			Fade = fade;
		}
Пример #4
0
        private void Button1_Click(object sender, EventArgs e)
        {
            double RS1, RS2, TR1;

            try
            {
                RS1 = double.Parse(textBox1.Text);
                RS2 = double.Parse(textBox2.Text);
            }
            catch
            {
                MessageBox.Show("INPUT ERROR");
                RS1 = 0.0;
                RS2 = 0.0;
            }

            TR1 = RS1 + RS2;
            MessageBox.Show(TR1.ToString());
        }
Пример #5
0
		/// <summary>
		/// Initializes a new instance of the <see cref="libtr.TR2.RoomVertex"/> struct.
		/// </summary>
		/// <param name="vertex">The vertex.</param>
		/// <param name="lighting1">The first lighting value.</param>
		/// <param name="attributes">The rendering flags.</param>
		/// <param name="lighting2">The second lighting value.</param>
		public RoomVertex (
			TR1.Vertex vertex, Int16 lighting1,
			RoomRenderingEffect attributes, Int16 lighting2
		) : this (vertex, lighting1, (UInt16) attributes, lighting2) { }
Пример #6
0
		/// <summary>
		/// Initializes a new instance of the <see cref="libtr.TR4.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="type">The light type.</param>
		/// <param name="intensity">The light intensity.</param>
		/// <param name="_in">The hotspot.</param>
		/// <param name="_out">The falloff.</param>
		/// <param name="length">The length.</param>
		/// <param name="cutoff">The cutoff.</param>
		/// <param name="dx">Target X position.</param>
		/// <param name="dy">Target Y position.</param>
		/// <param name="dz">Target Z position.</param>
		/// <param name="unknown">Unknown.</param>
		public RoomLight (
			Int32 x, Int32 y, Int32 z,
			TR1.Color color, RoomLightType type, Byte intensity,
			Single _in, Single _out, Single length, Single cutoff,
			Single dx, Single dy, Single dz, Byte unknown = 0xFF) : this (
			x, y, z, color, (Byte) type, intensity,
			_in, _out, length, cutoff, dx, dy, dz, unknown) {
		}
Пример #7
0
		/// <summary>
		/// Initializes a new instance of the <see cref="libtr.TR4.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="type">The light type.</param>
		/// <param name="intensity">The light intensity.</param>
		/// <param name="_in">The hotspot.</param>
		/// <param name="_out">The falloff.</param>
		/// <param name="length">The length.</param>
		/// <param name="cutoff">The cutoff.</param>
		/// <param name="dx">Target X position.</param>
		/// <param name="dy">Target Y position.</param>
		/// <param name="dz">Target Z position.</param>
		/// <param name="unknown">Unknown.</param>
		public RoomLight (
			Int32 x, Int32 y, Int32 z,
			TR1.Color color, Byte type, Byte intensity,
			Single _in, Single _out, Single length, Single cutoff,
			Single dx, Single dy, Single dz, Byte unknown = 0xFF) : this () {
			X = x;
			Y = y;
			Z = z;
			Color = color;
			RawLightType = type;
			Intensity = intensity;
			In = _in;
			Out = _out;
			Length = length;
			Cutoff = cutoff;
			Dx = dx;
			Dy = dy;
			Dz = dz;
			Unknown = unknown;
		}