/// <summary> /// 设置第二行文字行内容 /// </summary> public void SetContent_Second(string content, BusinessEnum.ScreenType screenType) { string strContent = content; int intFontSize = 22; try { if (strContent.Length > 8) { strContent = strContent.Substring(0, 8) + "\r\n" + strContent.Substring(8); } switch (screenType) { case BusinessEnum.ScreenType.ScreenType50: // 如果是50寸屏幕 intFontSize = 28; break; } } catch { strContent = content; } finally { tbTypeNum.FontSize = intFontSize; tbTypeNum.Text = strContent; } }
public static BusinessEnum.ScreenType ChangeScreenType(string screenType) { BusinessEnum.ScreenType scrype = BusinessEnum.ScreenType.ScreenType26; switch (screenType) { case "0": // 26寸屏 scrype = BusinessEnum.ScreenType.ScreenType26; break; case "1": // 50寸屏 scrype = BusinessEnum.ScreenType.ScreenType50; break; default: scrype = BusinessEnum.ScreenType.ScreenType26; break; } return(scrype); }