public AddEditPipeComponentDialog(Pipe pipe)
        {
            InitializeComponent();

            mModel = new AddEditPipeComponentViewModel(pipe, pipe.PipeComponents.Select(x => x.Name).ToList()) {View = this};
            mModel.Loaded += () => { DataContext = mModel; };
        }
        public AddEditPipeComponentDialog(Pipe pipe, PipeComponent pipeComponent)
        {
            InitializeComponent();

            Title = "Edit Pipe Component";

            mModel = new AddEditPipeComponentViewModel(pipeComponent, pipe.PipeComponents.Select(x => x.Name).ToList()) { View = this };
            mModel.Loaded += () =>
            {
                DataContext = mModel;
                Utils.ResetOriginalValues(this);
            };
        }