1 Star 0 Fork 2

zkleaf/ PDA解决方案:活字格设计器插件( PDA(Android)交互命令)

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Get_Location.cs 3.14 KB
一键复制 编辑 原始数据 按行查看 历史
using GrapeCity.Forguncy.Commands;
using GrapeCity.Forguncy.Plugin;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace AndroidPDACommand
{
[Icon("pack://application:,,,/AndroidPDACommand;component/Resources/Icon_Location.png")]
[Category("活字格安卓容器(HAC)")]
[OrderWeight(100)]
public class Get_Location : Command, IPropertySearchable, IForceGenerateCell
{
[FormulaProperty]
[DisplayName("坐标体系:支持WGS84、GCJ02、BD09")]
public object CS { get; set; }
[FormulaProperty(true)]
[DisplayName("目标单元格(Latitude/纬度)")]
public object LatCell { get; set; }
[FormulaProperty(true)]
[DisplayName("目标单元格(Longtitude/经度)")]
public object LonCell { get; set; }
[FormulaProperty(true)]
[DisplayName("目标单元格(错误信息)")]
public object ErrCell { get; set; }
public override string ToString()
{
return "读取地理位置到单元格";
}
public override CommandScope GetCommandScope()
{
return CommandScope.All;
}
public IEnumerable<FindResultItem> EnumSearchableProperty(LocationIndicator location)
{
List<FindResultItem> result = new List<FindResultItem>();
result.Add(new FindResultItem()
{
Location = location.AppendProperty("目标单元格(Latitude/纬度)"),
Value = LatCell?.ToString()
});
result.Add(new FindResultItem()
{
Location = location.AppendProperty("目标单元格(Longtitude/经度)"),
Value = LonCell?.ToString()
});
result.Add(new FindResultItem()
{
Location = location.AppendProperty("目标单元格(错误信息)"),
Value = ErrCell?.ToString()
});
return result ;
}
public IEnumerable<GenerateCellInfo> GetForceGenerateCells()
{
List<GenerateCellInfo> result = new List<GenerateCellInfo>();
if (LatCell is IFormulaReferObject formulaReferObject2)
{
var cellInfo = formulaReferObject2.GetGenerateCellInfo();
if (cellInfo != null)
{
result.Add(cellInfo);
}
}
if (LonCell is IFormulaReferObject formulaReferObject3)
{
var cellInfo = formulaReferObject3.GetGenerateCellInfo();
if (cellInfo != null)
{
result.Add(cellInfo);
}
}
if (ErrCell is IFormulaReferObject formulaReferObject4)
{
var cellInfo = formulaReferObject4.GetGenerateCellInfo();
if (cellInfo != null)
{
result.Add(cellInfo);
}
}
return result;
}
}
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C#
1
https://gitee.com/zkleaf/huozige-hac-plugin.git
git@gitee.com:zkleaf/huozige-hac-plugin.git
zkleaf
huozige-hac-plugin
PDA解决方案:活字格设计器插件( PDA(Android)交互命令)
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385