diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.gitignore" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..fdc0c4a65db238be4186f16e1e0911b1d61fbf31 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.gitignore" @@ -0,0 +1,16 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +/entry/.preview +.cxx +/node_modules diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/.gitignore" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/.gitignore" @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/compiler.xml" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/compiler.xml" new file mode 100644 index 0000000000000000000000000000000000000000..fb7f4a8a465d42b4a0390d464b83b99e8465bba7 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/compiler.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/gradle.xml" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/gradle.xml" new file mode 100644 index 0000000000000000000000000000000000000000..01cf0d1bf22ac0a56393a7e57ca2c5b02ef92126 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/gradle.xml" @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/jarRepositories.xml" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/jarRepositories.xml" new file mode 100644 index 0000000000000000000000000000000000000000..19e238eaa31f512cfc1e8641964227098d1eb8bb --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/jarRepositories.xml" @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/misc.xml" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/misc.xml" new file mode 100644 index 0000000000000000000000000000000000000000..794aa67e635837ac492499857a20ce72f4938e28 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/misc.xml" @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/phone/phoneSettingConfig_MateX2.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/phone/phoneSettingConfig_MateX2.json" new file mode 100644 index 0000000000000000000000000000000000000000..f505e6b9ca3d41faf1f0a39a496db58b117fbd60 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/phone/phoneSettingConfig_MateX2.json" @@ -0,0 +1,25 @@ +{ + "setting": { + "1.0.1": { + "Language": { + "args": { + "Language": "zh-CN" + } + } + } + }, + "frontend": { + "1.0.0": { + "Resolution": { + "args": { + "Resolution": "360*780" + } + }, + "DeviceType": { + "args": { + "DeviceType": "phone" + } + } + } + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/phone/phoneSettingConfig_P40.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/phone/phoneSettingConfig_P40.json" new file mode 100644 index 0000000000000000000000000000000000000000..69beee7fd7694e767677c5d3b4863f419c2bf84e --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/phone/phoneSettingConfig_P40.json" @@ -0,0 +1,25 @@ +{ + "setting": { + "1.0.1": { + "Language": { + "args": { + "Language": "zh_CN" + } + } + } + }, + "frontend": { + "1.0.0": { + "Resolution": { + "args": { + "Resolution": "360*780" + } + }, + "DeviceType": { + "args": { + "DeviceType": "phone" + } + } + } + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/previewConfigV2.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/previewConfigV2.json" new file mode 100644 index 0000000000000000000000000000000000000000..06968c2bbe6ce24a04a532b6f9bcd0108ffe99b7 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/previewConfigV2.json" @@ -0,0 +1,49 @@ +{ + "1.0.0": { + "LastPreviewDevice": {} + }, + "1.0.1": { + "profileList": [ + { + "id": "P40", + "deviceType": "phone", + "width": 1080, + "height": 2340, + "shape": "rect", + "dpi": 480, + "orientation": "portrait", + "language": "zh_CN", + "colorMode": "light" + }, + { + "id": "MateX2", + "deviceType": "phone", + "width": 2200, + "height": 2480, + "shape": "rect", + "dpi": 520, + "orientation": "portrait", + "language": "zh_CN", + "colorMode": "light" + }, + { + "id": "MatePadPro", + "deviceType": "tablet", + "width": 2560, + "height": 1600, + "shape": "rect", + "dpi": 400, + "orientation": "landscape", + "language": "zh_CN", + "colorMode": "light" + } + ], + "runningProfileList": [ + "MatePadPro" + ], + "availableProfileList": [ + "P40", + "MateX2" + ] + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/tablet/tabletSettingConfig_MatePadPro.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/tablet/tabletSettingConfig_MatePadPro.json" new file mode 100644 index 0000000000000000000000000000000000000000..278b67116de4f13f8bc141e0f8cc165f55ca3782 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/.idea/previewer/tablet/tabletSettingConfig_MatePadPro.json" @@ -0,0 +1,25 @@ +{ + "setting": { + "1.0.1": { + "Language": { + "args": { + "Language": "zh_CN" + } + } + } + }, + "frontend": { + "1.0.0": { + "Resolution": { + "args": { + "Resolution": "1024*640" + } + }, + "DeviceType": { + "args": { + "DeviceType": "tablet" + } + } + } + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/build.gradle" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/build.gradle" new file mode 100644 index 0000000000000000000000000000000000000000..d675b48000c68cd35cc61fb17874d845dbb17e64 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/build.gradle" @@ -0,0 +1,33 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +apply plugin: 'com.huawei.ohos.app' + +//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 +ohos { + compileSdkVersion 7 +} + +buildscript { + repositories { + maven { + url 'https://repo.huaweicloud.com/repository/maven/' + } + maven { + url 'https://developer.huawei.com/repo/' + } + } + dependencies { + classpath 'com.huawei.ohos:hap:3.0.3.4' + classpath 'com.huawei.ohos:decctest:1.2.6.0' + } +} + +allprojects { + repositories { + maven { + url 'https://repo.huaweicloud.com/repository/maven/' + } + maven { + url 'https://developer.huawei.com/repo/' + } + } +} diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/.gitignore" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..7d5b7a94f4dcf381f03ff21f28f8a2494b58023f --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/.gitignore" @@ -0,0 +1,2 @@ +/build +/node_modules diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/build.gradle" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/build.gradle" new file mode 100644 index 0000000000000000000000000000000000000000..31f12661b0e257a5d1dd57f654d308b3bcbc8620 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/build.gradle" @@ -0,0 +1,26 @@ +apply plugin: 'com.huawei.ohos.hap' +apply plugin: 'com.huawei.ohos.decctest' +//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 +ohos { + compileSdkVersion 7 + defaultConfig { + compatibleSdkVersion 7 + } + buildTypes { + release { + proguardOpt { + proguardEnabled false + rulesFiles 'proguard-rules.pro' + } + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) + testImplementation 'junit:junit:4.13.1' + ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.200' +} +decc { + supportType = ['html','xml'] +} diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/proguard-rules.pro" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/proguard-rules.pro" new file mode 100644 index 0000000000000000000000000000000000000000..f7666e47561d514b2a76d5a7dfbb43ede86da92a --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/proguard-rules.pro" @@ -0,0 +1 @@ +# config module specific ProGuard rules here. \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/config.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/config.json" new file mode 100644 index 0000000000000000000000000000000000000000..5f8000a8b2874b95d46a25652f95a4ca013f1e4d --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/config.json" @@ -0,0 +1,72 @@ +{ + "app": { + "bundleName": "com.test.myinterface", + "vendor": "test", + "version": { + "code": 1000000, + "name": "1.0.0" + } + }, + "deviceConfig": {}, + "module": { + "package": "com.test.myinterface", + "name": ".MyApplication", + "mainAbility": "com.test.myinterface.MainAbility", + "deviceType": [ + "phone", + "tablet" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": false + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "visible": true, + "name": "com.test.myinterface.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard", + "metaData": { + "customizeData": [ + { + "name": "hwc-theme", + "value": "androidhwext:style/Theme.Emui.Light.NoTitleBar", + "extra": "" + } + ] + } + } + ], + "js": [ + { + "mode": { + "syntax": "ets", + "type": "pageAbility" + }, + "pages": [ + "pages/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/ets/default/app.ets" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/ets/default/app.ets" new file mode 100644 index 0000000000000000000000000000000000000000..0be61a623b0216ebbfacf77d8871f2fcaf1de68e --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/ets/default/app.ets" @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info('Application onCreate') + }, + onDestroy() { + console.info('Application onDestroy') + }, +} diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/ets/default/pages/index.ets" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/ets/default/pages/index.ets" new file mode 100644 index 0000000000000000000000000000000000000000..e22123f25731bada1047eb6584eb5164e0b14c79 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/ets/default/pages/index.ets" @@ -0,0 +1,318 @@ +@Entry +@Component +struct Index { + scroller: Scroller = new Scroller() + private controller: TabsController = new TabsController() + @State pattern: number = 1 + @State on_off: boolean = false + @State cold_closet: boolean = false + @State change_the_greenhouse: boolean = false + @State freezing_chamber: boolean = false + @State cold_closet_value: number = 0 + @State change_the_greenhouse_value: number = 0 + @State freezing_chamber_value: number = 0 + @State degerming: boolean = false + + build() { + Flex({ direction:FlexDirection.Column, justifyContent:FlexAlign.Start, alignItems:ItemAlign.Center }){ + Scroll(this.scroller){ + Flex({ direction:FlexDirection.Column, justifyContent:FlexAlign.Start, alignItems:ItemAlign.Center }){ + Text("冰箱-refrigerator") + .fontSize(22) + .fontWeight(700) + .fontColor(Color.White) + .margin(10) + + Flex({ justifyContent:FlexAlign.Center, alignItems:ItemAlign.Center }){ + pattern({ str: "速冻模式", num: 1, state: $pattern }) + pattern({ str: "节能模式", num: 2, state: $pattern }) + pattern({ str: "冷冻模式", num: 3, state: $pattern }) + pattern({ str: "保鲜模式", num: 4, state: $pattern }) + } + .width('98%') + .height(48) + .borderWidth(1) + .borderRadius(24) + .borderColor("#888888") + .margin({ top:10 }) + + Image($rawfile("logo.png")) + .objectFit(ImageFit.Contain) + .height(200) + .margin(10) + + Flex({ justifyContent:FlexAlign.Center, alignItems:ItemAlign.Center }){ + temperature({ str1: "冷冻室当前温度", str2: "-10℃"}) + temperature({ str1: "变温室当前温度", str2: "15℉"}) + temperature({ str1: "冷冻室当前温度", str2: "-10℃"}) + } + .width('98%') + + Flex({ justifyContent:FlexAlign.Start, alignItems:ItemAlign.Center }){ + Flex({ justifyContent:FlexAlign.Center, alignItems:ItemAlign.Center }){ + Column(){ + Button({ type: ButtonType.Circle }){ + if(this.on_off){ + Image($rawfile("switch_on.png")) + .width(40) + .height(40) + }else{ + Image($rawfile("switch_off.png")) + .width(40) + .height(40) + } + } + .width(39) + .height(39) + .onClick(() => { + if(this.on_off){ + this.on_off = false + }else{ + this.on_off = true + } + }) + + Text("开关") + .width(85) + .fontColor("#888888") + .fontSize(13) + .fontWeight(500) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }.width('24%') + on_off({ image_off: "cold_closet_off.png", image_on: "cold_closet_on.png", str: "冷藏室开关", on_off: $cold_closet, switch_on_off: $on_off }) + on_off({ image_off: "change_the_greenhouse_off.png", image_on: "change_the_greenhouse_on.png", str: "变温室开关", on_off: $change_the_greenhouse, switch_on_off: $on_off }) + on_off({ image_off: "freezing_chamber_off.png", image_on: "freezing_chamber_on.png", str: "冷冻室开关", on_off: $freezing_chamber, switch_on_off: $on_off }) + } + .width('98%') + .height(80) + .borderRadius(10) + .backgroundColor(Color.White) + .margin({ top: 10 }) + + controller({ image: "cold_closet.png", str: "冷藏室温度设置", tem: $cold_closet_value, on_off: $cold_closet }) + controller({ image: "change_the_greenhouse.png", str: "变温室温度设置", tem: $change_the_greenhouse_value, on_off: $change_the_greenhouse }) + controller({ image: "freezing_chamber.png", str: "冷冻室温度设置", tem: $freezing_chamber_value, on_off: $freezing_chamber }) + + Flex({ justifyContent:FlexAlign.Start, alignItems:ItemAlign.Center }){ + Image($rawfile("degerming.png")) + .width(20) + .height(20) + .margin({ left: 20, right: 10}) + + Text("除菌模式") + .width(60) + .fontColor(Color.Black) + .fontSize(13) + .fontWeight(500) + .textAlign(TextAlign.Center) + + Button(){ + Circle() + .width(18) + .height(18) + .fill(Color.White) + .margin({ left: this.degerming ? 16 : 2, right: this.degerming ? 2 : 16, }) + } + .width(36) + .height(22) + .backgroundColor(this.degerming ? Color.Blue : "#808080") + .offset({ x: '88%', y: '35%' }) + .onClick(() => { + if(this.degerming){ + this.degerming = false + }else{ + this.degerming = true + } + }) + } + .width('98%') + .height(60) + .borderRadius(10) + .backgroundColor(Color.White) + .margin({ top: 10, bottom: 15 }) + } + } + .scrollBar(BarState.Off) + .width('100%') + .height('100%') + } + .width('100%') + .height('100%') + .linearGradient({ + angle: 120, + colors: [["#c471f5", 0], ["#fa71cd", 1]] + }) + } +} + +@Component +struct pattern{ + private str: string + private num: number + @Link state: number + + build(){ + Flex({ justifyContent:FlexAlign.Center, alignItems:ItemAlign.Center }){ + Button(this.str) + .width(85) + .height(40) + .fontColor(this.num==this.state ? Color.Blue : Color.White) + .fontSize(13) + .fontWeight(500) + .backgroundColor(this.num==this.state ? Color.White : '') + .opacity(this.num==this.state ? 1 : 0.5) + .margin(1) + .onClick(() => { + this.state = this.num + }) + }.width('24%') + } +} + +@Component +struct temperature{ + private str1: string + private str2: string + + build(){ + Flex({ justifyContent:FlexAlign.Center, alignItems:ItemAlign.Center }){ + Column(){ + Text(this.str1) + .width(100) + .fontColor(Color.White) + .fontSize(13) + .fontWeight(500) + .opacity(0.6) + Text(this.str2) + .width(100) + .fontColor(Color.White) + .fontSize(15) + .fontWeight(500) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + .margin(10) + }.width('32%') + } +} + +@Component +struct on_off{ + private image_off: string + private image_on: string + private str: string + @Link on_off: boolean + @Link switch_on_off: boolean + + build(){ + Flex({ justifyContent:FlexAlign.Center, alignItems:ItemAlign.Center }){ + Column(){ + Button({ type: ButtonType.Circle }){ + if(this.on_off){ + Image($rawfile(this.image_on)) + .width(40) + .height(40) + }else{ + Image($rawfile(this.image_off)) + .width(40) + .height(40) + } + } + .width(39) + .height(39) + .opacity(this.switch_on_off ? 1 : 0.3) + .onClick(() => { + if(this.switch_on_off){ + if(this.on_off){ + this.on_off = false + }else{ + this.on_off = true + } + } + }) + + Text(this.str) + .width(85) + .fontColor("#888888") + .fontSize(13) + .fontWeight(500) + .opacity(this.switch_on_off ? 1 : 0.3) + .textAlign(TextAlign.Center) + .margin({ top: 5 }) + } + }.width('24%') + } +} + +@Component +struct controller{ + private image: string + private str: string + @Link tem: number + @Link on_off: boolean + + build(){ + Flex({ direction:FlexDirection.Column, justifyContent:FlexAlign.Start,alignItems:ItemAlign.Start }){ + Row(){ + Image($rawfile(this.image)) + .width(20) + .height(20) + .margin({ left: 20, right: 10}) + + Text(this.str) + .width(100) + .fontColor(Color.Black) + .fontSize(13) + .fontWeight(500) + .textAlign(TextAlign.Center) + + Text(this.tem.toFixed(0)) + .width(30) + .fontColor(Color.Blue) + .fontSize(13) + .textAlign(TextAlign.Center) + } + .margin({ top: 10 }) + + Row(){ + Text("-50") + .width('10%') + .fontColor("#888888") + .fontSize(13) + .textAlign(TextAlign.Center) + + Slider({ + value: this.tem, + min: -50, + max: 20, + step: this.on_off ? 1 : 0, + style: SliderStyle.OutSet + }) + .width('78%') + .blockColor("#EEEEEE") + .trackColor("#808080") + .selectedColor(Color.Blue) + .showSteps(false) + .showTips(false) + .onChange((value: number) => { + this.tem = value + }) + + Text("20") + .width('10%') + .fontColor("#888888") + .fontSize(13) + .textAlign(TextAlign.Center) + } + .margin({ left: 30, top: 10 }) + } + .width('98%') + .height(90) + .borderRadius(10) + .backgroundColor(Color.White) + .opacity(this.on_off ? 1 : 0.05) + .margin({ top:10 }) + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/java/com/test/myinterface/MainAbility.java" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/java/com/test/myinterface/MainAbility.java" new file mode 100644 index 0000000000000000000000000000000000000000..46fb42f2bea1e1a62189354c9afaca528342c3d8 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/java/com/test/myinterface/MainAbility.java" @@ -0,0 +1,16 @@ +package com.test.myinterface; + +import ohos.ace.ability.AceAbility; +import ohos.aafwk.content.Intent; + +public class MainAbility extends AceAbility { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + } + + @Override + public void onStop() { + super.onStop(); + } +} diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/java/com/test/myinterface/MyApplication.java" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/java/com/test/myinterface/MyApplication.java" new file mode 100644 index 0000000000000000000000000000000000000000..5a0b07f9daaea0616b672db83fdcc005d7139975 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/java/com/test/myinterface/MyApplication.java" @@ -0,0 +1,10 @@ +package com.test.myinterface; + +import ohos.aafwk.ability.AbilityPackage; + +public class MyApplication extends AbilityPackage { + @Override + public void onInitialize() { + super.onInitialize(); + } +} diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/base/element/string.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/base/element/string.json" new file mode 100644 index 0000000000000000000000000000000000000000..14277b0900368e562461cc78aed81b6729298341 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/base/element/string.json" @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "mainability_description", + "value": "ETS_Empty Ability" + } + ] +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/base/media/icon.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/base/media/icon.png" new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/base/media/icon.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse.png" new file mode 100644 index 0000000000000000000000000000000000000000..9aa8a667ec6de43a2b631e7cebf47bc39650d335 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse_off.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse_off.png" new file mode 100644 index 0000000000000000000000000000000000000000..2d0625c8495bead9e24d902e831f43f2e36f853a Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse_off.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse_on.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse_on.png" new file mode 100644 index 0000000000000000000000000000000000000000..a4327999309f3335cc2c36a63a0722eb51ad4ed6 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/change_the_greenhouse_on.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet.png" new file mode 100644 index 0000000000000000000000000000000000000000..18c13302adbd19070a84f9ee3fe29ddc86f61f73 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet_off.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet_off.png" new file mode 100644 index 0000000000000000000000000000000000000000..811dece2bf0bde0fb2ad25021049466f800ac7ca Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet_off.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet_on.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet_on.png" new file mode 100644 index 0000000000000000000000000000000000000000..54a416db181d3a888cd36ba9c34de579d3aefc14 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/cold_closet_on.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/degerming.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/degerming.png" new file mode 100644 index 0000000000000000000000000000000000000000..1d6318a671a8b7ef5cc12eb941ee14e1d5941dd6 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/degerming.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber.png" new file mode 100644 index 0000000000000000000000000000000000000000..19986a06cd42a55f0a7aeb5ecbe045b47b5637cf Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber_off.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber_off.png" new file mode 100644 index 0000000000000000000000000000000000000000..1ef6eaa805a9324bbd7e4c332e4588962a49471c Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber_off.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber_on.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber_on.png" new file mode 100644 index 0000000000000000000000000000000000000000..f63c26e72c4ba1d22c908e912c2844d17dfe23e5 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/freezing_chamber_on.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/logo.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/logo.png" new file mode 100644 index 0000000000000000000000000000000000000000..fbe5808a5a14a4a5c76cfc7599faeac66d1484b0 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/logo.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/switch_off.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/switch_off.png" new file mode 100644 index 0000000000000000000000000000000000000000..cfa43501ecef51a57e557032a830cf94937277ae Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/switch_off.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/switch_on.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/switch_on.png" new file mode 100644 index 0000000000000000000000000000000000000000..2c33ebcaf5632b1a38083a766b6e4990ad222620 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/main/resources/rawfile/switch_on.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/app.ets" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/app.ets" new file mode 100644 index 0000000000000000000000000000000000000000..8658c07ca25e8955158335fe74f49a74a52b72fd --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/app.ets" @@ -0,0 +1,11 @@ +export default { + onCreate() { + console.info('Application onCreate') + }, + onShow() { + console.info('Application onShow') + }, + onDestroy() { + console.info('Application onDestroy') + }, +} diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/i18n/en-US.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/i18n/en-US.json" new file mode 100644 index 0000000000000000000000000000000000000000..55561b83737c3c31d082fbfa11e5fc987a351104 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/i18n/en-US.json" @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + }, + "Files": { + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/i18n/zh-CN.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/i18n/zh-CN.json" new file mode 100644 index 0000000000000000000000000000000000000000..cce1af06761a42add0cac1a0567aa3237eda8cb4 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/i18n/zh-CN.json" @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + }, + "Files": { + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/pages/index/index.ets" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/pages/index/index.ets" new file mode 100644 index 0000000000000000000000000000000000000000..9dd60d20318167a8e884a6eba4759d19ee3d2bbb --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/default/pages/index/index.ets" @@ -0,0 +1,51 @@ +import {Core, ExpectExtend, InstrumentLog} from "deccjsunit/index" +import testsuite from "../../../test/List.test.ets" +import app from '@system.app' +import featureAbility from "@ohos.ability.featureAbility" + +@Entry +@Component +struct MyComponent { + aboutToAppear() { + console.info("start run testcase!!!!") + featureAbility.getWant() + .then((Want) => { + const core = Core.getInstance() + const instrumentLog = new InstrumentLog({ + 'id': 'report', 'unity': 'true' + }) + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + core.addService('expect', expectExtend) + core.addService('report', instrumentLog) + core.init() + core.subscribeEvent('spec', instrumentLog) + core.subscribeEvent('suite', instrumentLog) + core.subscribeEvent('task', instrumentLog) + const configService = core.getDefaultService('config') + configService.setConfig(Want.parameters) + testsuite() + core.execute() + console.info('Operation successful. Data: ' + JSON.stringify(Want)); + }) + .catch((error) => { + console.error('Operation failed. Cause: ' + JSON.stringify(error)); + }) + } + + build() { + Flex({ + direction: FlexDirection.Column, + alignItems: ItemAlign.Center, + justifyContent: FlexAlign.Center + }) { + Text('Hello World') + .fontSize(50) + .fontWeight(FontWeight.Bold) + } + .width('100%') + .height('100%') + } +} + diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/test/ExampleJsunit.test.ets" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/test/ExampleJsunit.test.ets" new file mode 100644 index 0000000000000000000000000000000000000000..018aba5e774064d954d53b8fbb3e1ed34f52590d --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/test/ExampleJsunit.test.ets" @@ -0,0 +1,12 @@ +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from "deccjsunit/index" +import app from '@system.app' + +export default function exampleJsunit() { + describe('appInfoTest', function () { + it('app_info_test_001', 0, function () { + var info = app.getInfo() + expect("1.0").assertEqual('1.0') + expect(info.versionCode).assertEqual('3') + }) + }) +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/test/List.test.ets" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/test/List.test.ets" new file mode 100644 index 0000000000000000000000000000000000000000..c96221152225c7d3d4bc64859deed72bbee774c0 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/ets/test/List.test.ets" @@ -0,0 +1,5 @@ +import exampleJsunit from "../test/ExampleJsunit.test.ets" + +export default function testsuite() { + exampleJsunit() +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/java/com/test/myinterface/ExampleOhosTest.java" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/java/com/test/myinterface/ExampleOhosTest.java" new file mode 100644 index 0000000000000000000000000000000000000000..812bf73d67703add5a22c6da0948ab8362bd6f41 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/java/com/test/myinterface/ExampleOhosTest.java" @@ -0,0 +1,14 @@ +package com.test.myinterface; + +import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class ExampleOhosTest { + @Test + public void testBundleName() { + final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName(); + assertEquals("com.test.myinterface", actualBundleName); + } +} \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/resources/base/element/string.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/resources/base/element/string.json" new file mode 100644 index 0000000000000000000000000000000000000000..ba35e4c52acbac1231b855846674f316c28a47dc --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/resources/base/element/string.json" @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "MyInterface" + }, + { + "name": "mainability_description", + "value": "hap sample empty page" + } + ] +} diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/resources/base/media/icon.png" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/resources/base/media/icon.png" new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/entry/src/ohosTest/resources/base/media/icon.png" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle.properties" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle.properties" new file mode 100644 index 0000000000000000000000000000000000000000..be492496f9a20ac2d980ef4fc30061f4184c1c40 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle.properties" @@ -0,0 +1,13 @@ +# Project-wide Gradle settings. +# IDE (e.g. DevEco Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# If the Chinese output is garbled, please configure the following parameter. +# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false. +# more information see https://docs.gradle.org/current/userguide/performance.html +# org.gradle.parallel=false +# org.gradle.jvmargs=-Dfile.encoding=GBK \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle/wrapper/gradle-wrapper.jar" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle/wrapper/gradle-wrapper.jar" new file mode 100644 index 0000000000000000000000000000000000000000..490fda8577df6c95960ba7077c43220e5bb2c0d9 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle/wrapper/gradle-wrapper.jar" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle/wrapper/gradle-wrapper.properties" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle/wrapper/gradle-wrapper.properties" new file mode 100644 index 0000000000000000000000000000000000000000..f59159e865d4b59feb1b8c44b001f62fc5d58df4 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradle/wrapper/gradle-wrapper.properties" @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradlew" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradlew" new file mode 100644 index 0000000000000000000000000000000000000000..536f0272dd995f3afdb5e34e0f42bdf3d1986c22 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradlew" @@ -0,0 +1,183 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ]; do + ls=$(ls -ld "$PRG") + link=$(expr "$ls" : '.*-> \(.*\)$') + if expr "$link" : '/.*' >/dev/null; then + PRG="$link" + else + PRG=$(dirname "$PRG")"/$link" + fi +done +SAVED="$(pwd)" +cd "$(dirname \"$PRG\")/" >/dev/null +APP_HOME="$(pwd -P)" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=$(basename "$0") + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn() { + echo "$*" +} + +die() { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "$(uname)" in +CYGWIN*) + cygwin=true + ;; +Darwin*) + darwin=true + ;; +MINGW*) + msys=true + ;; +NONSTOP*) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ]; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ]; then + MAX_FD_LIMIT=$(ulimit -H -n) + if [ $? -eq 0 ]; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ]; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ]; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ]; then + APP_HOME=$(cygpath --path --mixed "$APP_HOME") + CLASSPATH=$(cygpath --path --mixed "$CLASSPATH") + JAVACMD=$(cygpath --unix "$JAVACMD") + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=$(find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null) + SEP="" + for dir in $ROOTDIRSRAW; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ]; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@"; do + CHECK=$(echo "$arg" | egrep -c "$OURCYGPATTERN" -) + CHECK2=$(echo "$arg" | egrep -c "^-") ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ]; then ### Added a condition + eval $(echo args$i)=$(cygpath --path --ignore --mixed "$arg") + else + eval $(echo args$i)="\"$arg\"" + fi + i=$(expr $i + 1) + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save() { + for i; do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/"; done + echo " " +} +APP_ARGS=$(save "$@") + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradlew.bat" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradlew.bat" new file mode 100644 index 0000000000000000000000000000000000000000..62bd9b9ccefea2b65ae41e5d9a545e2021b90a1d --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/gradlew.bat" @@ -0,0 +1,103 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/package.json" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/package.json" new file mode 100644 index 0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/package.json" @@ -0,0 +1 @@ +{} diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/settings.gradle" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/settings.gradle" new file mode 100644 index 0000000000000000000000000000000000000000..4773db73233a570c2d0c01a22e75321acfbf7a07 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/MyInterface/settings.gradle" @@ -0,0 +1 @@ +include ':entry' diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/readme.md" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/readme.md" new file mode 100644 index 0000000000000000000000000000000000000000..b50b71f5ec918b682c1548fa1e1e1223d39cb842 --- /dev/null +++ "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/readme.md" @@ -0,0 +1,2 @@ +![输入图片说明](%E6%95%88%E6%9E%9C%E5%9B%BE/Interface_phone.gif) +![输入图片说明](%E6%95%88%E6%9E%9C%E5%9B%BE/Interface_mate.gif) \ No newline at end of file diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/\346\225\210\346\236\234\345\233\276/Interface_mate.gif" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/\346\225\210\346\236\234\345\233\276/Interface_mate.gif" new file mode 100644 index 0000000000000000000000000000000000000000..584fdc89b44e4e86cb992d20633cdda26b83b039 Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/\346\225\210\346\236\234\345\233\276/Interface_mate.gif" differ diff --git "a/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/\346\225\210\346\236\234\345\233\276/Interface_phone.gif" "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/\346\225\210\346\236\234\345\233\276/Interface_phone.gif" new file mode 100644 index 0000000000000000000000000000000000000000..96058a8fd7577a11a272aa337e7978c802c6732f Binary files /dev/null and "b/Campus_Demo/\345\206\260\347\256\261_UI\347\225\214\351\235\242/\346\225\210\346\236\234\345\233\276/Interface_phone.gif" differ