Example #1
0
 private void CreateMessageBtn_Click(object sender, RoutedEventArgs e)
 {
     if (!VM.Creating)
     {
         NewMessageGrid.LayoutTransform.BeginAnimation(ScaleTransform.ScaleYProperty, new DoubleAnimation(1, TimeSpan.FromMilliseconds(150))
         {
             EasingFunction = new QuadraticEase()
         });
         NewMessageTextBox.Focus();
         VM.NewMessage = VM.MyLfg != null ? VM.MyLfg.Message : "";
         VM.Creating   = true;
     }
     else if (VM.Creating && !string.IsNullOrEmpty(VM.NewMessage))
     {
         NewMessageGrid.LayoutTransform.BeginAnimation(ScaleTransform.ScaleYProperty, new DoubleAnimation(0, TimeSpan.FromMilliseconds(150))
         {
             EasingFunction = new QuadraticEase()
         });
         Proxy.Proxy.RegisterLfg(VM.NewMessage, RaidSwitch.IsOn);
         VM.Creating = false;
         //VM.NewMessage = "";
         VM.NewMessage = VM.MyLfg != null ? VM.MyLfg.Message : "";
         Task.Delay(200).ContinueWith(t => Proxy.Proxy.RequestLfgList());
     }
     else
     {
         NewMessageGrid.LayoutTransform.BeginAnimation(ScaleTransform.ScaleYProperty, new DoubleAnimation(0, TimeSpan.FromMilliseconds(150))
         {
             EasingFunction = new QuadraticEase()
         });
         //VM.NewMessage = "";
         VM.NewMessage = VM.MyLfg != null ? VM.MyLfg.Message : "";
         VM.Creating   = false;
     }
 }
Example #2
0
        private void updateAll()
        {
            m_chat = m_chatter.MainChat;
            _UpdateChatterList();
            _UpdateChatMessageList();
            _UpdateAllChatter();
            m_chat.iAmUpToDate(m_chatter.intId);

            _UpdateChatRooms();
            if (m_chatter.mainChat == 0)
            {
                ChatRoomNameLabel.Text = "[0] Main Chatroom";
            }
            else
            {
                ChatRoomNameLabel.Text = String.Format("[{0}] {1}", m_chatter.mainChat, m_chat);
            }
            ChatUpdatePanel.Update();
            NewMessageTextBox.Focus();
        }