Click here to Skip to main content
15,889,403 members
Home / Discussions / C#
   

C#

 
GeneralRe: Close the form programmaticaly. Pin
Christian Graus27-Feb-08 10:23
protectorChristian Graus27-Feb-08 10:23 
GeneralRe: Close the form programmaticaly. Pin
led mike27-Feb-08 10:39
led mike27-Feb-08 10:39 
GeneralRe: Close the form programmaticaly. Pin
Pete O'Hanlon27-Feb-08 10:41
mvePete O'Hanlon27-Feb-08 10:41 
GeneralRe: Close the form programmaticaly. Pin
tingu27-Feb-08 10:54
tingu27-Feb-08 10:54 
GeneralRe: Close the form programmaticaly. Pin
tingu27-Feb-08 12:02
tingu27-Feb-08 12:02 
GeneralRe: Close the form programmaticaly. Pin
Anthony Mushrow27-Feb-08 13:55
professionalAnthony Mushrow27-Feb-08 13:55 
GeneralRe: Close the form programmaticaly. Pin
jasper01827-Feb-08 15:42
jasper01827-Feb-08 15:42 
General'TANK_2.Images.Images()': access modifiers are not allowed on static constructors Pin
Jordanwb27-Feb-08 9:00
Jordanwb27-Feb-08 9:00 
I get the error on the static constructor.

<code>using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using JCollections.Maps;

namespace TANK_2
{
class Images
{
public const int IMAGE_WIDTH = 18;
public const int IMAGE_HEIGHT = 18;

public static HashMap<Tank.Direction, Bitmap>; AI_TANKS;
public static HashMap<Tank.Direction, Bitmap> USER_TANKS;

public static Bitmap WALL = TANK_2.Resources.wall;
public static Bitmap ROAD = TANK_2.Resources.road;
public static Bitmap LOGO = TANK_2.Resources.logo;

public static Images()
{
TANK_2.Images.AI_TANKS = new HashMap<Tank.Direction, Bitmap>(4);

TANK_2.Images.AI_TANKS.Add(Tank.Direction.Left, TANK_2.Resources.ai_tank_left);
TANK_2.Images.AI_TANKS.Add(Tank.Direction.Right, TANK_2.Resources.ai_tank_right);
TANK_2.Images.AI_TANKS.Add(Tank.Direction.Up, TANK_2.Resources.ai_tank_up);
TANK_2.Images.AI_TANKS.Add(Tank.Direction.Down, TANK_2.Resources.ai_tank_down);

TANK_2.Images.USER_TANKS = new HashMap<Tank.Direction, Bitmap>(4);

TANK_2.Images.USER_TANKS.Add(Tank.Direction.Left, TANK_2.Resources.user_tank_left);
TANK_2.Images.USER_TANKS.Add(Tank.Direction.Right, TANK_2.Resources.user_tank_right);
TANK_2.Images.USER_TANKS.Add(Tank.Direction.Up, TANK_2.Resources.user_tank_up);
TANK_2.Images.USER_TANKS.Add(Tank.Direction.Down, TANK_2.Resources.user_tank_down);
}
}
}
</code>

I have an enum in the Tank class which has four things in it (I don't know the right term): Left, Up, Right and Down. Using the HashMap class which I made I have each enum thing point to a specific image. I'll probably figure it out after I click "Post Message".
GeneralRe: 'TANK_2.Images.Images()': access modifiers are not allowed on static constructors Pin
Christian Graus27-Feb-08 9:01
protectorChristian Graus27-Feb-08 9:01 
GeneralRe: 'TANK_2.Images.Images()': access modifiers are not allowed on static constructors Pin
Jordanwb27-Feb-08 9:04
Jordanwb27-Feb-08 9:04 
GeneralRe: 'TANK_2.Images.Images()': access modifiers are not allowed on static constructors Pin
Christian Graus27-Feb-08 9:33
protectorChristian Graus27-Feb-08 9:33 
GeneralWebServices and singleton pattern Pin
yarns27-Feb-08 8:34
yarns27-Feb-08 8:34 
GeneralRe: WebServices and singleton pattern Pin
led mike27-Feb-08 8:49
led mike27-Feb-08 8:49 
GeneralRe: WebServices and singleton pattern Pin
yarns27-Feb-08 8:51
yarns27-Feb-08 8:51 
GeneralRender loop for other process Pin
Jitse27-Feb-08 8:24
Jitse27-Feb-08 8:24 
GeneralRe: Render loop for other process Pin
Dave Kreskowiak27-Feb-08 10:07
mveDave Kreskowiak27-Feb-08 10:07 
GeneralRe: Render loop for other process Pin
Jitse28-Feb-08 3:47
Jitse28-Feb-08 3:47 
GeneralRe: Render loop for other process Pin
Dave Kreskowiak28-Feb-08 14:44
mveDave Kreskowiak28-Feb-08 14:44 
GeneralRe: Render loop for other process Pin
Jitse29-Feb-08 9:33
Jitse29-Feb-08 9:33 
GeneralRe: Render loop for other process Pin
Dave Kreskowiak29-Feb-08 18:28
mveDave Kreskowiak29-Feb-08 18:28 
GeneralRe: Render loop for other process Pin
Jitse1-Mar-08 2:10
Jitse1-Mar-08 2:10 
GeneralRe: Render loop for other process Pin
Dave Kreskowiak1-Mar-08 14:45
mveDave Kreskowiak1-Mar-08 14:45 
GeneralRe: Render loop for other process Pin
Jitse2-Mar-08 2:23
Jitse2-Mar-08 2:23 
QuestionUsing System.Reflection to walk values in an array??? Pin
LongRange.Shooter27-Feb-08 8:08
LongRange.Shooter27-Feb-08 8:08 
GeneralRe: Using System.Reflection to walk values in an array??? Pin
buchstaben27-Feb-08 8:18
buchstaben27-Feb-08 8:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.