| | |
| | | btnTilte.TextSize = UI.CSS.CSS_FontSize.HeadlineFontSize;
|
| | | btnTilte.TextColor = UI.CSS.CSS_Color.FirstLevelTitleColor;
|
| | | topFrameLayout.AddChidren(btnTilte); |
| | | topFrameLayout.AddTag("txtTitle", btnTilte); |
| | | topFrameLayout.AddTag("txtTitle", btnTilte);
|
| | | #if DEBUG
|
| | | btnTilte.MouseLongEventHandler += (sender, e) =>
|
| | | {
|
| | |
|
| | | var form = new BottomMenuSelectControl(3);
|
| | | form.AddMenu("切换为中文", () =>
|
| | | {
|
| | | Language.CurrentLanguage = "Chinese";
|
| | | //清除全部控件
|
| | | this.ClearBodyFrame();
|
| | | //执行ShowForm()方法实现重新加载
|
| | | this.LoadShowFormMethod(this.m_parameter);
|
| | | });
|
| | | form.AddMenu("切换为英文", () =>
|
| | | {
|
| | | Language.CurrentLanguage = "English";
|
| | | //清除全部控件
|
| | | this.ClearBodyFrame();
|
| | | //执行ShowForm()方法实现重新加载
|
| | | this.LoadShowFormMethod(this.m_parameter);
|
| | | });
|
| | | form.AddMenu("查看本地文件", () =>
|
| | | {
|
| | | var form2 = new HideOptionDirectoryListForm();
|
| | | form2.AddForm();
|
| | | });
|
| | | };
|
| | | #endif |
| | | } |
| | |
|
| | | #endregion |
| | |
| | | #region ■ 添加列表消息显示控件_______________
|
| | |
|
| | | /// <summary>
|
| | | /// 添加列表消息显示控件,返回的是最后一个控件的底部坐标(没看懂这个函数前,请勿使用)
|
| | | /// 添加列表消息显示控件,返回生成的控件(没看懂这个函数前,请勿使用,它不会帮计算换行)
|
| | | /// </summary>
|
| | | /// <param name="frameTable">桌布容器控件</param>
|
| | | /// <param name="i_msg">显示的消息(换行请使用【{0}】进行分割)</param>
|
| | |
| | | /// </param>
|
| | | /// <param name="i_width">文本宽度,真实值,当为-1时,内部自动计算</param>
|
| | | /// <returns></returns>
|
| | | public int AddListMsgControls(FrameLayout frameTable, string i_msg, int i_fontSize, uint i_fontColor, int i_height,
|
| | | public List<NormalViewControl> AddListMsgControls(FrameLayout frameTable, string i_msg, int i_fontSize, uint i_fontColor, int i_height,
|
| | | int i_yy, TextAlignment alignment = TextAlignment.Center, bool special = false, int i_width = -1)
|
| | | {
|
| | | var listMsg = i_msg.Split(new string[] { "{0}" }, StringSplitOptions.RemoveEmptyEntries);
|
| | |
| | | }
|
| | |
|
| | | //特殊处理
|
| | | if (special == true && alignment == TextAlignment.Center)
|
| | | if (special == true)
|
| | | {
|
| | | //设置它的真实宽度(对special变量有用)
|
| | | int realWidth = btnMsg.GetRealWidthByText();
|
| | |
| | | i_yy = btnMsg.Bottom + Application.GetRealHeight(4);
|
| | | }
|
| | | //特殊处理
|
| | | if (special == true && alignment == TextAlignment.Center)
|
| | | if (special == true)
|
| | | {
|
| | | foreach (var contr in listContr)
|
| | | {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | return i_yy - Application.GetRealHeight(4);
|
| | | return listContr;
|
| | | }
|
| | |
|
| | | #endregion
|
| | |
| | | public void RemoveBackButton() |
| | | { |
| | | //移除返回键 |
| | | var back = (NormalViewControl)topFrameLayout.GetTagByKey("btnBack"); |
| | | var back = (PicViewControl)topFrameLayout.GetTagByKey("btnBack"); |
| | | topFrameLayout.RemoveTag("btnBack"); |
| | | back?.RemoveFromParent();
|
| | |
|