Author |
Thread Statistics | Show CCP posts - 2 post(s) |

Callis Iqnatius
AlfaCorp
|
Posted - 2008.05.29 20:46:00 -
[1]
without sounding like a noob.......
how do i put
List<Alliance> alliances = api.GetAllianceData();
into a 'Tree View' thing???
i guess not sounding like a noob is out :P ...............................................................................................................................
|

Callis Iqnatius
AlfaCorp
|
Posted - 2008.05.29 21:46:00 -
[2]
ok i have worked out how to get the list into a list box. (well at least it compiles :P)
but when i type in my API details i get
Unable to cast object of type 'System.Windows.Forms..TextBox' to type System.IConvertible)
the code for the login bit is
UserID = Convert.ToInt32(UserIDTB); CharacterID = Convert.ToInt32(CharacterIDTB); ApiKey = Convert.ToString(APIkeyTB);
EveApi api = new EveApi(UserID, ApiKey, CharacterID);
List<Alliance> alliances = api.GetAllianceData(); foreach (Alliance a in alliances) { lstAlliance.Items.Add(a.Name); }
any ideas???
...............................................................................................................................
|

Callis Iqnatius
AlfaCorp
|
Posted - 2008.05.29 22:39:00 -
[3]
Originally by: Tiberius Xavier
Originally by: Callis Iqnatius ok i have worked out how to get the list into a list box. (well at least it compiles :P)
but when i type in my API details i get
Unable to cast object of type 'System.Windows.Forms..TextBox' to type System.IConvertible)
the code for the login bit is
UserID = Convert.ToInt32(UserIDTB); CharacterID = Convert.ToInt32(CharacterIDTB); ApiKey = Convert.ToString(APIkeyTB);
EveApi api = new EveApi(UserID, ApiKey, CharacterID);
List<Alliance> alliances = api.GetAllianceData(); foreach (Alliance a in alliances) { lstAlliance.Items.Add(a.Name); }
any ideas???
You need to extract from the control. Add .Text to all your sources. UserID = Convert.ToInt32(UserIDTB.Text); CharacterID = Convert.ToInt32(CharacterIDTB.Text); ApiKey = Convert.ToString(APIkeyTB.Text);
Side question, is this API OpenSource?
ahh thx dude that fixed the problem!!
and as far as what i am writing is concerned yer i will be shearing my project and code (not that it will be any gd) not shore about the API tho :P ...............................................................................................................................
|

Callis Iqnatius
AlfaCorp
|
Posted - 2008.05.29 23:39:00 -
[4]
ok sorry to be a pain hear ppl.. but this seems to be the only place to find the answers i need:P
is there an easy way to find out the 'List<Alliance>' bit in
List<Alliance> alliances = api.GetAllianceData();
for other API calls??? such as
api.GetCorporationStarbaseList()
i know im a lil over my head hear:P was just wondering if u guys could point me in the direction of the rubber rings ;P |

Callis Iqnatius
AlfaCorp
|
Posted - 2008.05.30 00:00:00 -
[5]
ok think im getting there....
List<EveAI.Live.Corporation.Starbase> starbaseList = api.GetCorporationStarbaseList();
works up till the 'api.GetCorporationStarbaseList()' this was copied from the wiki so i know its correct.... any one know what i have done wrong?? ...............................................................................................................................
|

Callis Iqnatius
AlfaCorp
|
Posted - 2008.05.30 13:05:00 -
[6]
from what i can tell.... when i use the line
EveApi api = new EveApi(UserID, ApiKey, CharacterID);
it grabs the data and Caches it.
then all i need to do is call the data i want.... which thinking about it doesn't make all that much sense but there you go :P
it worked with the alliance call
List<Alliance> alliances = api.GetAllianceData(); but that was copped directly from then wiki Linkage
the error i get the the line
List<EveAI.Live.Corporation.Starbase> starbaseList = api.GetCorporationStarbaseDetail();
is
C:\Documents and Settings\creature\My Documents\Visual Studio 2005\EVE Projects\EVEPOS V2.0\EVEPOS V2.0\Form1.cs(33,66): error CS0029: Cannot implicitly convert type 'EveAI.Live.Corporation.Starbase' to 'System.Collections.Generic.List<EveAI.Live.Corporation.Starbase>'
dose that make any sense?
...............................................................................................................................
|

Callis Iqnatius
AlfaCorp
|
Posted - 2008.05.30 15:00:00 -
[7]
Originally by: Tiberius Xavier
Originally by: Callis Iqnatius from what i can tell.... when i use the line
EveApi api = new EveApi(UserID, ApiKey, CharacterID);
it grabs the data and Caches it.
then all i need to do is call the data i want.... which thinking about it doesn't make all that much sense but there you go :P
it worked with the alliance call
List<Alliance> alliances = api.GetAllianceData(); but that was copped directly from then wiki Linkage
the error i get the the line
List<EveAI.Live.Corporation.Starbase> starbaseList = api.GetCorporationStarbaseDetail();
is
C:\Documents and Settings\creature\My Documents\Visual Studio 2005\EVE Projects\EVEPOS V2.0\EVEPOS V2.0\Form1.cs(33,66): error CS0029: Cannot implicitly convert type 'EveAI.Live.Corporation.Starbase' to 'System.Collections.Generic.List<EveAI.Live.Corporation.Starbase>'
dose that make any sense?
Check what the return type from api.GetCorporationStarbaseDetail() because the error suggests that it does not return a List of Starbase.
would love to as sooon as i work out how..... ...............................................................................................................................
|
|
|