|
If I understand your question correctly, I believe what you are trying to accomplish is something like:
-Pull data down from the database
-Make local changes to the data
-Update again from the database***
-Push your changes up to the server
And the problem you are having is merging the datasets together.
If this is what you are trying to do there are two routes of action I would consider:
1- is there any way around this, so you could avoid the problem completely? I suggest you take a step back, look through your code, and see if there is a different design strategy you could follow. If you could somehow remove the step where you update from that database again, the problem would probably be straight forward.
2- if you really do need to do something like this, I suggest checking out the Microsoft Sync Framework. It is designed to sync between multiple data connections, and in addition to making the updating easy, if conflicts happen it will detect those too. Take Data Offline Using Microsoft Synchronization Services for ADO.NET[^] that is a link that looks like a pretty good introduction to Harmonica. I honestly haven't read the entire article, but it looks like a good starting ground.
Let me know if I misunderstood your question.
-Ken
|
|
|
|
|
Dear All,
Iam implementing a project through which i want to convert the entered text through UI into desired Handwriting Pattern
iam using Tablet Pc Pen As an input device to capture my handwriting (iam using Microsoft.ink as namspace )what i have done till now is that , after using ink pen of tablet pc , i have written something on the Ink control of .net and store the image as GIF format
now i want my PC to learn my handwriting pattern , tell me how i can acieve using .net(csharp/vb.net) ,so that when i enter any text through UI it can convert it into my handwiriting sample
please also tell me how i will capture the Information , about the Pressure, strokes, trasparency etc of the pen tip
I need your help
please suggest some sample code for me
|
|
|
|
|
Hi,
The idea you have is pretty cool, however it would be a lot of work if you want to do it correctly. The problem with handwriting is that no 2 characters are usually the same, it usually depends on the letter before, the position in the line you are trying to write the length of the word you write (long words require you to move your hand while writing causing the letters to be written differently), the speed at which you are writing (scratching something down or writing a proper letter), the texture of the paper and finally the type of pen used. Although the ligature functions on the opentype font specification would allow you to do some of these things, it would be a heck of a lot of work.
The easy way out is to just create a Bitmap font[^] of your handwriting, the result would not be stunning but its the easiest way to go if you don't want to spend a lot of time on it
|
|
|
|
|
Yeah, what he said. Take a look at this[^].
|
|
|
|
|
I am not understand the session state or view state from ASP.net web form. please!
|
|
|
|
|
Possibly, posting this under the Asp.Net forum icght be a better idea than the C#?
Oh, you did allready.
Carpet bombing forums does not help - it just annoys people.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Ok, well first off, I just wanna let everyone know I have very little experience in C# so please be patient with me. (I'm working in Microsoft Visual C# 2008 btw) I have a fairly simple project I'm working on and I need a lot of help. I really hate asking people for help, but this is driving me crazy. Now to the project. Let's say I have a directory "C:/textures/" and inside are lots of pairs of files, a texture file, and a jpg of the texture. I'm trying to make a program that has a picture box with up and down arrow buttons that will cycle through all the pictures in that directory, and when a third button is pressed, it will copy the current picture's corresponding texture file to a very specific directory on an SD card and rename it based on the name (and overwrite any files of the same new name there). Here's an example of the files:
dogtexture.tex
dogtexture.jpg
cattexture.tex
cattexture.jpg
copy dogtexture.tex to SD/textures/dog/dog01.tex
or
copy cattexture.tex to SD/textures/cat/cat01.tex
Any help would be greatly appreciated
|
|
|
|
|
Have a look at this[^] for getting the file locations in a string array which is easy to browse through.
Then use this[^] to copy the selected file.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
Thanks for the quick reply, but like I said, I know next to nothing about programming in C#. I noticed that second function can't overwrite files, so I suppose I'd have to call another to delete any first... But a basic source would be extremely helpful for anyone who has the time
|
|
|
|
|
Have a look at this tutorial[^], all you need is 3 buttons and a PictureBox.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
I understand completely how to add buttons and generally how to use the picturebox, but I'm not at all familiar with calling functions and the basic structure of C#. I guess my main problem right now is figuring out how to make the picturebox cycle through all the pictures in a folder when a button is pressed...
|
|
|
|
|
Ok, I came up with the exact steps. It really shouldn't be that hard. It would be extremely helpful if someone would convert this to a source, but any help with specific parts would be helpful too.
Picture folder is working directory + /Textures/
PictureBox displays a picture from the Picture folder
The Down and Up buttons make the picturebox cycle forwards and backwards through the pictures
The export button returns the current picturebox picture, finds the .tex file with the same name, exports it to a specific directory on the SD card in a folder based on the first 2 digits in the name and renames the file to *00.tex
For an example, in the working directory there is a folder called Textures. The program looks in Textures for any .jpg file and opens it, we'll say it's 02cattexture.jpg. The user doesn't like it so he presses the down button and the program finds the next picture in the folder; it happens to be 01dogtexture.jpg. The user likes the texture and clicks export. The program then looks at the picture and finds the .tex extension equivalent in the same folder. Because the filename has 01 on the front, the program will copy (not move!) it to SD:/textures/dogtex/ and will rename it to dog00.tex. if the filename started with 02, it would copy it to SD:/textures/cattex/ and rename it cat00.tex. Oh, and if there's already a file with that name on the SD card, it overwrite it.
|
|
|
|
|
Not to be funny but it sounds to me like you have no clue of how to program. You have the basic idea of what you want to do but don't know how to write the code. Maybe a good Book for C# beginners??
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
You almost got it I'm extremely well versed in gml, and I'm learning quite a bit about linux shell script and little python, but like I said, other than making hello world and a half functional calculator, I'm just about completely lost in C#. I can't stay focused on reading my C# book, and I learn by doing and seeing. Unfortunately, I do not see any examples that will help me, and I've tried so many times and have gotten so many errors during compiling, that I gave up trying. I figured you guys could probably write up my answer in five minutes or at least point me in the right direction, so I came here. Like I said, any help is greatly appreciated, but if no one can (or is willing) to help, then I'll be on my way.
|
|
|
|
|
After a simple Google search you will find this[^].
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
Wow, I googled for quite a while and never saw this. Might I ask what exactly you googled? Anyhow, this will be a big help, thanks
|
|
|
|
|
'c# image slideshow application' and it was the second result.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
Ahh, didn't think of searching slideshow, but that actually works better
|
|
|
|
|
I think the "motto" of the site is show what you have done and where your problem is and the guys will help. There are a few sites with Video Tuts if that would help. Check this site. Development for Beginners[^]
Excellence is doing ordinary things extraordinarily well.
|
|
|
|
|
Hi people,
I want to have a print button in my GUI to print the contents of a panel (control drawn using Graphics class) perhaps to take a screenshot of the panel and print it out as an image.
Does anyone have any idea how I can do this?
Cheers
|
|
|
|
|
0) Don't cross post when your message is not imediatley reposponded to, your going to annoy people that way and they may not be too kind or they just may ignore it. It is considered rude. Have some patience.
1) Google[^]
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
Sorry !! I didnt know it has been posted twice. the first time I posted it didnt appear on the forum board and gave me a message saying the website is installing some updates.
|
|
|
|
|
Apologies, I didn't know the site was down.
My failometer is detecting vast quantities of FAIL!
"Its SQL - hardly programming..." (Caslen)
|
|
|
|
|
I was working on some image filtering when I saw a problem in my output. After a little while I noticed two possible problems with the code after fixing one of them the output was, strangely enough, correct.
Here's a part of the code:
public struct Pixel
{
public byte r;
public byte g;
public byte b;
public static bool operator >(Pixel p1,Pixel p2)
{
return p1.r + p1.g + p1.b > p2.r + p2.g + p2.b;
}
}
Now my thought here was that since the r,g and b values are bytes, adding them could cause an overflow of the byte. For example: 128,128,128 would add up to 128 and would cause 64+64+64 to be greater then the second example since it adds up to 192 (192>128). However this does not seem to be the case, 128,128,128 seems to add up to 384 which would be impossible with a byte, so is the + operator actually changing my byte to a (u)long, (u)int or (u)short internally. Has anyone found any documentation on this issue, and can I expect this to work on any implementation of c#?
|
|
|
|
|
Hi,
expressions involving 8-bit or 16-bit integer variables (such as the bytes in a pixel) get computed using 32-bit integers, so there is an automatic promotion from byte to int, and the sum is an int. In your case, overflow is not possible.
BTW: this is not only true for C#, it holds true for all C-like languages such as C, C++, Java
Luc Pattyn [Forum Guidelines] [My Articles]
The quality and detail of your question reflects on the effectiveness of the help you are likely to get.
Show formatted code inside PRE tags, and give clear symptoms when describing a problem.
|
|
|
|