teco-kit/PointAndControl

View on GitHub
IGS/MainWindow.xaml.cs

Summary

Maintainability
D
2 days
Test Coverage

Method Reader_MultiSourceFrameArrived has a Cognitive Complexity of 65 (exceeds 20 allowed). Consider refactoring.
Open

    private void Reader_MultiSourceFrameArrived(object sender, MultiSourceFrameArrivedEventArgs e)
    {

        List<ModelVisual3D> models = new List<ModelVisual3D>();
        List<ulong> skelIDs = new List<ulong>();
Severity: Minor
Found in IGS/MainWindow.xaml.cs - About 7 hrs to fix

Cognitive Complexity

Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

A method's cognitive complexity is based on a few simple rules:

  • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
  • Code is considered more complex for each "break in the linear flow of the code"
  • Code is considered more complex when "flow breaking structures are nested"

Further reading

File MainWindow.xaml.cs has 385 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using IGS;
using Microsoft.Kinect;
using PointAndControl.ComponentHandling;
using PointAndControl.Kinect;
using PointAndControl.MainComponents;
Severity: Minor
Found in IGS/MainWindow.xaml.cs - About 5 hrs to fix

    Method Reader_MultiSourceFrameArrived has 77 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        private void Reader_MultiSourceFrameArrived(object sender, MultiSourceFrameArrivedEventArgs e)
        {
    
            List<ModelVisual3D> models = new List<ModelVisual3D>();
            List<ulong> skelIDs = new List<ulong>();
    Severity: Major
    Found in IGS/MainWindow.xaml.cs - About 3 hrs to fix

      Method Kinect_Replace_Button_Click has 44 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          private void Kinect_Replace_Button_Click(object sender, RoutedEventArgs e)
          {
              String oldPlace = "";
              String newPlace = "";
      
      Severity: Minor
      Found in IGS/MainWindow.xaml.cs - About 1 hr to fix

        Method DrawBody has 43 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            private void DrawBody(IReadOnlyDictionary<JointType, Joint> joints, IDictionary<JointType, Point> jointPoints, DrawingContext drawingContext)
            {
                // Draw the bones
        
                // Torso
        Severity: Minor
        Found in IGS/MainWindow.xaml.cs - About 1 hr to fix

          Method RenderClippedEdges has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              private static void RenderClippedEdges(Body body, DrawingContext drawingContext)
              {
                  if (body.ClippedEdges.HasFlag(FrameEdges.Bottom))
                  {
                      drawingContext.DrawRectangle(
          Severity: Minor
          Found in IGS/MainWindow.xaml.cs - About 1 hr to fix

            Method WindowLoaded has 26 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                private void WindowLoaded(object sender, RoutedEventArgs e)
                {
                   
                    // Create the drawing group we'll use for drawing
                    _drawingGroup = new DrawingGroup();
            Severity: Minor
            Found in IGS/MainWindow.xaml.cs - About 1 hr to fix

              Avoid deeply nested control flow statements.
              Open

                                              if ((int)body.TrackingId == ts.Id)
                                              {
                                                  RenderClippedEdges(body, dc);
              
                                                  if (body.IsTracked)
              Severity: Major
              Found in IGS/MainWindow.xaml.cs - About 45 mins to fix

                Method DrawBone has 5 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                    private void DrawBone(IReadOnlyDictionary<JointType, Joint> joints, IDictionary<JointType, Point> jointPoints, JointType jointType0, JointType jointType1, DrawingContext drawingContext)
                Severity: Minor
                Found in IGS/MainWindow.xaml.cs - About 35 mins to fix

                  There are no issues that match your filters.

                  Category
                  Status