public AddEditExistingMechanicalComponentPropertyDialog(MechanicalEquipmentComponentType pcpt)
        {
            InitializeComponent();

            AddEditExistingMechanicalComponentPropertyViewModel viewModel =
                new AddEditExistingMechanicalComponentPropertyViewModel(pcpt);
            viewModel.Loaded +=
                () =>
                {
                    viewModel.View = this;
                    DataContext = viewModel;
                };
        }
        public AddEditExistingMechanicalComponentPropertyDialog(int componentPropertyId)
        {
            InitializeComponent();

            AddEditExistingMechanicalComponentPropertyViewModel viewModel =
                new AddEditExistingMechanicalComponentPropertyViewModel(componentPropertyId);
            viewModel.View = this;
            viewModel.Loaded +=
                () =>
                    {
                        DataContext = viewModel;
                        Utils.ResetOriginalValues(this);

                    };
        }