using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

using Para;
using ParaInt = Para.Para<int,int>;
using ParaDouble = Para.Para<double,double>;
using ParaString = Para.Para<string,string>;
using ParaIntDouble = Para.Para<int,double>;

namespace Pary
{    
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();            
        }        
        
        private void button1_Click(object sender, EventArgs e)
        {                                    
            Random r=new Random();            

            //int-double
            ParaIntDouble[] p = new ParaIntDouble[10];
            for (int i = 0; i < p.Length; i++)
                p[i] = new ParaIntDouble(r.Next(10), r.NextDouble());            
            string s = "";
            foreach (ParaIntDouble para in p) s += para.ToString() + "\n";
            MessageBox.Show("Para<int,double>\n" + s);
            Array.Sort(p);
            s = "";
            foreach (ParaIntDouble para in p) s += para.ToString() + "\n";
            MessageBox.Show("Para<int,double> po sortowaniu\n" + s);
        }
    }
}
