PageRenderTime 47ms CodeModel.GetById 24ms RepoModel.GetById 1ms app.codeStats 0ms

/TEditXna/View/Popups/ChestPopup.xaml.cs

https://github.com/Surfpup/Terraria-Map-Editor
C# | 50 lines | 40 code | 5 blank | 5 comment | 0 complexity | 888ac6c50cc945d3a1108ad64c6f5f43 MD5 | raw file
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Windows;
  6. using System.Windows.Controls;
  7. using System.Windows.Controls.Primitives;
  8. using System.Windows.Data;
  9. using System.Windows.Documents;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Windows.Media.Imaging;
  13. using System.Windows.Navigation;
  14. using System.Windows.Shapes;
  15. using TEditXNA.Terraria;
  16. namespace TEditXna.View.Popups
  17. {
  18. /// <summary>
  19. /// Interaction logic for ChestsContentsPopup.xaml
  20. /// </summary>
  21. public partial class ChestPopup : Popup
  22. {
  23. public ChestPopup(Chest chest)
  24. {
  25. InitializeComponent();
  26. DataContext = chest.Items;
  27. }
  28. public void OpenChest(Chest chest)
  29. {
  30. DataContext = chest.Items;
  31. }
  32. private void Popup_MouseDown(object sender, MouseButtonEventArgs e)
  33. {
  34. //IsOpen = false;
  35. }
  36. private void Popup_MouseLeave(object sender, MouseEventArgs e)
  37. {
  38. //IsOpen = false;
  39. }
  40. private void ClosePopup(object sender, RoutedEventArgs e)
  41. {
  42. IsOpen = false;
  43. }
  44. }
  45. }