6 months ago
parent
commit
6e07e03125

+ 86 - 0
04_1_Metody/04_1_Metody.csproj

@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProjectGuid>{1ABEB784-2F78-4DDD-9FCB-C748FD1023A3}</ProjectGuid>
+    <OutputType>WinExe</OutputType>
+    <RootNamespace>_04_1_Metody</RootNamespace>
+    <AssemblyName>04_1_Metody</AssemblyName>
+    <TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
+    <Deterministic>true</Deterministic>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <PlatformTarget>AnyCPU</PlatformTarget>
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core" />
+    <Reference Include="System.Xml.Linq" />
+    <Reference Include="System.Data.DataSetExtensions" />
+    <Reference Include="Microsoft.CSharp" />
+    <Reference Include="System.Data" />
+    <Reference Include="System.Deployment" />
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Net.Http" />
+    <Reference Include="System.Windows.Forms" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Class1.cs" />
+    <Compile Include="Ext.cs" />
+    <Compile Include="Form1.cs">
+      <SubType>Form</SubType>
+    </Compile>
+    <Compile Include="Form1.Designer.cs">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Program.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Robo.cs" />
+    <EmbeddedResource Include="Form1.resx">
+      <DependentUpon>Form1.cs</DependentUpon>
+    </EmbeddedResource>
+    <EmbeddedResource Include="Properties\Resources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
+      <SubType>Designer</SubType>
+    </EmbeddedResource>
+    <Compile Include="Properties\Resources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Resources.resx</DependentUpon>
+    </Compile>
+    <None Include="Properties\Settings.settings">
+      <Generator>SettingsSingleFileGenerator</Generator>
+      <LastGenOutput>Settings.Designer.cs</LastGenOutput>
+    </None>
+    <Compile Include="Properties\Settings.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DependentUpon>Settings.settings</DependentUpon>
+      <DesignTimeSharedInput>True</DesignTimeSharedInput>
+    </Compile>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="App.config" />
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+</Project>

+ 6 - 0
04_1_Metody/App.config

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<configuration>
+    <startup> 
+        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
+    </startup>
+</configuration>

+ 15 - 0
04_1_Metody/Class1.cs

@@ -0,0 +1,15 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace _04_1_Metody
+{
+  public class Class1
+  {
+    public string S { get; set; }
+    public DateTime d;
+    public int[] t;
+  }
+}

+ 31 - 0
04_1_Metody/Ext.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace _04_1_Metody
+{
+  public static class Ext
+  {
+    public static string Bez3PierwszychiOstatnich(this string s)
+    {
+      if (s.Length >= 6)
+        return s.Substring(3, s.Length - 6);
+      else
+        return null;
+    }
+
+
+    public static DateTime DodajDoDtDni(DateTime dt, int i)
+    {
+      return dt.AddDays(i);
+    }
+
+    public static DateTime DodajDoDtDni(this Class1 c, int i)
+    {
+      return c.d.AddDays(i);
+    }
+
+  }
+}

+ 139 - 0
04_1_Metody/Form1.Designer.cs

