Esempio n. 1
0
        public void AvChatEnded(object sender, AvChatEventArgs args)
        {
            bool enable;

            if (chatType == ChatTypeE.OnlineClient)
            {
                enable = this.cbAudienceType.SelectedIndex > 1;
            }
            else
            {
                enable = this.cbAudienceType.SelectedIndex == 0;
            }

            avClientUc1.Invoke(new AvChatDelegate(AvClientChatEnded), enable, sender, args);
        }
Esempio n. 2
0
 public void ChatEnded(object sender, AvChatEventArgs args)
 {
     cboChatType.Invoke(new CboChatEndedDelegate(cboChatEnded));
     btnDial.Invoke(new BtnChatEndedDelegate(btnChatEnded));
     //if (args.ChatType == AvChatTypeE.Video)
     //{
     //    lock (typeof(WebCam))
     //    {
     //        if (WebCam.IsLoaded)
     //        {
     //            WebCam.Instance.Dispose();
     //            WebCam.IsLoaded = false;
     //        }
     //    }
     //}
     if (OnHangup != null)
     {
         OnHangup.Invoke(this, new EventArgs());
     }
 }
Esempio n. 3
0
 public void ChatBegan(object sender, AvChatEventArgs args)
 {
     btnDial.Image             = InfinityChess.Properties.Resources.HangupCall;
     cboChatType.SelectedIndex = (int)args.ChatType;
     cboChatType.Enabled       = false;
     //if(args.ChatType == AvChatTypeE.Video)
     //{
     //    lock(typeof(WebCam))
     //    {
     //        if(!WebCam.IsLoaded)
     //        {
     //            //WebCam.Instance.Left = Screen.PrimaryScreen.Bounds.Width - WebCam.Instance.Width;
     //            //WebCam.Instance.Top = (Screen.PrimaryScreen.Bounds.Height - WebCam.Instance.Height) / 2;
     //            //WebCam.Instance.Left = this.Parent.Left + 20;
     //            //WebCam.Instance.Top = this.Parent.Top + this.Parent.Height - WebCam.Instance.Height - 20;
     //            //WebCam.Instance.Show();
     //            //WebCam.IsLoaded = true;
     //        }
     //    }
     //}
 }
Esempio n. 4
0
        private void AvChatUc_OnDial(object sender, AvChatEventArgs args)
        {
            if (chatType == ChatTypeE.OnlineClient)
            {
                if (cbAudienceType.SelectedIndex < 2 || UserID == Ap.CurrentUserID)
                {
                    return;
                }
            }
            else if (cbAudienceType.SelectedIndex != 0)
            {
                return;
            }

            if (Ap.CurrentUser.IsGuest || UserRank == "Guest")
            {
                ChatClient.Write(chatType, ChatMessageTypeE.Warning, chatType, "Not allowed for guest", 0);
                return;
            }

            if (!AvPlayer.IsFlash8Installed())
            {
                if (MessageForm.Confirm(this.ParentForm, MsgE.ConfirmFlashInstall) == DialogResult.Yes)
                {
                    System.Diagnostics.Process.Start(Msg.GetMsg(MsgE.InfoFlashUrl));
                }
                return;
            }

            ChatMessageEventArgs chatMessage = new ChatMessageEventArgs();

            chatMessage.ChatType = chatType;
            chatMessage.Type     = ChatMessageTypeE.Inprogress;
            //chatMessage.Message = "Calling " + UserName + "...";
            chatMessage.Message = "Connecting to chat server" + "...";
            AddLine(chatMessage);
            AvPlayer.InitializeChat(UserID, UserName, args.ChatType, chatType);
        }
Esempio n. 5
0
 private void AvClientChatEnded(bool enable, object sender, AvChatEventArgs args)
 {
     avClientUc1.Enabled = enable;
     avClientUc1.ChatEnded(sender, args);
 }
Esempio n. 6
0
 public void AvChatBegan(object sender, AvChatEventArgs args)
 {
     avClientUc1.Invoke(new AvChatDelegate(AvClientChatBegan), true, sender, args);
 }
Esempio n. 7
0
 public void ChatInitialize(object sender, AvChatEventArgs args)
 {
     btnDial.Image             = InfinityChess.Properties.Resources.HangupCall;
     cboChatType.SelectedIndex = (int)args.ChatType;
     cboChatType.Enabled       = false;
 }