public void Edit(DisplayUnitsManager displayUnitsManager, string displayUnitsType)
 {
     _displayUnitsManagerToEdit = displayUnitsManager;
     _clonedUnitManager         = _cloner.Clone(_displayUnitsManagerToEdit);
     _displayUnitsPresenter.Edit(_clonedUnitManager);
     _view.Caption = Captions.ManageDisplayUnits(displayUnitsType);
     _view.Display();
     if (_view.Canceled)
     {
         return;
     }
     // User confirms changes=> Update
     _displayUnitsManagerToEdit.UpdatePropertiesFrom(_clonedUnitManager, _cloner);
 }
        public void LoadUnitsFromFile()
        {
            var filename = _dialogCreator.AskForFileToOpen(Captions.LoadUnitsFromFile, Constants.Filter.UNITS_FILE_FILTER, Constants.DirectoryKey.MODEL_PART);

            if (string.IsNullOrEmpty(filename))
            {
                return;
            }
            var displayUnitsFromFile = _serializationTask.Load <DisplayUnitsManager>(filename);

            if (displayUnitsFromFile == null)
            {
                return;
            }
            _unitsManager.UpdatePropertiesFrom(displayUnitsFromFile, _cloneManager);
            bindToView();
        }