Showing posts with label C-sharp. Show all posts
Showing posts with label C-sharp. Show all posts

Tuesday, July 17

MYSQL Connection with C# WPF Application

Download Here: MySQL_C#WPF_Connection
Hello guys, today i’m gonna teach you how to connect MYSQL with MS visual studio c#. This tutorial is about MySQL workbench 5.2 and MySQL server 5.5, make sure both are installed in your PC.so let’s get started first of all open MySQL workbench 5.2 then click on New Server Instance. And follow the steps to configure your server. When you are done make a database let’s say I made a database name “Text” and Server name is Localhost.

Friday, January 27

Create custom window in Wpf Application


Hello Once again, today tutorial is about how to create a custom window in wpf application, and how to integrate this application like other normal window by adding functionality into it. So without any further delay let’s get started, this tutorial is based on WPF technology, in which you code in xaml and c# languages, WPF is an acronym for Windows Presentation Foundation, Microsoft Visual studio c# 2010 or lower version are built with WPF technology.

Tuesday, January 17

Media Player Guide in WPF (XAML) and c# code

Hello Guys, today i'm gonna show you how to make media player in wpf application, its very simple, so lets get started.
Steps

  • Lets begin with xaml (Designe) code of application. Wpf provides Media Element control which is used to load media files, in the toolbox you will find it, you can drag and drop onto your mainWindow or write a xaml code, Media Element is the class so in the angular brackets you will write MediaElement then you will give Name to your Media Element, Name is same like you are creating an object of respective class.

Friday, January 13

Paint Application in WPF (XAML) and C# Code

Hello guys, today i'm gonna show you how to make a simple paint application in wpf application using XAML for its GUI and c# for its back end coding, this application is equipped with Buttons, labels and InkCanvas,
so lets start it, first of all open MS visual Studio C# 2010, open a new project (WPF application), you will be shown a window, in the designer window we will make GUI of application, here is the screenshot, you have to follow these steps to make this application.
  • Divide your main Grid into two columns by writing this code

            <Grid.ColumnDefinitions >
                  <ColumnDefinition Width="100*" />
                    <ColumnDefinition Width="425*" />
                  </Grid.ColumnDefinitions>


          Tuesday, January 3

          LUDO Board in WPF (XAML) Code




          <Window x:Class="WpfApplication1.MainWindow"
                  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  Title="MainWindow" Height="500" Width="500">

          Monday, January 2

          Chess Board in WPF (XAML) code


          <Window x:Class="WpfApplication1.MainWindow"        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                  Title="MainWindow" Height="350" Width="525">

          Sunday, October 23

          Characters Validation in Name field using C-sharp Language

          The following program is to validate name field. There is a methods which is user defined named as checkEntry which is taking string as an argument. In this method a loop is used which is starting from 0 to string length. Code is pretty simple and anyone can understand it very easily. You will some useless variable and class in this code. You do not need to create another class and user defined method. This can be done in main method. Copy code from user defined method and paste it in main method and handle this in a loop as per requirement i have used 'while' loop here.

          Sunday, October 9

          Composition Concept using C-sharp language source code


          Composition is basically has a relationship and deals with the object creation in different classes. It is different from Inheritance. Object composition is a way to combine simple objects into more complex ones. Compositions are a critical building block of many basic data structures, including the tagged union, the linked list, and the binary tree, as well as the object used in object-oriented programming. Composited  objects are often referred to as having a "has a" relationship.

          Friday, October 7

          Exception Handling using C-Sharp Language


          Exception occurs when user tries enters an invalid value like we have provided user with an application to enter an interger and he/she enters a string value as in input. If the exception is not handled at this point then your application will crash ultimately. Exceptions are unforeseen errors that happen in your programs. Most of the time, you can, and should, detect and handle program errors in your code. In lower level languages exceptions are not being handled. But if you move to the higher level language like c-Sharp, java. Microsoft provides special techniques to the developer so by using these methods properly you can protect your application from being crashed.

          Age Calculator using User define Methods


          Another example of Console application using c sharp language. lets find out how this program works. i have made different classes like validateMonth, validateDay  which does not need to be made. it works fine if you do not make these classes. you want to calculate your age(Years, Months, Days) you only need to enter date of birth and subtract date of birth from today's Date. you will be shown output very accurate but this application for those who will not commit a mistake while entering the data of birth. to make it generic it requires some validations that will not allow the user to enter incorrect date of birth.