Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4241306
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T03:17:16+00:00 2026-05-21T03:17:16+00:00

I ran into a problem that I need to debug inside a method of

  • 0

I ran into a problem that I need to debug inside a method of class library project? But I received an project errors said “A project with an Output Type of Class Library cannot be started directly”?
Is there a way to work around this? My project is a user control.

 [XRDesigner("Rapattoni.ControlLibrary.CCMLThreePicGalleryTableDesigner," + "Rapattoni.ControlLibrary")]
    public class CCMLThreePicGalleryCtrl : XRTable
    {
        #region Variables
        const int cTableWidth = 825;
        #endregion

        #region Properties
        /// <summary>
        /// Get\Set  bindable variables
        /// </summary>

        [Bindable( true ), DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden )]
        public string SerialPicUrlString
        {
            get
            {
                return String.Empty;
            }
            set
            {
                SetPictures( value );
            }
        }

        private int CellWidth
        {
            get;  
            set;
        }

        private int CellHeight
        {
            get;  
            set;
        }

        private int PicHeight
        {
            get;  
            set;
        }

        private int PicWidth  
        { 
            get; set; 
        }

        private int MaximumPictures
        {
            get; set;
        }
        #endregion Properties


        #region Events

        #endregion

        #region Public/Private Methods

        private void SetPictures( string urlString )
        {
            CellWidth = 275;
            CellHeight = 130;
            PicWidth = 175;
            PicHeight = 120;
            //CommentCellWidth = "150";
            MaximumPictures = 12;

            this.Rows.Clear();
            this.BeginInit();

            string[] urls = urlString.Split( ';' );

            XRPictureBox picBox;
            XRTableRow row;
            CCMLThreePicGalleryCell cell;  //, CommentCell;

            // Prepare first Row
            row = new XRTableRow();
            row.Height = CellHeight; 
            row.CanShrink = false;

            int picTotal = urls.Length;
            /*
            if (picTotal % 3 == 1)  // Don't have one picture in a row
                picTotal--;
             */
            if (picTotal > MaximumPictures)      // Max of 12 pictures shown
                picTotal = MaximumPictures;
            else if (picTotal == 1)
                picTotal = 0;

            // Keep track of which picture
            int picCount = 0;
            // Go through each picture and assign to a cell
            for (int i = 0; i < picTotal; i++)
            {
                if (urls[i] != "")
                {

                    if (picCount % 3 == 0 && picCount > 0 )   // Make a new row after every 3rd picture
                    {
                        // Create a new row for pictures
                        row = new XRTableRow();
                        row.Height = CellHeight;
                        row.CanShrink = false;
                    }


                    cell = new CCMLThreePicGalleryCell();
                    cell.Size = new Size(CellWidth, CellHeight);
                    cell.CanShrink = false;
                    cell.Padding = new PaddingInfo(0, 0, 5, 5);


                    //CommentCell = new ThreePicGalleryCell(); // Don't want Comments

                    string[] url_comment = urls[i].Split('|');
                    picBox = new XRPictureBox();
                    //picBox.HtmlItemCreated += new HtmlEventHandler(picBox_HtmlItemCreated);
                    picBox.Sizing = ImageSizeMode.ZoomImage;
                    url_comment[0] = url_comment[0].Trim();
                    picBox.ImageUrl = url_comment[0];
                    picBox.Size = new Size(PicWidth, PicHeight);

                    cell.Controls.Add(picBox);

                    row.Cells.Add(cell);

                    if (picCount % 3 == 0)   // Add Finalized row
                    {
                        this.Rows.Add(row); // Add current row

                    }
                picCount++;
                } 
            }
            // Fix for odd bug where final picture is out 
            // of alignment if it is 2nd in the last row 
            if (picCount % 3 == 2)
            {
                cell = new CCMLThreePicGalleryCell();
                cell.Size = new Size(CellWidth, CellHeight);
                row.Cells.Add(cell);
                this.Rows.Add(row);
            }
            else if (picCount % 3 == 1)  // When last row has 1 picture
            {
                this.Rows.Remove(row);
            }


            if (urlString.Equals(string.Empty))
                this.Rows.Clear();

            this.EndInit();

        }

        #endregion
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T03:17:17+00:00Added an answer on May 21, 2026 at 3:17 am

    Typically I’d create a separate unit test class library project, and then start that in whatever your favourite unit test runner is, and debug that way.

    Alternatively, start debugging whatever application would actually use your class library, exercise functionality which will hit whatever breakpoint you want to set, and go on from there.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I ran into the problem that my primary key sequence is not in sync
I recently ran into a problem that I thought boost::lambda or boost::phoenix could help
Ok, so I just ran into the following problem that raised an eyebrow. For
I recently ran into a problem with a COM object that was using a
I know this question has been asked before, but I ran into a problem.
I just ran into a problem when I need to do a goto into
I ran into the problem in Java, but I guess it's a question about
I've ran into a problem while trying to test following IRepository based on NHibernate:
I'm writing a C parser using PLY, and recently ran into a problem. This
Today, I ran into this weird problem with a user using Mac OS X.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.