2010-11-28 12 views
0

私はUNOのゲームアプリケーションを作っています。私は都合よく、すべてのプレイヤーとそのカードが表示されているform2(ゲームテーブル)を作成しました。今、現在のプレイヤーを表示するためにテキストボックスを追加したいだけです。WindowsフォームアプリケーションCシャープビジュアルスタジオ2010

だから私がやったことだった -

  1. テキストボックスをドラッグ&ドロップ。 警告 - 警告1開いているデザイナに表示するようにGui1.Form2の変更をプロジェクトに再構築する必要があります。 0 0

  2. ダフォームを再構築 -

私が作成されている別のファイルを参照 - 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)); 
      } 
     } 
    } 
} 
+0

うわー、それは最高です。クイック、爆発する前にそれをオフに! –

答えて

2

あなたのファイルがめちゃくちゃされています。これは、リソースクラスの半分をフォームに変換しようとしたようです。

は、プロジェクトを右クリックし、[Windowsフォームの追加]をクリックして新しいフォームを追加(そしてそれを本当の名前を付け、 ないForm2)を、そこにあなたのコードを移動します。
次に、現在の機能不全のForm2に関係するすべてのファイルを削除します。

関連する問題