2010-11-28 8 views
0

Je crée une application de jeu UNO. J'ai commodément créé un formulaire2 (table de jeu) avec tous les joueurs et leurs cartes affichées. Maintenant, je veux juste ajouter une boîte de texte pour montrer le joueur actuel.Application Windows Form C Visual Studio 2010

Alors, que je l'ai fait était -

  1. glissés et déposés une zone de texte. Avertissement - Avertissement 1 Vous devez reconstruire votre projet pour que les modifications de Gui1.Form2 apparaissent dans tous les concepteurs ouverts. 0 0

  2. Reconstruire da forme -

Je vois un autre fichier étant créé - form21.designer.cs. PL. voir le contenu du fichier ci-dessous -

Erreur - Erreur 1 Modificateur partiel manquant lors de la déclaration de type 'Gui1.Form2'; une autre déclaration partielle de ce type existe C: \ Users \ uday \ Desktop \ Uday \ Client_0407 \ Gui1 \ Form21.Designer.cs 25 18 Gui1

REMARQUE - Il ne s'agit pas uniquement d'une zone de texte. Si je fais des modifications par glisser-déposer, la même chose arrive.

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

Wow, c'est génial. Rapide, éteignez-le avant qu'il ne explose! –

Répondre

2

Vos fichiers sont foiré; il semble que l'on essaie de convertir la moitié d'une classe Resources en un formulaire.

Ajouter un nouveau formulaire en cliquant droit sur le projet et cliquez sur Ajouter, Windows Form (et lui donner un vrai nom, pas Form2) et déplacez votre code en elle.
Ensuite, supprimez tous les fichiers impliqués dans votre Form2 dysfonctionnel actuel.