Search Results

Search found 3146 results on 126 pages for 'games brainiac'.

Page 101/126 | < Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >

  • image archive VS image strip

    - by DevA
    Hi, i've noticed that plenty of games / applications (very common on mobile builds) pack numerous images into an image strip. I figured that the advantages in this are making the program more tidy (file system - wise) and reducing (un)installation time. During the runtime of the application, the entire image strip is allocated and copied from FS to RAM. On the contrary, images can be stored in an image archive and unpacked during runtime to a number of image structures in RAM. The way I see it, the image strip approach is less efficient because of worse caching performance and because that even if the optimal rectangle packing algorithm is used, there will be empty spaces between the stored images in the strip, causing a waste of RAM. What are the advantages in using an image strip over using an image archive file?

    Read the article

  • Gallery items become off-center when switching into landscape orientation.

    - by Sandile
    Hey Guys, Thanks for your time. I'm writing an application for android 2.2 and I'm using a gallery to circulate through a list of images that the user can then click to navigate other portions of the application. In portrait orientation, everything is kosher: the images are displaying correctly (completely in the center of the screen as I intended); however, in landscape orientation, all the images in the gallery are strangely displaced a fixed distance to the left of the center of the screen. I've been researching this issue for hours now and haven't found a solution. I'm hoping that some android guru can aid me in the resolution of this bizarre rendering issue. MainMenuActivity.java relevant code snippet (the activity in which the gallery resides) Gallery optionList = (Gallery)findViewById(R.id.mainMenuOptionList); GalleryItem[] optionListItemIdArray = new GalleryItem[] { new GalleryItem(R.drawable.icon_main_menu_option_list_blackboard, "Start Next Lesson", "Start the next planned vocab lesson."), new GalleryItem(R.drawable.icon_main_menu_option_list_index_cards, "Review Words", "Manually look over old words."), new GalleryItem(R.drawable.icon_main_menu_option_list_dice, "Play Vocab Games", "Play games to reinforce knowledge."), new GalleryItem(R.drawable.icon_main_menu_option_list_calendar, "View Lesson Plan", "View the schedule for coming lessons."), new GalleryItem(R.drawable.icon_main_menu_option_list_pie_chart, "View Performance Report", "Evaluate your overall performance statistics."), new GalleryItem(R.drawable.icon_main_menu_option_list_settings, "Manage Settings", "Change and modify application settings.") }; optionList.setAdapter(new GalleryImageAdapter(this, optionListItemIdArray)); NOTE: A GalleryItem is a POJO with an image resource id, title and description. GalleryImageAdapter.java: public class GalleryImageAdapter extends BaseAdapter { private Context context; private GalleryItem[] galleryItemArray; public GalleryImageAdapter(Context context, GalleryItem[] galleryItemArray) { this.context = context; this.galleryItemArray = galleryItemArray; } @Override public int getCount() { return galleryItemArray.length; } @Override public Object getItem(int position) { return position; } @Override public long getItemId(int position) { return position; } @Override public View getView(int position, View convertView, ViewGroup parent) { ImageView imageView = new ImageView(context); imageView.setImageResource(galleryItemArray[position].getImageId()); imageView.setScaleType(ImageView.ScaleType.FIT_START); imageView.setLayoutParams(new Gallery.LayoutParams(Gallery.LayoutParams.WRAP_CONTENT, Gallery.LayoutParams.WRAP_CONTENT)); return imageView; } } Portrait version of main_menu.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainMenuLinearLayout" android:background="#3067a8" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/mainMenuHeadingTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="10dip" android:textColor="#ffffff" android:textSize="50sp" android:text="@string/main_menu_heading" android:shadowColor="#555555" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="2" /> <TextView android:id="@+id/mainMenuSubHeadingTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="15dip" android:textColor="#ffffff" android:textSize="15sp" android:text="@string/main_menu_sub_heading" android:shadowColor="#555555" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="2" /> <Gallery xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainMenuOptionList" android:layout_width="fill_parent" android:layout_height="wrap_content" android:paddingTop="20dip" android:paddingBottom="10dip" android:spacing="40dip" /> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainMenuOptionListDetailLinearLayout" android:gravity="center_vertical|center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/mainMenuOptionListLabelTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:textSize="25sp" android:shadowColor="#555555" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="2" /> <TextView android:id="@+id/mainMenuOptionListDescriptionTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:textSize="15sp" android:shadowColor="#555555" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="2" /> </LinearLayout> </LinearLayout> Landscape version of main_menu.xml <?xml version="1.0" encoding="utf-8"?> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainMenuLinearLayout" android:background="#3067a8" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/mainMenuHeadingTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="10dip" android:textColor="#ffffff" android:textSize="50sp" android:text="@string/main_menu_heading" android:shadowColor="#555555" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="2" /> <TextView android:id="@+id/mainMenuSubHeadingTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:paddingLeft="15dip" android:textColor="#ffffff" android:textSize="15sp" android:text="@string/main_menu_sub_heading" android:shadowColor="#555555" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="2" /> <Gallery xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainMenuOptionList" android:layout_width="fill_parent" android:layout_height="128dip" android:paddingLeft="0dip" android:paddingTop="5dip" android:spacing="10dip" /> <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/mainMenuOptionListDetailLinearLayout" android:gravity="center_vertical|center_horizontal" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" > <TextView android:id="@+id/mainMenuOptionListLabelTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:textSize="25sp" android:shadowColor="#555555" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="2" /> <TextView android:id="@+id/mainMenuOptionListDescriptionTextView" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textColor="#ffffff" android:textSize="15sp" android:shadowColor="#555555" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="2" /> </LinearLayout> </LinearLayout> Thank you for your time!

    Read the article

  • Creating a multiplayer card game

    - by Vikram.exe
    Hi, I was trying to make a multiplayer card game. I know networking concepts, so I know how to handle data between successive turns. I Haven't done a similar thing before so if any one could point me to a tutorial, that would be nice. I am comfortable with html/php/javascript and a bit of adobe flash. Please suggest are these sufficient to create a game or should I go for some other language(s)? Which are the best languages that are currently used to create such multiplayer games? Thanks, Vikram

    Read the article

  • translation/rotation of a HUD against a camera using vectors in Euclidian 3D space

    - by Jakob
    i've got 2 points in 3D space: the camera position and the camera lookAt. the camera movement is restricted akin to typical first person shooter games. you can move the cam freely, tilt horizontally and up to 90 degrees vertically, but not roll. so now i want to draw a HUD to the screen, on which i can move the mouse freely, with the position of the cursor correctly translating into 3D space. the easy part was to draw something directly in front of the camera. V0 = camPos; V1 = lookAt; V2 = lookAt-camPos; normalize V2; mutiply V2 according to camera frustum V3 = V0+V2 draw something at V3 now the part i don't get: i could use V3 and add to that the rotations of the cam combined with the x/y of the mouse cursor, somehow, right? that's what i want.

    Read the article

  • What's wront in this iban validation code?

    - by Jackoder
    Hello coders, I'm working on a php iban validator but i have a problem I wrote like this: function IbanValidator($value) { $iban = false; $value= strtoupper(trim($value)); # Change US text into your country code if(preg_match('/^US\d{7}0[A-Z0-9]{16}$/', $value)) { $number= substr($value,4,22).'2927'.substr($value,2,2); $number= str_replace( array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'), array(10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35), $number ); $iban = (1 == bcmod($number,97)) ? true; } return $iban; } Thanks. Funny Games

    Read the article

  • Where is my mistake?

    - by Hakan
    I have table which is connected to datagridview and I would like to enter new data by using text boxes. I have following code but it gives me error. Will be appreciated if you help me. Dim meter As DataTable = Me.DataSet1.Tables.Item("tblmeters") Dim row As DataRow = meter.NewRow() row.Item("No") = Me.txtno.Text row.Item("Turnover") = Me.txtturnover.Text row.Item("Total Win") = Me.txttotalwin.Text row.Item("Games Played") = Me.txtgamesplayed.Text row.Item("Credit In") = Me.txtcreditin.Text row.Item("Bill In") = Me.txtbillin.Text row.Item("Hand Pay") = Me.txthandpay.Text row.Item("Date") = DateTime.Today.ToShortDateString meter.Rows.Add(row) Me.TblMeterTableAdapter.Update(Me.DataSet1.tblMeter) meter.AcceptChanges()

    Read the article

  • MATLAB for kids?

    - by yuk
    My seven-years old expresses large interest in computers (well, who doesn't? :). Since I'm mostly program in MATLAB, I'm thinking why not to teach him MATLAB. We did a small project with him (he had to solve as many simple arithmetic problems as possible in a limited time) and he get pretty excited. I coded, he watched and then tested. He also likes to do create interesting graphics and simple animations. So, what's next? I would appreciate any ideas for interesting projects, games, graphics? What math concepts he has to understand to program in MATLAB? Or may be you would say it's too early and we should start with something like Logo, Scratch or Alice?

    Read the article

  • Game Programming - GUIs

    - by Spencer
    I've been coding for a while now and would like to start looking into programming games. I know the industry's standard language is C++, for 3D graphics the main choice is between Direct 3D and OpenGL, but what is the most widely used GUI framework? I'm currently on a Mac so if native Windows API is the answer, then what is the cross platform choice? To be clear, I'm not looking for people's favourites but simply what the common or standard game industry's choice is so that I can learn and familiarize myself with it. Thanks, Spencer

    Read the article

  • starting flash game development

    - by wefwgeweg
    where to begin ? i want to create multiplayer flash games using Union (any experience?) but which IDE and prerequisites do i need to begin ? also, what does Flex mean ? thank you. p.s. what is the best way to purchase Game assets ? ex) 2d sprites...i've given up trying to design my own. i need to outsource (any dedicated place for finding offshore artists?) or buy some package.

    Read the article

  • Perl SDL Windows Installation

    - by Blaise Roth
    I'm using Windows and I need the SDL Library to start using SDL with Perl. I've been pointed to http://www.libsdl.org/ to download it. My first queston is, which library do I want from that page? There's 3 to choose from... Then I've been pointed to 4 other SDL extensions by this page: http://arstechnica.com/gaming/news/2006/02/games-perl.ars. From those I've found there's a normal Win32 version and also a devel one. Which do I want? Thanks.

    Read the article

  • What languages, preprocessors, and toolkits will Apple not allow you to develop iPhone OS 4.0 Apps w

    - by Tony Lambert
    According to articles on web Apple will not approve Apps that have code that is not originally developed in Objective C, C or C++. Found on the Web: 3.3.1 Applications may only use Documented APIs in the manner prescribed by Apple and must not use or call any private APIs. Applications must be originally written in Objective-C, C, C++, or JavaScript as executed by the iPhone OS WebKit engine, and only code written in C, C++, and Objective-C may compile and directly link against the Documented APIs (e.g., Applications that link to Documented APIs through an intermediary translation or compatibility layer or tool are prohibited). Can we build a list of things developer use that will and won't be allowed under these possible new rules? We can use: C, C++, Objective C We can't use: Flash, Monotouch C#, Pascal, Fortran, Perl, Python, Lex, Yacc, Unity (games engine), Java What others?

    Read the article

  • MySQL Volleyball Standings

    - by Torez
    I have a database table full of game by game results and want to know if I can calculate the following: GP (games played) Wins Loses Points (2 points for each win, 1 point for each lose) Here is my table structure: CREATE TABLE `results` ( `id` int(10) unsigned NOT NULL auto_increment, `home_team_id` int(10) unsigned NOT NULL, `home_score` int(3) unsigned NOT NULL, `visit_team_id` int(10) unsigned NOT NULL, `visit_score` int(3) unsigned NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ; And a few testing results: INSERT INTO `results` VALUES(1, 1, 21, 2, 25); INSERT INTO `results` VALUES(2, 3, 21, 4, 17); INSERT INTO `results` VALUES(3, 1, 25, 3, 9); INSERT INTO `results` VALUES(4, 2, 7, 4, 22); INSERT INTO `results` VALUES(5, 1, 19, 4, 20); INSERT INTO `results` VALUES(6, 2, 24, 3, 26); Here is what a final table would look like: +-------------------+----+------+-------+--------+ | Team Name | GP | Wins | Loses | Points | +-------------------+----+------+-------+--------+ | Spikers | 4 | 4 | 0 | 8 | | Leapers | 4 | 2 | 2 | 6 | | Ground Control | 4 | 1 | 3 | 5 | | Touch Guys | 4 | 0 | 4 | 4 | +-------------------+----+------+-------+--------+

    Read the article

  • How do sprites work?

    - by Alan
    How do sprites work? I've seen sprites from old school games like Super Mario Brothers, and wondered how they're animated to make a game. They're always presented as one big image map, so how are they used? For Mario (as an example) are there precalculated image co-ordinates that outline mario, and are swapped between various mario sprites to produce animation? Or are sprites pre "cut" during game initialization using precalculated images co-ordinates and stored in memory somewhere? Obviously I know nothing about game development.

    Read the article

  • Help with game development. Render loop?

    - by John
    Hello, I'm working on a simple game, this is my first game project. Most of the samples I find have a Render Loop where all the game logic is made too and I just don't like this. Let's say I have a ball with X=0, and a wall in X=10 and in a slow machine, the first loop places the ball in X=7 and in a second loop, it places the ball in X=14. It would just crash the game! Is this "render loop" the right way to make games? Should I write code to check for things like this in every frame? Example, new frame X=14, last frame have X=7, so I should check if there's anything from X=7 to X=14?? I was thinking that I should have a separated thread for the game logic and in the render loop, I should just "take a snapshot" of the current game logic and display that, no? How do you guys, experienced game developers work around this? thanks!

    Read the article

  • How to call ejabberdctl from PHP (Apache)

    - by Adil
    Hi, I am trying to call ejabberdctl from PHP but i keep getting an error code of 3 (Failed RPC connection to the node ejabberd@localhost: nodedown). My PHP script contains the following code to add friends : exec('sudo /opt/ejabberd-2.1.2/bin/ejabberdctl add_rosteritem adil.baig40122310029739 godudu.com chburaska0822431111022397 godudu.com chburaska0822431111022397 Friends both', $output, $retCode); exec('sudo /opt/ejabberd-2.1.2/bin/ejabberdctl add_rosteritem chburaska0822431111022397 godudu.com adil.baig40122310029739 godudu.com adil.baig40122310029739 Friends both', $output, $retCode); I have also added ejabberdctl to /etc/sudoers like so : # Custom entry for ejabberdctl, so it can be used via PHP www-data ALL= NOPASSWD: /opt/ejabberd-2.1.2/bin/ejabberdctl I have also added the ejabberd bin directory to /etc/environment, like so : PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/ejabberd-2.1.2/bin" source /etc/environment Everytime i run the PHP script $retCode (the exec return code) returns 3, but if i run the same php file from the command line it works. Help!

    Read the article

  • Server is on or off

    - by Daniel
    Curious. I'm starting to broadcast high school football games online, and it uses a program to broadcast the feeds off my computer. However, when I shut the program down or the computer down, the server goes offline and guests won't be able to access the feeds. Is there any kind of code out there that I can post onto my website that will indicate to my guests whether the server is on or off? I would figure it would be a simple code, a php script or something that periodically checks to see if a site is on line and then displays ON or OFF.

    Read the article

  • Modern, Non-trivial, Pygame Tutorials?

    - by Gregg Lind
    What are some 'good', non-trivial Pygame tutorials? I realize good is relative. As an example, a good one (to me) is the one that describes how to use pygame.camera. It's recent uses a modern PyGame (1.9) non-trivial, in that it shows how to use it the module for a real application. I'd like to find others. A lot of the ones on the Pygame site are from 1.3 era or earlier! Info on related projects, like Gloss is welcome as well. (If your answer is "read the source of some pygame games", please link to the source of particular ones and note what is good about them)

    Read the article

  • XNA 4.0 - What happens when the window is minimized?

    - by Conrad Clark
    Hello. I'm learning F#, and decided to try making simple XNA games for windows using F# (pure enthusiasm) , and got a window with some images showing up. Here's the code: (*Methods*) member self.DrawSprites() = _spriteBatch.Begin() for i = 0 to _list.Length-1 do let spentity = _list.List.ElementAt(i) _spriteBatch.Draw(spentity.ImageTexture,new Rectangle(100,100,(int)spentity.Width,(int)spentity.Height),Color.White) _spriteBatch.End() (*Overriding*) override self.Initialize() = ChangeGraphicsProfile() _graphicsDevice <- _graphics.GraphicsDevice _list.AddSprite(0,"NagatoYuki",992.0,990.0) base.Initialize() override self.LoadContent() = _spriteBatch <- new SpriteBatch(_graphicsDevice) base.LoadContent() override self.Draw(gameTime : GameTime) = base.Draw(gameTime) _graphics.GraphicsDevice.Clear(Color.CornflowerBlue) self.DrawSprites() And the AddSprite Method: member self.AddSprite(ID : int,imageTexture : string , width : float, height : float) = let texture = content.Load<Texture2D>(imageTexture) list <- list @ [new SpriteEntity(ID,list.Length, texture,Vector2.Zero,width,height)] The _list object has a ContentManager, here's the constructor: type SpriteList(_content : ContentManager byref) = let mutable content = _content let mutable list = [] But I can't minimize the window, since when it regains its focus, i get this error: ObjectDisposedException Cannot access a disposed object. Object name: 'GraphicsDevice'. What is happening?

    Read the article

  • Drawing individual pixels with iphone sdk.

    - by blob8108
    Hi, I've been trying to figure out how to make a powder toy style game on the iPhone. My problem is how to draw pixels to the screen. From what I've read, OpenGL is better for games as it is faster/hardware accelerated, but there is no method to draw pixels directly to the screen. Apparently drawing pixels to an off-screen frame buffer is the way to go, but how do I then pass this to OpenGL? Do I use a texture? (this is assuming I have no previous knowledge of iPhone graphics programming). Thanks!

    Read the article

  • Develop applications to mobiles

    - by muek
    Hi there, I have very easy question, but I simply have any idea of the answer. I have developed a small mobile-application using java, for my nokia. The problem is that when installed on my samsung the application simply crashed. Then I tried on my other nokia but different model, and I didn't got the normal behavior. So my question is, does anyone have any idea how companies that develop mobiles applications/games test their software. Does they have to have all models for all mobiles phones??

    Read the article

  • Programming language for web

    - by cable729
    I haven't programmed in a while, and have kind of lost interest, but I want to get back, and I've enjoyed C# the most, a lot more than objective-c and visual basic. So I want to make some games that me and my friends will be able to play next school year. So basically something you can play on the web. What programming languages deploy to the web? If c# is possible, and a mac with safari/firefox would be able to use it (I can't install plugins, and I don't want to get in trouble for making myself admin again) Flash, Java, etc. If java does, I'd like that most since it's most like c#. Then what libraries/engines would I use? I want to do 2d. And then what IDE would I use? Thanks in advance!

    Read the article

  • Complicated football league Dynamic Ordering in MySQL?

    - by Dan
    I have a table 'games' for a football league as follows: date home_team_id away_team_id home_score away_score - 1 2 6 21 - 3 1 7 19 I can't figure out how to dynamically generate a list of team ID's ordered by Wins (then points for if poss)? -- I have this query which works fine when I have a $team_id but of cause then I can only do 1 team at a time, and that doesn't allow for ordering at query level ((SELECT COUNT(*) FROM `games` WHERE ((`home_score` > `away_score`) AND `home_team_id` = '.$team_id.')) + (SELECT COUNT(*) FROM `games` WHERE ((`home_score` < `away_score`) AND `away_team_id` = '.$team_id.'))) AS `wins` I wonder if i can use this with some form of GROUP, or mySQL can know the $team_id itself? I've also tried some multiple JOINs with the 'team' table but they didn't work either. Thanks, Dan

    Read the article

  • I have Following code but rest of it how?

    - by Hakan
    I have following code which is putting value of text box to table but i can't manage how to delete record. Can someone help me about it? Dim meter As DataTable = Me.DataSet1.Tables.Item("tblmeter") Dim row As DataRow = meter.NewRow() row.Item("No") = Me.txtno.Text row.Item("Turnover") = Me.txtturnover.Text row.Item("Total Win") = Me.txttotalwin.Text row.Item("Games Played") = Me.txtgamesplayed.Text row.Item("Credit In") = Me.txtcreditin.Text row.Item("Bill In") = Me.txtbillin.Text row.Item("Hand Pay") = Me.txthandpay.Text row.Item("Date") = DateTime.Today.ToShortDateString meter.Rows.Add(row) Me.TblMeterTableAdapter.Update(Me.DataSet1.tblMeter) meter.AcceptChanges() Dim table As DataTable = Me.DataSet1.Tables.Item("tblmeter") Dim defaultView As DataView = table.DefaultView Dim cell As New DataGridCell((defaultView.Table.Rows.Count - 1), 1) Me.DataGrid1.CurrentCell = cell txtno.Text = "" txtturnover.Text = "" txttotalwin.Text = "" txtgamesplayed.Text = "" txtcreditin.Text = "" txtbillin.Text = "" txthandpay.Text = "" txtno.Focus() I am using following code but it's not update records. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim current As DataRowView = DirectCast(Me.BindingContext.Item(Me.DataSet1.Tables.Item("tblmeter")).Current, DataRowView) current.Delete() Me.DataSet1.tblMeter.AcceptChanges() Me.TblMeterTableAdapter.Update(Me.DataSet1.tblMeter) End Sub Code deletes records from datagrid but not updating. Any help

    Read the article

  • Exception Error in c#

    - by Kumu
    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; using System.IO; using System.Runtime.Serialization.Formatters.Binary; namespace FoolballLeague { public partial class MainMenu : Form { FootballLeagueDatabase footballLeagueDatabase; Game game; Login login; public MainMenu() { InitializeComponent(); changePanel(1); } public MainMenu(FootballLeagueDatabase footballLeagueDatabaseIn) { InitializeComponent(); footballLeagueDatabase = footballLeagueDatabaseIn; } private void Form_Loaded(object sender, EventArgs e) { } private void gameButton_Click(object sender, EventArgs e) { int option = 0; changePanel(option); } private void scoreboardButton_Click(object sender, EventArgs e) { int option = 1; changePanel(option); } private void changePanel(int optionIn) { gamePanel.Hide(); scoreboardPanel.Hide(); string title = "Football League System"; switch (optionIn) { case 0: gamePanel.Show(); this.Text = title + " - Game Menu"; break; case 1: scoreboardPanel.Show(); this.Text = title + " - Display Menu"; break; } } private void logoutButton_Click(object sender, EventArgs e) { login = new Login(); login.Show(); this.Hide(); } private void addGameButton_Click(object sender, EventArgs e) { if ((homeTeamTxt.Text.Length) == 0) MessageBox.Show("You must enter a Home Team"); else if (homeScoreUpDown.Value > 9 || homeScoreUpDown.Minimum < 0) MessageBox.Show("You must enter one digit between 0 and 9"); else if ((awayTeamTxt.Text.Length) == 0) MessageBox.Show("You must enter a Away Team"); else if (homeScoreUpDown.Value > 9 || homeScoreUpDown.Value < 0) MessageBox.Show("You must enter one digit between 0 to 9"); else { //checkGameInputFields(); game = new Game(homeTeamTxt.Text, int.Parse(homeScoreUpDown.Value.ToString()), awayTeamTxt.Text, int.Parse(awayScoreUpDown.Value.ToString())); MessageBox.Show("Home Team -" + '\t' + homeTeamTxt.Text + '\t' + "and" + '\r' + "Away Team -" + '\t' + awayTeamTxt.Text + '\t' + "created"); footballLeagueDatabase.AddGame(game); //clearCreateStudentInputFields(); } } private void timer1_Tick(object sender, EventArgs e) { displayDateAndTime(); } private void displayDateAndTime() { dateLabel.Text = DateTime.Today.ToLongDateString(); timeLabel.Text = DateTime.Now.ToShortTimeString(); } private void displayResultsButton_Click(object sender, EventArgs e) { Game game = new Game(homeTeamTxt.Text, int.Parse(homeScoreUpDown.Value.ToString()), awayTeamTxt.Text, int.Parse(awayScoreUpDown.Value.ToString())); gameResultsListView.Items.Clear(); gameResultsListView.View = View.Details; ListViewItem row = new ListViewItem(); row.SubItems.Add(game.HomeTeam.ToString()); row.SubItems.Add(game.HomeScore.ToString()); row.SubItems.Add(game.AwayTeam.ToString()); row.SubItems.Add(game.AwayScore.ToString()); gameResultsListView.Items.Add(row); } private void displayGamesButton_Click(object sender, EventArgs e) { Game game = new Game("Home", 2, "Away", 4);//homeTeamTxt.Text, int.Parse(homeScoreUpDown.Value.ToString()), awayTeamTxt.Text, int.Parse(awayScoreUpDown.Value.ToString())); modifyGamesListView.Items.Clear(); modifyGamesListView.View = View.Details; ListViewItem row = new ListViewItem(); row.SubItems.Add(game.HomeTeam.ToString()); row.SubItems.Add(game.HomeScore.ToString()); row.SubItems.Add(game.AwayTeam.ToString()); row.SubItems.Add(game.AwayScore.ToString()); modifyGamesListView.Items.Add(row); } } } This is the whole code and I got same error like previous question. Unhandled Exception has occurred in you application.If you click...............click Quit.the application will close immediately. Object reference not set to an instance of an object. And the following details are in the error message. ***** Exception Text ******* System.NullReferenceException: Object reference not set to an instance of an object. at FoolballLeague.MainMenu.addGameButton_Click(Object sender, EventArgs e) in C:\Users\achini\Desktop\FootballLeague\FootballLeague\MainMenu.cs:line 91 at System.Windows.Forms.Control.OnClick(EventArgs e) at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent) at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.ButtonBase.WndProc(Message& m) at System.Windows.Forms.Button.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) I need to add the games to using the addGameButton and the save those added games and display them in the list view (gameResultsListView). Now I can add a game and display in the list view.But when I pressed the button addGameButton I got the above error message. If you can please give me a solution to this problem.

    Read the article

  • How to move user content in Wix Installer

    - by Simeon Pilgrim
    To support Window Vista in my game, I have changed were the save files are placed (From under Program Files to My Documents) for both XP and Vista installations. Now I would like to be able to move the current XP users save games from the old location to the new location. I think I can correctly trigger this via the upgrade checking code like so: <Upgrade Id="PLACE-GUID-HERE"> <UpgradeVersion OnlyDetect="yes" Minimum="$(var.ProductVersion)" IncludeMinimum="no" Property="NEWERVERSIONDETECTED" /> <UpgradeVersion OnlyDetect="no" Minimum="1.1.0" IncludeMinimum="yes" Maximum="$(var.ProductVersion)" IncludeMaximum="no" Property="OLDERVERSIONBEINGUPGRADED" /> <UpgradeVersion OnlyDetect="no" Maximum="1.1.0" IncludeMaximum="no" Property="MOVESAVEFILESUPGRADED" /> </Upgrade> where 1.0.x was the old way and 1.1.x will be the new way, thus I could do something in a custom action based on MOVESAVEFILESUPGRADED, but the heart of the problem, I cant see how to move non-installed files from one location to another.

    Read the article

< Previous Page | 97 98 99 100 101 102 103 104 105 106 107 108  | Next Page >