using System;
using System.Windows;


namespace NavisworksTransport.UI.WPF.Views
{
    public partial class EditCoordinatesWindow : Window
    {
        public double X { get; set; }
        public double Y { get; set; }
        public double Z { get; set; }

        public EditCoordinatesWindow(double x, double y, double z)
        {
            try
            {
                InitializeComponent();
                X = x;
                Y = y;
                Z = z;
                DataContext = this;
            }
            catch (Exception ex)
            {
                LogManager.Error($"编辑坐标对话框初始化失败: {ex.Message}", ex);
                MessageBox.Show($"编辑坐标对话框初始化失败: {ex.Message}", "错误", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }

        private void OnSaveClick(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
            Close();
        }

        private void OnCancelClick(object sender, RoutedEventArgs e)
        {
            DialogResult = false;
            Close();
        }
    }
}
