private void btnSave_Click(object sender, RoutedEventArgs e)
 {
     Stand toAdd = new Stand(1, txtName.Text, txtInfo.Text, null);
     bw_editStand.DoWork += new DoWorkEventHandler(bw_DoWorkEditStand);
     bw_editStand.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompletedStand);
     stand.info = this.txtInfo.Text;
     stand.stname = this.txtName.Text;
     bw_editStand.RunWorkerAsync(stand);
 }
 public StandRatingAdmin(Stand _currentS, Window _parent)
 {
     InitializeComponent();
     currentStand = _currentS;
     myParent = _parent;
     fillGridRatings();
     calcAvgRatings();
     gridRatings.IsReadOnly = true;
 }
 public EditStand(Stand _stand, Window _parent)
 {
     InitializeComponent();
     stand = _stand;
     myParent = _parent;
     txtName.Text = stand.stname;
     txtInfo.Text = stand.info;
     listViewSchueler.ItemsSource = stand.standschueler;
     getSchuler();
 }
Exemple #4
0
 public void addStandToAbteilung(Stand _Stand)
 {
     ab_stande.Add(_Stand);
 }
        private void btnAddStand_Click(object sender, RoutedEventArgs e)
        {

            Stand toAdd = new Stand(1, txtName.Text, txtInfo.Text, rechteck, listSchueler);
            bw_addStand.DoWork += new DoWorkEventHandler(bw_DoWorkAddSStand);
            bw_addStand.RunWorkerCompleted += new RunWorkerCompletedEventHandler(bw_RunWorkerCompletedStand);
            bw_addStand.RunWorkerAsync(toAdd);
        }
        private void Paint_Stand(Stand toPaint)
        {

            System.Windows.Shapes.Polygon shape = new System.Windows.Shapes.Polygon();

            PointCollection points = new PointCollection();
            points.Add(new Point(toPaint.shape.a.x, toPaint.shape.a.y)); //Left Top
            points.Add(new Point(toPaint.shape.b.x, toPaint.shape.a.y)); //Right Top
            points.Add(new Point(toPaint.shape.b.x, toPaint.shape.b.y)); //Right Bottom
            points.Add(new Point(toPaint.shape.a.x, toPaint.shape.b.y)); //Left Bottom

            




            shape.Points = points;
            shape.Stroke = Brushes.Black;
            //shape.Fill = Brushes.Green;
            shape.StrokeThickness = 1;
            //shape.HorizontalAlignment = HorizontalAlignment.Left;
            //shape.VerticalAlignment = VerticalAlignment.Center;



            canvasDrawStand.Children.Add(shape);

            Console.WriteLine("##Painted-------- " + toPaint.ToString());


        }