Friday 13 November 2015

Security Alarm System Project in C# for Beginners

This is the small interesting project for beginners to get motivation in programming. The program performs just like a security alarm system and generates different sounds and peeps on different situations.


Source Code 

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
Console.ForegroundColor = ConsoleColor.Magenta;
Console.WriteLine("\t\t\tLEP SECURIETY SYSTEM - C#\n\n");
Console.ForegroundColor = ConsoleColor.DarkGray;
Console.WriteLine("\t1 : Police \n");
Console.ForegroundColor = ConsoleColor.Green;
Console.WriteLine("\t2: Fire Alarm \n");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("\t3: Earthquake \n");
Console.ForegroundColor = ConsoleColor.Yellow;
Console.WriteLine("\t Press the Button for help\n");
int s = int.Parse(System.Console.ReadLine());

Console.ForegroundColor = ConsoleColor.DarkRed;
switch (s) {
case 1:
for (int i = 0; i < 10; i++) {
Console.Write("\a");
Console.Write("\tPlz Help us...\t");

}
break;
case 2:
for (int i = 0; i < 10; i++) {
System.Media.SystemSounds.Exclamation.Play();
Console.Write("\tPlz Help us...\t");

}
break;
case 3:
for (int i = 0; i < 10; i++)
{
System.Media.SystemSounds.Hand.Play();
Console.Write("\tPlz Help us...\t");
}
break;
default:

break;
}
int s1 = Console.Read();
Console.WriteLine("\a");
}
}
}

Output of the Program

security alarm system in C#

Share it Please
asad

About Author!

Asad Niazi is Software Engineer , Programmer, Web Developers and a young mentor of Tech Solutions Desk and Blogging Solutions . Asad Love to writes about Technology, Programming, Blogging and make money online.

11 comments: Post Yours! Read Comment Policy!▼
Important Note:
We have Zero Tolerance to Spam. Chessy Comments and Comments with Links will be deleted immediately upon our review.

  1. This is one of the most wonderful blog, this is work is tremendous. Thanks
    Time Management

    ReplyDelete
  2. Hey,Thank you for sharing such an amazing and informative post. Really enjoyed reading it.

    Web Based Omnichannel

    ReplyDelete
  3. Hey there, first of all thank you so much for this post and honestly I was searching for the same information from last few days. Keep posting and keep sharing.
    Cheap Software for Students

    ReplyDelete
  4. Hey there is the new articles in blogs. So really thank full through the information's. Thanks for sharing.



    Java training in Chennai

    ReplyDelete
  5. mfingro.com is the best options to choose Employee Benefits, Life Insurance Retirement Plans and Group Health Insurance or Employee Benefits Guide.

    ReplyDelete
  6. This content creates a new hope and inspiration with in me. Thanks for sharing article like this. The way you have stated everything above is quite awesome. Keep blogging like this. Thanks.


    SAP training in Chennai

    ReplyDelete
  7. Programming is combination of intelligent and creative work. Programmers can do anything with code. The entire Programming tutorials that you mention here on this blog are awesome. Beginners Heapalso provides latest tutorials of Programming from beginning to advance level.

    ReplyDelete
  8. This is one of the most wonderful blog, this is work is tremendous. Thanks
    my peopel here can enjoy some programming tips here
    http://www.stackoverflow.info/

    ReplyDelete
  9. how can i create this program using c programming

    Thank you

    ReplyDelete