SEARCH C# PROGRAMMING CODES HERE

Media Player in C# Visual Studio By Rohit Programming Zone

Media Player  in C# Visual Studio



 

Source Code

-----------------------------------------------------------------------------------------------------------------------------

using System;

using System.Windows.Forms;

 

namespace Media_Player_in_C_Sharp_By_Rohit_Programming_Zone

{

    public partial class Form1 : Form

    {

        public Form1()

        {

            InitializeComponent();

        }

        string[] paths, files;

 

        private void btn_open_Click(object sender, EventArgs e)

        {

            OpenFileDialog ofd = new OpenFileDialog();

            ofd.Multiselect = true;

            if(ofd.ShowDialog()==System.Windows.Forms.DialogResult.OK)

            {

                files = ofd.SafeFileNames;

                paths = ofd.FileNames;

                for(int x=0;x<files.Length;x++)

                {

                    track_list.Items.Add(files[x]);

                }

            }

        }

 

        private void track_list_SelectedIndexChanged(object sender, EventArgs e)

        {

            player.URL = paths[track_list.SelectedIndex];

            player.Ctlcontrols.play();

            lbl_msg.Text = "Playing...";

            timer1.Start();

            trackBar1.Value = 15;

            lbl_volume.Text = trackBar1.Value.ToString() + "%";

        }

 

        private void btn_play_Click(object sender, EventArgs e)

        {

            player.Ctlcontrols.play();

            lbl_msg.Text = "Playing...";

        }

 

        private void btn_pause_Click(object sender, EventArgs e)

        {

            player.Ctlcontrols.pause();

            lbl_msg.Text = "Pause";

        }

 

        private void btn_stop_Click(object sender, EventArgs e)

        {

            player.Ctlcontrols.stop();

            lbl_msg.Text = "Stop";

 

        }

 

        private void btn_next_Click(object sender, EventArgs e)

        {

            if(track_list.SelectedIndex<track_list.Items.Count-1)

            {

                track_list.SelectedIndex = track_list.SelectedIndex + 1;

            }

        }

 

        private void btn_prev_Click(object sender, EventArgs e)

        {

            if(track_list.SelectedIndex>0)

            {

                track_list.SelectedIndex = track_list.SelectedIndex - 1;

            }

        }

 

        private void timer1_Tick(object sender, EventArgs e)

        {

            if(player.playState==WMPLib.WMPPlayState.wmppsPlaying)

            {

                progressBar1.Maximum = (int)player.Ctlcontrols.currentItem.duration;

                progressBar1.Value = (int)player.Ctlcontrols.currentPosition;

 

            }

            lbl_track_start.Text = player.Ctlcontrols.currentPositionString;

            lbl_track_end.Text = player.Ctlcontrols.currentItem.durationString.ToString();

 

        }

 

        private void trackBar1_Scroll(object sender, EventArgs e)

        {

            player.settings.volume = trackBar1.Value;

            lbl_volume.Text = trackBar1.Value.ToString()+"%";

        }

 

    }

}

 

 

 ========================================================================





Rocket Launch Game in C# Visual Studio By Rohit Programming zone

In this video you will see ,how you can create a Rocket Launch Game in C# Visual Studio .

Resource Files Link-Download


Plane Flying Game in C# Visual Studio By Rohit Programming Zone

In this video you will see , How you can create a Plane Flying Game in C# Visual Studio















Source Code-Download

C# Game Programming with Unity 3D

An Accessible, Modular Style of Game Building Easily Start Making Games with Unity 3D C# Game Programming Cookbook for Unity 3D presents a highly flexible core framework to create just about any type of game by plugging in different script components. Most scripts function within the game framework or in your own structures. The techniques and concepts discussed in the book give you a solid foundation in game development. The first ten chapters set up the flexible, reusable framework based in C# and suitable for all game types. The book also explains scripting of generic, reusable, and common functionality. The remainder of the text adds game-specific code to the framework to create four example games: a top-down arena shooter, a futuristic racing combat game, a tank arena deathmatch game, and a classic arcade-style vertical scrolling shootem up. The games encompass artificial intelligence (path following, target chasing, and line-of-sight patrolling behaviors), game state control, wheel colliders, and weapon inventory management. The example files are available for download on the book‘s CRC Press web page. Reducing your recoding, repurposing, or adaptation time, this book provides script-based components that you can use to jump start your own projects. The book‘s modular components can be mixed and matched to build various kinds of video games for the Unity game engine.
https://www.amazon.in/gp/product/1138413720/ref=as_li_ss_tl?ie=UTF8&linkCode=ll1&tag=rpzone-21&linkId=415d0f09e8b67e3ee2acb225df71443d&language=en_IN