|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace IndianFormatDemo
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != "")
{
try
{
decimal val = decimal.Parse(textBox1.Text);
//int val = int.Parse(textBox1.Text);
label1.Text = Indian.IndianCurrency.CurFromat((long)val, true);
label2.Text = Indian.IndianCurrency.CurFromatWthDecimal(val, false);
label3.Text = Indian.IndianCurrency.toWords(val, "hi",false);
label4.Text = Indian.IndianCurrency.toWords(val, "en",false);
label5.Text = Indian.IndianCurrency.toWords(val, "hi", true);
label6.Text = Indian.IndianCurrency.toWords(val, "en", true);
label7.Text = Indian.IndianCurrency.toWords(val, "Marathi", true);
//label8.Text = Indian.IndianCurrency.toWords(val, "en", true);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message);
}
}
}
private void textBox2_Validated(object sender, EventArgs e)
{
dateTimePicker1.Value = DateTime.Parse(textBox2.Text);
}
private void textBox3_Validated(object sender, EventArgs e)
{
dateTimePicker2.Value = Indian.IndianDate.date(textBox3.Text);
}
private void Form1_Load(object sender, EventArgs e)
{
//this.label1.Font = new System.Drawing.Font("Verdana", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
Indian.IndianCurrency.intFont();
this.label1.Font = new System.Drawing.Font(Indian.IndianCurrency.rupeeFont.Families[0], 10.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I am a computer engineer doing business at my city. I love to program is also engaged in part time programing. Normaly, work for fun and most of the time free of charge.