1/* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16import CameraService from '../model/CameraService'; 17import DateTimeUtil from '../model/DateTimeUtil'; 18import Logger from '../model/Logger'; 19 20const TAG: string = "RecodeStopDialog"; 21 22@CustomDialog 23export struct RecodeStopDialog { 24 private controller: CustomDialogController; 25 @Link isModeBol: boolean; 26 @Link videoRecodeTime: number; 27 // 时间管理器 28 @State dateTimeUtil: DateTimeUtil = new DateTimeUtil(); 29 @Link isRecording: boolean; 30 31 build() { 32 Column() { 33 Text($r('app.string.recording_completed')) 34 .fontSize(18) 35 .fontWeight(500) 36 .fontColor('#182431') 37 .margin({ top: 10 }) 38 .width('99%') 39 Row() { 40 Button() { 41 Text($r('app.string.stop')) 42 .fontColor($r('app.color.theme_color')) 43 .fontSize(17) 44 .fontWeight(500) 45 } 46 .layoutWeight(5) 47 .height(50) 48 .backgroundColor('#FFFFFF') 49 .onClick(() => { 50 this.isModeBol = true; 51 this.videoRecodeTime = 0; 52 this.controller.close(); 53 }) 54 } 55 .justifyContent(FlexAlign.SpaceAround) 56 .width('100%') 57 } 58 .justifyContent(FlexAlign.SpaceAround) 59 .width(336) 60 .height(155) 61 .padding('2%') 62 .borderRadius(32) 63 .backgroundColor('#FFFFFF') 64 } 65}