@@ -0,0 +1,139 @@
+namespace _04_1_Metody
+{
+  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()
+    {
+      this.button1 = new System.Windows.Forms.Button();
+      this.button2 = new System.Windows.Forms.Button();
+      this.button3 = new System.Windows.Forms.Button();
+      this.button4 = new System.Windows.Forms.Button();
+      this.button5 = new System.Windows.Forms.Button();
+      this.button6 = new System.Windows.Forms.Button();
+      this.button7 = new System.Windows.Forms.Button();
+      this.SuspendLayout();
+      // 
+      // button1
+      // 
+      this.button1.Location = new System.Drawing.Point(16, 22);
+      this.button1.Name = "button1";
+      this.button1.Size = new System.Drawing.Size(155, 73);
+      this.button1.TabIndex = 0;
+      this.button1.Text = "Met01";
+      this.button1.UseVisualStyleBackColor = true;
+      this.button1.Click += new System.EventHandler(this.button1_Click);
+      // 
+      // button2
+      // 
+      this.button2.Location = new System.Drawing.Point(177, 26);
+      this.button2.Name = "button2";
+      this.button2.Size = new System.Drawing.Size(96, 69);
+      this.button2.TabIndex = 1;
+      this.button2.Text = "Met02";
+      this.button2.UseVisualStyleBackColor = true;
+      this.button2.Click += new System.EventHandler(this.button2_Click);
+      // 
+      // button3
+      // 
+      this.button3.Location = new System.Drawing.Point(279, 26);
+      this.button3.Name = "button3";
+      this.button3.Size = new System.Drawing.Size(96, 69);
+      this.button3.TabIndex = 2;
+      this.button3.Text = "Met03";
+      this.button3.UseVisualStyleBackColor = true;
+      this.button3.Click += new System.EventHandler(this.button3_Click);
+      // 
+      // button4
+      // 
+      this.button4.Location = new System.Drawing.Point(12, 153);
+      this.button4.Name = "button4";
+      this.button4.Size = new System.Drawing.Size(155, 73);
+      this.button4.TabIndex = 3;
+      this.button4.Text = "Met04";
+      this.button4.UseVisualStyleBackColor = true;
+      this.button4.Click += new System.EventHandler(this.button4_Click);
+      // 
+      // button5
+      // 
+      this.button5.Location = new System.Drawing.Point(177, 153);
+      this.button5.Name = "button5";
+      this.button5.Size = new System.Drawing.Size(96, 69);
+      this.button5.TabIndex = 4;
+      this.button5.Text = "Met05";
+      this.button5.UseVisualStyleBackColor = true;
+      this.button5.Click += new System.EventHandler(this.button5_Click);
+      // 
+      // button6
+      // 
+      this.button6.Location = new System.Drawing.Point(330, 125);
+      this.button6.Name = "button6";
+      this.button6.Size = new System.Drawing.Size(248, 128);
+      this.button6.TabIndex = 5;
+      this.button6.Text = "statyczne";
+      this.button6.UseVisualStyleBackColor = true;
+      this.button6.Click += new System.EventHandler(this.button6_Click);
+      // 
+      // button7
+      // 
+      this.button7.Location = new System.Drawing.Point(330, 259);
+      this.button7.Name = "button7";
+      this.button7.Size = new System.Drawing.Size(248, 128);
+      this.button7.TabIndex = 6;
+      this.button7.Text = "rozszerzające";
+      this.button7.UseVisualStyleBackColor = true;
+      this.button7.Click += new System.EventHandler(this.button7_Click);
+      // 
+      // Form1
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.ClientSize = new System.Drawing.Size(800, 450);
+      this.Controls.Add(this.button7);
+      this.Controls.Add(this.button6);
+      this.Controls.Add(this.button5);
+      this.Controls.Add(this.button4);
+      this.Controls.Add(this.button3);
+      this.Controls.Add(this.button2);
+      this.Controls.Add(this.button1);
+      this.Name = "Form1";
+      this.Text = "Form1";
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Button button1;
+    private System.Windows.Forms.Button button2;
+    private System.Windows.Forms.Button button3;
+    private System.Windows.Forms.Button button4;
+    private System.Windows.Forms.Button button5;
+    private System.Windows.Forms.Button button6;
+    private System.Windows.Forms.Button button7;
+  }
+}
+

+ 103 - 0
04_1_Metody/Form1.cs

