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.

17 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. thanks for creating a nice post on c programming but did you know what is loop in c programming

    ReplyDelete
  4. You tried something new!! Good for you! I’m always afraid I’ll mess up when I try new stuff. What made you decide to try something new? I’d like to get motivated. Maybe you have some ideas you can share. Java training jalandhar

    ReplyDelete
  5. Great post!

    Useful information worthy of thanks ,

    http://ixgram.com

    ReplyDelete
  6. 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
  7. Thanks for sharing,, it's very helpful post and like to read.. thanks.. Best Private University Punjab

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



    Java training in Chennai

    ReplyDelete
  9. Wow amazing i saw the article with execution models you had posted. It was such informative. Really its a wonderful article. Thank you for sharing and please keep update like this type of article because i want to learn more relevant to this topic.

    Dotnet Training in Chennai

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

    ReplyDelete
  11. 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
  12. 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
  13. 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
  14. how can i create this program using c programming

    Thank you

    ReplyDelete