コード例 #1
0
ファイル: Form1.cs プロジェクト: RosanaAlcheva/FruitManiac
        public Form1(String ime, PocetnaForma pf)
        {
            InitializeComponent();
            igracIme = ime;
            this.igraci = pf.igraci;
            fruits = new List<Fruit>();
            toolStripStatusLabel1.Text = "";
            this.DoubleBuffered = true;
            selected = false;
            pf = new PocetnaForma();
            this.pf = pf;
            i1 = new Igrac(igracIme);

            timer1.Start();
            timer2.Start();

               //za kopceto  da bide okruglo i bez  border
               System.Drawing.Drawing2D.GraphicsPath ag = new System.Drawing.Drawing2D.GraphicsPath();
               ag.AddArc(0, 0, button1.Width, button1.Height, 0, 360);
               button1.Region = new Region(ag);
               button1.TabStop = false;
               button1.FlatStyle = FlatStyle.Flat;
               button1.FlatAppearance.BorderSize = 0;

              //za play kopceto
               System.Drawing.Drawing2D.GraphicsPath ag1 = new System.Drawing.Drawing2D.GraphicsPath();
               ag1.AddArc(0, 0, button2.Width, button2.Height, 0, 360);
               button2.Region = new Region(ag1);
               button2.TabStop = false;
               button2.FlatStyle = FlatStyle.Flat;
               button2.FlatAppearance.BorderSize = 0;
        }
コード例 #2
0
        public Form1(String ime, PocetnaForma pf)
        {
            InitializeComponent();
            igracIme    = ime;
            this.igraci = pf.igraci;
            fruits      = new List <Fruit>();
            toolStripStatusLabel1.Text = "";
            this.DoubleBuffered        = true;
            selected = false;
            pf       = new PocetnaForma();
            this.pf  = pf;
            i1       = new Igrac(igracIme);


            timer1.Start();
            timer2.Start();


            //za kopceto  da bide okruglo i bez  border
            System.Drawing.Drawing2D.GraphicsPath ag = new System.Drawing.Drawing2D.GraphicsPath();
            ag.AddArc(0, 0, button1.Width, button1.Height, 0, 360);
            button1.Region    = new Region(ag);
            button1.TabStop   = false;
            button1.FlatStyle = FlatStyle.Flat;
            button1.FlatAppearance.BorderSize = 0;

            //za play kopceto
            System.Drawing.Drawing2D.GraphicsPath ag1 = new System.Drawing.Drawing2D.GraphicsPath();
            ag1.AddArc(0, 0, button2.Width, button2.Height, 0, 360);
            button2.Region    = new Region(ag1);
            button2.TabStop   = false;
            button2.FlatStyle = FlatStyle.Flat;
            button2.FlatAppearance.BorderSize = 0;
        }
コード例 #3
0
        private void Sortiraj(List <Igrac> t)
        {
            int n = t.Count();

            if (t.Count() > 1)
            {
                for (int i = 0; i < n - 1; i++)
                {
                    for (int j = i + 1; j < n; j++)
                    {
                        if (t[j].poeni > t[i].poeni)
                        {
                            Igrac pomosen = t[i];
                            t[i] = t[j];
                            t[j] = pomosen;
                        }
                    }
                }
            }
        }