Пример #1
0
        public void show(DataRow row)
        {
            k               = sel.getTimeRule().Tables[0].Rows.Count;
            label1.Text     = row[0].ToString();
            Start_Time.Text = row[2].ToString();
            End_Time.Text   = row[3].ToString();
            if (row[4].ToString() == "True")
            {
                label2.Image = Properties.Resources.勾;
                label2.Tag   = "1";
            }
            else
            {
                label2.Image = Properties.Resources.;
                label2.Tag   = "0";
            }


            //if (label1.Text == "1")
            //{

            //}
            //else
            //{
            //   // PreviousTime = DateTime.Parse(sel.getHeadRule(label1.Text.ToString()).Tables[0].Rows[0][3].ToString());
            //    if (DateTime.Compare(Start_Time.Value, PreviousTime) < 0)
            //    {
            //        panel1.BackColor = Color.Yellow;
            //    }
            //}
        }
Пример #2
0
 private void TimeRule_Load(object sender, EventArgs e)
 {
     panel1.Controls.Clear();
     dt = sel.getTimeRule().Tables[0];
     for (i = 0; i < dt.Rows.Count; i++)
     {
         TimeRow time = new TimeRow();
         time.show(dt.Rows[i]);
         time.Name   = i.ToString();
         time.Top    = 33 * i;
         time.Parent = this;
         panel1.Controls.Add(time);
     }
 }