/// <summary> /// 显示方法 /// </summary> public override void showDialog() { base.showDialog(); FCButton btnOK = getButton("btnOK"); FCButton btnCancel = getButton("btnCancel"); FCLabel lblDelete = getLabel("lblDelete"); if (m_isEdit) { FCTextBox txtName = getTextBox("txtName"); FCTextBox txtScript = getTextBox("txtScript"); txtName.Text = m_indicatorData.m_name; txtScript.Text = m_indicatorData.m_script; txtName.Enabled = false; lblDelete.Visible = true; btnOK.Text = "修改"; m_window.Text = "修改指标"; } else { lblDelete.Visible = false; btnOK.Text = "新增"; m_window.Height -= 50; } Native.invalidate(); }
/// <summary> /// 创建标签单元格 /// </summary> public FCGridLabelCell() { FCLabel label = new FCLabel(); label.BorderColor = FCColor.None; label.DisplayOffset = false; Control = label; }
/// <summary> /// 控件加载方法 /// </summary> public override void onLoad() { base.onLoad(); if (m_lblXY == null) { m_lblXY = m_native.findControl("lblXY") as FCLabel; } if (m_lblWH == null) { m_lblWH = m_native.findControl("lblWH") as FCLabel; } startTimer(getNewTimerID(), 100); }
/// <summary> /// 注册事件 /// </summary> /// <param name="control">控件</param> private void registerEvents(FCView control) { FCTouchEvent clickButtonEvent = new FCTouchEvent(clickButton); List <FCView> controls = control.getControls(); int controlsSize = controls.Count; for (int i = 0; i < controlsSize; i++) { FCButton button = controls[i] as FCButton; FCLabel linkLabel = controls[i] as FCLabel; if (button != null) { button.addEvent(clickButtonEvent, FCEventID.CLICK); } else if (linkLabel != null) { linkLabel.addEvent(clickButtonEvent, FCEventID.CLICK); } registerEvents(controls[i]); } }