using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        private string TicCO;
        public Form1()
        {
            InitializeComponent();
        }

        private string[] ShowTickCount()
        {

            int H, M, S;
            int allSec;
            string[] tic = { "", "", "", "", "" };
            allSec = Environment.TickCount / 1000;

            if (allSec < 3600)
            {
                H = 0;
                M = allSec / 60;
                S = allSec % 60;

            }
            else
            {
                H = allSec / 3600;

                M = (allSec % 3600) / 60;
                S = (allSec % 3600) % 60;
            }
            tic[1] = " زمان کارکرد سیستم : " + S.ToString() + " : " + M.ToString()
             + " : " + H.ToString();
            string count = H.ToString() + "ساعت" + " و " + M.ToString() + "دقیقه" + " و " + S.ToString() + " ثانیه";
            label6.Text = count;
            if (allSec < 3600) { tic[2] = "هنوز به ساعت نرسیده"; }
            else { tic[2] = Convert.ToString((allSec / 3600)) + " ساعت "; }

            if (allSec < 60) { tic[3] = "هنوز به دقیقه نرسیده ..."; }
            else { tic[3] = Convert.ToString((allSec / 60)) + " دقیقه "; }

            tic[4] = allSec.ToString() + " ثانیه ";

            return tic;
        }

        private void timer1_Tick(object sender, EventArgs e)
        {
            string[] tic = ShowTickCount();
            TicCO = tic[1];
            label1.Text = tic[1];
            label2.Text =" به ساعت "+":"+""+ tic[2];
            label3.Text =" به دقیقه "+":"+""+ tic[3];
            label4.Text =" به ثانیه "+":"+""+ tic[4];
            
        }

        private void Form1_Load(object sender, EventArgs e)
        {
            this.skinEngine1.SkinFile = Environment.CurrentDirectory + @"\skin\a (1).ssk";
            this.skinEngine1.Active = true;
            label1.Text = "";
            label2.Text = "";
            label3.Text = "";
            label4.Text = "";
            label6.Text = "";
        }

        private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
           
        }
    }
}