private void worker_calendar_ItemMouseHover(object sender, CalendarItemEventArgs e)
        {
            Call c = e.Item.Tag as Call;

            if (c.Workers.Count == 0)
            {
                return;
            }

            if (frm == null)
            {
                frm = new CallCoverLabelFrm();
            }


            frm.ServiceUser = c.ServiceUser;

            frm.StartTime = c.time.ToString("HH:mm");
            frm.Duration  = c.Duration;

            Point loc = Cursor.Position;

            loc.X += 10;
            loc.Y += 10;

            frm.Location = loc;

            frm.Show();
        }
Beispiel #2
0
        private void serviceuser_calendar_ItemMouseHover(object sender, CalendarItemEventArgs e)
        {
            Call c = e.Item.Tag as Call;

            if (c.Workers.Count == 0)
            {
                return;
            }

            if (frm == null)
            {
                frm = new CallCoverLabelFrm();
            }


            for (int i = 0; i < c.Workers.Count; i++)
            {
                switch (i)
                {
                case 0:
                    frm.Worker1 = c.Workers[0];
                    break;

                case 1:
                    frm.Worker2 = c.Workers[1];
                    break;
                }
            }

            if (c.Workers.Count < 2)
            {
                frm.Worker2 = null;
            }


            frm.StartTime = c.time.ToString("HH:mm");
            frm.Duration  = c.Duration;

            Point loc = Cursor.Position;

            loc.X += 10;
            loc.Y += 10;

            frm.Location = loc;

            frm.Show();
        }