コード例 #1
0
        // Shows the image of the selected floortype.
        private void floorTypeComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            chosenFloorType = tempFloorType.Find(v => v.name == floorTypeComboBox.SelectedItem.ToString());
            Bitmap image = chosenFloorType.GetImage();

            floorPictureBox.SizeMode = PictureBoxSizeMode.StretchImage;
            floorPictureBox.Image    = image;
            priceLabel.Text          = "€" + tempFloorType.Find(v => v.name == floorTypeComboBox.SelectedItem.ToString()).price.ToString() + "  / m2";
        }
コード例 #2
0
        // Show a dialog where you can choose a floortype to use as background.
        private void btnFloor_Click(object sender, EventArgs e)
        {
            ChooseFloor cfDialog = new ChooseFloor();

            cfDialog.ShowDialog();
            if (cfDialog.DialogResult == DialogResult.OK)
            {
                chosenFloorType = cfDialog.chosenFloorType;
                tempImage       = chosenFloorType.GetImage();
                colorChosen     = false;
                if (!intersects)
                {
                    Intersecting();
                }
                Invalidate();
            }
        }