[FIX] fixed merge conflicts
This commit is contained in:
@@ -48,8 +48,13 @@
|
||||
</Border>
|
||||
|
||||
<Grid Grid.Column="2" Grid.Row="1">
|
||||
<TextBox Name="SentMessage" IsReadOnly="True" Margin="0,0,0,50"/>
|
||||
<TextBox x:Name="ChatBox" Keyboard.KeyDown="ChatBox_KeyDown" Width="200" Height="50" ToolTip="Message goes here" ToolTipService.IsEnabled="True" VerticalAlignment="Bottom" HorizontalAlignment="Left"/>
|
||||
<ListBox Name ="TextBox" ItemsSource="{Binding Path=Messages}" Margin="0,0,0,69"/>
|
||||
|
||||
<TextBox Name="ChatBox" Text="{Binding Message, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="0,465,0,0">
|
||||
<TextBox.InputBindings>
|
||||
<KeyBinding Key="Return" Command="{Binding OnKeyDown}"/>
|
||||
</TextBox.InputBindings>
|
||||
</TextBox>
|
||||
</Grid>
|
||||
|
||||
</Grid>
|
||||
|
||||
@@ -52,36 +52,11 @@ namespace Client.Views
|
||||
// var deepCopy = System.Windows.Markup.XamlReader.Parse(xaml) as UIElement;
|
||||
// TEST.Children.Add(deepCopy);
|
||||
//}
|
||||
|
||||
}
|
||||
|
||||
private void ClrPcker_Background_SelectedColorChanged_1(object sender, RoutedPropertyChangedEventArgs<Color?> e)
|
||||
{
|
||||
viewModel.Color_Picker(e, this);
|
||||
}
|
||||
|
||||
private void ChatBox_KeyDown(object sender, KeyEventArgs e)
|
||||
{
|
||||
//if enter then clear textbox and send message.
|
||||
if (e.Key.Equals(Key.Enter))
|
||||
{
|
||||
WriteToChat(ChatBox.Text);
|
||||
ChatBox.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Writes the current client's message to the chatbox.
|
||||
*/
|
||||
private void WriteToChat(string message)
|
||||
{
|
||||
string user = data.User.Username;
|
||||
SentMessage.AppendText($"{user}: {message}\n");
|
||||
}
|
||||
|
||||
private void Window_Closing(object sender, System.ComponentModel.CancelEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,8 +32,6 @@ namespace Client
|
||||
|
||||
private void Button_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user