Ejemplo n.º 1
0
        private void BtnConvert_Click(object sender, EventArgs e)
        {
            DateTime startTime = DateTime.Now;

            LblStartTime.Text = startTime.ToShortTimeString();
            LblStartTime.Refresh();

            BtnConvert.Enabled = false;

            //SubRtn.ConvertImages(PictureBox1, RichTextBox1, PictureBox2);

            SubRtn.ProcessPicTables(consts.PicTable1, PicOrig, LblCount, LblTotal);

            BtnConvert.Enabled = true;

            DateTime endTime = DateTime.Now;
            TimeSpan diff    = startTime - endTime;

            LblTotalTime.Text = diff.ToString(@"hh\:mm\:ss");
            LblTotalTime.Refresh();

            //for (int x = 1; x < 5; x++)
            //{
            //    SubRtn.ProcessDB(constants.PicTable + x);
            //}
        }
Ejemplo n.º 2
0
        void ReleaseDesignerOutlets()
        {
            if (LblTitle != null)
            {
                LblTitle.Dispose();
                LblTitle = null;
            }

            if (LblSpeakers != null)
            {
                LblSpeakers.Dispose();
                LblSpeakers = null;
            }

            if (LblStartTime != null)
            {
                LblStartTime.Dispose();
                LblStartTime = null;
            }

            if (LblDuration != null)
            {
                LblDuration.Dispose();
                LblDuration = null;
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// In forms constructor the not necessarily labels, tetxboxes and comboboxes are hiding
        /// from the form. Then the combobox for work hours(CmbWorkHours) is filling with the ID of work hours.
        /// </summary>
        public EditWorkHours()
        {
            InitializeComponent();

            LblDays.Hide();
            LblEndTime.Hide();
            LblStartTime.Hide();
            DtpEndTime.Hide();
            DtpStartTime.Hide();
            CmbDays.Hide();
            BtnEdit.Hide();

            CmbWorkHours.DataSource    = DCom.GetData("SELECT * FROM work_hours");
            CmbWorkHours.DisplayMember = "ID";
            CmbWorkHours.ValueMember   = "ID";
        }
Ejemplo n.º 4
0
        /// <summary>
        /// When the client select the work hour that wants to edit the not necessarily labels, tetxboxes and comboboxes are hiding
        /// from the form and then the neccesarily labels, tetxboxes and comboboxes are pop up. Then fills all the fields with
        /// the data of the selected work hour.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            LblDays.Show();
            LblEndTime.Show();
            LblStartTime.Show();
            DtpEndTime.Show();
            DtpStartTime.Show();
            CmbDays.Show();
            BtnEdit.Show();

            label1.Hide();
            CmbWorkHours.Hide();
            BtnSelect.Hide();

            SelectedData      = DCom.GetData(String.Format(SqlExec, CmbWorkHours.SelectedValue));
            DtpEndTime.Text   = SelectedData.Rows[0]["End_Time"].ToString();
            DtpStartTime.Text = SelectedData.Rows[0]["Start_Time"].ToString();

            CmbDays.DataSource    = DCom.GetData("SELECT * FROM days");
            CmbDays.DisplayMember = "NAME";
            CmbDays.ValueMember   = "NAME";
            CmbDays.Text          = SelectedData.Rows[0]["Day"].ToString();
        }