|
Afternoon All,
This has maybe been asked a million times so apologies in advance.
Does anyone have a tried and tested way of converting a decimal to a fraction (including negative decimals) or better still can you point me in the direction of an article explaining how to do this? I have tried google but can find nothing on C#. I did convert a program written in VB, but only to find that the logic therein was wrong.
Really appreciate any help
Thanks in advance
Colin
|
|
|
|
|
Just search cp for fraction class ![Smile | :)](https://www.codeproject.com/script/Forums/Images/smiley_smile.gif)
|
|
|
|
|
Thats excellent. Just what I was looking for. I had come across another one in CP but not this one.
Many thanks
Colin
|
|
|
|
|
There are a few, mine and others (which were of assistance to me). Which did you find easiest or most helpful?
|
|
|
|
|
Hi
I went with the one supplied by Giorgi and although I am making headway. it is a bot complicated for one of limited experience. Do you have something else?
Many tahnks
Colin
|
|
|
|
|
|
I'm creating WinForms ERP application.
This application need to run custom scripts in may places like:
retrieving list of invoices
before adding invoice
before saving invoice
after saving invoice
before posting invoice
after posing etc.
etc.
I'm looking for script engine which simplifies this.
Features I need to embed into application are:
1. Syntax coloring script editor
2. Syntax check on script save
3. Executing scripts with error reporting
4. Passsing parameters to/from scripts
5. Allowing scripts to access application objects.
6. Maybe binding scripts to Winforms control events.
Any framework, idea, or sample code how to implement this ?
Andrus
|
|
|
|
|
You can use the Microsoft Scripting engines. I don't know if any licensing is involved.
led mike
|
|
|
|
|
I'm implementing entity object which should populate its properties from
database when property is first referenced.
In RDL reports I use object properties like
MyObject.MyProperty
MyObject is instance of entity class. There is no MyProperty property in MyObject at design time.
I need to catch missing object reference and provide object value at run time. Something line
public class MyEntity {
override Exception Exception.MissingPropertyGetException {
return dbo.ExecuteScalar("SELECT "+Exception.UnreferencedPropertyName+
" FROM myEntity");
}
}
Any idea how to implement this ?
Andrus
|
|
|
|
|
I don't know if properties can be added at run time.
What I would do is have a dictionary (e.g. System.Collections.Generic.Dictionary<string,object>) for various values the object may hold.
You can then have a property that exposes the dictionary and access the values like
myobj.Properties [ "SomeProperty" ]
|
|
|
|
|
There are so many different ways of adding help and documentation to an application that I am confused and don't know where to start.
Have you got experience with adding help that you would like to share? I'd be interested in hearing about approaches that create the help directly in the source code as well as 3rd party applications that claim to make writing help and documentation easier.
Here is what I'm trying to achieve:
1) Help for the user directly within the application.
2) Have the possibility of adding web-based help for things like 'How to ...' that can be added after an application has been released.
3) Write a manual for the end user.
I'm particularly keen on keeping the effort for writing this documentation as small as possible, i.e. I don't want to write the same thing two or three times.
Any feedback is appreciated.
|
|
|
|
|
|
Thanks for that, though I am looking for documentation for the end user of the software, not for the software developer.
This documentation or manual should include images, cross references, etc.
|
|
|
|
|
how can i use the code for vc++ .NET in c# .NET????
|
|
|
|
|
what do you mean?
rather have something you don't need, than need something you don't have
|
|
|
|
|
i mean that i have some vc++ classes and header files but i m not comfortable in working in VC++ so i want to work in C# using those VC++ files. my question was can i use those files in C# (mainting the original format of the VC++)
thnx
|
|
|
|
|
it is possible. the next question is, is it managed c++ or unmanaged c++
as i have it, the easiest way to see that is that managed c++ has a 'ref' somewhere before class names. and unmanaged doesn't.
rather have something you don't need, than need something you don't have
|
|
|
|
|
i m using vc++ 6 MFC i just want to import some special classes in C#.NET 2.0
thnx for ur support
|
|
|
|
|
|
Hi all,
I have got 3 dropdownlist, one would be interrelated with other.
On a particular selection of the 1st dropdownlist, the 2nd and 3rd dropdown list should be enabled, if not only the 2nd dropdown list must be enabled.
In the selected index change of my dropdownlist 2, my 3rd one is getting disabled, even though on particular selection of my 1st dropdownlist is enabling both(which shouldn't happen).
I'm using Page.RegisterStartup script for enabling / disabling the items. The below code is written in the selected index change of 2nd dropdownlist(without the bold text, my 3rd dropdownlist is always disabled", though my 1st dropdownlist is enabling it.)
string focusScriptSetVal = "<script language='javascript'>" + " document.getElementById('" + 1stdrpdwnlist+ "').disabled=false;document.getElementById('" + 2nddrpdwnlist.UniqueID +"').disabled=false;document.getElementById('" + 3rddrpdwnlist+"').disabled=false;;</script>";
Page.RegisterStartupScript("focusScriptSetVal", focusScriptSetVal);
Knowledge grows when shared
|
|
|
|
|
me2crazy wrote: document.getElementById('" + 1stdrpdwnlist+ "').disabled=false
Shouldn't that be 1stdrpdwnlist.ClientID ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Thanks Christian Graus, the 1st dropdownlist works fine, the problem is with the 3rd dropdown list.
Knowledge grows when shared
|
|
|
|
|
hi,
I want to see a form from another form.
I have the code:
System.Windows.Forms.Form fact1= new Form();<br />
fact1.ShowDialog();
I see the form but I can't see the controls.
My form shows empty but I have controls on it.
Please help.
Thanks
|
|
|
|
|
WhiteGirl23 wrote: My form shows empty but I have controls on it.
No, it doesn't. You are creating an instance of the base Form class, not your derived class, called Form1, or whatever. This base form has no controls on it.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
CAn I design my forms in c# in dreamweaver or any other software?????
|
|
|
|