Вопрос о написании кода в VBScript для создания напоминания или будильника

Вот быстрая версия принятого ответа.

func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
    if (cell.respondsToSelector("tintColor")) {
        var cornerRadius: CGFloat = 5;
        cell.backgroundColor = UIColor.clearColor()
        var layer: CAShapeLayer  = CAShapeLayer()
        var pathRef: CGMutablePathRef  = CGPathCreateMutable()
        var bounds: CGRect  = CGRectInset(cell.bounds, 10, 0)
        var addLine: Bool  = false
        if (indexPath.row == 0 && indexPath.row == tableView.numberOfRowsInSection(indexPath.section)-1) {
            CGPathAddRoundedRect(pathRef, nil, bounds, cornerRadius, cornerRadius);
        } else if (indexPath.row == 0) {
            CGPathMoveToPoint(pathRef, nil, CGRectGetMinX(bounds), CGRectGetMaxY(bounds));
            CGPathAddArcToPoint(pathRef, nil, CGRectGetMinX(bounds), CGRectGetMinY(bounds), CGRectGetMidX(bounds), CGRectGetMinY(bounds), cornerRadius);
            CGPathAddArcToPoint(pathRef, nil, CGRectGetMaxX(bounds), CGRectGetMinY(bounds), CGRectGetMaxX(bounds), CGRectGetMidY(bounds), cornerRadius);
            CGPathAddLineToPoint(pathRef, nil, CGRectGetMaxX(bounds), CGRectGetMaxY(bounds));
            addLine = true;
        } else if (indexPath.row == tableView.numberOfRowsInSection(indexPath.section)-1) {
            CGPathMoveToPoint(pathRef, nil, CGRectGetMinX(bounds), CGRectGetMinY(bounds));
            CGPathAddArcToPoint(pathRef, nil, CGRectGetMinX(bounds), CGRectGetMaxY(bounds), CGRectGetMidX(bounds), CGRectGetMaxY(bounds), cornerRadius);
            CGPathAddArcToPoint(pathRef, nil, CGRectGetMaxX(bounds), CGRectGetMaxY(bounds), CGRectGetMaxX(bounds), CGRectGetMidY(bounds), cornerRadius);
            CGPathAddLineToPoint(pathRef, nil, CGRectGetMaxX(bounds), CGRectGetMinY(bounds));
        } else {
            CGPathAddRect(pathRef, nil, bounds);
            addLine = true;
        }
        layer.path = pathRef;
        //CFRelease(pathRef);
        //set the border color
        layer.strokeColor = UIColor.lightGrayColor().CGColor;
        //set the border width
        layer.lineWidth = 1;
        layer.fillColor = UIColor(white: 1, alpha: 1.0).CGColor;


        if (addLine == true) {
            var lineLayer: CALayer = CALayer();
            var lineHeight: CGFloat  = (1 / UIScreen.mainScreen().scale);
            lineLayer.frame = CGRectMake(CGRectGetMinX(bounds), bounds.size.height-lineHeight, bounds.size.width, lineHeight);
            lineLayer.backgroundColor = tableView.separatorColor!.CGColor;
            layer.addSublayer(lineLayer);
        }

        var testView: UIView = UIView(frame:bounds)
        testView.layer.insertSublayer(layer, atIndex: 0)
        testView.backgroundColor = UIColor.clearColor()
        cell.backgroundView = testView
    }

}
-2
задан Passer-by 17 January 2019 в 18:26
поделиться

1 ответ

SCHTASKS /Create /SC WEEKLY /D MON /TN ReportAlarm /st 16:00 /TR "c:\windows\system32\cmd /c 'Echo Report Time & Pause'"

См. schtasks /? для помощи.

Так вы планируете задание раз в неделю.

Но вы можете использовать Windows 'Alarms and Clock с 30-минутным отсрочкой, что проще.

Нажмите Пуск , Все приложения , Будильники и часы . На вкладке Alarm нажмите большой значок + на нижней панели инструментов. Установите будильник на 16:00 , Повторите на Понедельник и Повторите на 30 минут . Назовите сигнал тревоги . Пожалуйста, отправьте отчет . Нажмите значок дискеты на нижней панели инструментов, чтобы сохранить.

0
ответ дан catcat 17 January 2019 в 18:26
поделиться
Другие вопросы по тегам:

Похожие вопросы: