|
public enum UnitDefs
{
UNDEFINED = 0,
LENGTH, // 1
PRESS, // 2
DPRESS, // 3
MASS, // 4
VOLUME, // 5
TIMEUNIT, // 6
TEMPERATURE, // 7
DENSITY, // 8
MASSFLOW, // 9
VOLFLOW, // 10
EXPANFACT, // 11
VISCOSITY, // 12
HEATVALUE, // 13
ENGYFLWRATE, // 14
VELOCITY, // 15
GASISEEXP, // 16
MYBOOL, // 17
End
}
public enum SysUnits
{
USUNITS = 0, // 1
IPUNITS, // 2
METRICUNITS, // 3
SIUNITS, // 4
End
}
public enum Line
{
m = 0,
b,
End
}
// y = mx + b conversion format
// since C# does not allow for struct->struct->instance, we will have to create a single array
// first dim => current units, second dim => desired units, third dim m=0, b=1
// so instead of names, we are reduced to numbers
public class UnitConv
{
double[, ,] To = new double[(int)SysUnits.End.GetTypeCode(),
(int)SysUnits.End.GetTypeCode(),
(int)Line.End.GetTypeCode()];
}
UnitConv[] ConvFacts = new UnitConv[(int)UnitDefs.End.GetTypeCode()];
Is this the best way?!
This appears to be runtime based resolution, not compile time resolution.
Is there a compile time (c preprocessor) method.
I can use defines which may perform the same replacement operations.
Any ideas?
-- modified at 12:18 Thursday 11th October, 2007
|
|
|
|
|
HI,
I like to know if there is a warehourse that contains UI controls?
like the popup info from gmail notifayer or a better more advanced toolTip
etc..
if u can point me to a link...
THNKS
kobkob
|
|
|
|
|
There are two of them for free: Code Project and Google. Seriously, if you are looking for a specific type of UI control look for one on either of those two sites and you will probably find what you are looking for. Even if you don't find exactly what you need, you will get something that does almost everything and can then add/fix what it doesn't do.
|
|
|
|
|
Well - if you want to pay out good money, there's always ComponentSource[^].
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
would you please give some suggestions how to make a POS system. please just give me a hint what to do.
|
|
|
|
|
Name your threads something useful Download windows embedded 6.0, select your device type and get the .NET compact framework and go to town.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
Wow! Could your question be any more vague??
How about gather the customers requirements, come up with a design, write some code, test it, fix it, rinse and repeat.
|
|
|
|
|
Dave Kreskowiak wrote: Could your question be any more vague??
Yes, but only just. He was very close to a full vagueness factor...
By wording it as "would you please give some suggestions how to make a system. please just give me a hint what to do."
|
|
|
|
|
|
I think you'll have no trouble developing a Piece Of Sh** system all on your own.
|
|
|
|
|
I was just about to say that I see POS projects all the time. Beat me to it.
|
|
|
|
|
|
MasterSharp wrote: So much negativity...
Come on. Feel the love.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
POS means "Point of Sale" doesn't it?
So I guess what you are asking is for help in creating an electronic cashtill.
If this is the case I'd suggest you start off by designing a simple calculator and take it from there.
That is assuming I've understood what you mean by POS.
You always pass failure on the way to success.
|
|
|
|
|
I have been know to develop such systems :p
Actually, your best bet is to purchase Quick Books or some other cots and then use its extensibility model.
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|
|
I want to hide the + or - sign in the PropertyGrid. For instance, if there are 1 main root level and has 2 child roots levels I only want to display everything expanded but again without having the options to click to minimize or maximize.
MainFolder
|
|
|_____
|
|SubFolder1
|
|SubFolder2
Thanks
|
|
|
|
|
That's not something the PropertyGrid control allows you to suppress.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
In order to do this, you'd have to take over drawing the property grid yourself. It seems like a lot of effort for not really much gain.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi,
Today I opened the definition of Excel.ApplicationClass and I observed that it implements two interfaces called application and _application. Interface _application contains lot of members but interface application is empty and only implements interface _application. So the hierarchy is like this;
interface _application (interface with members in it)
interface application (empty interface) : _application
ApplicationClass (class) : _application, application
So the class ApplicationClass provides definitions to all members in topmost interface _application. My question is that why does this class need to implement the interface _application if it is already implemented by interface application?
Thanks in advance for all the answers by you.
Anil
|
|
|
|
|
A M SOMAN wrote: My question is that why does this class need to implement the interface _application if it is already implemented by interface application?
Good question. I would expect that the answer is because it's autogenerated so don't actually expect it to do anything clever there.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Assume I have class1.
class class1
{
public class1(class1 c1)
{
}
}
What this means ? Why a class needs another instance of the same class to be passed as parameter. I have seen this type of behavior in XmlSerializerNamespaces[^] class. It accepts XmlSerializerNamespaces object in the constructor ? Any idea ?
|
|
|
|
|
This is called a copy constructor[^]. It is used to create a copy of the given object. In .Net, the class should really implement ICloneable[^] though.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
That's new to me. Do you have any c# links explaining this ? Why we use this ? I found that it is making a copy of object, so how parameters are passed to constructor ?
|
|
|
|
|
The link I provided is for C++, but the same concept applies to C#.
Take care,
Tom
-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com
|
|
|
|
|
And yet is still isn't generic
Need a C# Consultant? I'm available.
Happiness in intelligent people is the rarest thing I know. -- Ernest Hemingway
|
|
|
|