public Form1() { InitializeComponent(); this.radPanel1.PanelElement.PanelBorder.Visibility = ElementVisibility.Hidden; this.radPanelCars.PanelElement.PanelBorder.Visibility = ElementVisibility.Hidden; this.store = this.CreatePropertyStore(); this.championships = this.CreateChampionships(); this.progressBars = new List <RadProgressBar>() { this.radProgressBar1, this.radProgressBar2, this.radProgressBar3, this.radProgressBar4, this.radProgressBar5, }; this.radPropertyGrid1.SelectedObject = store; this.radPropertyGrid1.PropertySort = PropertySort.CategorizedAlphabetical; this.ProcessProgressBarValues(); this.radPropertyGrid1.EditorInitialized += new PropertyGridItemEditorInitializedEventHandler(radPropertyGrid1_EditorInitialized); this.radPropertyGrid1.PropertyValueChanged += new PropertyGridItemValueChangedEventHandler(radPropertyGrid1_PropertyValueChanged); }
private RadPropertyStore CreatePropertyStore() { RadPropertyStore vehicleStore = new RadPropertyStore(); PropertyStoreItem engineLayout = new PropertyStoreItem(typeof(EngineLayouts), "Layout", EngineLayouts.I4, "Engine layout is determined by the configuration of the engine pistons.", "Engine"); PropertyStoreItem engineDisplacement = new PropertyStoreItem(typeof(int), "Displacement", 1600, "Engine displacement is determined from the bore and stroke of the engine's cylinders.", "Engine"); PropertyStoreItem engineFuel = new PropertyStoreItem(typeof(Fuels), "Fuel", Fuels.Petrol, "The type of fuel providing the energy source for the engine.", "Engine"); PropertyStoreItem engineSupercharged = new PropertyStoreItem(typeof(bool), "Turbocharged/Supercharged", true, "Turbocharging/Supercharging is the process of compressing air on the intake of an engine(technical term - Forced induction).", "Engine"); PropertyStoreItem transmission = new PropertyStoreItem(typeof(Transmissions), "Transmission", Transmissions.SemiAutomatic, "The type of transmission thet would convert the engine power/torque.", "Drivetrain"); PropertyStoreItem drive = new PropertyStoreItem(typeof(Drives), "Drive", Drives.AllWheelDrive, "The configuration of the driving wheels.", "Drivetrain"); PropertyStoreItem vehicleSeats = new PropertyStoreItem(typeof(int), "Number of seats", 2, "The number of seats in the vehicle.", "Other"); PropertyStoreItem vehicleWeight = new PropertyStoreItem(typeof(int), "Weight", 1250, "The minimum wight of the car.", "Other"); vehicleStore.Add(engineLayout); vehicleStore.Add(engineDisplacement); vehicleStore.Add(engineFuel); vehicleStore.Add(engineSupercharged); vehicleStore.Add(transmission); vehicleStore.Add(drive); vehicleStore.Add(vehicleSeats); vehicleStore.Add(vehicleWeight); return(vehicleStore); }