簡體   English   中英

Windows Form Application C銳視覺工作室2010

[英]Windows Form Application C sharp visual studio 2010

我正在制作一個UNO游戲應用程序。 我方便地創建了一個form2(游戲桌),其中顯示了所有玩家及其卡牌,等等。現在,我只想添加一個文本框來顯示當前玩家。

所以我做的是 -

  1. 拖曳並放下一個文本框。 警告-警告1您必須重建項目才能對Gui1.Form2所做的更改顯示在任何打開的設計器中。 0 0

  2. 重建da形式 -

我看到正在創建另一個文件-form21.designer.cs。 PL。 請參閱以下文件的內容-

錯誤 - 錯誤1在聲明類型'Gui1.Form2'時缺少部分修飾符; 存在此類型的另一個部分聲明C:\\ Users \\ uday \\ Desktop \\ Uday \\ Client_0407 \\ Gui1 \\ Form21.Designer.cs 25 18 Gui1

注意 - 它不僅僅是文本框。 如果我做任何拖放修改,同樣的事情發生。

form21.designer.cs

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.1
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Gui1 {
    using System;


    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    public class Form2 {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Form2() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Gui1.Form2", typeof(Form2).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        public static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        public static System.Drawing.Bitmap Pic_MyPlayer_Image {
            get {
                object obj = ResourceManager.GetObject("Pic_MyPlayer.Image", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }

        public static System.Drawing.Bitmap Pic_OtherPlayer1_Image {
            get {
                object obj = ResourceManager.GetObject("Pic_OtherPlayer1.Image", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }

        public static System.Drawing.Bitmap Pic_OtherPlayer2_Image {
            get {
                object obj = ResourceManager.GetObject("Pic_OtherPlayer2.Image", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }

        public static System.Drawing.Bitmap Pic_OtherPlayer3_Image {
            get {
                object obj = ResourceManager.GetObject("Pic_OtherPlayer3.Image", resourceCulture);
                return ((System.Drawing.Bitmap)(obj));
            }
        }
    }
}

你的文件搞砸了; 它似乎試圖將Resources類的一半轉換為表單。

右鍵單擊項目,然后單擊“添加”,“ Windows窗體”(並為其提供真實名稱, 而不是“ Form2 ),然后將代碼移入其中,以添加新窗體。
然后,刪除當前功能不正常的Form2中涉及的所有文件。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM