وبلاگ رسمی علیرضا شهامت در بلاگ اسکای

وبلاگ رسمی علیرضا شهامت در بلاگ اسکای

وبلاگ رسمی علیرضا شهامت در بلاگ اسکای - تأسیس شده در سال 1396
وبلاگ رسمی علیرضا شهامت در بلاگ اسکای

وبلاگ رسمی علیرضا شهامت در بلاگ اسکای

وبلاگ رسمی علیرضا شهامت در بلاگ اسکای - تأسیس شده در سال 1396

VLC\1398 12 27\2123\LrVL - ؟؟؟ - کار با اعداد زمان - شروع ساخت مدیا پلیر با سی شارپ



//**--**//**++665544

//**--**//**++665544

//**--**//**++665544


Path = "...\DS\a\o\Crt\mm\C#\8x\sln\tp\VLC\1398 12 27\2123\LrVL"

VLC\1398 12 27\2123\LrVL

file name = "Form1.cs"


//**--**//**++665544

//**--**//**++665544

//**--**//**++665544







using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LrVL
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }



        int day;
        int hour;
        int minute;
        int second;
        int frame;



        string str_day;
        string str_hour;
        string str_minute;
        string str_second;
        string str_frame;


        string str_Total_short;

        string str_Total_long;



        int min_frame;
        int min_second;
        int min_minute;
        int min_hour;
        int min_day;


        int max_frame;
        int max_second;
        int max_minute;
        int max_hour;





        private void timer1_Tick(object sender, EventArgs e)
        {


            /////////////////////////////////


            set_str_1();

            set_total_short();

            set_total_long();


            /////////////////////////////////

            textBox_short_time.Text = str_Total_short;

            textBox_long_time.Text = str_Total_long;

            /////////////////////////////////

            if_else_if();


            /////////////////////////////////
        }

        private void if_else_if()
        {

            /////////////////////////////////
            /////////////////////////////////
            /////////////////////////////////


            if (frame + 1 <= max_frame)
            {
                frame++;
            }
            else if (frame + 1 > max_frame)
            {
                frame = min_frame;

                if (second + 1 <= max_second)
                {
                    second++;
                }
                else if (second + 1 > max_second)
                {
                    second = min_second;


                    if (minute + 1 <= max_minute)
                    {
                        minute++;
                    }
                    else if (minute + 1 > max_minute)
                    {
                        minute = min_minute;


                        if (hour + 1 <= max_hour)
                        {
                            hour++;
                        }
                        else if (hour + 1 > max_hour)
                        {

                            hour = min_hour;

                            day++;

                        }

                    }

                }

            }

            /////////////////////////////////
            /////////////////////////////////
            /////////////////////////////////

        }



        private void set_total_long()
        {


            str_Total_long = " Time = ";

            str_Total_long += str_day + " day(s) and ";

            str_Total_long += str_hour + " hour(s) and ";

            str_Total_long += str_minute + " minute(s) and ";

            str_Total_long += str_second + " second(s) and ";

            str_Total_long += str_frame + " frame(s) ";
        }



        private void set_total_short()
        {

            str_Total_short = "";

            str_Total_short += str_day + ":/";

            str_Total_short += str_hour + ":";

            str_Total_short += str_minute + ":";

            str_Total_short += str_second + ":/";

            str_Total_short += str_frame;
        }





        private void set_str_1()
        {

            str_day = day.ToString();

            str_hour = hour.ToString();

            str_minute = minute.ToString();

            str_second = second.ToString();

            str_frame = frame.ToString();
        }




        private void Form1_Load(object sender, EventArgs e)
        {

            /////////////////////////////////////////////


            numericUpDown_max_frame.Value = 2;
            numericUpDown_max_second.Value = 2;
            numericUpDown_max_minute.Value = 2;
            numericUpDown_max_hour.Value = 2;


            //////////////////////////////////////////////


            max_frame = (int)numericUpDown_max_frame.Value;
            max_second = (int)numericUpDown_max_second.Value;
            max_minute = (int)numericUpDown_max_minute.Value;
            max_hour = (int)numericUpDown_max_hour.Value;


            //////////////////////////////////////////////

            numericUpDown_max_frame.Minimum = 1;
            numericUpDown_max_frame.Maximum = 6000;

            numericUpDown_max_second.Minimum = 1;
            numericUpDown_max_second.Maximum = 6000;

            numericUpDown_max_minute.Minimum = 1;
            numericUpDown_max_minute.Maximum = 6000;

            numericUpDown_max_hour.Minimum = 1;
            numericUpDown_max_hour.Maximum = 6000;



            //////////////////////////////

            textBox_short_time.ReadOnly = true;
            textBox_long_time.ReadOnly = true;


            //////////////////////////////



            numericUpDown_t1_interval.Value = 1000;

            timer1.Interval = (int)numericUpDown_t1_interval.Value;
            timer1.Enabled = false;

            //////////////////////////////

            frame = 1;

            //////////////////////////////

            min_frame = 1;
            min_second = 0;
            min_minute = 0;
            min_hour = 0;
            min_day = 0;

            //////////////////////////////

            //max_frame=24;
            //max_second=59;
            //max_minute=59;
            //max_hour=23;

            //////////////////////////////


            //max_frame = 2;
            //max_second = 2;
            //max_minute = 2;
            //max_hour = 2;

            //////////////////////////////


        }




        private void button_reset_values_Click(object sender, EventArgs e)
        {



            if (timer1.Enabled == false)
            {
                groupBox_options_set_2.Enabled = true;
            }



            /////////////////////////////////



            frame = min_frame;
            second = min_second;
            minute = min_minute;
            hour = min_hour;
            day = min_day;


            /////////////////////////////////


            set_str_1();

            set_total_short();

            set_total_long();


            /////////////////////////////////

            textBox_short_time.Text = str_Total_short;

            textBox_long_time.Text = str_Total_long;

            /////////////////////////////////




        }

        private void button_SPR_Click(object sender, EventArgs e)
        {

            timer1.Enabled = !timer1.Enabled;

            if (timer1.Enabled == true)
            {
                groupBox_options_set_2.Enabled = false;
            }



        }

        private void numericUpDown_t1_interval_ValueChanged(object sender, EventArgs e)
        {
            timer1.Interval = (int)numericUpDown_t1_interval.Value;
        }

        private void numericUpDown_max_frame_ValueChanged(object sender, EventArgs e)
        {
            max_frame = (int)numericUpDown_max_frame.Value;
        }

        private void numericUpDown_max_second_ValueChanged(object sender, EventArgs e)
        {
            max_second = (int)numericUpDown_max_second.Value;
        }

        private void numericUpDown_max_minute_ValueChanged(object sender, EventArgs e)
        {
            max_minute = (int)numericUpDown_max_minute.Value;
        }

        private void numericUpDown_max_hour_ValueChanged(object sender, EventArgs e)
        {
            max_hour = (int)numericUpDown_max_hour.Value;
        }



    }
}



//**--**//**++665544

//**--**//**++665544

//**--**//**++665544



نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد