private void UpdateViewModel(BeamProperties beamProperties)
 {
     LoadData(beamProperties);
     UpdatePositionData(beamProperties);
     UpdateAttributesData(beamProperties);
     UpdateNumberingData(beamProperties);
 }
 private void UpdateNumberingData(BeamProperties beamProperties)
 {
     NumberingSeriesPartPrefixText          = beamProperties.NumberingSeriesPartPrefixText;
     NumberingSeriesPartStartNumberText     = beamProperties.NumberingSeriesPartStartNumberText;
     NumberingSeriesAssemblyPrefixText      = beamProperties.NumberingSeriesAssemblyPrefixText;
     NumberingSeriesAssemblyStartNumberText = beamProperties.NumberingSeriesAssemblyStartNumberText;
 }
        public DialogBeamPropertiesViewModel(MemberModifierFactory modifierFactory,
                                             BeamProperties localBeamProperties,
                                             BeamProperties globalBeamPropertiesInput,
                                             BeamValuesGetter beamValuesGetter
                                             )
        {
            PositionOnPlaneComboBox = new List <string>()
            {
                "MIDDLE", "RIGHT", "LEFT"
            };
            PositionRotationComboBox = new List <string>()
            {
                "TOP"
            };
            PositionAtDepthComboBox = new List <string>()
            {
                "MIDDLE", "FRONT", "BEHIND"
            };

            SelectedDataInPositionOnPlaneComboBox  = PositionOnPlaneComboBox[0];
            SelectedDataInPositionRotationComboBox = PositionRotationComboBox[0];
            SelectedDataInPositionAtDepthComboBox  = PositionAtDepthComboBox[0];

            InitCommand();
            this.modifierFactory  = modifierFactory;
            globalBeamProperties  = globalBeamPropertiesInput;
            this.beamValuesGetter = beamValuesGetter;
            UpdateViewModel(localBeamProperties);
            TickAllBoxes();
        }
 private void UpdateAttributesData(BeamProperties beamProperties)
 {
     AttributesNameText     = beamProperties.AttributesNameText;
     AttributesProfileText  = beamProperties.AttributesProfileText;
     AttributesMaterialText = beamProperties.AttributesMaterialText;
     AttributesFinishText   = beamProperties.AttributesFinishText;
     AttributesClassText    = beamProperties.AttributesClassText;
 }
예제 #5
0
        public MainWindow()
        {
            InitializeComponent();
            BeamProperties prop = (new StandardBeamPropertiesFactory()).CreateStandardProperties("ABC", 0, 0, "TOP", "MIDDLE", 0, "MIDDLE", 0, "", "", "");

            DummyBeamPropertyData(prop);
            ColumnProperties propColumn = (new StandardColumnPropertiesFactory()).CreateStandardProperties("EFG", 0, 0, 1000, 0, "TOP", "MIDDLE", 0, "MIDDLE", 0, "", "", "");

            DummyColumnProprtyData(propColumn);
        }
예제 #6
0
        private void DummyBeamPropertyData(BeamProperties prop)
        {
            prop.AttributesProfileText = "RS";
            BeamValuesGetterDummyImplementation beamValuesGetter = new BeamValuesGetterDummyImplementation();
            DialogBeamPropertiesViewModel       viewModel        = new DialogBeamPropertiesViewModel(new MemberModifierFactoryDummyImplementation(), prop, prop, beamValuesGetter);

            testBeam          = new DialogBeamProperties.DialogBeamProperties(viewModel);
            testBeam.Closing += TestBeam_Closing;
            testBeam.Show();
            this.Hide();
        }
        private void UpdatePositionData(BeamProperties beamProperties)
        {
            SelectedDataInPositionOnPlaneComboBox = beamProperties.SelectedDataInPositionOnPlaneComboBox;
            PositionOnPlaneText = beamProperties.PositionOnPlaneText.ToString();

            SelectedDataInPositionRotationComboBox = beamProperties.SelectedDataInPositionRotationComboBox;
            PositionRotationText = beamProperties.PositionRotationText.ToString();

            SelectedDataInPositionAtDepthComboBox = beamProperties.SelectedDataInPositionAtDepthComboBox;
            PositionAtDepthText = beamProperties.PositionAtDepthText.ToString();
        }
 private void GetButtonClick(object obj)
 {
     try
     {
         BeamProperties beamProperties = beamValuesGetter.GetBeamProperties();
         UpdateViewModel(beamProperties);
     }
     catch (NotImplementedException ex)
     {
         MessageBox.Show(ex.Message);
     }
 }
예제 #9
0
        public BeamProperties CreateStandardProperties(string profile, double rotation, int color, string rotationEnum, string depthEnum, double depthOffset, string planeEnum, double planeOffset, string finish, string material, string name)
        {
            BeamProperties beamProperties = new BeamProperties();

            beamProperties.AttributesProfileText                  = "H100";
            beamProperties.NumberingSeriesPartPrefixText          = "";
            beamProperties.NumberingSeriesPartStartNumberText     = "";
            beamProperties.NumberingSeriesAssemblyPrefixText      = "";
            beamProperties.NumberingSeriesAssemblyStartNumberText = "";
            beamProperties.AttributesNameText     = name;
            beamProperties.AttributesProfileText  = profile;
            beamProperties.AttributesMaterialText = material;
            beamProperties.AttributesFinishText   = finish;
            beamProperties.AttributesClassText    = color;
            beamProperties.PositionOnPlaneText    = planeOffset;
            beamProperties.PositionRotationText   = rotation;
            beamProperties.PositionAtDepthText    = depthOffset;
            beamProperties.SelectedDataInPositionRotationComboBox = rotationEnum;
            beamProperties.SelectedDataInPositionOnPlaneComboBox  = planeEnum;
            beamProperties.SelectedDataInPositionAtDepthComboBox  = depthEnum;
            return(beamProperties);
        }
 private void LoadData(BeamProperties beamProperties)
 {
     SelectedDataInLoadDataComboBox = beamProperties.SelectedDataInLoadDataComboBox;
 }