ThibaultMontaufray/Droid-Image

View on GitHub
Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs

Summary

Maintainability
F
6 days
Test Coverage

File ToolStripMenuIMG.cs has 879 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Windows.Forms;
using System.Collections.Generic;
using Tools.Utilities;
using System.Drawing;
Severity: Major
Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 2 days to fix

    Class ToolStripMenuIMG has 28 methods (exceeds 20 allowed). Consider refactoring.
    Open

        public class ToolStripMenuIMG : RibbonTab
        {
            #region Attributes
            private Panel _currentTabPage;
            private GUI _gui; 
    Severity: Minor
    Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 3 hrs to fix

      Method BuildToolsDrawing has 64 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              private void BuildToolsDrawing()
              {
                  _ts_draw_pencil = new RibbonButton();
                  _ts_draw_pencil.ToolTip = "Pencil";
                  _ts_draw_pencil.Click += new EventHandler(tsb_Click);
      Severity: Major
      Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 2 hrs to fix

        Method BuildToolsText has 64 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                private void BuildToolsText()
                {
                    _ts_font_label = new RibbonLabel();
                    _ts_font_label.Text = "Font";
        
        
        Severity: Major
        Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 2 hrs to fix

          Method BuildPanelDrawing has 53 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private void BuildPanelDrawing()
                  {
                      _ts_undo = new RibbonButton("Undo");
                      _ts_undo.ToolTip = "Undo";
                      _ts_undo.Click += new EventHandler(tsb_Click);
          Severity: Major
          Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 2 hrs to fix

            Method BuildPanelMain has 50 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    private void BuildPanelMain()
                    {
                        _ts_main_open = new RibbonButton("Open");
                        _ts_main_open.ToolTip = "Open";
                        _ts_main_open.Click += new EventHandler(tsb_Click);
            Severity: Minor
            Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 2 hrs to fix

              Method SwitchMode has 39 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public void SwitchMode()
                      {
                          _modeView.Image = Tools.Utilities.Resources.ResourceIconSet32Default.shape_square;
                          _modeView.SmallImage = Tools.Utilities.Resources.ResourceIconSet16Default.shape_square;
                          _modeEdition.Image = Tools.Utilities.Resources.ResourceIconSet32Default.shape_square;
              Severity: Minor
              Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                Method BuildToolsSize has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private void BuildToolsSize()
                        {
                            _ts_resize = new RibbonButton("Resize");
                            _ts_resize.Click += new EventHandler(tsb_Click);
                            _ts_resize.SmallImage = Tools.Utilities.Resources.ResourceIconSet16Default.layer_to_image_size;
                Severity: Minor
                Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                  Method BuildToolsReturn has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          private void BuildToolsReturn()
                          {
                              _ts_returnH = new RibbonButton("Return horizontal");
                              _ts_returnH.MinSizeMode = RibbonElementSizeMode.Compact;
                              _ts_returnH.Style = RibbonButtonStyle.Normal;
                  Severity: Minor
                  Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                    Method BuildPanelView has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            private void BuildPanelView()
                            {          
                                _ts_tool_addImage = new RibbonButton("Insert image");
                                _ts_tool_addImage.Click += new EventHandler(tsb_Click);
                                _ts_tool_addImage.SmallImage = Tools.Utilities.Resources.ResourceIconSet16Default.insert_object;
                    Severity: Minor
                    Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                      Method BuildPanelNavigation has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              private void BuildPanelNavigation()
                              {
                                  _ts_fullscreen = new RibbonButton("Full screen");
                                  _ts_fullscreen.ToolTip = "Full screen";
                                  _ts_fullscreen.Click += new EventHandler(tsb_Click);
                      Severity: Minor
                      Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                        Method BuildPanelMode has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                private void BuildPanelMode()
                                {
                                    _modeView = new RibbonButton();
                                    _modeView.Name = "View";
                                    _modeView.Text = _modeView.Name;
                        Severity: Minor
                        Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                          Method BuildToolsAdjustment has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  private void BuildToolsAdjustment()
                                  {
                                      _ts_tool_contrast = new RibbonButton("Contraste");
                                      _ts_tool_contrast.Click += new EventHandler(tsb_Click);
                                      _ts_tool_contrast.SmallImage = Tools.Utilities.Resources.ResourceIconSet16Default.contrast;
                          Severity: Minor
                          Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                            Method BuildPanelParsing has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    private void BuildPanelParsing()
                                    {
                                        _ts_code_qr = new RibbonButton("QR code");
                                        _ts_code_qr.Click += new EventHandler(tsb_Click);
                                        _ts_code_qr.Image = Tools.Utilities.Resources.ResourceIconSet32Default.qrcode;
                            Severity: Minor
                            Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                              Method tsb_Click has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      private void tsb_Click(object sender, EventArgs e)
                                      {
                                          try
                                          {
                                              if (sender.GetType().Name.Equals("RibbonButton"))
                              Severity: Minor
                              Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs - About 1 hr to fix

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                        public void EnableAll()
                                        {
                                            _panelMain.Enabled = true;
                                            _panelView.Enabled = true;
                                            //_panelNavigation.Enabled = true;
                                Severity: Major
                                Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs and 1 other location - About 1 hr to fix
                                Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs on lines 184..204

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 141.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                        public void DisableAll()
                                        {
                                            _panelMain.Enabled = false;
                                            _panelView.Enabled = false;
                                            //_panelNavigation.Enabled = false;
                                Severity: Major
                                Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs and 1 other location - About 1 hr to fix
                                Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs on lines 163..183

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 141.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                                    case Mode.EDITION:
                                                        _panelDrawing.Visible = true;
                                                        _panelNavigation.Visible = false;
                                                        _panelParsing.Visible = false;
                                                        _panelText.Visible = true;
                                Severity: Minor
                                Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs and 1 other location - About 55 mins to fix
                                Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs on lines 236..243

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 87.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                                    case Mode.ANALYSE:
                                                        _panelDrawing.Visible = false;
                                                        _panelNavigation.Visible = false;
                                                        _panelParsing.Visible = true;
                                                        _panelText.Visible = false;
                                Severity: Minor
                                Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs and 1 other location - About 55 mins to fix
                                Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs on lines 228..235

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 87.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                Similar blocks of code found in 2 locations. Consider refactoring.
                                Open

                                        private void _valueLookingFor_TextBoxTextChanged(object sender, EventArgs e)
                                        {
                                            try
                                            {
                                                ToolBarEventArgs action = new ToolBarEventArgs("textchanged_" + _valueLookingFor.TextBoxText);
                                Severity: Minor
                                Found in Project/Droid.Image.UI/Vues/ToolStripMenuIMG.cs and 1 other location - About 45 mins to fix
                                Project/Droid.Image.UI/ToolStripMenuIMG.cs on lines 618..629

                                Duplicated Code

                                Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                                Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                                When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                                Tuning

                                This issue has a mass of 76.

                                We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                                The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                                If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                                See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                                Refactorings

                                Further Reading

                                There are no issues that match your filters.

                                Category
                                Status