Пример #1
0
        private void DrawDateLabel(string content, int lenghtLabelDate, int positionXLabelDate, List <ActiveApplication> otherActivity, ref int numberDateLabel)
        {
            int     tempNumberDateLabel = numberDateLabel;
            MyLabel l2 = new MyLabel(chartContentCanvas, content, lenghtLabelDate, 22, 9, positionXLabelDate, 326, Color.FromArgb(255, 255, 255, 255), Color.FromArgb(255, 255, 255, 255), 1);

            l2.SetBackgroundColor(Color.FromArgb(60, 255, 255, 255));
            string toolTip = "Wyłączony komputer [" + ActionOnTime.GetTimeAndDays(otherActivity[numberDateLabel].ActivityTime) + " / " + ActionOnTime.GetTimeAndDays(otherActivity.Where(x => x.ID == 1).Sum(x => x.ActivityTime)) + "] [" +
                             ActionOnNumbers.DivisionI(otherActivity[numberDateLabel].ActivityTime * 100, otherActivity.Where(x => x.Date == otherActivity[tempNumberDateLabel].Date).Sum(x => x.ActivityTime))
                             + "% / " + ActionOnNumbers.DivisionI(otherActivity.Where(x => x.ID == 1).Sum(x => x.ActivityTime) * 100, otherActivity.Sum(x => x.ActivityTime)) + "%]"
                             + "\nBrak aktywności [" + ActionOnTime.GetTimeAndDays(otherActivity[++numberDateLabel].ActivityTime) + "/ " + ActionOnTime.GetTimeAndDays(otherActivity.Where(x => x.ID == 2).Sum(x => x.ActivityTime)) + "] [" +
                             ActionOnNumbers.DivisionI(otherActivity[numberDateLabel].ActivityTime * 100, otherActivity.Where(x => x.Date == otherActivity[tempNumberDateLabel].Date).Sum(x => x.ActivityTime))
                             + "% / " + ActionOnNumbers.DivisionI(otherActivity.Where(x => x.ID == 2).Sum(x => x.ActivityTime) * 100, otherActivity.Sum(x => x.ActivityTime)) + "%]";

            l2.ToolTip(toolTip);
            numberDateLabel++;
        }