Ir ao conteúdo
  • Cadastre-se

C# Erro com windows form


Arkcanjou

Posts recomendados

Estou obtendo o seguinte erro quando tento adicionar um UserControl ao meu form principal

image.png.c6dadd669dcacf5e4878a736a2b432c3.png





SettingsPanel.cs
 

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace All_in_one
{
    public partial class SettingsPanel : UserControl
    {
        public SettingsPanel()
        {
            InitializeComponent();
        }
    }
}


 


SettingsPanel.design.cs

namespace All_in_one
{
    partial class SettingsPanel
    {
        /// <summary> 
        /// Variável de designer necessária.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary> 
        /// Limpar os recursos que estão sendo usados.
        /// </summary>
        /// <param name="disposing">true se for necessário descartar os recursos gerenciados; caso contrário, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Código gerado pelo Designer de Componentes

        /// <summary> 
        /// Método necessário para suporte ao Designer - não modifique 
        /// o conteúdo deste método com o editor de código.
        /// </summary>
        private void InitializeComponent()
        {
            this.showLastImg = new System.Windows.Forms.CheckBox();
            this.skipDuplicated = new System.Windows.Forms.CheckBox();
            this.downloadType = new System.Windows.Forms.ComboBox();
            this.SuspendLayout();
            // 
            // showLastImg
            // 
            this.showLastImg.AutoSize = true;
            this.showLastImg.Checked = true;
            this.showLastImg.CheckState = System.Windows.Forms.CheckState.Checked;
            this.showLastImg.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
            this.showLastImg.Location = new System.Drawing.Point(22, 3);
            this.showLastImg.Name = "showLastImg";
            this.showLastImg.Size = new System.Drawing.Size(254, 25);
            this.showLastImg.TabIndex = 0;
            this.showLastImg.Text = "Show last downloaded image";
            this.showLastImg.UseVisualStyleBackColor = true;
            // 
            // skipDuplicated
            // 
            this.skipDuplicated.AutoSize = true;
            this.skipDuplicated.Checked = true;
            this.skipDuplicated.CheckState = System.Windows.Forms.CheckState.Checked;
            this.skipDuplicated.Font = new System.Drawing.Font("Microsoft YaHei", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point);
            this.skipDuplicated.Location = new System.Drawing.Point(22, 34);
            this.skipDuplicated.Name = "skipDuplicated";
            this.skipDuplicated.Size = new System.Drawing.Size(187, 25);
            this.skipDuplicated.TabIndex = 1;
            this.skipDuplicated.Text = "Skip duplicated itens";
            this.skipDuplicated.UseVisualStyleBackColor = true;
            // 
            // downloadType
            // 
            this.downloadType.FormattingEnabled = true;
            this.downloadType.Items.AddRange(new object[] {
            "Images and Animated",
            "Images",
            "Animated"});
            this.downloadType.Location = new System.Drawing.Point(22, 65);
            this.downloadType.Name = "downloadType";
            this.downloadType.Size = new System.Drawing.Size(187, 23);
            this.downloadType.TabIndex = 2;
            // 
            // SettingsPanel
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(7F, 15F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.downloadType);
            this.Controls.Add(this.skipDuplicated);
            this.Controls.Add(this.showLastImg);
            this.Name = "SettingsPanel";
            this.Size = new System.Drawing.Size(625, 354);
            this.ResumeLayout(false);
            this.PerformLayout();

        }

        #endregion

        public CheckBox showLastImg;
        public CheckBox skipDuplicated;
        public ComboBox downloadType;
    }
}

 

Link para o comentário
Compartilhar em outros sites

Crie uma conta ou entre para comentar

Você precisa ser um usuário para fazer um comentário

Criar uma conta

Crie uma nova conta em nossa comunidade. É fácil!

Crie uma nova conta

Entrar

Já tem uma conta? Faça o login.

Entrar agora

Sobre o Clube do Hardware

No ar desde 1996, o Clube do Hardware é uma das maiores, mais antigas e mais respeitadas comunidades sobre tecnologia do Brasil. Leia mais

Direitos autorais

Não permitimos a cópia ou reprodução do conteúdo do nosso site, fórum, newsletters e redes sociais, mesmo citando-se a fonte. Leia mais

×
×
  • Criar novo...

Ebook grátis: Aprenda a ler resistores e capacitores!

EBOOK GRÁTIS!

CLIQUE AQUI E BAIXE AGORA MESMO!