Click here to Skip to main content
15,913,587 members
Home / Discussions / C#
   

C#

 
GeneralRe: Changing a Struct Property Value Pin
Kevin Marois13-Apr-15 3:06
professionalKevin Marois13-Apr-15 3:06 
GeneralRe: Changing a Struct Property Value Pin
Richard Deeming13-Apr-15 4:12
mveRichard Deeming13-Apr-15 4:12 
QuestionC# Memory Leak Question Pin
Kevin Marois10-Apr-15 10:45
professionalKevin Marois10-Apr-15 10:45 
AnswerRe: C# Memory Leak Question Pin
jschell10-Apr-15 11:36
jschell10-Apr-15 11:36 
GeneralRe: C# Memory Leak Question Pin
Kevin Marois13-Apr-15 3:13
professionalKevin Marois13-Apr-15 3:13 
QuestionEasy Way to Display Multilingual Tooltip and Message Box Pin
Felix Obere10-Apr-15 10:03
Felix Obere10-Apr-15 10:03 
Questionconvert piece of code from C++ to C# Pin
MrKBA10-Apr-15 8:25
MrKBA10-Apr-15 8:25 
AnswerRe: convert piece of code from C++ to C# Pin
RedDk12-Apr-15 16:49
RedDk12-Apr-15 16:49 
Questionsingle quote inside double quote in C# ASP.NET Pin
Rajeshkunwar2510-Apr-15 3:42
Rajeshkunwar2510-Apr-15 3:42 
AnswerRe: single quote inside double quote in C# ASP.NET Pin
OriginalGriff10-Apr-15 3:57
mveOriginalGriff10-Apr-15 3:57 
QuestionI can't get my splash screen to close Pin
jkirkerx9-Apr-15 11:00
professionaljkirkerx9-Apr-15 11:00 
AnswerRe: I can't get my splash screen to close Pin
Herman<T>.Instance9-Apr-15 23:54
Herman<T>.Instance9-Apr-15 23:54 
GeneralRe: I can't get my splash screen to close Pin
jkirkerx10-Apr-15 6:25
professionaljkirkerx10-Apr-15 6:25 
AnswerRe: I can't get my splash screen to close Pin
Richard MacCutchan10-Apr-15 2:20
mveRichard MacCutchan10-Apr-15 2:20 
GeneralRe: I can't get my splash screen to close Pin
jkirkerx10-Apr-15 6:46
professionaljkirkerx10-Apr-15 6:46 
GeneralRe: I can't get my splash screen to close Pin
Richard MacCutchan10-Apr-15 6:50
mveRichard MacCutchan10-Apr-15 6:50 
GeneralRe: I can't get my splash screen to close Pin
jkirkerx10-Apr-15 7:38
professionaljkirkerx10-Apr-15 7:38 
QuestionApplication.Run(new FormMain()); does not contain a constructor that takes 0 arguments Pin
jkirkerx9-Apr-15 7:02
professionaljkirkerx9-Apr-15 7:02 
AnswerRe: Application.Run(new FormMain()); does not contain a constructor that takes 0 arguments Pin
Richard Deeming9-Apr-15 7:05
mveRichard Deeming9-Apr-15 7:05 
GeneralRe: Application.Run(new FormMain()); does not contain a constructor that takes 0 arguments Pin
jkirkerx9-Apr-15 7:24
professionaljkirkerx9-Apr-15 7:24 
AnswerRe: Application.Run(new FormMain()); does not contain a constructor that takes 0 arguments Pin
OriginalGriff9-Apr-15 21:47
mveOriginalGriff9-Apr-15 21:47 
GeneralRe: Application.Run(new FormMain()); does not contain a constructor that takes 0 arguments Pin
jkirkerx10-Apr-15 6:24
professionaljkirkerx10-Apr-15 6:24 
GeneralRe: Application.Run(new FormMain()); does not contain a constructor that takes 0 arguments Pin
OriginalGriff10-Apr-15 6:32
mveOriginalGriff10-Apr-15 6:32 
GeneralRe: Application.Run(new FormMain()); does not contain a constructor that takes 0 arguments Pin
jkirkerx10-Apr-15 7:36
professionaljkirkerx10-Apr-15 7:36 
QuestionParse XML Sibling Pin
antrock1019-Apr-15 6:23
antrock1019-Apr-15 6:23 
Hello,

I'm using a website to parse data to my program and I return the node I want and add it to a listbox. In this case I am looking for "GameTitle". "GameTitle" has a sibling called "id". Once a "GameTitle" is selected in the listbox I would like to pass the id to a variable called "id". I am a bit stuck now and would appreciate some help.

Snippet of XML
<Data>
<baseImgUrl>http://thegamesdb.net/banners/</baseImgUrl>
<Game>
<id>5016</id>
<GameTitle>Final Fight</GameTitle>
<PlatformId>21</PlatformId>
<Platform>Sega CD</Platform>
<ReleaseDate>07/01/1993</ReleaseDate>
<Overview>
The Sega Mega CD version, titled Final Fight CD, was ported and published by Sega under license from Capcom in 1993. This version retains nearly all the features of the arcade game (namely the 2-player game mode, the Industrial Area stage, and the ability to play as any of the three main characters), adding voice acting to the game's opening and ending sequence, an arranged version of the original soundtrack, and an exclusive time attack mode. The Mega CD version was still censored for the English localization with many of the same changes. Poison and Roxy were kept this time, but were redrawn with less revealing clothing (longer shorts and shirts) to hide all nudity
</Overview>
<Genres>
<genre>Fighting</genre>
</Genres>
<Co-op>No</Co-op>
<Publisher>Sega</Publisher>
<Developer>Sega</Developer>
<Images>
<fanart>
<original width="1920" height="1080">fanart/original/5016-1.jpg</original>
<thumb>fanart/thumb/5016-1.jpg</thumb>
</fanart>
<boxart side="back" width="1530" height="2156" thumb="boxart/thumb/original/back/5016-1.jpg">boxart/original/back/5016-1.jpg</boxart>
<boxart side="front" width="1539" height="2156" thumb="boxart/thumb/original/front/5016-1.jpg">boxart/original/front/5016-1.jpg</boxart>
<clearlogo width="400" height="250">clearlogo/5016.png</clearlogo>
</Images>
</Game>

My Code Snippet
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.Xml;
using System.Collections;
using System.IO;
using System.Xml.Linq;
using System.Net;
namespace Collection
{
    public partial class search : Form
    {
        ArrayList ar;
        String Search_Query;
        public string id;
        public string selectedGame;

        public search()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            Search_Query = textBox1.Text;
            URL_XML_Load();
        }

        public void URL_XML_Load()
        {

            XmlDocument doc = new XmlDocument();
            doc.Load("<a href="http://thegamesdb.net/api/GetGame.php?name=">http://thegamesdb.net/api/GetGame.php?name=</a>" + Search_Query);

            foreach (XmlNode node in doc.ChildNodes)
            {
                if (node.Name == "Data")
                {
                    foreach (XmlNode node_of_node in node.ChildNodes)
                    {
                        if (node_of_node.Name == "Game")
                        {
                            string Name = node_of_node["GameTitle"].InnerText;
                            listBox1.Items.Add(Name);

                        }

                    }
                }

            }
        }

        private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
        {
            selectedGame = listBox1.SelectedItem.ToString();

        }

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.