// Use this for initialization // Use this for initialization public override void Start() { base.Start(); base.isTweenWin = true; //Icon max and min Transform closeOpen = transform.Find("CloseOpen"); /*if (null == btnmin) { * btnmin = closeOpen.Find ("Minsize").GetComponent<Button> (); * } * btnmin.onClick.AddListener (delegate() { * SCMainWinController.Instance ().Minsize (); * });*/ if (null == btnquit) { btnquit = closeOpen.Find("Close").GetComponent <Button> (); } btnquit.onClick.AddListener(delegate() { SCMainWinController.Instance().Exit(); }); }
/// <summary> /// Login this instance. /// 登录成功处理... /// TODO:Realize... /// </summary> public void LoginSuccess(DangmuLoginRsp loginRsp) { _model.WexinId = loginRsp.weixinId; _model.nickname = loginRsp.nickname; _model.qrcode = loginRsp.qrcodeUrl; _model.IsMark = loginRsp.bMark; _model.actName = loginRsp.actName; //_model.IsLogined = true; //Start Init dangmu messages... //whether to init judge by DangmuStatus_Initing.. /* * if (DangmuTextController.DangmuStatus.DangmuStatus_Initing == SCMainWinController.Instance ().DangmuControl.DanmuCurStatus || DangmuTextController.DangmuStatus.DangmuStatus_None == SCMainWinController.Instance ().DangmuControl.DanmuCurStatus ) || SCMainWinController.Instance ().InitDangmu (); ||else { || SCWindowsManager.Instance.OpenAndCloseWin( typeof(CombBulletScreenDisplayer), typeof(SCLoginView) ); || SCMainWinController.Instance().DangmuControl.DanmuCurStatus = DangmuTextController.DangmuStatus.DangmuStatus_Opening; ||}*/ //for webview to displayweb SCMainWinController.Instance().InitDangmu(); // _model.LoginTime = Utility.GetUnixTimeStamp().ToString(); //set Bind text.. Image uiImage = bindBtn.GetComponentInChildren <Image> (); uiImage.sprite = SCMainWinController.Instance().SCMainVw.buttonSelected; bingText.text = @"活动名称:" + _model.actName; }
public void LoginOutView( ) { Image uiImage = bindBtn.GetComponentInChildren <Image> (); uiImage.sprite = SCMainWinController.Instance().SCMainVw.buttonUnselected; bingText.text = ""; _model.Init(); }
// Use this for initialization public override void Start() { base.Start(); base.isTweenWin = true; name = GetComponentInChildren <Text> (true); qrCode = GetComponentInChildren <Image> (true); qrCode.enabled = true; //to load sprite.. TextureLoader.Instance().StartSpriteLoad(SCMainWinController.Instance().ScModel.qrcode, 0, new TextureLoader.DelegateSpriteCallMethod(this.Display)); }
// Use this for initialization public override void Start() { base.Start(); _model = SCMainWinController.Instance().ScModel; //add listener.. //btnLogin = gameObject.GetComponentInChildren<Button>(); btnLogin.onClick.AddListener(delegate() { this.Login(); }); closeBtn.onClick.AddListener(delegate() { this.Hide(); }); isTweenWin = true; }
//init to set .. /* * public void SetSprite(int index, Sprite previewSprite) * { * this.index = index; * previewImage.sprite = previewSprite; * }*/ public void OnClick(GameObject objSender) { switch (objSender.name) { case "PreviewBtn": //Open Material Window.. if (fileListModel._fileType == FileItem.FileType.FileType_Video) { SCMainWinController.Instance().TopLeftVw.DisplayVideo(fileListModel._fileInfo.file, title); } else if (fileListModel._fileType == FileItem.FileType.FileType_Web) { SCMainWinController.Instance().TopLeftVw.DisplayWeb(fileListModel._webUrl, title); } break; case "ProjectBtn": //.. if (fileListModel._fileType == FileItem.FileType.FileType_Video) { SCMainWinController.Instance().TopRhtVw.DisplayVideo(fileListModel._fileInfo.file, title, SCMainWinController.Instance().TopLeftVw.GetVideoFrameCount()); } else if (fileListModel._fileType == FileItem.FileType.FileType_Web) { SCMainWinController.Instance().TopRhtVw.DisplayWeb(fileListModel._webUrl, title); } break; case "RemoveBtn": //移除... string key = ""; if (fileListModel._fileType == FileItem.FileType.FileType_Video) { key = FileListModel.GetFileShortName(fileListModel._fileInfo.file); } else if (fileListModel._fileType == FileItem.FileType.FileType_Web) { key = FileListModel.GetUrlShortName(fileListModel._webUrl); } FileListControl.Instance().ClickRemovePreview(key); break; default: break; } }
/* * private void SetButtonText(GameObject btn, string content) * { * Text uiText = btn.GetComponentInChildren<Text> (); * uiText.text = content; * }*/ private void ProcessBingding(GameObject btn) { //SCWindowsManager.Instance.openWin( typeof(SCLoginView) ); if (SCMainWinController.Instance().ScModel.IsLogined) { SCMainWinController.Instance().LoginOut(); //SetButtonSprite (btn, buttonUnselected); } else { if (true == SCWindowsManager.Instance.ContainerWin(typeof(SCLoginView))) { SCWindowsManager.Instance.closeWin(typeof(SCLoginView)); } else { SCWindowsManager.Instance.openWin(typeof(SCLoginView)); } } }
public void SwitchProject() { string leftString = SCMainWinController.Instance().TopLeftVw.GetActivePath(); string leftTitle = SCMainWinController.Instance().TopLeftVw.TitleText.text; string rightString = SCMainWinController.Instance().TopRhtVw.GetActivePath(); string rightTitle = SCMainWinController.Instance().TopRhtVw.TitleText.text; bool rightBVideo = SCMainWinController.Instance().TopRhtVw.VideoRoot.activeSelf; bool rightBWeb = SCMainWinController.Instance().TopRhtVw.WebRoot.activeSelf; if (leftString == null) { SCMainWinController.Instance().TopRhtVw.DisplayNone(); } else if (SCMainWinController.Instance().TopLeftVw.WebRoot.activeSelf) { SCMainWinController.Instance().TopRhtVw.DisplayWeb(leftString, leftTitle); } else if (SCMainWinController.Instance().TopLeftVw.VideoRoot.activeSelf) { SCMainWinController.Instance().TopRhtVw.DisplayVideo(leftString, leftTitle, SCMainWinController.Instance().TopLeftVw.GetVideoFrameCount()); } if (rightString == null) { SCMainWinController.Instance().TopLeftVw.DisplayNone(); } else if (rightBWeb) { SCMainWinController.Instance().TopLeftVw.DisplayWeb(rightString, rightTitle); } else if (rightBVideo) { SCMainWinController.Instance().TopLeftVw.DisplayVideo(rightString, rightTitle); } }
/// <summary> /// Display the specified headSprite and index. /// </summary> /// <param name="headSprite">Head sprite.</param> /// <param name="index">Index.</param> public void Display(Sprite qrSprite, uint index) { qrCode.enabled = true; name.text = SCMainWinController.Instance().ScModel.nickname; qrCode.sprite = qrSprite; }
/// <summary> /// Process the click event of the main window. /// TODO:.. /// </summary> /// <param name="objSender">Object sender.</param> public void OnClick(GameObject objSender) { switch (objSender.name) { case "AddMaterialBtn": //Open Material Window.. SCWindowsManager.Instance.openWin(typeof(FileMaterialDiaLog)); break; case "DanMuBtn": if (SCMainWinController.Instance().ScModel.IsLogined) { //&& SCMainWinController.Instance ().DangmuControl.DanmuCurStatus != DangmuTextController.DangmuStatus.DangmuStatus_None ) { if (true == SCMainWinController.Instance().DangmuVw.isActiveAndEnabled) { //SCMainWinController.Instance().DangmuVw.enabled = false; SCWindowsManager.Instance.closeWin(typeof(WebBulletScreenView)); //SetButtonText (objSender, "打 开 弹 幕"); SetButtonSprite(objSender, buttonUnselected); //SCMainWinController.Instance ().DangmuControl.DanmuCurStatus = DangmuTextController.DangmuStatus.DangmuStatus_Hiding; } else { //SCMainWinController.Instance().DangmuVw.enabled = true; SCMainWinController.Instance().InitDangmu(); SetButtonSprite(objSender, buttonSelected); //SetButtonText (objSender, "关 闭 弹 幕"); //SCMainWinController.Instance ().DangmuControl.DanmuCurStatus = DangmuTextController.DangmuStatus.DangmuStatus_Opening; } } else if (SCMainWinController.Instance().ScModel.IsLogined) //Logined but not intialed.. { if (true == SCMainWinController.Instance().DangmuVw.isActiveAndEnabled) { SCWindowsManager.Instance.closeWin(typeof(WebBulletScreenView)); //SetButtonText (objSender, "打 开 弹 幕"); SetButtonSprite(objSender, buttonUnselected); //SCMainWinController.Instance ().DangmuControl.DanmuCurStatus = DangmuTextController.DangmuStatus.DangmuStatus_Hiding; } else { //SCMainWinController.Instance().DangmuVw.enabled = true; SetButtonSprite(objSender, buttonSelected); SCMainWinController.Instance().InitDangmu(); //SetButtonText (objSender, "关 闭 弹 幕"); } } else { //SCMainWinController.Instance ().DangmuControl.DanmuCurStatus = DangmuTextController.DangmuStatus.DangmuStatus_Initing; SCWindowsManager.Instance.openWin(typeof(SCLoginView)); } break; case "SwitchBtn": //qiehuan SwitchProject(); break; case "QRCodeBtn": SCMainWinController.Instance().TopRhtVw.ResetQrCode(); break; case "FullScreenBtn": //SCWindowsManager.Instance.openWin (typeof(FullWindowView)); SCMainWinController.Instance().TopRhtVw.FullWindowSwitch( ); break; case "StartBtn": //Preject... // ProjectProcess(objSender); break; case "SoundBtn": audioSource.mute = !audioSource.mute; if (false == audioSource.mute) { SetButtonSprite(objSender, buttonSelected); } else { SetButtonSprite(objSender, buttonUnselected); } break; case "BindBtn": ProcessBingding(objSender); break; case "MarkBtn": if (!SCMainWinController.Instance().ScModel.IsLogined) { SCWindowsManager.Instance.openWin(typeof(SCLoginView)); } break; default: break; } }