@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace _04_1_Metody
+{
+  public partial class Form1 : Form
+  {
+    public Form1()
+    {
+      InitializeComponent();
+    }
+
+    Robo r = new Robo();
+
+    private void button1_Click(object sender, EventArgs e)
+    {
+      int i = 123;
+      string s = "Ala ma kota";
+      bool b = false;
+      //MessageBox.Show($"Przed Met01: i: {i}  s: {s}  b: {b}");
+      r.Met01(i, s, b);
+      MessageBox.Show($"Po Met01: i: {i}  s: {s}  b: {b}");
+    }
+
+    private void button2_Click(object sender, EventArgs e)
+    {
+      int i = 123;
+      string s = "Ala ma kota";
+      bool b = false;
+      MessageBox.Show($"Przed Met02: i: {i}  s: {s}  b: {b}");
+      r.Met02(ref i, ref s, ref b);
+      MessageBox.Show($"Po Met02: i: {i}  s: {s}  b: {b}");
+    }
+
+    private void button3_Click(object sender, EventArgs e)
+    {
+      int i = 123;
+      string s = "Ala ma kota";
+      bool b = false;
+      MessageBox.Show($"Przed Met03: i: {i}  s: {s}  b: {b}");
+      r.Met03(out i, out s, out b);
+      MessageBox.Show($"Po Met03: i: {i}  s: {s}  b: {b}");
+    }
+
+    private void button4_Click(object sender, EventArgs e)
+    {
+      double[] d = new double[10];
+      d[0] = Math.PI;
+      Class1 c = new Class1();
+      c.d = DateTime.Now;
+      c.t = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+      c.S = "Ala ma kota";
+      DateTime dt = new DateTime(2025, 1, 1);
+      MessageBox.Show($"Przed Met04: d[0]: {d[0]}  c.t[0]: {c.t[0]} c.d: {c.d} dt: {dt}");
+      r.Met04(d, c, dt);
+      MessageBox.Show($"Po Met04: d[0]: {d[0]}  c.t[0]: {c.t[0]} c.d: {c.d} dt: {dt}");
+    }
+
+    private void button5_Click(object sender, EventArgs e)
+    {
+      double[] d = new double[10];
+      d[0] = Math.PI;
+      Class1 c = new Class1();
+      c.d = DateTime.Now;
+      c.t = new int[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
+      c.S = "Ala ma kota";
+      DateTime dt = new DateTime(2025, 1, 1);
+      MessageBox.Show($"Przed Met05: d[0]: {d[0]}  c.t[0]: {c.t[0]} c.d: {c.d} dt: {dt}");
+      r.Met05(ref d, ref c, ref dt);
+      MessageBox.Show($"Po Met05: d[0]: {d[0]}  c.t[0]: {c.t[0]} c.d: {c.d} dt: {dt}");
+    }
+
+    private void button6_Click(object sender, EventArgs e)
+    {
+      double r = 100;
+      double P = Robo.ObliczPiRKwadrat(r);
+      MessageBox.Show($"Pole okręgu o promieniu {r}: {P}");
+
+      //Robo.metodaStat(0, 0, "", DateTime.Now, new decimal[] { 325, 2356, 21354 }, new Class1());
+    }
+
+    private void button7_Click(object sender, EventArgs e)
+    {
+      string s = "Ala ma kota";
+      s = s.Bez3PierwszychiOstatnich();
+      MessageBox.Show(s);
+
+      Class1 c = new Class1();
+      c.d = DateTime.Now;
+
+      MessageBox.Show($"{Ext.DodajDoDtDni(c.d, 3)}");
+      MessageBox.Show($"{c.DodajDoDtDni(3)}");
+
+    }
+  }
+}

+ 120 - 0
04_1_Metody/Form1.resx

@@ -0,0 +1,120 @@
+<?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>
+</root>

+ 22 - 0
04_1_Metody/Program.cs

@@ -0,0 +1,22 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace _04_1_Metody
+{
+  internal static class Program
+  {
+    /// <summary>
+    /// The main entry point for the application.
+    /// </summary>
+    [STAThread]
+    static void Main()
+    {
+      Application.EnableVisualStyles();
+      Application.SetCompatibleTextRenderingDefault(false);
+      Application.Run(new Form1());
+    }
+  }
+}

+ 36 - 0
04_1_Metody/Properties/AssemblyInfo.cs

@@ -0,0 +1,36 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("04_1_Metody")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("04_1_Metody")]
+[assembly: AssemblyCopyright("Copyright ©  2024")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible
+// to COM components.  If you need to access a type in this assembly from
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("1abeb784-2f78-4ddd-9fcb-c748fd1023a3")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Build and Revision Numbers
+// by using the '*' as shown below:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]

+ 71 - 0
04_1_Metody/Properties/Resources.Designer.cs

@@ -0,0 +1,71 @@
+//------------------------------------------------------------------------------
+// <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 _04_1_Metody.Properties
+{
+
+
+  /// <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", "4.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 ((resourceMan == null))
+        {
+          global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("_04_1_Metody.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;
+      }
+    }
+  }
+}

