|
regexValidator it is... many thanks Boss.....
|
|
|
|
|
I use CR 8.5, for the reports from my C#.NET - windows forms. I use "AxCrystal.AxCrystalReport" component for reporting, whats the way to send the report directly to printer??
"He that is good with a hammer tends to think everything is a nail." - Abraham Maslow
|
|
|
|
|
I am having some problems understanding how to wirte a c program could someone please help me.
Write a C program that displays a title, "Currency Conversion," and then write the names of five currencies and their equivalents to the US dollar. The conversions are hard coded equations. Insert comments in the program to document the program internally.
Design document: This includes a design flowchart, problem statement, list of all acceptable inputs (and their data types), and a list of all expected outputs (and their data types).
Source code: This is the complete source code listing of your program.
Version Control Sheet: This sheet keeps a maintenance log for the
program. It documents the author name, modification date, description of changes, and files changed. You will update this document while you are working on each programming assignment.
Tom J.
|
|
|
|
|
trjskid wrote:
am having some problems understanding how to wirte a c program could someone please help me.
C or C# ? You're in the C# forum
trjskid wrote:
Write a C program that displays a title, "Currency Conversion," and then write the names of five currencies and their equivalents to the US dollar. The conversions are hard coded equations. Insert comments in the program to document the program internally.
Ahh... this is HOMEWORK. Welcome to the real world, kid. This is where you do your own work and only ask questions when you're stuck. If that's too hard for you, cut out the middle man and apply for a job at McDonalds today.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Christian Graus wrote:
Ahh... this is HOMEWORK. Welcome to the real world, kid. This is where you do your own work and only ask questions when you're stuck. If that's too hard for you, cut out the middle man and apply for a job at McDonalds today.
brilliant
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Who is Jewish, the Trivia Game!
Judah Himango
|
|
|
|
|
Okay, I've done the hard part, envisioning and implementing this revolutionary new currency converting technology. I leave it to you to provide the documentation, flowcharts, graphs, PowerPoint slides and theses. I only ask that you mention my name in your acceptance speech for the Nobel Prize in Software (yes, I know there is no such thing now, but surely there will be after this):
class HighTechCurrencyConversionTechnology
{
public static void Main()
{
System.Console.WriteLine( "Currency Conversion" + System.Environment.NewLine +
"-------------------" + System.Environment.NewLine +
"$1 is 110.9900 Yen, 0.8192 Euro, $1.1995" +
" Canadian, 0.5579 UK Pounds, $1.3363 Australian.");
}
}
Matt Gerrans
|
|
|
|
|
If you're attempting to learn programming, you may wish to visit MSDN at Microsoft http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbref/html/vboriVBVCSharpSamples.asp?frame=true[^]. They have quite a lot of free downloads and samples on everything from 'How to declare an object variable and assign an object to it' all the way to full-blown sample applications. As much as I hate research, there's a lot of samples out there you can look at to get the feel for some basic tasks.
Based on your assignment, you may also want to do a little research on standard coding practices - like "best practices" on how to comment, how to name your variables (check out "hungarian notation" versus "camel casing") etc. If you're really into it, try to come up with at least 3 ways to do the same thing.
These tasks in your assignment are honestly useful. In pretty much any company where you are a programmer, you will have to do flowcharts, problem statements, user requirements, use cases, and test cases to some extent, and you will have to do at least some form of documentation, anywhere from commenting your own code well, to writing technical documents on your code.
Good luck, hope you like programming.
-- modified at 21:57 Wednesday 31st August, 2005
|
|
|
|
|
I'm toying with the idea of making an online card game using .NET remoting. Clients should only be able to control their player object and their own deck of cards, but other clients should have access to their events and the "back" of their decks (probably just a count of cards in the hand).
Is there a way to maybe intercept calls on the host and throw an exception if an object is marked with, say, a PlayerOnly attribute? One thing I'm having trouble understanding is how to identify the caller of a remote object.
Thanks in advance.
|
|
|
|
|
Just make all remote method calls contain the ID of the user who initiated the call. That way, you can do your restrictions on the host without any wild remoting hacks.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Who is Jewish, the Trivia Game!
Judah Himango
|
|
|
|
|
Yeah, that's my last resort solution... I wonder if there's a more elegant way to do it with Remoting though?
|
|
|
|
|
When the connection is made, you should be able to get the endpoint of the player connecting, and associate that with a player's name in a hashtable, or something similar, but I'd hardly call that elegant.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Who is Jewish, the Trivia Game!
Judah Himango
|
|
|
|
|
hi
How can I add webusercontrol in project class library
-- modified at 15:59 Tuesday 30th August, 2005
|
|
|
|
|
|
Thanks Alomgir
I don't want add usercontrol in a windows form , i want add usercontrol in a class library
|
|
|
|
|
This applies to classs library as well.
|
|
|
|
|
I have a Windows Form that creates an instance of a class of my own, and within that object I need to call a function that is part of the Windows Form. The problem is I don't know how to give my class a reference to my Windows Form. If this was C++ I'd just pass a pointer through the constructor... but this isn't C++... Anyone know the proper way to get a reference to a parent object so its methods can be called?
Bungo!
|
|
|
|
|
You can always pass the reference to the parent object and call methods of it. The reference is just like pointers in c++.
Live Life King Size
Alomgir Miah
|
|
|
|
|
You could just pass the form to the class during instantiation using 'this' keyword. For example, assume your form is called MyForm and has a function called MyFormFunction that you want to call from MyClass:
during instantiation in MyForm:
MyClass newClass = new MyClass(this);
in MyClass:
private MyForm _externalForm; //declare as class level private variable
//ctor
public MyClass(MyForm passedFormReference)
{
_externalForm = passedFormReference;
}
public MyFormFunction()
{
_externalForm.MyFormFunction();
}
Hope this helps,
Regards,
-----
Josh Lindenmuth
jlindenmuth at paycepayroll dot com
Payce Payroll - Smart for Business
|
|
|
|
|
I am designing a function that requires an asynchronous call to be made to a remote device and the reception of some data from that device. Once the data is acquired the function can return its result.
Currently the function initiates the call and terminates, waiting for a communications event to signal that the data has been received.
How do I make the function wait until the event returns the value (or times out at which time I return an error) before it terminates and returns its value?
Thanks
Chris
|
|
|
|
|
if i understood you correctly you want the caller of the function wait untile its recive the signal or timeout
if this is correct So
The IAsyncResult interface returned from BeginInvoke ( ) has the AsyncWaitHandle property which have some overloaded WaitOne method
One of the take Timespan parameter you can use it to pass
Timeout value
IAsyncResult asyncResult = yourDelegate.BeginInvoke(param1,param2,null,null);
asyncResult.AsyncWaitHandle.WaitOne(timeoutValue,false);
int result;
result = yourDelegate.EndInvoke(asyncResult);
WaitHandle.WaitOne Method[^]
MCAD
-- modified at 19:36 Monday 29th August, 2005
|
|
|
|
|
Thanks for your response....Just so that you understand this fully:
My function has a method that just opens the comms port and dials out the number of the remote device. At that point exeution of the method terminates. At the same time in the function's class constructor I subscribe to the OnComm event (which fires whenever communications events happen, such as when receiving data). When I receive data, I parse it in the event handler of the OnComm event and if valid I fire an event with the data as its argument.
What I am looking to do is have the original method initiating the call wait until this valid data event is fired, or a timeout occurs. Once either of these happens I would like the function to return the data or an error code accordingly.
Thanks
Chris
|
|
|
|
|
Just adding to the previous response
//Client Code
AsyncCallback callback = new AsyncCallback(MyCallback);
MyBeginMethod(param1, param2,..., callback, null);
private void MyCallback(IAsyncResult result)
{
MyRetType obj = EndMyMethod(result);
//Some stuff
}
//Server Code
public MyRetType MyMethod(string param1, string param2, ... )
{
//your logic
}
public IAsyncResult BeginMyMethod(string param1, string param2, ..., AsyncCallback ac, Object state)
{
MyDelegate d = new MyDelegateMyMethod);
IAsyncResult result = d.BeginInvoke(string param1, string param2, ..., ac, null);
return result;
}
public static MyRetType EndMyMethod(IAsyncResult result)
{
MyDelegate d = (MyDelegate)((AsyncResult)result).AsyncDelegate;
return d.EndInvoke(result);
}
Live Life King Size
Alomgir Miah
|
|
|
|
|
I am working on the extraction of the frames from the AVI Movie.As i want to grab each and every frame from the AVI movie and perform some processing on them.I have done it in Visual C++ using AVI Library there.But i can't find the same library there.So i want to know how it can be done.Moreover the library(if any) in C# which will be used to handle AVI can be used to handle MP3 format.
|
|
|
|
|
|
Hello
You can try to interop Video for Windows for this task. Look at my "Motion detection algorithms" for sample. Or you can try to work with DirectShow (which is able to play MP3s too). A small sample for the second approach you can find in that article too or other article here on CP.
With best regards,
Andrew
|
|
|
|