Esempio n. 1
0
        private void DelRecordingsAtTwelve(object sender, EventArgs e)
        {
            Log.Debug("Func: DelRecordingsAtTwelve. Enter");

            var hour = DateTime.Now.Hour;
            var mins = DateTime.Now.Minute;

            //设置凌晨的3:00-3:10进行删除
            if (hour >= 3 && hour < 4 && mins < 10 && mins >= 0)
            {
                Log.Debug("Func: DelRecordingsAtTwelve. del action, begin");
                _recordingFiles.DelPreviousRecordings();
                Log.Debug("Func: DelRecordingsAtTwelve. del action, end");
            }
            Log.Debug("Func: DelRecordingsAtTwelve. Leave");
        }
Esempio n. 2
0
        private void BtnDelPreviousRecordings_OnClick(object sender, RoutedEventArgs e)
        {
            string content = String.Format("请确认是否删除{0}天之前的所有录音文件?", _supernova.RecordingDelDate);

            Log.Debug("BtnDelPreviousRecordings_OnClick__MessageWindow.ShowDialog BEFORE");

            MessageWindow dialog = new MessageWindow(
                Properties.Resources.IDS_RECORD_DELETE_ALL_TITLE,
                content,
                MessageWindow.ButtonListType.ButtonOkCancel, MessageWindow.IconType.IconWarn)
            {
                Owner = this
            };

            if (dialog.ShowDialog() == true)
            {
                var _recordingFiles = new RecordingFiles(_system);
                _recordingFiles.DelPreviousRecordings();
            }

            Log.Debug("BtnDelPreviousRecordings_OnClick__MessageWindow.ShowDialog AFTER");
        }