|
I'm doing a project in .net for little kids. So i need my UI to be eye catching. I'm hoping to use FLEX to do that.
first of all is it possible?
If so how can I do it?
Any help will be appreciated
Thanks.
|
|
|
|
|
Good god man, just use Windows Forms! Or maybe WPF (like Windows Forms, but all fancy smancy looking). But Flex (a Flash technology, right?) inside of Windows Forms... why oh why would you inflict that upon yourself?
|
|
|
|
|
Thanks for your reply,
But I've developed several components which are needed using FLEX. So now I have to integrate them with the win form.
Therefor I can't migrate to WPF now
|
|
|
|
|
If you want to do it in .Net, use WPF. It is quite good at flashy and unconventional UIs. If you want to use Flex, use Flex and make a SWF. Integrating them may be possible but it certainly won't be nice, you'd almost certainly be better off rewriting the custom controls you need. (Customising controls in WPF is quite easy, you can edit the template XAML.)
|
|
|
|
|
In case you haven't found out yourself, Adobe has some integration tutorials here.
|
|
|
|
|
hi,
What is a realTime application?
Is it one with multithreading?
If an application uses background worker process, can it be a realtime application?
Thanks
|
|
|
|
|
|
Thanks for the link.
I had read this before but do not really understand it.
Thanks
|
|
|
|
|
Sometimes computers need to things which must finish before or at a particular time, or length of time. Sometimes real-time systems are very important and will result in bad things happening if they do not work. Anti-lock brakes on a car are an example of a real-time computing system it would be bad if the system, did not release the brakes at the correct times as it might mean the car will crash and people going to hospital.
Some real time systems are not allowed to be naughty at all and cannot miss one deadline as this is a failure, some are allowed to be a little bit bad and miss some deadlines because missing a deadline is not too bad as the computer's answer can be ignored, some systems can miss lots of deadlines but the information they give is more useful the closer it is to the deadline.
Some people mix up real-time and high performance: A supercomputer doing hard maths is peforming well but not working in real time. The anti-lock brake doesn't have much to do before it reaches it's deadline so it's performance is not high, but it does have to finish before the deadline, so it is real time.
|
|
|
|
|
arkiboys wrote: What is a realTime application?
It is a system where response time is of most importance. We all have performance related requirements but the application does not fails if those are not met. For real time, processing time is one of the requirements.
arkiboys wrote: Is it one with multithreading?
Not all multi-threaded applications are real time. IMHO threading and real time do not relate.
arkiboys wrote: If an application uses background worker process, can it be a realtime application?
Yes. If the background thread does the work and reports back to the main thread within the time limits, it can be.
Note after Keith's reply: A real time application does not mean that it is very fast with processing. It means that it always processes within the given time limit. If it does not, it is a failure.
"The worst code you'll come across is code you wrote last year.", wizardzz[ ^]
modified on Monday, May 16, 2011 5:02 PM
|
|
|
|
|
d@nish wrote: It is a system where response time is of most importance. We all have performance related requirements but the application does not fails if those are
not met. For real time, processing time is one of the requirements.
I just think it is worth clarifying as it can be read two ways IMO: It is not the fastest possible response time that is the issue (though often real-time systems do need good response times) it is more the time of the response to meet a deadline that defines a real-time system.
(for the OP's benefit)
If you are writing software to process the image on a TV sceen in real time, the image must be ready before the screen refreshes at its regular interval. Lets say the screen is 60 Hz, that means you have 1/60th of a second to get ready. If the code is guaranteed to finish in 1/59th of a second, that is good enough, you do not need to write a higher performance processing route for screen. There are reasons you might write a better performing routine (e.g. support for higher end screens) but you don't need to for this screen.
|
|
|
|
|
True. Updated the reply. Thanks.
"The worst code you'll come across is code you wrote last year.", wizardzz[ ^]
|
|
|
|
|
A video game is a real-time application. Maya is not. Well, Maya does provide real-time 3D modeling, but the final rendering usually takes a while (e.g., it can take hours to render a single frame), so is not real-time.
A real-time application is usually defined as an application which responds immediately to user input. It can be broader, but that is typically what people mean.
|
|
|
|
|
arkiboys wrote: What is a realTime application?
depends on what real-time means to you.
hard real-time? soft real-time? what is your time resolution?
how bad is it when a dead-line isn't met? If your analog video recorder skips a frame, you can still enjoy the movie.
if your app is all about some physical events happening at 100 microsecond intervals or less, a Windows PC probably is not the solution, unless you add intelligence, say some micro-controller based subsystem with a real-time OS or no OS at all.
whatever definition you use for real-time, you will have to configure your PC accordingly. Windows Update and automatic reboots won't be welcome...
Multi-threading is in another dimension. It may or may not be present, wanted, or required, in a R-T app; although probably interrupt handlers are more likely than threads. The .NET ThreadPool (and the BackgroundWorkers that are based on it) behave pretty unpredictably time-wise, so they would not fit in a R-T app.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Hello,
I would use a ThreadPool like this :
public void TEST()
{
Object oMissing = System.Reflection.Missing.Value;
Object oTrue = true;
Object oFalse = false;
Microsoft.Office.Interop.Word.Application oWord = new Microsoft.Office.Interop.Word.Application();
Microsoft.Office.Interop.Word.Document oWordDoc = new Microsoft.Office.Interop.Word.Document();
oWord.Visible = true;
oWord.Visible = false;
Object oTemplatePath = @".\1.doc";
oWordDoc = oWord.Documents.Add(ref oTemplatePath, ref oMissing, ref oMissing, ref oMissing);
foreach (Microsoft.Office.Interop.Word.Range range in oWordDoc.Words)
{
if (range.Text.Trim().Contains("P"))
{
int pos = range.Text.Trim().IndexOf("P");
string str = range.Text.Trim().Replace("P", "");
range.Text = str;
}
}
Object oSaveAsFile = "./2.doc";
oWordDoc.SaveAs(ref oSaveAsFile, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing);
oWordDoc.Close(ref oFalse, ref oMissing, ref oMissing);
oWord.Quit(ref oMissing, ref oMissing, ref oMissing);
}
static void Main(string[] args)
{
Program test = new Program();
ThreadPool.QueueUserWorkItem(o => test.TEST());
}
Unfortunatly it don't work.
Thank you verry mutch.
|
|
|
|
|
What do you mean by the ThreadPool doesn't work? What, exactly, is going wrong - apart from the fact that your program will exit here before your application gets a chance to do the work in the ThreadPool?
If you are going to queue an item, you've got to give it a chance to complete before the program exits. Immediately after you call QueueUserWorkItem , your code exits. I would suspect that this is your problem.
|
|
|
|
|
Thank you verry mutch for your answer, the TEST method isn't executed, I do not get the document word.
I want to spend a block of code to run heavy, however the code does not return anything, thank you for your feedback on my big problem.
|
|
|
|
|
Teacher: Ok, class... For this quiz, you're going to go through this document and cross out all of the P's... Ready... set... GO! Time's up! Pencils down...
Class: But we haven't started yet...
Teacher: Pass your tests forward now!
|
|
|
|
|
Ian Shlasko wrote: encils down...
FTFY.
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.
|
|
|
|
|
Its not going to execute and its not expected to. As Pete indicated, your application exits BEFORE the Test method has a chance to run. You need to wait on your main thread for the worker threads to finish.
|
|
|
|
|
How i can wait the end of execution ?
|
|
|
|
|
As I said, when you run something in a background process, you need to wait for it to complete. A simplistic mechanism here would be to use a Monitor to wait for the document method to complete - although in this case, I have to question why it's a background task at all. Architecturally, you'd be better off having the task run on the main thread and then exit.
|
|
|
|
|
exactly, whene i put Thread.Sleep(10000); the TEST method was excuted, so i need to wait the time necessary for executin my method, it's possible?
|
|
|
|
|
Why don't you just call it without threadpool?
|
|
|
|
|
i would excute the TEST method 5X in the same time, how in can do this?
|
|
|
|
|