Tuesday 21 November 2017

Snake Ladder Game in windows Form C# (PART-1)





Load event:
pictureBox3.Image
=
Image.FromFile(@"C:\Users\salman\Documents\Visual Studio
2013\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Resources\roll.png"
);
           pictureBox3.SizeMode = PictureBoxSizeMode.StretchImage;

roll dice button:
label2.Text = logics.rolldice(pictureBox3).ToString();

class:
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication3
{
    class logics
    {


        public static int rolldice(PictureBox px)
        {

            int dice = 0;
            Random r = new Random();
            dice = r.Next(1, 7);
            px.Image = Image.FromFile(@"C:\Users\salman\Documents\Visual Studio
2013\Projects\WindowsFormsApplication3\WindowsFormsApplication3\Resources\"
+ dice + ".png");
            px.SizeMode = PictureBoxSizeMode.StretchImage;

            return dice;
       
       
        } //roll dice
method end................



    }
}



Pass Dynamically Added Html Table Records List To Controller In Asp.net MVC

Controller Code: using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using ...