ShareView.cs 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. // using ET;
  2. // using FairyGUI;
  3. // using System;
  4. // using System.Collections;
  5. // using System.Collections.Generic;
  6. // using UnityEngine;
  7. // using UnityEngine.EventSystems;
  8. // using System.IO;
  9. // using UnityEngine.Networking;
  10. // using cn.sharesdk.unity3d;
  11. // using UI.Share;
  12. //
  13. // namespace GFGGame
  14. // {
  15. // public class ShareView : BaseWindow
  16. // {
  17. // private UI_ShareUI _ui;
  18. //
  19. // public override void Dispose()
  20. // {
  21. // if (_ui != null)
  22. // {
  23. // _ui.Dispose();
  24. // }
  25. //
  26. // _ui = null;
  27. // base.Dispose();
  28. // }
  29. //
  30. // protected override void OnInit()
  31. // {
  32. // base.OnInit();
  33. // packageName = UI_ShareUI.PACKAGE_NAME;
  34. // _ui = UI_ShareUI.Create();
  35. // this.viewCom = _ui.target;
  36. // isfullScreen = true;
  37. //
  38. // _ui.m_btnShare.onClick.Add(BtnOnclickShare);
  39. // _ui.m_btnClose.onClick.Add(this.Hide);
  40. // _ui.m_btnShareWB.onClick.Add(BtnOnclickShareWb);
  41. // _ui.m_btnShareWX.onClick.Add(BtnOnClickShareWX);
  42. // _ui.m_btnShareQQ.onClick.Add(BtnOnClickShareQQ);
  43. // _ui.m_btnShareQQZone.onClick.Add(BtnOnClickShareQQPlatform);
  44. // _ui.m_btnShareDouYin.onClick.Add(BtnOnClickShareDouYin);
  45. // }
  46. //
  47. // protected override void OnShown()
  48. // {
  49. // base.OnShown();
  50. // _ui.m_btnShareWB.visible = false;
  51. // _ui.m_btnShareWX.visible = false;
  52. // _ui.m_btnShareQQ.visible = false;
  53. // _ui.m_btnShareQQZone.visible = false;
  54. // _ui.m_btnShareDouYin.visible = false;
  55. // RoleInfoManager.Instance.UpdateHead(_ui.m_head, RoleDataManager.headId, RoleDataManager.headBorderId);
  56. // _ui.m_levelText.text = RoleDataManager.lvl.ToString();
  57. // _ui.m_nameText.text = RoleDataManager.roleName;
  58. // ShareDataManager.Instance.group = _ui.m_shareGrade;
  59. // Texture2D imageText = ShareDataManager.Instance.ConvertBytesToTexture(ShareDataManager.Instance.imageBytes);
  60. // _ui.m_icon.texture = new NTexture(imageText);
  61. // }
  62. //
  63. // protected override void OnHide()
  64. // {
  65. // base.OnHide();
  66. // }
  67. //
  68. // private void BtnOnclickShare()
  69. // {
  70. // ShareDataManager.Instance.CaptureCameraToImage(false);
  71. // ShareSDKFun(PlatformType.WeChatMoments);
  72. // }
  73. //
  74. // private void BtnOnclickShareWb()
  75. // {
  76. // ShareDataManager.Instance.CaptureCameraToImage(false);
  77. // ShareSDKFun(PlatformType.SinaWeibo);
  78. // }
  79. //
  80. // private void BtnOnClickShareWX()
  81. // {
  82. // ShareDataManager.Instance.CaptureCameraToImage(false);
  83. // ShareSDKFun(PlatformType.WeChat);
  84. // }
  85. //
  86. // private void BtnOnClickShareQQ()
  87. // {
  88. // ShareDataManager.Instance.CaptureCameraToImage(false);
  89. // ShareSDKFun(PlatformType.QQ);
  90. // }
  91. //
  92. // private void BtnOnClickShareQQPlatform()
  93. // {
  94. // ShareDataManager.Instance.CaptureCameraToImage(false);
  95. // #if UNITY_ANDROID
  96. // ShareSDKFun(PlatformType.QQPlatform);
  97. // #endif
  98. // }
  99. //
  100. // private void BtnOnClickShareDouYin()
  101. // {
  102. // ShareDataManager.Instance.CaptureCameraToImage(false);
  103. // ShareSDKFun(PlatformType.Douyin);
  104. // }
  105. //
  106. // private void ShareSDKFun(PlatformType platformType)
  107. // {
  108. // QDShareManager.Instance.SubmitPolicyGrantResult();
  109. // ShareContent content = new ShareContent();
  110. // content.SetText("万世镜");
  111. // content.SetImagePath(ShareDataManager.Instance.outputImagePath);
  112. // content.SetTitle("wsj");
  113. // content.SetSite("Mob-ShareSDK");
  114. // content.SetComment("test description");
  115. // content.SetShareType(ContentType.Image);
  116. // QDShareManager.Instance.ShareContent(platformType, content);
  117. // }
  118. // }
  119. // }