private void AddNewPointTypeButton_Click(object sender, RoutedEventArgs e) { DatabaseHandler.CreateNewPointType(NewPointTypeName.Text); NewPointTypeName.Text = ""; TypeTable newType = DatabaseHandler.GetLatestPointType(); pointTypes.Add(newType); newType.number = pointTypes.Count; PointsTypeList.Items.Refresh(); updatePointTypesHandler.Invoke(); //TODO UPDATE MAIN PAGE AND ALL OPENED POINTS }