我很困惑,我可以从微调器中选择一个项目,然后在弹出的消息中显示它。我有这个,
btnSubmitRequest.Click += (sender, e) =>
{
spinnerJobTypes.ItemSelected += new EventHandler<AdapterView.ItemSelectedEventArgs>(spinnerJobTypes_ItemSelected);
}
private void spinnerJobTypes_ItemSelected(object sender, AdapterView.ItemSelectedEventArgs e)
{
Spinner spinner = (Spinner)sender;
string toast = string.Format("{0}", spinner.GetItemAtPosition(e.Position));
Toast.MakeText(this, toast, ToastLength.Long).Show();
}
Run Code Online (Sandbox Code Playgroud)
如何获得SpinnerJobTypes_ItemSelected对字符串的响应,以便可以将其提交到数据库中?
任何帮助是极大的赞赏
我正在尝试从 ac# 应用程序读取 xml 文件。到目前为止,根本没有运气。这是 XML 文件
<?xml version="1.0" encoding="utf-8"?>
<ExportJobs xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<JobList>
<Job Id="555555">
<Comments></Comments>
<DueDate>2017-11-17</DueDate>
<FormattedDueDate>17-Nov-2017 12:00</FormattedDueDate>
<TargetDueDate>2017-11-17</TargetDueDate>
<ServiceTypeId>3</ServiceTypeId>
<ServiceType>Service</ServiceType>
<TenantName>Miss Ash</TenantName>
<Uprn>testUpr</Uprn>
<HouseName></HouseName>
</Job>
<Job Id="666666">
<Comments></Comments>
<DueDate>2018-03-15</DueDate>
<FormattedDueDate>15-Mar-2018 12:00</FormattedDueDate>
<TargetDueDate>2018-03-15</TargetDueDate>
<ServiceTypeId>3</ServiceTypeId>
<ServiceType>Service</ServiceType>
<TenantName>Mr Howard</TenantName>
<Uprn>testUpr2</Uprn>
</Job>
</JobList>
</ExportJobs>
Run Code Online (Sandbox Code Playgroud)
我正在尝试从作业列表节点获取作业 ID和 Uprn,并将值传递给 Sql Server DB。我试过这个,但我无法得到值,
string costCode;
string uprn;
//File path where the xml is located
string filepath = "C:\\ExportJobs.xml";
XmlDocument xmlDoc = new XmlDocument();
xmlDoc.Load(filepath);
foreach (XmlNode node in …
Run Code Online (Sandbox Code Playgroud) 我正在尝试在我的 React 项目中实现 SignaturePad,并且我可以绘制签名,但我无法访问属性以清除或保存它。我在 ref={signCanvas} 以及 current.clear() 和 signCanvas.current.clear() 和 signCanvas.getTrimmedCanvas().toDataURL("image/png") 上收到以下错误
没有重载与此调用匹配。
Overload 1 of 2, '(props: Readonly<ReactSignatureCanvasProps>): ReactSignatureCanvas', gave the following error.
Type 'MutableRefObject<{}>' is not assignable to type 'string | ((instance: ReactSignatureCanvas | null) => void) | RefObject<ReactSignatureCanvas> | null | undefined'.
Type 'MutableRefObject<{}>' is not assignable to type 'RefObject<ReactSignatureCanvas>'.
Types of property 'current' are incompatible.
Type '{}' is missing the following properties from type 'ReactSignatureCanvas': on, off, clear, isEmpty, and 14 more.
Overload 2 of 2, …
Run Code Online (Sandbox Code Playgroud) c# ×2
android ×1
reactjs ×1
signaturepad ×1
typescript ×1
use-ref ×1
xamarin ×1
xml ×1
xml-parsing ×1