!1874 新增eTS分布式计算器

Merge pull request !1874 from liuxin256/1130_etsCalc
This commit is contained in:
openharmony_ci 2022-12-01 07:20:18 +00:00 committed by Gitee
commit bb4d6f72ef
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
59 changed files with 2004 additions and 0 deletions

5
Preset/EtsDistributedCalc/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/node_modules
/local.properties
/.idea
**/build
/.hvigor

View File

@ -0,0 +1,26 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
{
"app": {
"bundleName": "ohos.samples.etsdistributedcalc",
"vendor": "samples",
"versionCode": 1000000,
"versionName": "1.0.0",
"icon": "$media:app_icon",
"label": "$string:app_name",
"distributedNotificationEnabled": true,
"singleton": true
}
}

View File

@ -0,0 +1,8 @@
{
"string": [
{
"name": "app_name",
"value": "DistributeCalc"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,44 @@
# 分布式计算器
### 简介
本示例使用分布式能力实现了一个简单的计算器应用,可以进行简单的数值计算,支持远程拉起另一个设备的计算器应用,两个计算器应用进行协同计算。
远程拉起通过StartAbility实现远端应用的拉起。
协同计算通过DistributedDataKit分布式数据框架实现异端应用的数据同步。实现效果如下
![](./screenshots/device/calc.png)
### 相关概念
数据管理实例: 用于获取KVStore的相关信息。
单版本分布式数据库继承自KVStore不对数据所属设备进行区分提供查询数据和同步数据的方法。
### 相关权限
允许不同设备间的数据交换ohos.permission.DISTRIBUTED_DATASYNC
### 使用说明
1.点击桌面应用图标,启动应用。
2.点击应用右上角按钮,或者在界面任意位置滑动(上下左右滑动皆可)即可弹出设备选择框。
3.在设备选择框中点击对端设备名称,拉起对端应用。
4.对端应用启动后,可在任意一端中操作应用,两端应用可实现数据实时同步。
5.在设备选择框中选中本机即可关闭对端应用。
### 约束与限制
1.本示例只实现简单的加减乘除功能后续开发者可基于当前框架考虑在calc页面中实现更多的功能如开方、立方、三角函数等科学计算功能。
2.分布式计算功能使用的前提是分布式组网。
3.本示例需要使用DevEco Studio 3.0 Beta4 (Build Version: 3.0.0.993, built on July 14, 2022)才可编译运行。
4.本示例需要使用@ohos.distributedHardware.deviceManager系统权限的系统接口。使用Full SDK时需要手动从镜像站点获取并在DevEco Studio中替换具体操作可参考[替换指南](https://gitee.com/openharmony/docs/blob/master/zh-cn/application-dev/quick-start/full-sdk-switch-guide.md)。

View File

@ -0,0 +1,42 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
{
"app": {
"signingConfigs": [],
"compileSdkVersion": 9,
"compatibleSdkVersion": 9,
"products": [
{
"name": "default",
"signingConfig": "default",
}
]
},
"modules": [
{
"name": "entry",
"srcPath": "./entry",
"targets": [
{
"name": "default",
"applyToProducts": [
"default"
]
}
]
}
]
}

View File

@ -0,0 +1,7 @@
/node_modules
/local.properties
/.idea
**/build
/.hvigor
/package-lock.json
/entry/package-lock.json

View File

@ -0,0 +1,28 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
{
"apiType": 'stageMode',
"buildOption": {
},
"targets": [
{
"name": "default"
},
{
"name": "ohosTest",
}
]
}

View File

@ -0,0 +1,2 @@
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').hapTasks

View File

@ -0,0 +1,14 @@
{
"license": "ISC",
"devDependencies": {},
"name": "entry",
"ohos": {
"org": "huawei",
"directoryLevel": "module",
"buildTool": "hvigor"
},
"description": "example description",
"repository": {},
"version": "1.0.0",
"dependencies": {}
}

View File

@ -0,0 +1,24 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import AbilityStage from '@ohos.application.AbilityStage'
import Logger from '../model/Logger'
const TAG: string = 'MyAbilityStage'
export default class MyAbilityStage extends AbilityStage {
onCreate() {
Logger.info(TAG, `MyAbilityStage onCreate`)
}
}

View File

@ -0,0 +1,59 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import Ability from '@ohos.application.Ability'
import Logger from '../model/Logger'
const TAG: string = 'MainAbility'
export default class MainAbility extends Ability {
onCreate(want, launchParam) {
let isRemote = want.parameters.isRemote
if (isRemote) {
AppStorage.SetOrCreate('isRemote', isRemote)
}
Logger.info(TAG, `MainAbility onCreate`)
}
onDestroy() {
Logger.info(TAG, `MainAbility onDestroy`)
}
onWindowStageCreate(windowStage) {
// Main window is created, set main page for this ability
Logger.info(TAG, `MainAbility onWindowStageCreate`)
windowStage.loadContent("pages/Index", (err, data) => {
if (err.code) {
Logger.info(TAG, `Failed to load the content. Cause: ${JSON.stringify(err)}`)
return
}
Logger.info(TAG, `Succeeded in loading the content. Data: ${JSON.stringify(data)}`)
})
}
onWindowStageDestroy() {
// Main window is destroyed, release UI related resources
Logger.info(TAG, `MainAbility onWindowStageDestroy`)
}
onForeground() {
// Ability has brought to foreground
Logger.info(TAG, `MainAbility onForeground`)
}
onBackground() {
// Ability has back to background
Logger.info(TAG, `MainAbility onBackground`)
}
}

View File

@ -0,0 +1,73 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import { obtainImgVertical, obtainImgV } from '../model/ImageList'
@Component
export struct ButtonComponent {
private onInputValue: (result) => void
build() {
Row() {
Grid() {
ForEach(obtainImgV(), (item, index) => {
GridItem() {
Button({ type: ButtonType.Normal }) {
Image(item.image)
.width('100%')
.aspectRatio(index < 3 ? 1 : 0.6)
.objectFit(ImageFit.Contain)
}
.width('100%')
.height('100%')
.borderRadius(20)
.backgroundColor(index < 3 ? '#33007DFF' : '#007DFF')
.onClick(() => {
this.onInputValue(item.value)
})
}
.rowStart(index)
.rowEnd(index === 3 ? index + 1 : index)
.columnStart(3)
.columnEnd(3)
})
ForEach(obtainImgVertical(), (item, index) => {
GridItem() {
Button({ type: ButtonType.Normal }) {
Image(item.image)
.height('100%')
.aspectRatio(item.value === '0' ? 2.5 : 1)
.objectFit(ImageFit.Contain)
}
.width('100%')
.height('100%')
.borderRadius(20)
.backgroundColor(index < 3 ? '#33007DFF' : '#F0F0F0')
.onClick(() => {
this.onInputValue(item.value)
})
}
.columnStart(index % 3)
.columnEnd(item.value === '0' ? (index % 3 + 1) : index % 3)
})
}
.columnsGap(10)
.rowsGap(10)
.columnsTemplate('1fr 1fr 1fr 1fr')
.rowsTemplate('1fr 1fr 1fr 1fr 1fr')
}
.padding(10)
.size({ width: '100%', height: '60%' })
}
}

View File

@ -0,0 +1,74 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import { obtainImgLevel, obtainImg, obtainImgL } from '../model/ImageList'
@Component
export struct ButtonComponentHorizontal {
private onInputValue: (result) => void
build() {
Column() {
Grid() {
ForEach(obtainImg(), (item, index) => {
GridItem() {
Button({ type: ButtonType.Normal }) {
Image(item.image)
.height('100%')
.aspectRatio(index < 2 ? 1 : 0.5)
.objectFit(ImageFit.Contain)
}
.width('100%')
.height('100%')
.borderRadius(20)
.backgroundColor(index < 2 ? '#33007DFF' : '#007DFF')
.onClick(() => {
this.onInputValue(item.value)
})
}
.rowStart(index)
.rowEnd(index === 2 ? index + 1 : index)
.columnStart(4)
.columnEnd(4)
})
ForEach(obtainImgLevel(), (item, index) => {
GridItem() {
Button({ type: ButtonType.Normal }) {
Image(item.image)
.height('100%')
.aspectRatio(item.value === '0' ? 2.5 : 1)
.objectFit(ImageFit.Contain)
}
.width('100%')
.height('100%')
.borderRadius(20)
.backgroundColor((index % 4 >= 3) || item.value === '+' ? '#33007DFF' : '#F0F0F0')
.onClick(() => {
this.onInputValue(item.value)
})
}
.columnStart(index % 4)
.columnEnd(item.value === '0' ? (index % 4 + 1) : index % 4)
})
}
.width('80%')
.columnsGap(10)
.rowsGap(10)
.columnsTemplate('1fr 1fr 1fr 1fr 1fr')
.rowsTemplate('1fr 1fr 1fr 1fr')
}
.padding(10)
.size({ width: '70%', height: '90%' })
}
}

View File

@ -0,0 +1,84 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import deviceManager from '@ohos.distributedHardware.deviceManager'
import Logger from '../model/Logger'
const TAG: string = 'DeviceDialog'
@CustomDialog
export struct DeviceDialog {
controller: CustomDialogController
private deviceList: Array<deviceManager.DeviceInfo> = []
private selectedIndex: number = 0
private onSelectedIndexChange: (selectedIndex) => void
build() {
Column() {
Text($r('app.string.choiceDevice'))
.fontSize(30)
.width('100%')
.fontColor(Color.Black)
.textAlign(TextAlign.Start)
.fontWeight(FontWeight.Bold)
List() {
ForEach(this.deviceList, (item, index) => {
ListItem() {
Row() {
Text(item.deviceName)
.fontSize(21)
.width('90%')
.fontColor(Color.Black)
Image(index === this.selectedIndex ? $r('app.media.checked') : $r('app.media.uncheck'))
.width('8%')
.objectFit(ImageFit.Contain)
}
.height(55)
.margin({ top: 17 })
.onClick(() => {
Logger.debug(TAG, `select device: ${item.deviceId}`)
Logger.debug(TAG, `deviceList: ${JSON.stringify(this.deviceList)}`)
if (index === this.selectedIndex) {
Logger.info(TAG, `index:${JSON.stringify(index)} ty:${JSON.stringify(typeof (index))} this.selectedIndex:${JSON.stringify(this.selectedIndex)} ${JSON.stringify(typeof (this.selectedIndex))}`)
return
}
this.selectedIndex = index
this.onSelectedIndexChange(this.selectedIndex)
})
}
}, item => item.deviceName)
}
.width('100%')
.layoutWeight(1)
Button() {
Text($r('app.string.cancel'))
.width('90%')
.fontSize(21)
.fontColor('#0D9FFB')
.textAlign(TextAlign.Center)
}
.margin({ top: 22 })
.type(ButtonType.Capsule)
.backgroundColor(Color.White)
.onClick(() => {
this.controller.close()
})
}
.width(448)
.height(290)
.padding({ left: 32, right: 32, top: 13, bottom: 33 })
.backgroundColor(Color.White)
.border({ color: Color.White, radius: 20 })
}
}

View File

@ -0,0 +1,53 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
@Component
export struct InputComponent {
@Link result: string
@Link expression: string
private isLand: boolean = false
build() {
Stack({ alignContent: this.isLand ? Alignment.BottomStart : Alignment.TopEnd }) {
Column() {
Scroll() {
Text(this.expression)
.maxLines(1)
.opacity(0.9)
.fontWeight(400)
.textAlign(TextAlign.Start)
.fontSize(this.isLand ? 50 : 35)
}
.width('90%')
.scrollable(ScrollDirection.Horizontal)
.align(this.isLand ? Alignment.Start : Alignment.End)
Scroll() {
Text(this.result)
.maxLines(1)
.opacity(0.38)
.textAlign(TextAlign.Start)
.fontSize(this.isLand ? 45 : 30)
.margin(this.isLand ? { bottom: 64 } : {})
}
.width('90%')
.scrollable(ScrollDirection.Horizontal)
.align(this.isLand ? Alignment.Start : Alignment.End)
}
.width('100%')
.align(Alignment.Center)
}
.width(this.isLand ? '34%' : '100%')
.height(this.isLand ? '100%' : '30%')
}
}

View File

@ -0,0 +1,175 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import deviceManager from '@ohos.distributedHardware.deviceManager'
import Logger from '../model/Logger'
import { DeviceDialog } from '../common/DeviceDialog'
import { RemoteDeviceModel } from '../model/RemoteDeviceModel'
const TAG: string = 'TitleBar'
const DATA_CHANGE: string = 'dataChange'
const EXIT: string = 'exit'
@Component
export struct TitleBarComponent {
@Prop isLand: boolean
@State selectedIndex: number = 0
@State deviceList: Array<deviceManager.DeviceInfo> = []
@Link isDistributed: boolean
private startAbilityCallBack: (key) => void
private remoteDeviceModel: RemoteDeviceModel = new RemoteDeviceModel()
private dialogController: CustomDialogController = null
onSelectedIndexChange = async (index: number) => {
Logger.info(TAG, `selectedIndexChange`)
this.selectedIndex = index
if (this.selectedIndex === 0) {
Logger.info(TAG, `stop ability`)
await this.startAbilityCallBack(EXIT)
this.isDistributed = false
this.deviceList = []
this.dialogController.close()
return
}
this.selectDevice()
}
private isShow: boolean = false
clearSelectState() {
this.deviceList = []
this.dialogController.close()
Logger.info(TAG, `cancelDialog`)
if (this.remoteDeviceModel === undefined) {
return
}
this.remoteDeviceModel.unregisterDeviceListCallback()
}
selectDevice() {
Logger.info(TAG, `start ability ......`)
this.isDistributed = true
if (this.remoteDeviceModel === null || this.remoteDeviceModel.discoverList.length <= 0) {
Logger.info(TAG, `continue unauthed device: ${JSON.stringify(this.deviceList)}`)
this.startAbility(this.deviceList[this.selectedIndex].deviceId)
this.clearSelectState()
return
}
Logger.info(TAG, `start ability1, needAuth`)
this.remoteDeviceModel.authenticateDevice(this.deviceList[this.selectedIndex], () => {
Logger.info(TAG, `auth and online finished`)
for (let i = 0; i < this.remoteDeviceModel.deviceList.length; i++) {
if (this.remoteDeviceModel.deviceList[i].deviceName === this.deviceList[this.selectedIndex].deviceName) {
this.startAbility(this.remoteDeviceModel.deviceList[i].deviceId)
}
}
})
Logger.info(TAG, `start ability2 ......`)
this.clearSelectState()
}
async startAbility(deviceId) {
Logger.debug(TAG, `startAbility deviceId: ${deviceId}`)
let context = getContext(this) as any
context.startAbility(
{
bundleName: 'ohos.samples.etsdistributedcalc',
abilityName: 'MainAbility',
deviceId: deviceId,
parameters: {
isRemote: 'isRemote'
}
}).then((data) => {
Logger.info(TAG, `start ability finished: ${JSON.stringify(data)}`)
this.startAbilityCallBack(DATA_CHANGE)
})
}
showDiainfo() {
this.deviceList = []
// 注册监听回调,发现设备或查找到已认证设备会弹窗显示
this.remoteDeviceModel.registerDeviceListCallback(() => {
Logger.info(TAG, `registerDeviceListCallback, callback entered`)
this.deviceList.push({
deviceId: '0',
deviceName: getContext(this).resourceManager.getStringSync($r('app.string.localhost').id),
deviceType: 0,
networkId: '',
range: 1000
})
let deviceTempList = this.remoteDeviceModel.discoverList.length > 0 ? this.remoteDeviceModel.discoverList : this.remoteDeviceModel.deviceList
for (let i = 0; i < deviceTempList.length; i++) {
Logger.debug(TAG, `device ${i}/${deviceTempList.length} deviceId= ${deviceTempList[i].deviceId},
deviceName= ${deviceTempList[i].deviceName}, deviceType= ${deviceTempList[i].deviceType}`)
this.deviceList.push({
deviceId: deviceTempList[i].deviceId,
deviceName: deviceTempList[i].deviceName,
deviceType: deviceTempList[i].deviceType,
networkId: deviceTempList[i].networkId,
range: 1000
})
}
})
let alignments = DialogAlignment.Bottom
if (this.isLand) {
alignments = DialogAlignment.Center
}
if (this.dialogController === null) {
this.dialogController = new CustomDialogController({
builder: DeviceDialog({
deviceList: this.deviceList,
selectedIndex: this.selectedIndex,
onSelectedIndexChange: this.onSelectedIndexChange
}),
cancel: () => {
this.clearSelectState()
},
autoCancel: true,
alignment: alignments,
})
}
this.dialogController.open()
}
build() {
Row() {
Image($r('app.media.ic_back'))
.height('60%')
.margin({ left: 32 })
.width(this.isLand ? '5%' : '8%')
.objectFit(ImageFit.Contain)
.onClick(async () => {
let context = getContext(this) as any
context.terminateSelf()
})
Text($r('app.string.distributed_calculator'))
.height('60%')
.fontSize(30)
.margin({ left: 20, top: 7 })
Blank().layoutWeight(1)
if (!this.isShow) {
Image($r('app.media.ic_hop_normal'))
.height('60%')
.margin({ right: 32 })
.width(this.isLand ? '5%' : '8%')
.objectFit(ImageFit.Contain)
.onClick(() => {
this.showDiainfo()
})
}
}
.width('100%')
.height(this.isLand ? '10%' : '8%')
.constraintSize({ minHeight: 50 })
.alignItems(VerticalAlign.Center)
}
}

View File

@ -0,0 +1,172 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
const OPERATORLEVELS = {
'+': 0,
'-': 0,
'*': 1,
'/': 1,
}
const OPERATORHANDLERS = {
'+': (firstOperand, secondOperand) => (parseFloat(firstOperand) + parseFloat(secondOperand)).toFixed(getFloatNum(firstOperand, secondOperand, '+')),
'-': (firstOperand, secondOperand) => (firstOperand - secondOperand).toFixed(getFloatNum(firstOperand, secondOperand, '-')),
'*': (firstOperand, secondOperand) => (firstOperand * secondOperand).toFixed(getFloatNum(firstOperand, secondOperand, '*')),
'/': (firstOperand, secondOperand) => (firstOperand / secondOperand).toFixed(getFloatNum(firstOperand, secondOperand, '/')),
}
function getFloatNum(firstOperand, secondOperand, oprate) {
let result = 0
let oneString = (new String(firstOperand)).toString()
let otherString = (new String(secondOperand)).toString()
let firstNum = 0
if (oneString.indexOf('.') !== -1) {
firstNum = oneString.split('.')[1].length
}
let secondNum = 0
if (otherString.indexOf('.') !== -1) {
secondNum = otherString.split('.')[1].length
}
if (oprate === '+' || oprate === '-') {
result = Math.max(firstNum, secondNum)
}
if (oprate === '*') {
result = firstNum + secondNum
}
if (oprate === '/') {
result = (firstNum + otherString.length) > 3 ? (firstNum + otherString.length) : 3
}
return result
}
function calcSuffixExpression(expression) {
const numberStack = []
while (expression.length) {
let element = expression.shift()
if (!isOperator(element)) {
numberStack.push(element)
} else {
const firstStackElement = numberStack.pop()
const secondStackElement = numberStack.pop()
const result = OPERATORHANDLERS[element](secondStackElement, firstStackElement)
if (result.length > 15) {
numberStack.push(parseFloat(result).toExponential())
} else {
numberStack.push(result)
}
}
}
return numberStack[0]
}
function toSuffixExpression(expression) {
const operatorStack = []
const suffixExpression = []
let topOperator
for (let index = 0, size = expression.length; index < size; ++index) {
const element = expression[index]
if (element === '(') {
operatorStack.push(element)
continue
}
if (element === ')') {
if (operatorStack.length) {
let operator = operatorStack.pop()
while (operator !== '(') {
suffixExpression.push(operator)
operator = operatorStack.pop()
}
}
continue
}
if (isOperator(element)) {
if (!operatorStack.length) {
operatorStack.push(element)
} else {
topOperator = operatorStack[operatorStack.length - 1]
if (!isGrouping(topOperator) && !isPrioritized(element, topOperator)) {
while (operatorStack.length) {
suffixExpression.push(operatorStack.pop())
}
}
operatorStack.push(element)
}
continue
}
suffixExpression.push(element)
}
while (operatorStack.length) {
suffixExpression.push(operatorStack.pop())
}
return suffixExpression
}
function parseInfixExpression(inputContent) {
const size = inputContent.length
const lastIndex = size - 1
let singleChar = ''
const expression = []
for (let index = 0; index < size; index++) {
const element = inputContent[index]
if (isGrouping(element)) {
if (singleChar !== '') {
expression.push(singleChar)
singleChar = ''
}
expression.push(element)
} else if (isOperator(element)) {
if (isSymbol(element) && (index === 0 || inputContent[index - 1] === '(')) {
singleChar += element
} else {
if (singleChar !== '') {
expression.push(singleChar)
singleChar = ''
}
if (index !== lastIndex) {
expression.push(element)
}
}
} else {
singleChar += element
}
if (index === lastIndex && singleChar !== '') {
expression.push(singleChar)
}
}
return expression
}
function isPrioritized(firstOperator, secondOperator) {
return OPERATORLEVELS[firstOperator] > OPERATORLEVELS[secondOperator]
}
export function isOperator(operator) {
return (
operator === '+' || operator === '-' || operator === '*' || operator === '/'
)
}
function isSymbol(symbol) {
return symbol === '+' || symbol === '-'
}
function isGrouping(operator) {
return operator === '(' || operator === ')'
}
export function calc(inputContent) {
const infixExpression = parseInfixExpression(inputContent)
const suffixExpression = toSuffixExpression(infixExpression)
return calcSuffixExpression(suffixExpression)
}

View File

@ -0,0 +1,94 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
export class ImageList {
image: Resource
value: string
constructor(image: Resource, value: string) {
this.image = image
this.value = value
}
}
export function obtainImgVertical(): Array<ImageList> {
let list =
[
{ image: $r('app.media.ic_cal_delete_c'), value: 'C' },
{ image: $r('app.media.ic_cal_devide'), value: '/' },
{ image: $r('app.media.ic_cal_multiply'), value: '*' },
{ image: $r('app.media.ic_cal_seven'), value: '7' },
{ image: $r('app.media.ic_cal_eight'), value: '8' },
{ image: $r('app.media.ic_cal_nine'), value: '9' },
{ image: $r('app.media.ic_cal_four'), value: '4' },
{ image: $r('app.media.ic_cal_five'), value: '5' },
{ image: $r('app.media.ic_cal_six'), value: '6' },
{ image: $r('app.media.ic_cal_one'), value: '1' },
{ image: $r('app.media.ic_cal_two'), value: '2' },
{ image: $r('app.media.ic_cal_three'), value: '3' },
{ image: $r('app.media.ic_cal_zero'), value: '0' },
{ image: $r('app.media.ic_cal_point'), value: '.' }
]
return list
}
export function obtainImgV(): Array<ImageList> {
let list =
[
{ image: $r('app.media.ic_cal_delete'), value: '' },
{ image: $r('app.media.ic_cal_minus'), value: '-' },
{ image: $r('app.media.ic_cal_plus'), value: '+' },
{ image: $r('app.media.ic_cal_equal'), value: '=' }
]
return list
}
export function obtainImgLevel(): Array<ImageList> {
let list = [
{ image: $r('app.media.ic_cal_seven'), value: '7' },
{ image: $r('app.media.ic_cal_eight'), value: '8' },
{ image: $r('app.media.ic_cal_nine'), value: '9' },
{ image: $r('app.media.ic_cal_devide'), value: '/' },
{ image: $r('app.media.ic_cal_four'), value: '4' },
{ image: $r('app.media.ic_cal_five'), value: '5' },
{ image: $r('app.media.ic_cal_six'), value: '6' },
{ image: $r('app.media.ic_cal_multiply'), value: '*' },
{ image: $r('app.media.ic_cal_one'), value: '1' },
{ image: $r('app.media.ic_cal_two'), value: '2' },
{ image: $r('app.media.ic_cal_three'), value: '3' },
{ image: $r('app.media.ic_cal_minus'), value: '-' },
{ image: $r('app.media.ic_cal_zero'), value: '0' },
{ image: $r('app.media.ic_cal_point'), value: '.' },
{ image: $r('app.media.ic_cal_plus'), value: '+' }
]
return list
}
export function obtainImg(): Array<ImageList> {
let list = [
{ image: $r('app.media.ic_cal_delete'), value: '' },
{ image: $r('app.media.ic_cal_delete_c'), value: 'C' },
{ image: $r('app.media.ic_cal_equal'), value: '=' }
]
return list
}
export function obtainImgL(): Array<ImageList> {
let list = [
{ image: $r('app.media.ic_cal_zero'), value: '0' },
{ image: $r('app.media.ic_cal_point'), value: '.' },
{ image: $r('app.media.ic_cal_plus'), value: '+' }
]
return list
}

View File

@ -0,0 +1,88 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import distributedData from '@ohos.data.distributedData'
import Logger from '../model/Logger'
const TAG: string = 'KvStoreModel'
const STORE_ID: string = 'distributedcalc'
export class KvStoreModel {
public kvManager: distributedData.KVManager = undefined
public kvStore: distributedData.KVStore = undefined
createKvStore(context, callback) {
if ((typeof (this.kvStore) !== 'undefined')) {
callback()
return
}
let config = {
bundleName: 'ohos.samples.etsdistributedcalc',
userInfo: {
userId: '0',
userType: 0
},
context: context
}
Logger.info(TAG, `createKVManager begin`)
distributedData.createKVManager(config).then((manager) => {
Logger.info(TAG, `createKVManager success, kvManager= ${JSON.stringify(manager)}`)
this.kvManager = manager
let options = {
createIfMissing: true,
encrypt: false,
backup: false,
autoSync: true,
kvStoreType: 1,
securityLevel: 1
}
Logger.info(TAG, `kvManager.getKVStore begin`)
this.kvManager.getKVStore(STORE_ID, options).then((store) => {
Logger.info(TAG, `getKVStore success, kvStore= ${store}`)
this.kvStore = store
callback()
})
})
Logger.info(TAG, `createKVManager end`)
}
put(key, value) {
Logger.debug(TAG, `kvStore.put ${key} = ${value}`)
this.kvStore.put(key, value).then((data) => {
Logger.debug(TAG, `kvStore.put ${key} finished, data= ${JSON.stringify(data)}`)
}).catch((err) => {
Logger.debug(TAG, `kvStore.put ${key} failed, ${JSON.stringify(err)}`)
})
}
setOnMessageReceivedListener(context, msg, callback) {
Logger.info(TAG, `setOnMessageReceivedListener: ${msg}`)
this.createKvStore(context, () => {
Logger.info(TAG, `kvStore.on(dataChange) begin`)
this.kvStore.on('dataChange', 1, (data) => {
Logger.debug(TAG, `dataChange, ${JSON.stringify(data)}`)
let entries = data.insertEntries.length > 0 ? data.insertEntries : data.updateEntries
for (let i = 0; i < entries.length; i++) {
if (entries[i].key === msg) {
let value = <string> entries[i].value.value
Logger.debug(TAG, `Entries receive msg :${msg}, value${value}`)
callback(value)
return
}
}
})
Logger.info(TAG, `kvStore.on(dataChange) end`)
})
}
}

View File

@ -0,0 +1,45 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import hilog from '@ohos.hilog'
class Logger {
private domain: number = 0xFF00
private prefix: string = ''
private format: string = '%{public}s, %{public}s'
constructor(prefix: string) {
this.prefix = prefix
this.domain = 0xFF00
}
debug(...args: any[]) {
hilog.debug(this.domain, this.prefix, this.format, args)
}
info(...args: any[]) {
hilog.info(this.domain, this.prefix, this.format, args)
}
warn(...args: any[]) {
hilog.warn(this.domain, this.prefix, this.format, args)
}
error(...args: any[]) {
hilog.error(this.domain, this.prefix, this.format, args)
}
}
export default new Logger('[Sample_distributedcalc]')

View File

@ -0,0 +1,236 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import deviceManager from '@ohos.distributedHardware.deviceManager'
import Logger from '../model/Logger'
const TAG: string = 'RemoteDeviceModel'
let SUBSCRIBE_ID: number = 100
export class RemoteDeviceModel {
public deviceList: Array<deviceManager.DeviceInfo> = []
public discoverList: Array<deviceManager.DeviceInfo> = []
private callback: () => void = null
private authCallback: () => void = null
private deviceManager: deviceManager.DeviceManager = undefined
registerDeviceListCallback(callback) {
if (typeof (this.deviceManager) !== 'undefined') {
this.registerDeviceListCallbackImplement(callback)
return
}
Logger.info(TAG, 'deviceManager.createDeviceManager begin')
try {
deviceManager.createDeviceManager("ohos.samples.etsdistributedcalc", (error, value) => {
if (error) {
Logger.error(TAG, `createDeviceManager failed.${error}`)
return
}
this.deviceManager = value
this.registerDeviceListCallbackImplement(callback)
Logger.info(TAG, `createDeviceManager callback returned, error= ${JSON.stringify(error)} value= ${JSON.stringify(value)}`)
})
} catch (error) {
Logger.error(TAG, `createDeviceManager throw code:${error.code} message:${error.message}`)
}
Logger.info(TAG, 'deviceManager.createDeviceManager end')
}
deviceStateChangeActionOnline(device) {
this.deviceList[this.deviceList.length] = device
Logger.debug(TAG, `online, device list= ${JSON.stringify(this.deviceList)}`)
this.callback()
if (this.authCallback !== null) {
this.authCallback()
this.authCallback = null
}
}
deviceStateChangeActionReady(device) {
if (this.deviceList.length <= 0) {
this.callback()
return
}
let list = new Array()
for (let i = 0; i < this.deviceList.length; i++) {
if (this.deviceList[i].deviceId !== device.deviceId) {
list[i] = device
}
}
this.deviceList = list
Logger.debug(TAG, `ready, device list= ${JSON.stringify(device)}`)
this.callback()
}
deviceStateChangeActionOffline(device) {
if (this.deviceList.length <= 0) {
this.callback()
return
}
for (let j = 0; j < this.deviceList.length; j++) {
if (this.deviceList[j ].deviceId === device.deviceId) {
this.deviceList[j] = device
break
}
}
Logger.debug(TAG, `offline, device list= ${JSON.stringify(this.deviceList)}`)
this.callback()
}
registerDeviceListCallbackImplement(callback) {
Logger.info(TAG, 'registerDeviceListCallback')
this.callback = callback
if (this.deviceManager === undefined) {
Logger.error(TAG, 'deviceManager has not initialized')
this.callback()
return
}
Logger.info(TAG, 'getTrustedDeviceListSync begin')
try {
let list = this.deviceManager.getTrustedDeviceListSync()
Logger.debug(TAG, `getTrustedDeviceListSync end, deviceList= ${JSON.stringify(list)}`)
if (typeof (list) !== 'undefined' && typeof (list.length) !== 'undefined') {
this.deviceList = list
}
} catch (error) {
Logger.error(TAG, `getTrustedDeviceListSync throw code:${error.code} message:${error.message}`)
}
this.callback()
Logger.info(TAG, 'callback finished')
try {
this.deviceManager.on('deviceStateChange', (data) => {
if (data === null) {
return
}
Logger.debug(TAG, `deviceStateChange data= ${JSON.stringify(data)}`)
switch (data.action) {
case deviceManager.DeviceStateChangeAction.ONLINE:
this.deviceStateChangeActionOnline(data.device)
break;
case deviceManager.DeviceStateChangeAction.READY:
this.deviceStateChangeActionReady(data.device)
break;
case deviceManager.DeviceStateChangeAction.CHANGE:
this.deviceStateChangeActionOffline(data.device)
break
default:
break
}
})
this.deviceManager.on('deviceFound', (data) => {
if (data === null) {
return
}
Logger.info(TAG, `deviceFound data=${JSON.stringify(data)}`)
this.deviceFound(data)
})
this.deviceManager.on('discoverFail', (data) => {
Logger.info(TAG, `discoverFail data= ${JSON.stringify(data)}`)
})
this.deviceManager.on('serviceDie', () => {
Logger.error(TAG, 'serviceDie')
})
} catch (error) {
Logger.error(TAG, `on throw code:${error.code} message:${error.message}`)
}
this.startDeviceDiscovery()
}
deviceFound(data) {
for (let i = 0;i < this.discoverList.length; i++) {
if (this.discoverList[i].deviceId === data.device.deviceId) {
Logger.info(TAG, 'device founded ignored')
return
}
}
this.discoverList[this.discoverList.length] = data.device
Logger.debug(TAG, `deviceFound self.discoverList= ${this.discoverList}`)
this.callback()
}
/**
* 通过SUBSCRIBE_ID搜索分布式组网内的设备
*/
startDeviceDiscovery() {
SUBSCRIBE_ID = Math.floor(65536 * Math.random())
let info = {
subscribeId: SUBSCRIBE_ID,
mode: 0xAA,
medium: 2,
freq: 2,
isSameAccount: false,
isWakeRemote: true,
capability: 0
}
Logger.info(TAG, `startDeviceDiscovery${SUBSCRIBE_ID}`)
try {
this.deviceManager.startDeviceDiscovery(info)
} catch (error) {
Logger.error(TAG, `startDeviceDiscovery throw code:${error.code} message:${error.message}`)
}
}
unregisterDeviceListCallback() {
try {
Logger.info(TAG, `stopDeviceDiscovery${SUBSCRIBE_ID}`)
this.deviceManager.stopDeviceDiscovery(SUBSCRIBE_ID);
} catch (error) {
Logger.error(TAG, `stopDeviceDiscovery throw code:${JSON.stringify(error.code)} message:${error.message}`)
}
try {
this.deviceManager.off('deviceStateChange')
this.deviceManager.off('deviceFound')
this.deviceManager.off('discoverFail')
this.deviceManager.off('serviceDie')
} catch (error) {
Logger.error(TAG, `off throw code:${error.code} message:${error.message}`)
}
this.deviceList = []
this.discoverList = []
}
authenticateDevice(device, callBack) {
Logger.info(TAG, `authenticateDevice ${JSON.stringify(device)}`)
for (let i = 0; i < this.discoverList.length; i++) {
if (this.discoverList[i].deviceId !== device.deviceId) {
continue
}
let extraInfo = {
'targetPkgName': 'ohos.samples.etsdistributedcalc',
'appName': 'Distributed distributecalc',
'appDescription': 'Distributed distributecalc',
'business': '0'
}
let authParam = {
'authType': 1,
'appIcon': '',
'appThumbnail': '',
'extraInfo': extraInfo
}
try {
this.deviceManager.authenticateDevice(device, authParam, (err, data) => {
if (err) {
Logger.error(TAG, `authenticateDevice error: ${JSON.stringify(err)}`)
this.authCallback = null
return
}
Logger.debug(TAG, `authenticateDevice succeed: ${JSON.stringify(data)}`)
this.authCallback = callBack
})
} catch (error) {
Logger.error(TAG, `authenticateDevice throw throw code:${error.code} message:${error.message}`)
}
}
}
}

View File

@ -0,0 +1,169 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
import mediaQuery from '@ohos.mediaquery'
import Logger from '../model/Logger'
import { ButtonComponent } from '../common/ButtonComponent'
import { ButtonComponentHorizontal } from '../common/ButtonComponentHorizontal'
import { InputComponent } from '../common/InputComponent'
import { KvStoreModel } from '../model/KvStoreModel'
import { RemoteDeviceModel } from '../model/RemoteDeviceModel'
import { TitleBarComponent } from '../common/TitleBarComponent'
import { isOperator, calc } from '../model/Calculator'
const TAG: string = 'Index'
const EXIT: string = 'exit'
const DATA_CHANGE: string = 'dataChange'
@Entry
@Component
struct Index {
@State isLand: boolean = false
@State result: string = ''
@State @Watch('dataChange') expression: string = ''
@State isDistributed: boolean = false
@State isShow: boolean = false
private listener = mediaQuery.matchMediaSync('screen and (min-aspect-ratio: 1.5) or (orientation: landscape)')
private kvStoreModel: KvStoreModel = new KvStoreModel()
private remoteDeviceModel: RemoteDeviceModel = new RemoteDeviceModel()
onLand = (mediaQueryResult) => {
Logger.debug(TAG, `onLand: mediaQueryResult.matches= ${mediaQueryResult.matches}`)
if (mediaQueryResult.matches) {
this.isLand = true
} else {
this.isLand = false
}
}
dataChange() {
Logger.info(TAG, `dataChange, expression = ${this.expression}`)
this.kvStoreModel.put(DATA_CHANGE, this.expression)
}
isOperator(operator) {
return (
operator === '+' || operator === '-' || operator === '*' || operator === '/'
)
}
onInputValue = (value) => {
Logger.info(TAG, `this.isLand=${this.isLand}`)
if (value === 'C') { // 当用户点击C按钮表达式和运算结果归0
this.expression = ''
this.result = ''
return
} else if (value === '') {
this.expression = this.expression.substring(0, this.expression.length - 1)
this.result = this.result = calc(this.expression)
if (!this.expression.length) {
this.result = ''
Logger.info(TAG, `handleBackspace`)
}
} else if (isOperator(value)) {
Logger.info(TAG, `value=${value}`)
let size = this.expression.length;
if (size) {
const last = this.expression.charAt(size - 1);
if (isOperator(last)) {
this.expression = this.expression.substring(0, this.expression.length - 1);
}
}
if (!this.expression && (value === '*' || value === '/')) {
return
}
this.expression += value
} else if (value === '=') {
this.result = calc(this.expression)
if (this.result !== '' && this.result !== undefined) {
this.expression = this.result
this.result = ''
}
} else {
this.expression += value
this.result = calc(this.expression)
}
}
async aboutToAppear() {
let context = getContext(this) as any
await context.requestPermissionsFromUser(['ohos.permission.DISTRIBUTED_DATASYNC'])
Logger.info(TAG, `grantPermission,requestPermissionsFromUser`)
this.listener.on('change', this.onLand)
if (AppStorage.Get('isRemote') === 'isRemote') {
this.isDistributed = true
this.isShow = true
}
this.kvStoreModel.setOnMessageReceivedListener(context, DATA_CHANGE, (value) => {
Logger.debug(TAG, `DATA_CHANGE: ${value},this.isDistributed = ${this.isDistributed}`)
if (this.isDistributed) {
if (value.search(EXIT) !== -1) {
Logger.info(TAG, `EXIT ${EXIT}`)
context.terminateSelf((error) => {
Logger.error(TAG, `terminateSelf finished, error= ${error}`)
})
} else {
if (value === 'null') {
this.expression = ''
} else {
this.expression = value
}
if (this.isOperator(this.expression.substr(this.expression.length - 1, this.expression.length))) {
this.result = calc(this.expression.substring(0, this.expression.length - 1))
} else {
this.result = calc(this.expression)
}
}
}
})
}
startAbilityCallBack = (key: string) => {
Logger.info(TAG, `startAbilityCallBack ${key}`)
if (DATA_CHANGE === key) {
this.kvStoreModel.put(DATA_CHANGE, this.expression)
}
if (EXIT === key) {
this.kvStoreModel.put(DATA_CHANGE, EXIT)
}
}
build() {
Column() {
TitleBarComponent({
isLand: this.isLand,
startAbilityCallBack: this.startAbilityCallBack,
remoteDeviceModel: this.remoteDeviceModel,
isDistributed: $isDistributed,
isShow: this.isShow
})
if (this.isLand) {
Row() {
InputComponent({ isLand: this.isLand, result: $result, expression: $expression })
ButtonComponentHorizontal({ onInputValue: this.onInputValue })
}
.width('100%')
.layoutWeight(1)
} else {
Column() {
InputComponent({ isLand: this.isLand, result: $result, expression: $expression })
ButtonComponent({ onInputValue: this.onInputValue })
}
.width('100%')
}
}
.width('100%')
.height('100%')
}
}

View File

@ -0,0 +1,66 @@
/*
* Copyright (c) 2022 Huawei Device Co., Ltd.
* 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
*
* http://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.
*/
{
"module": {
"name": "entry",
"type": "entry",
"srcEntrance": "./ets/Application/MyAbilityStage.ts",
"description": "$string:entry_desc",
"mainElement": "MainAbility",
"deviceTypes": [
"default",
"tablet"
],
"deliveryWithInstall": true,
"installationFree": false,
"pages": "$profile:main_pages",
"uiSyntax": "ets",
"abilities": [
{
"name": "MainAbility",
"srcEntrance": "./ets/MainAbility/MainAbility.ts",
"description": "$string:MainAbility_desc",
"icon": "$media:icon",
"label": "$string:MainAbility_label",
"startWindowIcon": "$media:icon",
"startWindowBackground": "$color:white",
"visible": true,
"launchType": "singleton",
"skills": [
{
"entities": [
"entity.system.home"
],
"actions": [
"action.system.home"
]
}
]
}
],
"requestPermissions": [
{
"name": "ohos.permission.DISTRIBUTED_DATASYNC",
"reason": "$string:distributed_permission",
"usedScene": {
"abilities": [
"MainAbility"
],
"when": "inuse"
}
}
]
}
}

View File

@ -0,0 +1,8 @@
{
"color": [
{
"name": "white",
"value": "#FFFFFF"
}
]
}

View File

@ -0,0 +1,36 @@
{
"string": [
{
"name": "entry_desc",
"value": "description"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "Calculator"
},
{
"name": "choiceDevice",
"value": "Choice Device"
},
{
"name": "cancel",
"value": "Cancel"
},
{
"name": "distributed_calculator",
"value": "distributed calculator"
},
{
"name": "distributed_permission",
"value": "Allow data exchange between different devices"
},
{
"name": "localhost",
"value": "localhost"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_delete</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-355.000000, -403.000000)" fill="#007DFF">
<g id="ic_cal_delete" transform="translate(355.000000, 403.000000)">
<rect id="矩形备份-16" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M61.0799558,34 C62.6248701,34 64.0408535,35.2257223 63.9990991,36.7567568 L63.9990991,36.7567568 L63.9990991,55.2432432 C63.9990991,56.7742777 62.6248701,58 61.0799558,58 L61.0799558,58 L40.077472,58 C39.409401,58 38.7830844,57.7517241 38.3237855,57.2965517 L38.3237855,57.2965517 L28.7202641,47.8206897 C27.759912,46.8275862 27.759912,45.2551724 28.7202641,44.3034483 L28.7202641,44.3034483 L38.3237855,34.7448276 C38.8248388,34.2482759 39.4511554,34 40.1192265,34 L40.1192265,34 Z M60.7264537,36.9189189 L40.5996847,36.9189189 L31.1090131,45.888164 L40.4360524,55.0810811 L60.7264537,55.0810811 C60.7965818,55.011583 60.8427178,54.9901516 60.882828,54.9805167 L60.9603375,54.9662291 C60.9870447,54.959545 61.0163972,54.9473572 61.0537182,54.9189189 L61.0537182,54.9189189 L61.0537182,37.2432432 C60.9230945,37.0844362 60.7978312,36.9189189 60.7264537,36.9189189 L60.7264537,36.9189189 Z M43.1986165,40.1655172 C43.6579153,39.6689655 44.4512497,39.6689655 44.952303,40.1655172 L44.952303,40.1655172 L49.0859927,44.262069 L53.2196823,40.1655172 C53.7207356,39.6689655 54.51407,39.6689655 55.0151233,40.1655172 C55.5161766,40.6206897 55.5161766,41.4068966 55.0151233,41.9034483 L55.0151233,41.9034483 L50.8814336,46 L54.9733688,50.0965517 C55.4744221,50.5517241 55.4744221,51.337931 54.9733688,51.8344828 C54.51407,52.3310345 53.7207356,52.3310345 53.2196823,51.8344828 L53.2196823,51.8344828 L49.0859927,47.737931 L44.952303,51.8344828 C44.4930042,52.3310345 43.6996698,52.3310345 43.1986165,51.8344828 C42.6975632,51.3793103 42.6975632,50.5931034 43.1986165,50.0965517 L43.1986165,50.0965517 L47.3323061,46 L43.1986165,41.9034483 C42.6975632,41.4482759 42.6975632,40.662069 43.1986165,40.1655172 Z" id="形状结合" fill-rule="nonzero"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_delete_c</title>
<g id="calculator" stroke="none" stroke-width="1" fill="#00000000" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-32.000000, -403.000000)" fill="none">
<g id="ic_cal_delete_c" transform="translate(32.000000, 403.000000)">
<rect id="矩形备份-15" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M47.1668153,60.9223919 C50.2807018,60.9223919 52.7763901,60.0845554 54.6538805,58.4088826 C56.5313708,56.7332097 57.646744,54.3532201 58,51.2689139 L58,51.2689139 L54.2123104,51.2689139 C53.8459709,53.6722694 53.103479,55.3579562 51.984835,56.3259744 C50.8661909,57.2939926 49.2601844,57.7780017 47.1668153,57.7780017 C44.8379423,57.7780017 43.0258698,56.8433635 41.7305977,54.974087 C40.4353256,53.1048105 39.7876896,50.5879632 39.7876896,47.4235451 L39.7876896,47.4235451 L39.7876896,44.5996023 C39.7876896,41.2482566 40.4713054,38.6646494 41.838537,36.8487808 C43.2057687,35.0329122 45.0930717,34.1249779 47.500446,34.1249779 C49.4629795,34.1249779 50.9904847,34.6457049 52.0829616,35.687159 C53.1754386,36.728613 53.8852215,38.4109619 54.2123104,40.7342055 L54.2123104,40.7342055 L58,40.7342055 C57.6990782,37.6766033 56.6327684,35.2832617 54.8010705,33.554181 C52.9693726,31.8251002 50.5358311,30.9605598 47.500446,30.9605598 C45.2108237,30.9605598 43.195956,31.5113288 41.455843,32.6128667 C39.71573,33.7144047 38.3713946,35.2932757 37.4228368,37.3494799 C36.4742789,39.405684 36,41.7890116 36,44.4994625 L36,44.4994625 L36,47.3033773 C36,51.4424896 37.0172465,54.7471034 39.0517395,57.2172188 C41.0862325,59.6873342 43.7912578,60.9223919 47.1668153,60.9223919 Z" id="C" fill="#007DFF" fill-rule="nonzero"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_devide</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-140.000000, -403.000000)" fill="none">
<g id="ic_cal_devide" transform="translate(140.000000, 403.000000)">
<rect id="矩形备份-14" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M46.1702128,57.137931 C47.7683161,57.137931 49.0638298,58.450197 49.0638298,60.0689655 C49.0638298,61.687734 47.7683161,63 46.1702128,63 C44.5721094,63 43.2765957,61.687734 43.2765957,60.0689655 C43.2765957,58.450197 44.5721094,57.137931 46.1702128,57.137931 Z M60.4,46.1034483 C61.2836,46.1034483 62,46.875431 62,47.8275862 C62,48.7801724 61.2836,49.5517241 60.4,49.5517241 L60.4,49.5517241 L31.5996,49.5517241 C30.716,49.5517241 30,48.7801724 30,47.8275862 C30,46.875431 30.716,46.1034483 31.5996,46.1034483 L31.5996,46.1034483 Z M46.1702128,33 C47.7683161,33 49.0638298,34.312266 49.0638298,35.9310345 C49.0638298,37.549803 47.7683161,38.862069 46.1702128,38.862069 C44.5721094,38.862069 43.2765957,37.549803 43.2765957,35.9310345 C43.2765957,34.312266 44.5721094,33 46.1702128,33 Z" id="形状结合" fill="#007DFF"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_eight</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-140.000000, -510.000000)" fill="#000000">
<g id="ic_cal_eight" transform="translate(140.000000, 510.000000)">
<rect id="矩形备份-11" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M47.090535,66 C49.2030178,66 51.0891632,65.5721854 52.7489712,64.7165563 C54.4087791,63.8609272 55.6989026,62.6900662 56.6193416,61.2039735 C57.5397805,59.7178808 58,58.0441501 58,56.1827815 C58,54.2313466 57.494513,52.5050773 56.4835391,51.0039735 C55.4725652,49.5028698 54.0768176,48.3770419 52.2962963,47.6264901 C53.6844993,46.9059603 54.7784636,45.9377483 55.5781893,44.7218543 C56.377915,43.5059603 56.7777778,42.1324503 56.7777778,40.6013245 C56.7777778,39.0101545 56.3703704,37.5540839 55.5555556,36.2331126 C54.7407407,34.9121413 53.5939643,33.8763797 52.1152263,33.1258278 C50.6364883,32.3752759 48.9615912,32 47.090535,32 C45.1893004,32 43.4766804,32.3827815 41.9526749,33.1483444 C40.4286694,33.9139073 39.2441701,34.9496689 38.399177,36.2556291 C37.5541838,37.5615894 37.1316872,39.0101545 37.1316872,40.6013245 C37.1316872,42.1624724 37.5466392,43.5509934 38.3765432,44.7668874 C39.2064472,45.9827815 40.3305898,46.9359823 41.7489712,47.6264901 C39.9684499,48.407064 38.5651578,49.5403974 37.5390947,51.0264901 C36.5130316,52.5125828 36,54.2313466 36,56.1827815 C36,58.0441501 36.4677641,59.7178808 37.4032922,61.2039735 C38.3388203,62.6900662 39.6440329,63.8609272 41.31893,64.7165563 C42.9938272,65.5721854 44.9176955,66 47.090535,66 Z M47.090535,45.8701987 C45.340192,45.8701987 43.9444444,45.3898455 42.9032922,44.4291391 C41.8621399,43.4684327 41.3415638,42.2375276 41.3415638,40.7364238 C41.3415638,39.1752759 41.8621399,37.9143488 42.9032922,36.9536424 C43.9444444,35.992936 45.340192,35.5125828 47.090535,35.5125828 C48.8106996,35.5125828 50.1838134,35.992936 51.2098765,36.9536424 C52.2359396,37.9143488 52.7489712,39.1752759 52.7489712,40.7364238 C52.7489712,42.2375276 52.2359396,43.4684327 51.2098765,44.4291391 C50.1838134,45.3898455 48.8106996,45.8701987 47.090535,45.8701987 Z M47.090535,62.397351 C45.0082305,62.397351 43.3559671,61.8344371 42.1337449,60.7086093 C40.9115226,59.5827815 40.3004115,58.0291391 40.3004115,56.0476821 C40.3004115,54.0662252 40.9039781,52.4900662 42.1111111,51.3192053 C43.3182442,50.1483444 44.9780521,49.5629139 47.090535,49.5629139 C49.1426612,49.5629139 50.7722908,50.1483444 51.9794239,51.3192053 C53.1865569,52.4900662 53.7901235,54.0662252 53.7901235,56.0476821 C53.7901235,57.999117 53.1790123,59.5452539 51.9567901,60.6860927 C50.7345679,61.8269316 49.1124829,62.397351 47.090535,62.397351 Z" id="8" fill-rule="nonzero" opacity="0.6"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="127px" height="234px" viewBox="0 0 127 234" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_equal</title>
<defs>
<rect id="path-1" x="-8" y="-12" width="110" height="226" rx="25"></rect>
<filter x="-28.0%" y="-12.5%" width="155.9%" height="126.0%" filterUnits="objectBoundingBox" id="filter-2">
<feOffset dx="0" dy="1" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="8.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
</defs>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="" transform="translate(-337.000000, -710.000000)">
<g id="ic_cal_equal" transform="translate(354.000000, 726.000000)">
<g id="矩形备份-25">
<use fill="black" fill-opacity="0" filter="url(#filter-2)" xlink:href="#path-1"></use>
<use fill="none" fill-rule="evenodd" xlink:href="#path-1"></use>
</g>
<g id="编组-4" transform="translate(31.000000, 93.000000)" fill="#FFFFFF">
<path d="M1.5,3.29842932 L28.5,3.29842932 C29.328375,3.29842932 30,2.55999346 30,1.64921466 C30,0.738435864 29.328375,0 28.5,0 L1.5,0 C0.67125,0 0,0.738435864 0,1.64921466 C0,2.55999346 0.67125,3.29842932 1.5,3.29842932" id="Fill-1"></path>
<path d="M28.5,10.7015707 L1.5,10.7015707 C0.67125,10.7015707 0,11.4400065 0,12.3507853 C0,13.2615641 0.67125,14 1.5,14 L28.5,14 C29.328375,14 30,13.2615641 30,12.3507853 C30,11.4400065 29.328375,10.7015707 28.5,10.7015707" id="Fill-3"></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_five</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-140.000000, -618.000000)" fill="#000000">
<g id="ic_cal_five" transform="translate(140.000000, 618.000000)">
<rect id="矩形备份-19" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M45.6017699,65 C47.4896755,65 49.2227139,64.5564516 50.800885,63.6693548 C52.379056,62.7822581 53.640118,61.5181452 54.5840708,59.8770161 C55.5280236,58.2358871 56,56.3655914 56,54.266129 C56,52.2258065 55.5648968,50.422043 54.6946903,48.8548387 C53.8244838,47.2876344 52.6224189,46.0752688 51.0884956,45.2177419 C49.5545723,44.3602151 47.8289086,43.9314516 45.9115044,43.9314516 C44.0235988,43.9314516 42.4011799,44.3454301 41.0442478,45.1733871 L41.0442478,45.1733871 L42.3274336,35.4596774 L54.539823,35.4596774 L54.539823,32 L38.8761062,32 L36.6637168,49.7419355 L39.1858407,51.0282258 C39.8348083,49.9637097 40.7123894,49.0987903 41.8185841,48.4334677 C42.9247788,47.7681452 44.1858407,47.4354839 45.6017699,47.4354839 C47.5781711,47.4354839 49.1120944,48.0860215 50.2035398,49.3870968 C51.2949853,50.688172 51.840708,52.3736559 51.840708,54.4435484 C51.840708,56.5725806 51.280236,58.265457 50.159292,59.5221774 C49.0383481,60.7788978 47.519174,61.4072581 45.6017699,61.4072581 C44.1268437,61.4072581 42.8362832,61.015457 41.7300885,60.2318548 C40.6238938,59.4482527 39.7758112,58.3172043 39.1858407,56.8387097 L39.1858407,56.8387097 L36,58.6572581 C36.7079646,60.6680108 37.9469027,62.2278226 39.7168142,63.3366935 C41.4867257,64.4455645 43.4483776,65 45.6017699,65 Z" id="5" fill-rule="nonzero" opacity="0.599999964"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="94px" viewBox="0 0 93 94" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_four</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-32.000000, -619.000000)" fill="#000000">
<g id="ic_cal_four" transform="translate(32.000000, 619.390000)">
<rect id="矩形备份-20" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<polygon id="4" fill-rule="nonzero" opacity="0.599999964" points="52.9924812 61.61 52.9924812 54.5280328 58 54.5280328 58 51.1619126 52.9924812 51.1619126 52.9924812 42.2438798 48.9774436 42.2438798 48.9774436 51.1619126 38.6917293 51.1619126 51.1428571 29.61 46.7669173 29.61 34 51.8176503 34 54.5280328 48.9774436 54.5280328 48.9774436 61.61"></polygon>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_minus</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-355.000000, -510.000000)" fill="#007DFF">
<g id="ic_cal_minus" transform="translate(355.000000, 510.000000)">
<rect id="矩形备份-17" fill-opacity="0" x="0" y="-7.10542736e-15" width="93" height="93" rx="21"></rect>
<rect id="矩形" x="31" y="44" width="30" height="3" rx="1.5"></rect>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 760 B

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_multiply</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-247.000000, -403.000000)" fill="none">
<g id="ic_cal_multiply" transform="translate(247.000000, 403.000000)">
<rect id="矩形备份-13" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M58.5431814,34.5188446 C59.1564674,35.1666731 59.1491081,36.1796861 58.5399965,36.8184819 L58.4829655,36.8755028 L48.9116339,45.999758 L58.4829655,55.1244972 C59.1480922,55.7585839 59.1750518,56.8136957 58.5431814,57.4811554 C57.9298954,58.1289839 56.9213726,58.1735238 56.25443,57.5958161 L56.1947604,57.5415825 L46.4999966,48.2988247 L36.8052328,57.5415825 C36.1401061,58.1756692 35.0886821,58.1486151 34.4568117,57.4811554 C33.8435258,56.8333269 33.850885,55.8203139 34.4599967,55.1815181 L34.5170277,55.1244972 L44.0880439,45.999758 L34.5170277,36.8755028 C33.8519009,36.2414161 33.8249414,35.1863043 34.4568117,34.5188446 C35.0700977,33.8710161 36.0786205,33.8264762 36.7455631,34.4041839 L36.8052328,34.4584175 L46.4996728,43.7006913 L56.1947604,34.4584175 C56.8598871,33.8243308 57.911311,33.8513849 58.5431814,34.5188446 Z" id="形状结合" fill="#007DFF" fill-rule="nonzero"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_nine</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-247.000000, -510.000000)" fill="#000000">
<g id="ic_cal_nine" transform="translate(247.000000, 510.000000)">
<rect id="矩形备份-10" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M45.016632,64 L53.1580042,50.8387097 C54.4996535,48.6756272 55.4753985,46.8629032 56.0852391,45.4005376 C56.6950797,43.938172 57,42.3691756 57,40.6935484 C57,38.6218638 56.5426195,36.7786738 55.6278586,35.1639785 C54.7130977,33.5492832 53.4248094,32.2849462 51.7629938,31.3709677 C50.1011781,30.4569892 48.1878032,30 46.022869,30 C43.8884269,30 41.982675,30.4646057 40.3056133,31.3938172 C38.6285516,32.3230287 37.3250173,33.6102151 36.3950104,35.2553763 C35.4650035,36.9005376 35,38.7284946 35,40.7392473 C35,42.6890681 35.4345114,44.4713262 36.3035343,46.0860215 C37.1725572,47.7007168 38.3998614,48.9802867 39.985447,49.9247312 C41.5710326,50.8691756 43.3853084,51.3413978 45.4282744,51.3413978 C46.6174636,51.3413978 47.6846847,51.1890681 48.6299376,50.8844086 C48.2564103,51.4353345 47.9555132,51.887775 47.7272465,52.2417301 L47.5493763,52.5210013 C47.4693347,52.6485775 47.4026334,52.7580645 47.3492723,52.8494624 L47.3492723,52.8494624 L40.3970894,64 L45.016632,64 Z M46.022869,47.594086 C43.9494109,47.594086 42.3257103,46.9543011 41.1517672,45.6747312 C39.977824,44.3951613 39.3908524,42.7043011 39.3908524,40.6021505 C39.3908524,38.5609319 39.977824,36.9005376 41.1517672,35.6209677 C42.3257103,34.3413978 43.9494109,33.7016129 46.022869,33.7016129 C48.0658351,33.7016129 49.6819127,34.3337814 50.8711019,35.5981183 C52.0602911,36.8624552 52.6548857,38.5304659 52.6548857,40.6021505 C52.6548857,42.6738351 52.0679141,44.3570789 50.8939709,45.6518817 C49.7200277,46.9466846 48.0963271,47.594086 46.022869,47.594086 Z" id="9" fill-rule="nonzero" opacity="0.599999964"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.2 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>1</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-32.000000, -725.000000)" fill="#000000">
<g id="1" transform="translate(32.000000, 725.000000)">
<rect id="矩形备份-24" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<polygon fill-rule="nonzero" opacity="0.599999964" points="50 64 50 31 46.9090909 31 38 36.1393443 38 40.2868852 45.9090909 35.8237705 45.9090909 64"></polygon>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 812 B

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_percent</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-32.000000, -833.000000)" fill="#000000">
<g id="ic_cal_percent" transform="translate(32.000000, 833.000000)">
<rect id="矩形备份-28" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M38.5604681,44.7165563 C39.9752926,44.7165563 41.2574772,44.393819 42.4070221,43.7483444 C43.556567,43.1028698 44.4629389,42.1871965 45.1261378,41.0013245 C45.7893368,39.8154525 46.1209363,38.4419426 46.1209363,36.8807947 C46.1209363,35.2896247 45.7893368,33.9011038 45.1261378,32.7152318 C44.4629389,31.5293598 43.556567,30.6136865 42.4070221,29.9682119 C41.2574772,29.3227373 39.9752926,29 38.5604681,29 C37.1456437,29 35.863459,29.3227373 34.7139142,29.9682119 C33.5643693,30.6136865 32.6579974,31.5293598 31.9947984,32.7152318 C31.3315995,33.9011038 31,35.2896247 31,36.8807947 C31,38.4419426 31.3315995,39.8154525 31.9947984,41.0013245 C32.6579974,42.1871965 33.5643693,43.1028698 34.7139142,43.7483444 C35.863459,44.393819 37.1456437,44.7165563 38.5604681,44.7165563 Z M40.373212,62.5046358 L59.6944083,29.4953642 L55.626788,29.4953642 L36.3055917,62.5046358 L40.373212,62.5046358 Z M38.5604681,41.2490066 C37.4698743,41.2490066 36.5635024,40.8437086 35.8413524,40.0331126 C35.1192024,39.2225166 34.7581274,38.1717439 34.7581274,36.8807947 C34.7581274,35.5598234 35.1192024,34.4940397 35.8413524,33.6834437 C36.5635024,32.8728477 37.4698743,32.4675497 38.5604681,32.4675497 C39.651062,32.4675497 40.5574339,32.8728477 41.2795839,33.6834437 C42.0017339,34.4940397 42.3628088,35.5598234 42.3628088,36.8807947 C42.3628088,38.1717439 42.0017339,39.2225166 41.2795839,40.0331126 C40.5574339,40.8437086 39.651062,41.2490066 38.5604681,41.2490066 Z M57.4395319,63 C58.8543563,63 60.136541,62.6772627 61.2860858,62.0317881 C62.4356307,61.3863135 63.3420026,60.4706402 64.0052016,59.2847682 C64.6684005,58.0988962 65,56.7253863 65,55.1642384 C65,53.5730684 64.6684005,52.1845475 64.0052016,50.9986755 C63.3420026,49.8128035 62.4356307,48.8971302 61.2860858,48.2516556 C60.136541,47.606181 58.8543563,47.2834437 57.4395319,47.2834437 C56.0247074,47.2834437 54.7425228,47.606181 53.5929779,48.2516556 C52.443433,48.8971302 51.5370611,49.8128035 50.8738622,50.9986755 C50.2106632,52.1845475 49.8790637,53.5730684 49.8790637,55.1642384 C49.8790637,56.7253863 50.2106632,58.0988962 50.8738622,59.2847682 C51.5370611,60.4706402 52.443433,61.3863135 53.5929779,62.0317881 C54.7425228,62.6772627 56.0247074,63 57.4395319,63 Z M57.4395319,59.5324503 C56.348938,59.5324503 55.4425661,59.1271523 54.7204161,58.3165563 C53.9982661,57.5059603 53.6371912,56.4551876 53.6371912,55.1642384 C53.6371912,53.8432671 53.9982661,52.7774834 54.7204161,51.9668874 C55.4425661,51.1562914 56.348938,50.7509934 57.4395319,50.7509934 C58.5301257,50.7509934 59.4364976,51.1562914 60.1586476,51.9668874 C60.8807976,52.7774834 61.2418726,53.8432671 61.2418726,55.1642384 C61.2418726,56.4551876 60.8807976,57.5059603 60.1586476,58.3165563 C59.4364976,59.1271523 58.5301257,59.5324503 57.4395319,59.5324503 Z" id="%" fill-rule="nonzero" opacity="0.600000024"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.4 KiB

View File

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_plus</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-355.000000, -618.000000)" fill="#007DFF">
<g id="ic_cal_plus" transform="translate(355.000000, 618.000000)">
<rect id="矩形备份-21" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<g id="编组-5" transform="translate(31.000000, 32.000000)">
<rect id="矩形复制" x="0" y="13.2954545" width="30" height="3.40909091" rx="1.5"></rect>
<path d="M1.5,13.3333333 L28.5,13.3333333 C29.3284271,13.3333333 30,14.0049062 30,14.8333333 L30,15.1666667 C30,15.9950938 29.3284271,16.6666667 28.5,16.6666667 L1.5,16.6666667 C0.671572875,16.6666667 7.67068418e-14,15.9950938 7.63833441e-14,15.1666667 L7.63833441e-14,14.8333333 C7.65039356e-14,14.0049062 0.671572875,13.3333333 1.5,13.3333333 Z" id="矩形复制" transform="translate(15.000000, 15.000000) rotate(90.000000) translate(-15.000000, -15.000000) "></path>
</g>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_point</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-247.000000, -833.000000)" fill="#000000">
<g id="ic_cal_point" transform="translate(247.000000, 833.000000)">
<rect id="矩形备份-26" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M39.4778761,64 C40.1858407,64 40.7831858,63.7557471 41.2699115,63.2672414 C41.7566372,62.7787356 42,62.1896552 42,61.5 C42,60.8103448 41.7566372,60.2212644 41.2699115,59.7327586 C40.7831858,59.2442529 40.1858407,59 39.4778761,59 C38.79941,59 38.2168142,59.2442529 37.7300885,59.7327586 C37.2433628,60.2212644 37,60.8103448 37,61.5 C37,62.1609195 37.2433628,62.7428161 37.7300885,63.2456897 C38.2168142,63.7485632 38.79941,64 39.4778761,64 Z" id="." fill-rule="nonzero" opacity="0.599999964"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_seven</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-32.000000, -510.000000)" fill="#000000">
<g id="ic_cal_seven" transform="translate(32.000000, 510.000000)">
<rect id="矩形备份-12" fill-opacity="0" x="0" y="-7.10542736e-15" width="93" height="93" rx="21"></rect>
<polygon id="7" fill-rule="nonzero" opacity="0.6" points="43.9824561 62 56 32.4010914 56 30 36 30 36 33.361528 51.5701754 33.361528 39.6842105 62"></polygon>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 845 B

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title> ic_cal_six</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-247.000000, -618.000000)" fill="#000000">
<g id="--ic_cal_six" transform="translate(247.000000, 618.000000)">
<rect id="矩形备份-18" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M45.977131,65 C48.1115731,65 50.017325,64.5490591 51.6943867,63.6471774 C53.3714484,62.7452957 54.6749827,61.4959677 55.6049896,59.8991935 C56.5349965,58.3024194 57,56.5282258 57,54.5766129 C57,52.6841398 56.5654886,50.9543011 55.6964657,49.3870968 C54.8274428,47.8198925 53.6001386,46.577957 52.014553,45.6612903 C50.4289674,44.7446237 48.6146916,44.2862903 46.5717256,44.2862903 C45.3825364,44.2862903 44.3153153,44.4341398 43.3700624,44.7298387 C44.010395,43.813172 44.4372834,43.1774194 44.6507277,42.8225806 L44.6507277,42.8225806 L51.6029106,32 L46.983368,32 L38.8419958,44.7741935 C37.5003465,46.8736559 36.5246015,48.6330645 35.9147609,50.0524194 C35.3049203,51.4717742 35,52.9946237 35,54.6209677 C35,56.6317204 35.4573805,58.4206989 36.3721414,59.9879032 C37.2869023,61.5551075 38.5751906,62.7822581 40.2370062,63.6693548 C41.8988219,64.5564516 43.8121968,65 45.977131,65 Z M45.977131,61.4072581 C43.9341649,61.4072581 42.3180873,60.7936828 41.1288981,59.5665323 C39.9397089,58.3393817 39.3451143,56.7204301 39.3451143,54.7096774 C39.3451143,52.6989247 39.9320859,51.0651882 41.1060291,49.8084677 C42.2799723,48.5517473 43.9036729,47.9233871 45.977131,47.9233871 C48.0505891,47.9233871 49.6742897,48.5443548 50.8482328,49.7862903 C52.022176,51.0282258 52.6091476,52.6693548 52.6091476,54.7096774 C52.6091476,56.6908602 52.022176,58.3024194 50.8482328,59.5443548 C49.6742897,60.7862903 48.0505891,61.4072581 45.977131,61.4072581 Z" id="6" fill-rule="nonzero" opacity="0.599999964"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_three</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-247.000000, -725.000000)" fill="#000000">
<g id="ic_cal_three" transform="translate(247.000000, 725.000000)">
<rect id="矩形备份-22" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M47.611465,65 C49.4840764,65 51.2080679,64.6172185 52.7834395,63.8516556 C54.358811,63.0860927 55.6220807,61.9602649 56.5732484,60.4741722 C57.5244161,58.9880795 58,57.2242826 58,55.1827815 C58,53.1112583 57.5169851,51.3699779 56.5509554,49.9589404 C55.5849257,48.5479029 54.1210191,47.5271523 52.1592357,46.8966887 C53.7346072,46.2362031 54.9012739,45.2754967 55.6592357,44.0145695 C56.4171975,42.7536424 56.7961783,41.2975717 56.7961783,39.6463576 C56.7961783,37.0644592 55.9490446,34.9779249 54.2547771,33.386755 C52.5605096,31.795585 50.3163482,31 47.522293,31 C45.1146497,31 43.0116773,31.6229581 41.2133758,32.8688742 C39.4150743,34.1147903 38.1592357,35.9536424 37.4458599,38.3854305 L37.4458599,38.3854305 L40.656051,40.2317881 C41.2505308,38.4304636 42.1050955,37.0494481 43.2197452,36.0887417 C44.3343949,35.1280353 45.6942675,34.6476821 47.2993631,34.6476821 C48.8450106,34.6476821 50.1082803,35.0980132 51.089172,35.9986755 C52.0700637,36.8993377 52.5605096,38.1452539 52.5605096,39.7364238 C52.5605096,41.41766 51.9883227,42.7986755 50.843949,43.8794702 C49.6995754,44.9602649 48.0276008,45.5006623 45.8280255,45.5006623 L45.8280255,45.5006623 L44.2675159,45.5006623 L44.2229299,49.1033113 L45.6050955,49.1033113 C51.044586,49.1033113 53.7643312,51.1147903 53.7643312,55.1377483 C53.7643312,57.0891832 53.1772824,58.6128035 52.0031847,59.7086093 C50.829087,60.804415 49.3651805,61.3523179 47.611465,61.3523179 C46.0063694,61.3523179 44.5127389,60.8944812 43.1305732,59.9788079 C41.7484076,59.0631347 40.7749469,57.7046358 40.2101911,55.9033113 L40.2101911,55.9033113 L37,57.7496689 C37.6836518,60.1214128 39.0286624,61.9227373 41.0350318,63.1536424 C43.0414013,64.3845475 45.2335456,65 47.611465,65 Z" id="3" fill-rule="nonzero" opacity="0.599999964"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_two</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-140.000000, -725.000000)" fill="#000000">
<g id="ic_cal_two" transform="translate(140.000000, 725.000000)">
<rect id="矩形备份-23" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M57,65 L57,61.3946309 L42.1156317,61.3946309 L49.6702355,52.9060403 C52.0685225,50.2286353 53.7473233,48.0076063 54.7066381,46.242953 C55.6659529,44.4782998 56.1456103,42.6071588 56.1456103,40.6295302 C56.1456103,38.5910515 55.7184154,36.849217 54.8640257,35.4040268 C54.009636,33.9588367 52.862955,32.8635347 51.4239829,32.1181208 C49.9850107,31.3727069 48.3961456,31 46.6573876,31 C44.2591006,31 42.0856531,31.69217 40.137045,33.0765101 C38.1884368,34.4608501 36.8843683,36.4004474 36.2248394,38.895302 L36.2248394,38.895302 L39.4625268,40.766443 C40.0021413,38.9409396 40.8865096,37.4729306 42.1156317,36.3624161 C43.3447537,35.2519016 44.7687366,34.6966443 46.3875803,34.6966443 C47.9764454,34.6966443 49.2955032,35.2290828 50.3447537,36.2939597 C51.3940043,37.3588367 51.9186296,38.864877 51.9186296,40.8120805 C51.9186296,42.3333333 51.5438972,43.7404922 50.7944325,45.033557 C50.0449679,46.3266219 48.6659529,48.0988814 46.6573876,50.3503356 L46.6573876,50.3503356 L36,62.3986577 L36,65 L57,65 Z" id="2" fill-rule="nonzero" opacity="0.599999964"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="201px" height="93px" viewBox="0 0 201 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_zero</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_B端" transform="translate(-32.000000, -833.000000)" fill="#000000">
<g id="ic_cal_zero" transform="translate(32.000000, 833.000000)">
<rect id="矩形备份-27" fill-opacity="0" x="0" y="0" width="201" height="93" rx="21"></rect>
<path d="M46.9781312,64.6854553 C49.1650099,64.6854553 51.0894632,64.0580426 52.7514911,62.8032173 C54.4135189,61.5483919 55.7037773,59.6586847 56.6222664,57.1340957 C57.5407555,54.6095066 58,51.4948508 58,47.7901284 C58,44.0555292 57.5407555,40.9259351 56.6222664,38.401346 C55.7037773,35.8767569 54.4135189,33.9870497 52.7514911,32.7322244 C51.0894632,31.477399 49.1650099,30.8499864 46.9781312,30.8499864 C44.7912525,30.8499864 42.8740888,31.477399 41.2266402,32.7322244 C39.5791915,33.9870497 38.2962227,35.8842261 37.3777336,38.4237536 C36.4592445,40.9632811 36,44.085406 36,47.7901284 C36,51.4948508 36.4592445,54.6095066 37.3777336,57.1340957 C38.2962227,59.6586847 39.5791915,61.5483919 41.2266402,62.8032173 C42.8740888,64.0580426 44.7912525,64.6854553 46.9781312,64.6854553 Z M46.9781312,61.0106097 C44.8495693,61.0106097 43.1802518,59.9051683 41.9701789,57.6942856 C40.760106,55.4834028 40.1550696,52.1820171 40.1550696,47.7901284 C40.1550696,43.3683629 40.760106,40.0445696 41.9701789,37.8187485 C43.1802518,35.5929274 44.8495693,34.4800168 46.9781312,34.4800168 C49.1358516,34.4800168 50.8197482,35.5929274 52.0298211,37.8187485 C53.239894,40.0445696 53.8449304,43.3683629 53.8449304,47.7901284 C53.8449304,52.2118939 53.239894,55.5207488 52.0298211,57.7166931 C50.8197482,59.9126375 49.1358516,61.0106097 46.9781312,61.0106097 Z" id="0" fill-rule="nonzero" opacity="0.599999964"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="93px" height="93px" viewBox="0 0 93 93" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>ic_cal_zero_short</title>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-140.000000, -833.000000)" fill="#000000">
<g id="ic_cal_zero_short" transform="translate(140.000000, 833.000000)">
<rect id="矩形备份-27" fill-opacity="0" x="0" y="0" width="93" height="93" rx="21"></rect>
<path d="M45.2459593,65.1464067 C47.4250278,65.1464067 49.342608,64.5165901 50.9987,63.256957 C52.654792,61.9973239 53.9404424,60.1003765 54.8556512,57.5661146 C55.7708599,55.0318528 56.2284643,51.9052635 56.2284643,48.1863468 C56.2284643,44.4374387 55.7708599,41.2958538 54.8556512,38.761592 C53.9404424,36.2273302 52.654792,34.3303827 50.9987,33.0707496 C49.342608,31.8111165 47.4250278,31.1812999 45.2459593,31.1812999 C43.0668909,31.1812999 41.1565742,31.8111165 39.5150093,33.0707496 C37.8734444,34.3303827 36.5950576,36.234828 35.6798488,38.7840854 C34.7646401,41.3333429 34.3070357,44.46743 34.3070357,48.1863468 C34.3070357,51.9052635 34.7646401,55.0318528 35.6798488,57.5661146 C36.5950576,60.1003765 37.8734444,61.9973239 39.5150093,63.256957 C41.1565742,64.5165901 43.0668909,65.1464067 45.2459593,65.1464067 Z M45.2459593,61.4574812 C43.1249994,61.4574812 41.4616438,60.3478044 40.2558926,58.1284508 C39.0501414,55.9090973 38.4472658,52.5950626 38.4472658,48.1863468 C38.4472658,43.7476397 39.0501414,40.4111115 40.2558926,38.1767623 C41.4616438,35.9424131 43.1249994,34.8252385 45.2459593,34.8252385 C47.3959735,34.8252385 49.0738562,35.9424131 50.2796074,38.1767623 C51.4853586,40.4111115 52.0882342,43.7476397 52.0882342,48.1863468 C52.0882342,52.6250539 51.4853586,55.9465864 50.2796074,58.1509443 C49.0738562,60.3553022 47.3959735,61.4574812 45.2459593,61.4574812 Z" id="0" fill-rule="nonzero" opacity="0.600000024"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="32px" height="32px" viewBox="0 0 32 32" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>icon-hop</title>
<defs>
<rect id="path-1" x="0" y="0" width="32" height="32"></rect>
</defs>
<g id="calculator" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="分布式计算器_A端_计算器首页" transform="translate(-416.000000, -55.000000)">
<g id="icon-hop" transform="translate(416.000000, 55.000000)">
<mask id="mask-2" fill="white">
<use xlink:href="#path-1"></use>
</mask>
<g id="蒙版"></g>
<path d="M29.6666667,15 C30.2189514,15 30.6666667,15.4477153 30.6666667,16 C30.6666667,24.1001763 24.1001763,30.6666667 16,30.6666667 C7.89982367,30.6666667 1.33333333,24.1001763 1.33333333,16 C1.33333333,15.4477153 1.78104858,15 2.33333333,15 C2.88561808,15 3.33333333,15.4477153 3.33333333,16 C3.33333333,22.9956068 9.00439317,28.6666667 16,28.6666667 C22.9956068,28.6666667 28.6666667,22.9956068 28.6666667,16 C28.6666667,15.4477153 29.1143819,15 29.6666667,15 Z M17.8821367,8.92546229 L17.9398151,8.98122726 L21.7110513,12.7524634 C21.882882,12.9242941 21.9791072,13.1431 21.9997269,13.367543 L22.0034759,13.4288634 L22.0034759,13.490277 C21.9959778,13.7358693 21.898503,13.9792253 21.7110513,14.166677 C21.3344743,14.543254 20.7322786,14.5567032 20.339586,14.2070245 L20.2968378,14.166677 L17.2898066,11.1598097 L17.2898518,16.7582631 C17.2898518,19.6145236 15.0445605,21.9463683 12.2227056,22.0850693 L11.9565185,22.0915964 L11.5758066,22.0915964 C11.0235218,22.0915964 10.5758066,21.6438812 10.5758066,21.0915964 C10.5758066,20.5853354 10.9520118,20.1669418 11.4401125,20.1007252 L11.5758066,20.0915964 L11.9565185,20.0915964 C13.7238297,20.0915964 15.1699034,18.7162152 15.2827616,16.9774307 L15.2898518,16.7582631 L15.2898066,11.1588097 L12.2829609,14.166677 C11.8924366,14.5572013 11.2592716,14.5572013 10.8687473,14.166677 C10.6804588,13.9783885 10.5829523,13.7336953 10.5762277,13.4869877 L10.5764378,13.4253003 C10.5841431,13.1991901 10.6681304,12.9751958 10.8283998,12.7952117 L10.8687473,12.7524634 L14.6399835,8.98122726 C15.532223,8.08898773 16.9672798,8.0703994 17.8821367,8.92546229 Z M28.0761393,9.55564886 C28.7488556,9.25613626 29.5370028,9.55867764 29.8365154,10.2313939 C30.136028,10.9041102 29.8334866,11.6922575 29.1607703,11.9917701 C28.488054,12.2912827 27.6999068,11.9887413 27.4003942,11.316025 C27.1008816,10.6433087 27.403423,9.85516145 28.0761393,9.55564886 Z M3.92272633,9.55564886 C4.59544262,9.85516145 4.897984,10.6433087 4.59847141,11.316025 C4.29895882,11.9887413 3.51081158,12.2912827 2.83809528,11.9917701 C2.16537898,11.6922575 1.8628376,10.9041102 2.16235019,10.2313939 C2.46186278,9.55867764 3.25001003,9.25613626 3.92272633,9.55564886 Z M24.7169976,5.39752589 C25.2376967,4.87682684 26.0819167,4.87682684 26.6026157,5.39752589 C27.1233148,5.91822495 27.1233148,6.76244492 26.6026157,7.28314398 C26.0819167,7.80384303 25.2376967,7.80384303 24.7169976,7.28314398 C24.1962986,6.76244492 24.1962986,5.91822495 24.7169976,5.39752589 Z M7.27787977,5.39337844 C7.79857882,5.9140775 7.79857882,6.75829747 7.27787977,7.27899653 C6.75718071,7.79969558 5.91296074,7.79969558 5.39226168,7.27899653 C4.87156263,6.75829747 4.87156263,5.9140775 5.39226168,5.39337844 C5.91296074,4.87267939 6.75718071,4.87267939 7.27787977,5.39337844 Z M20.0194755,2.82901186 C20.2953281,2.14625253 21.0724367,1.8163895 21.7551961,2.09224218 C22.4379554,2.36809486 22.7678184,3.14520344 22.4919657,3.82796278 C22.2161131,4.51072212 21.4390045,4.84058514 20.7562451,4.56473246 C20.0734858,4.28887978 19.7436228,3.5117712 20.0194755,2.82901186 Z M11.9852991,2.82899202 C12.2611517,3.51175136 11.9312887,4.28885994 11.2485294,4.56471262 C10.5657701,4.8405653 9.78866147,4.51070228 9.51280879,3.82794294 C9.23695611,3.1451836 9.56681914,2.36807502 10.2495785,2.09222234 C10.9323378,1.81636966 11.7094464,2.14623269 11.9852991,2.82899202 Z M16,1.13333333 C16.7363797,1.13333333 17.3333333,1.730287 17.3333333,2.46666667 C17.3333333,3.20304633 16.7363797,3.8 16,3.8 C15.2636203,3.8 14.6666667,3.20304633 14.6666667,2.46666667 C14.6666667,1.730287 15.2636203,1.13333333 16,1.13333333 Z" id="icon-流转" fill="#000000" fill-rule="nonzero" mask="url(#mask-2)"></path>
</g>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 550 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,5 @@
{
"src": [
"pages/Index"
]
}