+ 117 - 0
04_1_Metody/Properties/Resources.resx

@@ -0,0 +1,117 @@
+<?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.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: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" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+            </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" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+            </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=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+</root>

+ 30 - 0
04_1_Metody/Properties/Settings.Designer.cs

@@ -0,0 +1,30 @@
+//------------------------------------------------------------------------------
+// <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 _04_1_Metody.Properties
+{
+
+
+  [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+  [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")]
+  internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase
+  {
+
+    private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
+
+    public static Settings Default
+    {
+      get
+      {
+        return defaultInstance;
+      }
+    }
+  }
+}

+ 7 - 0
04_1_Metody/Properties/Settings.settings

@@ -0,0 +1,7 @@
+<?xml version='1.0' encoding='utf-8'?>
+<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)">
+  <Profiles>
+    <Profile Name="(Default)" />
+  </Profiles>
+  <Settings />
+</SettingsFile>

+ 118 - 0
04_1_Metody/Robo.cs

@@ -0,0 +1,118 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Forms;
+
+namespace _04_1_Metody
+{
+  public class Robo
+  {
+    public void Met01(int i1, string s1, bool b1)
+    {
+      MessageBox.Show($"Na wejściu: i1: {i1}  s1: {s1}  b1: {b1}");
+      i1 = i1 * 2;
+      s1 = s1 + " " + DateTime.Now.ToString("HH:mm:ss");
+      b1 = !b1;
+      MessageBox.Show($"Na wyjściu: i1: {i1}  s1: {s1}  b1: {b1}");
+    }
+
+    public void Met02(ref int i1, ref string s1, ref bool b1)
+    {
+      MessageBox.Show($"Na wejściu: i1: {i1}  s1: {s1}  b1: {b1}");
+      i1 = i1 * 2;
+      s1 = s1 + " " + DateTime.Now.ToString("HH:mm:ss");
+      b1 = !b1;
+      MessageBox.Show($"Na wyjściu: i1: {i1}  s1: {s1}  b1: {b1}");
+    }
+
+    public void Met03(out int i1, out string s1, out bool b1)
+    {
+      //MessageBox.Show($"Na wejściu: i1: {i1}  s1: {s1}  b1: {b1}");
+      //i1 = i1 * 2;
+      i1 = 1234;
+      //s1 = s1 + " " + DateTime.Now.ToString("HH:mm:ss");
+      s1 = "Ola ma psa " + DateTime.Now.ToString("HH:mm:ss");
+      //b1 = !b1;
+      b1 = true;
+      MessageBox.Show($"Na wyjściu: i1: {i1}  s1: {s1}  b1: {b1}");
+    }
+
+
+    public void Met04(double[] d, Class1 c, DateTime dt)
+    {
+      MessageBox.Show($"Na wejściu: d[0]: {d[0]}  c.t[0]: {c.t[0]} c.d: {c.d} dt: {dt}");
+      d[0] += 10;
+      c.t[0] = 666;
+      c.d = c.d.AddMonths(1);
+      dt = dt.AddDays(1);
+      c = new Class1();
+      c.d = new DateTime(2000, 1, 1);
+      c.t = new int[] { 6, 6, 6 };
+      c.S = "A kuku";
+      MessageBox.Show($"Na wyjściu: d[0]: {d[0]}  c.t[0]: {c.t[0]} c.d: {c.d} dt: {dt}");
+    }
+
+    public void Met05(ref double[] d, ref Class1 c, ref DateTime dt)
+    {
+      MessageBox.Show($"Na wejściu: d[0]: {d[0]}  c.t[0]: {c.t[0]} c.d: {c.d} dt: {dt}");
+      d[0] += 10;
+      c.t[0] = 666;
+      c.d = c.d.AddMonths(1);
+      dt = dt.AddDays(1);
+      c = new Class1();
+      c.d = new DateTime(2000, 1, 1);
+      c.t = new int[] { 6, 6, 6 };
+      c.S = "A kuku";
+      MessageBox.Show($"Na wyjściu: d[0]: {d[0]}  c.t[0]: {c.t[0]} c.d: {c.d} dt: {dt}");
+    }
+
+
+    public static double ObliczPiRKwadrat(double r)
+    {
+      return Math.PI * r * r;
+    }
+
+    public static double ObliczPiRKwadrat(ref double r2)
+    {
+      return Math.PI * r2 * r2;
+    }
+
+    //public static double ObliczPiRKwadrat(out double r)
+    //{
+    //  r2 = 12;
+    //  return Math.PI * r2 * r2;
+    //}
+
+
+
+    public static void metodaStat(int i, double d, string s, DateTime dt, decimal[] dec, Class1 c, int k = 123)
+    {
+      MessageBox.Show("Z k");
+    }
+
+
+    public static void metodaStat(int i, double d, string s, DateTime dt, decimal[] dec, Class1 c)
+    {
+      MessageBox.Show("Bez k");
+    }
+
+    public static void metodaStat(double d, int i, string s, DateTime dt, decimal[] dec, Class1 c)
+    {
+      MessageBox.Show("Bez k");
+    }
+
+
+    public static void KKK()
+    { 
+    }
+    //public static string KKK()
+    //{
+    //  return "Ala ma kota";
+    //}
+
+
+
+  }
+}

+ 6 - 0
ProgOb_2024 II - VI.sln

@@ -23,6 +23,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "03_3_Tabliczka2", "03_3_Tab
 EndProject
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "03_4_Tabliczka2_WPF", "03_4_Tabliczka2_WPF\03_4_Tabliczka2_WPF.csproj", "{37C76F73-92A4-4BB8-BAD2-BC8C2BB97729}"
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "03_4_Tabliczka2_WPF", "03_4_Tabliczka2_WPF\03_4_Tabliczka2_WPF.csproj", "{37C76F73-92A4-4BB8-BAD2-BC8C2BB97729}"
 EndProject
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "04_1_Metody", "04_1_Metody\04_1_Metody.csproj", "{1ABEB784-2F78-4DDD-9FCB-C748FD1023A3}"
+EndProject
 Global
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Any CPU = Debug|Any CPU
 		Debug|Any CPU = Debug|Any CPU
@@ -69,6 +71,10 @@ Global
 		{37C76F73-92A4-4BB8-BAD2-BC8C2BB97729}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{37C76F73-92A4-4BB8-BAD2-BC8C2BB97729}.Debug|Any CPU.Build.0 = Debug|Any CPU
 		{37C76F73-92A4-4BB8-BAD2-BC8C2BB97729}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{37C76F73-92A4-4BB8-BAD2-BC8C2BB97729}.Release|Any CPU.ActiveCfg = Release|Any CPU
 		{37C76F73-92A4-4BB8-BAD2-BC8C2BB97729}.Release|Any CPU.Build.0 = Release|Any CPU
 		{37C76F73-92A4-4BB8-BAD2-BC8C2BB97729}.Release|Any CPU.Build.0 = Release|Any CPU
+		{1ABEB784-2F78-4DDD-9FCB-C748FD1023A3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{1ABEB784-2F78-4DDD-9FCB-C748FD1023A3}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{1ABEB784-2F78-4DDD-9FCB-C748FD1023A3}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{1ABEB784-2F78-4DDD-9FCB-C748FD1023A3}.Release|Any CPU.Build.0 = Release|Any CPU
 	EndGlobalSection
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
 		HideSolutionNode = FALSE