|
i use to be a java , j2ee , csp , php programmer
currently start using c sharp
i know that asp is a server scripting language.
currently im building a standalone program
and i need to build a olap grid
c sharp datagridview bring a lot restriction
however html grid view give me the full functionality of it.
with asp integration my grid will be more interactive
somehow i find it a bit difficult to integrate that asp in the c sharp
without put it in iis server.
how can i solve it ?
if that is impossible ....or too hard since it is a sever scripting language
should wpf be the another solution for this?
|
|
|
|
|
1 - we have an ASP.NET forum
2 - ASP and ASP.NET are two different things
3 - No, you can't run ASP.NET without IIS, in the same way that you couldn't run PHP or J2EE without a web server, surely ? However, you must be very confused, b/c the C# grid is at least as powerful as the ASP.NET one. I'd say the problem is that you're looking at the wrong class.
WPF has next to no grid support, I am just struggling with that, myself.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
em... thanks for your guidance
your reply have been very helpful to me.
it would be great if scripting language can mix with standalone program.
so other code can combine to stronger combination since every language have their own weakness.
|
|
|
|
|
IN one project they used appsettings 4 Msn live search.In my project they asked to use MSN but it's settings
so how to define appidsearch in settings.They didn't use the add key
Thanks
|
|
|
|
|
mkalantri wrote: In my project they asked to use MSN but it's settings
Is ur question is complete?
Cheers!!
Brij
|
|
|
|
|
Dear all,
I had been using serial communication for my device to talk to the PC. But these days, I have decided to replace the serial com with usb and I have bought a serial to usb converter for that. But I don't actually know how to interface that converter with my C# code. Previously I worked with C# code for interfacing with HID class device, but the present device I am using seems not to be configured as HID. I tried with it's product and vendor ID to communicate with it from my previous hid software but failed.
Please provide me some suggestions regarding this. If you have any code samples or link, please share
with Thanks....
|
|
|
|
|
If your USB to serial converter is properly installed it will appear to your application as a serial port (that's exactly what it's for). You shouldn't need to change anything in your code except the COM port number.
A serial port is not an HID.
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Hi guys,
I am doing a per thread singleton, I want to know if the objects are the same or not by comparing the addresses of the references. How do I print the address of a reference?
Thank you in advance!
|
|
|
|
|
I'm not sure that you can, although C# does support pointers in general, you're better off making sure your objects have a unique Id you can compare.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I guess I'll just implement the GetHashCode method for my class. Thank you for your reply!
|
|
|
|
|
If you just want to check if two objects refer to same location in memory, then use the Object.Equals method.
C isn't that hard: void (*(*f[])())() defines f as an array of unspecified size, of pointers to functions that return pointers to functions that return void
"Always program as if the person who will be maintaining your program is a violent psychopath that knows where you live." - Martin Golding
|
|
|
|
|
Hi, thanks for your answer! I dun think I can use Object.Equals . Because I want to know the object deleted in the Uninitialize() is not the same; I do not have 2 objects to compare in the Uninitialize() , Uninitialize() can be called multiple times, each time for each thread for my per thread singleton. Your answer is useful to me in the future, anyway. Thanks again!
|
|
|
|
|
Wong Shao Voon wrote: I want to know if the objects are the same or not by comparing the addresses of the references.
if (object.ReferenceEquals(object1, object2)) ...
Wong Shao Voon wrote: How do I print the address of a reference?
You could get a pointer to the object, convert the pointer to an IntPtr, which you can convert to an Int64, and display the value. However, you either would have to keep the object pinned (which is bad for memory management), or continuously update the display to show any changes, as the garbage collector can move the object at any time.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks for reminding me that the addresses do change, due to GC.
|
|
|
|
|
How to create a jagged array of multiple data-type data?
Hallo everyone,
I need a little help in creating an array that holds this kind of data:
It should be a dynamic two dimensional array similar to a dataset in a database.
All rows of a column have the sama data type.
int | string | System.Drawing.Color | System.Drawing.Rectangle(=Struct) | 1 | "TEST1" | Color.Black | {,,,,} | 2 | "TEST2" | Color.Blue | {,,,,} | 3 | "TEST3" | Color.Green | {,,,,} | 4 | "TEST4" | Color.Red | {,,,,} |
With "dynamic" I mean that I don't need to specify the size of the array and that I can add as many rows as I like.
Even at creation time of the array I don't know how many rows it will get.
To realize this I'd like to use Lists.
I had something like this in my mind:
public object[] [] AxisLabelItems = new object[4] [] {<br />
new List<Int32>(), <br />
new List<String>(), <br />
new List<System.Drawing.Color>(),<br />
new List<System.Drawing.Rectangle>()};
but that doesn't work: "Implicit conversion from List to object not possible"
Any suggestions?
Thanks.
PS: Why are there all the new lines above the html-table? They belong to the table somehow..?? (If I mark these lines the fields of the table get marked too.)
I've just used:
<table border="1">
<tr>
<th> </th>
</tr>
<tr>
<td> </td>
</tr>
</table>
|
|
|
|
|
You seem to be half way there. Why not use lists of lists insead of arrays?
|
|
|
|
|
It looks like a list of structs to me, or maybe a list of some class. No arrays involved.
|
|
|
|
|
You are not thinking object oriented enough. You don't use a jagged array for something like that, you use a list of custom objects.
Create a class:
public class AxisLabel {
public int Id { get; private set; }
public string Name { get; private set; }
public Color Color { get; private set; }
public Rectangle Rectangle { get; private set; }
public AxisLabel(int id, string name, Color color, Rectangle rectangle) {
Id = id;
Name = name;
Color = color;
Rectangle = rectangle;
}
}
Create a list of objects:
List<AxisLabel> axisLabelItems = new List<AxisLabel>();
Add in item to the list:
axisLabelItems.Add(new AxisLabel(1, "TEST1", Color.Black, new Rectangle(1,2,3,4)));
LightIceStorm wrote: Why are there all the new lines above the html-table?
Because you have <br /> tags between the rows and cells in the table. As they don't belong there, they are displayed outside the table, in this case the browser chose to display them before the table.
[Edit]
Corrected some encoding in the code.
Despite everything, the person most likely to be fooling you next is yourself.
modified on Monday, December 15, 2008 6:06 PM
|
|
|
|
|
Guffa wrote: public int Id { get; private set; }
Cool externally read only properties - learn something every day. Thanks
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hallo Guffa,
thank you for your reply.
Unfortunately there is a little problem with:
Guffa wrote: List axisLabelItems = new List();
I get following error for the "new List" (translated):
"The use of type "System.Collections.Generic.List<t>" (generic) makes the 1-type-argument necessary."
Any ideas?
By the way: To prevent the creation of the <br /> tags, I have to use just 1 line for the whole HTML section, because every \r\n in the textbox gets converted to the <br /> tag.
|
|
|
|
|
LightIceStorm wrote: Unfortunately there is a little problem with:
Guffa wrote:
List axisLabelItems = new List();
That's because of the backwards way that this forum handles html in the messages. Instead of encoding everything except the few html tags that makes sense to use, it allows any html code and tries to remove the most dangerous code...
I just forgot to encode some code. This is how it should look:
List<AxisLabel> axisLabelItems = new List<AxisLabel>();
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hello,
Actually I'm not sure if a Picture Box is the right control for my need, but I'm just guessing it is. I'm new to C#, so haven't got much of an idea. I'm using MS Visual C# 2005.
Here is my problem.
I read data from a file which contains text lines seperated by a return. Then according to the data lines, I need a verticle bar (deciding what this control is upto me, and I'm guessing it is a Picture Box) be filled with different colors.
For example let's say this is the text file.
A
B
C
A
Then, in the C# Form, on whatever that control I need four color lines be displayed according to the text. So, if we assign colors as follows:
A - Red
B - Yellow
C - Green
Then the color lines should be displayed like
Red
Yellow
Green
Red
I think you get the drift.
Please note that there could be any number of text lines in the text file, but the control height I use need to be remained the same. So, according to the number of lines in the text file, height of each color strip in the control should differ.
Please help me with this.
Thanks in advance.
|
|
|
|
|
The big issue that many people have is that they mistake the picture box for a lot of things that it isn't. Your best bet for what you want, is to draw the image yourself in your paint handler, then draw your lines, etc.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Thanks for the reply mate.
Could you please show me how?
|
|
|
|
|
Just to give you an idea, you can create a custom control inherited from System.Windows.Forms.Control and hook to its Paint event, like this:
this.Paint += new PaintEventHandler(CustomComponent_Paint);
Then, draw your stuff in your PaintEventHandler:
void CustomComponent_Paint(object sender, PaintEventArgs e) {
Brush brush = new SolidBrush(Color.Red);
Pen pen = new Pen(brush);
Rectangle rect = new Rectangle(0,0,100,100);
e.Graphics.FillRectangle(brush, rect);
}
You can get the colors you need and create different color brushes for any of you cases
Regards,
Lev
|
|
|
|