/// <summary> /// Создание нового ярлыка /// </summary> /// <param name="labelPath"></param> /// <param name="task"></param> /// <param name="imagePath"></param> public void CreateLabel(String labelPath, String task, String imagePath) { LabelService.CreateLabel(task, imagePath, labelPath, true, LabelService.GetLabelsCount() - 1); Labels[DesktopService.GetDesktop(DesktopIndex).LabelCount] = new LabelViewModel(LabelService.GetLabel(LabelService.GetLabelsCount() - 1), User.Login, User.Font, User.FontSize, User.FontBold, User.FontItalic, User.FontUnderline, User.FontStrikeout, User.FontColor); DesktopService.GetDesktop(DesktopIndex).LabelCount++; }
/// <summary> /// Создание нулевого ярлыка /// </summary> public void CreateNoneLabel() { if (LabelService.LabelCountTest(DesktopService.GetDesktop(DesktopIndex).LabelCount)) { LabelService.CreateLabel(false); Labels.Add(new LabelViewModel(LabelService.GetLabel(LabelService.GetLabelsCount() - 1), CreateViewModel())); } else { if (DesktopIndex == User.DesktopCount - 1) { DesktopService.CreateDesktop(); User.DesktopCount++; } DesktopIndex++; LoadLabels(); CreateNoneLabel(); LeftButtonFlag = true; } }