View File

@ -0,0 +1,36 @@
{
"string": [
{
"name": "entry_desc",
"value": "description"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "Calculator"
},
{
"name": "choiceDevice",
"value": "Choice Device"
},
{
"name": "cancel",
"value": "Cancel"
},
{
"name": "distributed_calculator",
"value": "distributed calculator"
},
{
"name": "distributed_permission",
"value": "Allow data exchange between different devices"
},
{
"name": "localhost",
"value": "localhost"
}
]
}

View File

@ -0,0 +1,36 @@
{
"string": [
{
"name": "entry_desc",
"value": "description"
},
{
"name": "MainAbility_desc",
"value": "description"
},
{
"name": "MainAbility_label",
"value": "计算器"
},
{
"name": "choiceDevice",
"value": "选择设备"
},
{
"name": "cancel",
"value": "取消"
},
{
"name": "distributed_calculator",
"value": "分布式计算器"
},
{
"name": "distributed_permission",
"value": "允许不同设备间的数据交换"
},
{
"name": "localhost",
"value": "本机(结束协同)"
}
]
}

View File

@ -0,0 +1,2 @@
// Script for compiling build behavior. It is built in the build plug-in and cannot be modified currently.
module.exports = require('@ohos/hvigor-ohos-plugin').appTasks

View File

@ -0,0 +1,18 @@
{
"license": "ISC",
"devDependencies": {},
"name": "sampletest",
"ohos": {
"org": "huawei",
"directoryLevel": "project",
"buildTool": "hvigor"
},
"description": "example description",
"repository": {},
"version": "1.0.0",
"dependencies": {
"@ohos/hypium": "1.0.2",
"@ohos/hvigor-ohos-plugin": "1.2.2",
"@ohos/hvigor": "1.2.2"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB