| | |
| | | {
|
| | | #region ■ 变量声明___________________________
|
| | |
|
| | | /// <summary>
|
| | | /// 解密
|
| | | /// </summary>
|
| | | private bool decryptPassword = false;
|
| | |
|
| | | #endregion
|
| | |
|
| | | #region ■ 初始化_____________________________
|
| | |
| | |
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame(i_file);
|
| | |
|
| | | var btnButton = new NormalViewControl(200, 69, true);
|
| | | btnButton.Gravity = Gravity.CenterVertical;
|
| | | btnButton.X = bodyFrameLayout.Width - Application.GetRealWidth(200) - HdlControlResourse.XXLeft;
|
| | | btnButton.TextColor = UserCenterColor.Current.TopLayoutTitleText;
|
| | | btnButton.TextAlignment = TextAlignment.BottomRight;
|
| | | btnButton.TextSize = 17;
|
| | | btnButton.Text = "翻译";
|
| | | topFrameLayout.AddChidren(btnButton);
|
| | | btnButton.ButtonClickEvent += (sender, e) =>
|
| | | {
|
| | | if (this.decryptPassword == false)
|
| | | {
|
| | | this.decryptPassword = true;
|
| | | //初始化中部信息
|
| | | this.InitMiddleFrame(i_file);
|
| | | }
|
| | | };
|
| | | }
|
| | |
|
| | | /// <summary>
|
| | |
| | | private void InitMiddleFrame(string i_file)
|
| | | {
|
| | | if (i_file == string.Empty) { return; }
|
| | |
|
| | | this.ClearBodyFrame();
|
| | |
|
| | | if (i_file.EndsWith(".png") == true || i_file.EndsWith(".jpg") == true || i_file.EndsWith(".JPG") == true)
|
| | | {
|
| | |
| | | /// <param name="i_text"></param>
|
| | | public void SetTextContent(string textValue)
|
| | | {
|
| | | textValue = textValue.Replace(",", "\r\n");
|
| | | if (this.decryptPassword == true)
|
| | | {
|
| | | var strArry = textValue.Split(new string[] { "\r\n" }, StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | textValue = string.Empty;
|
| | | foreach (var strtext in strArry)
|
| | | {
|
| | | string value = HdlCommonLogic.Current.DecryptPassword(HdlUserCenterResourse.FileEncryptKey, strtext);
|
| | | textValue += value + "\r\n";
|
| | | }
|
| | | }
|
| | | if (textValue.StartsWith("{") == true)
|
| | | {
|
| | | textValue = "{\r\n" + textValue.Substring(1);
|