Add project files.
This commit is contained in:
25
MetoderUppgift.sln
Normal file
25
MetoderUppgift.sln
Normal file
@@ -0,0 +1,25 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.14.36408.4 d17.14
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MetoderUppgift", "MetoderUppgift\MetoderUppgift.csproj", "{BABEC19A-A89A-4E67-871A-68DD536720B6}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{BABEC19A-A89A-4E67-871A-68DD536720B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{BABEC19A-A89A-4E67-871A-68DD536720B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{BABEC19A-A89A-4E67-871A-68DD536720B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{BABEC19A-A89A-4E67-871A-68DD536720B6}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {B857B06C-46F3-47A5-BF97-027A9FB132B0}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
183
MetoderUppgift/Form1.Designer.cs
generated
Normal file
183
MetoderUppgift/Form1.Designer.cs
generated
Normal file
@@ -0,0 +1,183 @@
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace MetoderUppgift
|
||||
{
|
||||
partial class Form1
|
||||
{
|
||||
/// <summary>
|
||||
/// Required designer variable.
|
||||
/// </summary>
|
||||
private System.ComponentModel.IContainer components = null;
|
||||
|
||||
/// <summary>
|
||||
/// Clean up any resources being used.
|
||||
/// </summary>
|
||||
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
|
||||
protected override void Dispose(bool disposing)
|
||||
{
|
||||
if (disposing && (components != null))
|
||||
{
|
||||
components.Dispose();
|
||||
}
|
||||
base.Dispose(disposing);
|
||||
}
|
||||
|
||||
#region Windows Form Designer generated code
|
||||
|
||||
/// <summary>
|
||||
/// Required method for Designer support - do not modify
|
||||
/// the contents of this method with the code editor.
|
||||
/// </summary>
|
||||
private void InitializeComponent()
|
||||
{
|
||||
components = new System.ComponentModel.Container();
|
||||
Throttle = new TrackBar();
|
||||
lblThr = new Label();
|
||||
lblVel = new Label();
|
||||
lblAcc = new Label();
|
||||
btnStart = new Button();
|
||||
Timer = new System.Windows.Forms.Timer(components);
|
||||
Car = new PictureBox();
|
||||
tbxAcceleration = new TextBox();
|
||||
tbxVelocity = new TextBox();
|
||||
lblMaxAcceleration = new Label();
|
||||
lblMaxHastighet = new Label();
|
||||
((System.ComponentModel.ISupportInitialize)Throttle).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)Car).BeginInit();
|
||||
SuspendLayout();
|
||||
//
|
||||
// Throttle
|
||||
//
|
||||
Throttle.Location = new Point(12, 438);
|
||||
Throttle.Maximum = 4;
|
||||
Throttle.Name = "Throttle";
|
||||
Throttle.Size = new Size(208, 90);
|
||||
Throttle.TabIndex = 0;
|
||||
Throttle.Value = 2;
|
||||
//
|
||||
// lblThr
|
||||
//
|
||||
lblThr.AutoSize = true;
|
||||
lblThr.Location = new Point(50, 514);
|
||||
lblThr.Name = "lblThr";
|
||||
lblThr.Size = new Size(126, 32);
|
||||
lblThr.TabIndex = 1;
|
||||
lblThr.Text = "Gaspådrag";
|
||||
//
|
||||
// lblVel
|
||||
//
|
||||
lblVel.AutoSize = true;
|
||||
lblVel.Location = new Point(26, 327);
|
||||
lblVel.Name = "lblVel";
|
||||
lblVel.Size = new Size(116, 32);
|
||||
lblVel.TabIndex = 2;
|
||||
lblVel.Text = "Hastighet";
|
||||
//
|
||||
// lblAcc
|
||||
//
|
||||
lblAcc.AutoSize = true;
|
||||
lblAcc.Location = new Point(26, 378);
|
||||
lblAcc.Name = "lblAcc";
|
||||
lblAcc.Size = new Size(145, 32);
|
||||
lblAcc.TabIndex = 3;
|
||||
lblAcc.Text = "Acceleration";
|
||||
//
|
||||
// btnStart
|
||||
//
|
||||
btnStart.Location = new Point(26, 260);
|
||||
btnStart.Name = "btnStart";
|
||||
btnStart.Size = new Size(150, 46);
|
||||
btnStart.TabIndex = 4;
|
||||
btnStart.Text = "Starta";
|
||||
btnStart.UseVisualStyleBackColor = true;
|
||||
btnStart.Click += btnStart_Click;
|
||||
//
|
||||
// Timer
|
||||
//
|
||||
Timer.Interval = 50;
|
||||
Timer.Tick += Timer_Tick;
|
||||
//
|
||||
// Car
|
||||
//
|
||||
Car.BackColor = Color.Transparent;
|
||||
Car.BackgroundImageLayout = ImageLayout.None;
|
||||
Car.Image = Properties.Resources.Car;
|
||||
Car.Location = new Point(552, 277);
|
||||
Car.Name = "Car";
|
||||
Car.Size = new Size(148, 159);
|
||||
Car.SizeMode = PictureBoxSizeMode.Zoom;
|
||||
Car.TabIndex = 7;
|
||||
Car.TabStop = false;
|
||||
//
|
||||
// tbxAcceleration
|
||||
//
|
||||
tbxAcceleration.Location = new Point(26, 153);
|
||||
tbxAcceleration.Name = "tbxAcceleration";
|
||||
tbxAcceleration.Size = new Size(288, 39);
|
||||
tbxAcceleration.TabIndex = 8;
|
||||
//
|
||||
// tbxVelocity
|
||||
//
|
||||
tbxVelocity.Location = new Point(26, 64);
|
||||
tbxVelocity.Name = "tbxVelocity";
|
||||
tbxVelocity.Size = new Size(288, 39);
|
||||
tbxVelocity.TabIndex = 9;
|
||||
//
|
||||
// lblMaxAcceleration
|
||||
//
|
||||
lblMaxAcceleration.AutoSize = true;
|
||||
lblMaxAcceleration.Location = new Point(26, 118);
|
||||
lblMaxAcceleration.Name = "lblMaxAcceleration";
|
||||
lblMaxAcceleration.Size = new Size(280, 32);
|
||||
lblMaxAcceleration.TabIndex = 10;
|
||||
lblMaxAcceleration.Text = "MaxAcceleration [m/s^2]";
|
||||
//
|
||||
// lblMaxHastighet
|
||||
//
|
||||
lblMaxHastighet.AutoSize = true;
|
||||
lblMaxHastighet.Location = new Point(26, 29);
|
||||
lblMaxHastighet.Name = "lblMaxHastighet";
|
||||
lblMaxHastighet.Size = new Size(226, 32);
|
||||
lblMaxHastighet.TabIndex = 11;
|
||||
lblMaxHastighet.Text = "Max hastighet [m/s]";
|
||||
//
|
||||
// Form1
|
||||
//
|
||||
AutoScaleDimensions = new SizeF(13F, 32F);
|
||||
AutoScaleMode = AutoScaleMode.Font;
|
||||
ClientSize = new Size(1083, 622);
|
||||
Controls.Add(lblMaxHastighet);
|
||||
Controls.Add(lblMaxAcceleration);
|
||||
Controls.Add(tbxVelocity);
|
||||
Controls.Add(tbxAcceleration);
|
||||
Controls.Add(Car);
|
||||
Controls.Add(btnStart);
|
||||
Controls.Add(lblAcc);
|
||||
Controls.Add(lblVel);
|
||||
Controls.Add(lblThr);
|
||||
Controls.Add(Throttle);
|
||||
MaximizeBox = false;
|
||||
Name = "Form1";
|
||||
Text = "Form1";
|
||||
Load += Form1_Load;
|
||||
((System.ComponentModel.ISupportInitialize)Throttle).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)Car).EndInit();
|
||||
ResumeLayout(false);
|
||||
PerformLayout();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
private TrackBar Throttle;
|
||||
private Label lblThr;
|
||||
private Label lblVel;
|
||||
private Label lblAcc;
|
||||
private Button btnStart;
|
||||
private System.Windows.Forms.Timer Timer;
|
||||
private PictureBox Car;
|
||||
private TextBox tbxAcceleration;
|
||||
private TextBox tbxVelocity;
|
||||
private Label lblMaxAcceleration;
|
||||
private Label lblMaxHastighet;
|
||||
}
|
||||
}
|
||||
125
MetoderUppgift/Form1.cs
Normal file
125
MetoderUppgift/Form1.cs
Normal file
@@ -0,0 +1,125 @@
|
||||
using System.Drawing;
|
||||
namespace MetoderUppgift
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
float velocity = 0; // [m/s]
|
||||
float vMax; // [m/s]
|
||||
float aMax; // [m/s^2]
|
||||
float engineBraking = 2; // [m/s^2]
|
||||
float dt = 0.1f; // [s]
|
||||
float stripeOffset = 0; // horizontal offset for stripes
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
void UpdateUI(float acceleration)
|
||||
{
|
||||
lblAcc.Text = "Acceleration: " + acceleration.ToString("0.00") + " [m/s<>]";
|
||||
lblVel.Text = "Hastighet: " + velocity.ToString("0.00") + " [m/s]";
|
||||
lblThr.Text = "Gasp<73>drag: " + GetThrottlePercentage().ToString("0.00") + " [%]";
|
||||
}
|
||||
|
||||
void ImplementSpecifications()
|
||||
{
|
||||
if (float.TryParse(tbxAcceleration.Text, out float result)) // tal fr<66>n str<74>ng, v<>rden blir NaN om input inte fungerar
|
||||
{
|
||||
aMax = result;
|
||||
}
|
||||
if (float.TryParse(tbxVelocity.Text, out float result2))
|
||||
{
|
||||
vMax = result2;
|
||||
}
|
||||
}
|
||||
void Simulate()
|
||||
{
|
||||
ImplementSpecifications(); // Uppdatera specifikationer av bilen angivna av textboxes
|
||||
|
||||
float acceleration = GetAcceleration(Throttle.Value); // H<>mta acceleration
|
||||
velocity += acceleration * dt; // Uppdatera Acceleration
|
||||
|
||||
UpdateUI(acceleration); // Uppdatera kontroller
|
||||
UpdateStripes(); // Uppdatera strecken p<> v<>gen f<>r att simulera grafisk hastighet
|
||||
|
||||
}
|
||||
|
||||
void UpdateStripes()
|
||||
{
|
||||
stripeOffset += 10 * velocity * dt; // Uppdatera avst<73>nd fr<66>n initial plats f<>r varje streck p<> v<>gen
|
||||
}
|
||||
float GetThrottlePercentage() //Omvanlda gasp<73>drag (0-4) till %
|
||||
{
|
||||
float percentage = (100 / Throttle.Maximum) * Throttle.Value;
|
||||
return percentage;
|
||||
}
|
||||
float GetAcceleration(int throttle) // Uppdatera accelerationen fr<66>n gasp<73>drag
|
||||
{
|
||||
if (velocity < 0)
|
||||
{
|
||||
velocity = 0;
|
||||
return 0; // Undvik negativ hastighet
|
||||
}
|
||||
|
||||
float ratio = (float)throttle / (float)Throttle.Maximum;
|
||||
float acceleration = ratio * aMax * (1.1f - velocity / vMax); // Formel f<>r att g<>ra fysik mer realistisk
|
||||
float netAcceleration = acceleration - engineBraking;
|
||||
|
||||
return netAcceleration;
|
||||
}
|
||||
|
||||
private void btnStart_Click(object sender, EventArgs e) //Start och stopp knapp
|
||||
{
|
||||
if (!Timer.Enabled)
|
||||
{
|
||||
Timer.Enabled = true;
|
||||
btnStart.Text = "Stopp";
|
||||
}
|
||||
else
|
||||
{
|
||||
Application.Exit();
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnPaint(PaintEventArgs e) // Paint funktion f<>r grafik
|
||||
{
|
||||
base.OnPaint(e);
|
||||
Graphics g = e.Graphics;
|
||||
|
||||
int roadX = 800;
|
||||
int roadWidth = 150;
|
||||
g.FillRectangle(Brushes.DimGray, roadX, 0, roadWidth, ClientSize.Height);
|
||||
Car.Location = new Point(800, ClientSize.Height / 2);
|
||||
|
||||
// Streck
|
||||
int stripeWidth = 10;
|
||||
int stripeHeight = 30;
|
||||
int gap = 200;
|
||||
int stripesCount = 5;
|
||||
int stripeX = roadX + roadWidth / 2 - stripeWidth / 2;
|
||||
int stripeY = 0;
|
||||
|
||||
for (int i = 0; i < stripesCount; i++)
|
||||
{
|
||||
g.FillRectangle(Brushes.White, stripeX, stripeY + stripeOffset, stripeWidth, stripeHeight); // Offset uppdateras varje tick. F<>r<EFBFBD>ndringshastighet av hastighet.
|
||||
stripeY += gap;
|
||||
if ((stripeOffset) > 200)
|
||||
{
|
||||
stripeOffset = 0; // Flytta tillbaka strecken om de hamnar utanf<6E>r rutan.
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
private void Timer_Tick(object sender, EventArgs e)
|
||||
{
|
||||
Simulate(); // Simulera fysik och grafik
|
||||
Invalidate(); // uppdatera grafik
|
||||
}
|
||||
|
||||
private void Form1_Load(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
123
MetoderUppgift/Form1.resx
Normal file
123
MetoderUppgift/Form1.resx
Normal file
@@ -0,0 +1,123 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<metadata name="Timer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>17, 17</value>
|
||||
</metadata>
|
||||
</root>
|
||||
30
MetoderUppgift/MetoderUppgift.csproj
Normal file
30
MetoderUppgift/MetoderUppgift.csproj
Normal file
@@ -0,0 +1,30 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>net9.0-windows</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Properties\Resources.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
17
MetoderUppgift/Program.cs
Normal file
17
MetoderUppgift/Program.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
namespace MetoderUppgift
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
/// <summary>
|
||||
/// The main entry point for the application.
|
||||
/// </summary>
|
||||
[STAThread]
|
||||
static void Main()
|
||||
{
|
||||
// To customize application configuration such as set high DPI settings or default font,
|
||||
// see https://aka.ms/applicationconfiguration.
|
||||
ApplicationConfiguration.Initialize();
|
||||
Application.Run(new Form1());
|
||||
}
|
||||
}
|
||||
}
|
||||
83
MetoderUppgift/Properties/Resources.Designer.cs
generated
Normal file
83
MetoderUppgift/Properties/Resources.Designer.cs
generated
Normal file
@@ -0,0 +1,83 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace MetoderUppgift.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("MetoderUppgift.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Car {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Car", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap Road3 {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("Road3", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
127
MetoderUppgift/Properties/Resources.resx
Normal file
127
MetoderUppgift/Properties/Resources.resx
Normal file
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
<xsd:attribute ref="xml:space" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="Car" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Car.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="Road3" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\Screenshot 2026-01-18 192524.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
BIN
MetoderUppgift/Resources/Car.png
Normal file
BIN
MetoderUppgift/Resources/Car.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 65 KiB |
BIN
MetoderUppgift/Resources/Screenshot 2026-01-18 192012.png
Normal file
BIN
MetoderUppgift/Resources/Screenshot 2026-01-18 192012.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
MetoderUppgift/Resources/Screenshot 2026-01-18 192524.png
Normal file
BIN
MetoderUppgift/Resources/Screenshot 2026-01-18 192524.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 8.6 KiB |
Reference in New Issue
Block a user