|
This is not the recommended way to do this, but I am a little pushed for time...
using System;
using System.Collections.Generic;
namespace Demo
{
class SaveResults
{
public string results;
}
class Program
{
public static List<saveresults> listResults = new List<saveresults>();
static void Main(string[] args)
{
foreach (SaveResults sr in listResults)
{
Console.WriteLine(sr.results);
}
}
}
class Processing
{
void DoSomething()
{
SaveResults sr = new SaveResults();
sr.results = "hello";
Program.listResults.Add(sr);
}
}
}
</saveresults></saveresults>
Each time you get results, you create a new instance of the SaveResults class, storing the info you need later (Processing.DoSomething). You then add this to a static list (in program class here so that it persists until the app ends - you will have a better place, I am sure). When all processing is done, just iterrate through the List<t> and handle each answer in turn.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Thank you for taking the time to explain it, I appreciate it.
|
|
|
|
|
Hello evrybody
i installed WPF ToolKit
the i create a window and i used the wpftoolkite datepiker on this window
it works well on my pc , but when i try to run the application on another PC this window cann't load , if i remove the datepiker from the window it works well
i don't know what can i do for it even the WPFToolkit.dll allready in the same path of the exe file it is not working with another pc
thanks for help
MD_NADA
|
|
|
|
|
Are they both using the same .NET Framework version?
My failometer is detecting vast quantities of FAIL!
|
|
|
|
|
no the second PC dosen't have the enviroment
just i deploy the application on it
but i installed the prerequisites
MD_NADA
|
|
|
|
|
You need the version of the .NET Framework that is on the developing computer on the targat machine (version 3.0 atleast), it's as simple as that.
md_nada wrote: but i installed the prerequisites?
What do you mean by "prerequisites"?
My failometer is detecting vast quantities of FAIL!
|
|
|
|
|
yes i install the framework
and the application run on the pc
but the problem is there is a window included DatePiker
when i call this window this window can't open and make error and it drop the application
Note: the WPFToolKite.dll already at the same path of the exe file
i hope i descripe it well
MD_NADA
|
|
|
|
|
i mean the .net framwork
and the WPFToolKite.dll is on the same path of the application exe
MD_NADA
|
|
|
|
|
Hey,
I want to ask for your help:
i am in the middle of building a program using C#, the program have to read XML file from the net that including the information about the member that logind in (this is a website) and display it in the program.
the problem is that when i do the requst it not send any cookies with the requst, so the xml return guest, how can i get with C# the cookies that was sendin the website to send them?
example: i have loggind in the website with "gindi bar yahav", "123321" - the web set cookies on my computer, now i want to get those cookies with C# becuse i need to use them when i requst from the XML file.
that was the code i used
try
{
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(this.xml_file);
request.Method = "GET";
CookieContainer web_cookies = new CookieContainer();
CookieContainer cookies = web_cookies.GetCookies(new Uri("http://otaku-con.co.il"));
request.CookieContainer = cookies;
HttpWebResponse resp = (HttpWebResponse) request.GetResponse();
st = resp.GetResponseStream();
sr = new System.IO.StreamReader(st);
System.Windows.Forms.MessageBox.Show(sr.ReadToEnd().ToString());
}
catch(Exception e)
{
System.Windows.Forms.MessageBox.Show(e.ToString());
System.Windows.Forms.Application.Exit();
}
when i get the message it gave me "Array()" what means i dont have any cookies (in the page i tried only to print the cookies [with PHP]) but when i go to the page with the browser i can see all my cookies.
someone know what the problem?
thanks alot, Yahav.
Gindi Bar Yahav - Web & Software defeloper.
|
|
|
|
|
|
change their Anchor to bottom right.
|
|
|
|
|
Hi everyone!
I am working with ms studio 2008.
I need to make simple divx (avi) player with subtitles (srt).
I googled this, and I found very simple solutions for video (like directx.audiovideoplayback...), with many examples of player...
But, I can't find any solution that includes subtitles.
Is there any free library that provides this? Or some other way...
Any solution is welcome...
Thanks In Advance
|
|
|
|
|
This isn't exactly simple. Why do you need to do this? Can't you tell them to use VLC[^]?
|
|
|
|
|
It's my student project...
I have to make movie catalog (database) for movies stored on hard disk.
Also, this catalog should have its own player. I already made one using directx sdk, but it doesn't show subtitles.
I live in non-English speaking country, so subtitles are very important.
If it's not extreme hard, I would really like to add them to video...
|
|
|
|
|
Ok I live in the Netherlands. I don't usually use subs (English is easy).
Anyway. You could make some sort of overlay and parse+display the subtitles yourself. Parsing an srt file is the easiest part.
For the overlay, see: http://www.codeguru.com/cpp/g-m/directx/article.php/c1229
For what to actually put on it.. I'd get a sprite font somewhere (or make one), reading font files is terrible (nice result, but terrible to code)
|
|
|
|
|
Hi,
I have a windows application in which sinlge instance check is applied and is working well.
But when i schedule my application to run on system startup the probelm comes as the exe runs in process but no icon is shown in task bar (on minimize mode application icon is shown in taskbar) or the forms are shown.
So when i click on the icon nothing happens as already exe is running in process.
I need a solution like when scheduled task runs my application its icon shuold automatically appear in the taskbar.
|
|
|
|
|
So your program is running at system startup and not system login? Under what ID is it running? It sounds like it's not part of the same interactive desktop session.
|
|
|
|
|
Hello i`m elther
student, 18 years old
I want to hide process.
it's like ssdt hook.. zwquerysysteminformation api..
I think it's very difficult
plz somebody help me.
|
|
|
|
|
Yes, in fact, it's impossible.
Christian Graus
Driven to the arms of OSX by Vista.
"I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )
|
|
|
|
|
Hide the window or hide the process? People mix them up alot.
If you want to hide the process (viewable from task manager) then you can't, simple as that.
My failometer is detecting vast quantities of FAIL!
|
|
|
|
|
|
Yea well actually you can do this. But it's bad. very bad.
If you can prove you want to use this for a legitimate purpose, I might PM you some answers (but seriously, you could just google for them..)
|
|
|
|
|
Hey,
I am looking for a C# data structure that will allow me to store multiple values with the same key and then later on, look through the data structure and pull out the most recent entry for a given key.
I am planning on using an int value for the key and a custom object for the value. Is this possible?
Thanks
|
|
|
|
|
Sure is, the framework gives you Dictionaries, which can do exactly what you need:
using System.Collections.Generic;
...
Dictionary<int,MyClass> MyDictionary = new Dictionary<int,MyClass>();
...
MyDictionary.Add(1,new MyClass(...));
MyDictionary.Add(2,new MyClass(...));
...
MyClass ClassNo1 = null;
if (MyDictionary.ContainsKey(1)) ClassNo1 = MyDictionary[1];
...
Where "MyClass" is a custom structure you create to hold your multiple values.
2+2=5 for very large amounts of 2
(always loved that one hehe!)
|
|
|
|
|