|
Sorry, I thought it was a local device.
Try to use the :
[^] or Wireshark in order to see if the traffic comes in on both side.
|
|
|
|
|
Hi All,
I have a DataList that is populated from a database table. The data shows in the dataList with no issues. The problem is when I link the dit button for a particular row of data the whole dataList disapears from the screen. It returns when I click on another button with the row in edit mode.
Here is the code behind the edit button:
protected void DataList_EditCommand(Object sender, DataListCommandEventArgs e)
{
DataList1.EditItemIndex = e.Item.ItemIndex;
DataList1.DataSource = DataView1;
DataList1.DataBind();
}
Does anyone know of any reason this would be occuring?
Thanks,
Mel
|
|
|
|
|
Hi,
I develop a csharp smart device project using Visual Studio2008.I wanna load my data from my database .sdf in a DataGrid View.I add the tool from the Toolbox and in the its proprities,I add the datatable to the DataRessource field.When running,an sqlceexception appereas telling me that:
The column name is not valid. [ Node name (if any) = ,Column name = Effectué/Non ]
and it goes to this ligne of my code
int returnValue = this.Adapter.Fill(dataTable);
What is the problem?
Thank u for u suggestions
|
|
|
|
|
Based on the error message I would say that the slah "/" in the column name is responsable for the error.
Without any further details this is the best I can do.
|
|
|
|
|
Hi,
My issue stills the same.My form's code is:
using System;
using System.Linq;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace ModeDifféré
{
public partial class DataGridT : Form
{
public DataGridT()
{
InitializeComponent();
}
private void DataGridT_Load(object sender, EventArgs e)
{
this.travauxTableAdapter.Fill(this.baseGmaoLocaleDataSet2.Travaux);
}
private void dataGrid1_CurrentCellChanged(object sender, EventArgs e)
{
}
}
}
What can I add to let the system shows the data stocked in the table Travaux??
Regards
|
|
|
|
|
a,c are streams. b is an array. I am performing this
<br />
while(some condition)<br />
{<br />
a.read(b);
c.write(b);
}<br />
In order to improve performance, I want to do the read and write simultaneously. Something like this crossed my mind
<br />
a.read(b1)<br />
a.read(b2) Parallel c.write(b1)<br />
a.read(b1) Parallel c.write(b2)<br />
a.read(b2) Parallel c.write(b1)<br />
and so on...
I cannot implement this in a simple loop because of
Some obvious coditions
1) a cannot write into bx till bx has been read by c
2) c cannot read from bx till bx has been written to by a.
Can I get some idea how this can be implemented ?
|
|
|
|
|
Hi,
you could create two threads, one looping the reads, the other the writes; then the arrays need to be handed over from one thread to the other, an easy way to do so is with a Queue. If you need lots of arrays and they all are same size, same type, you could skip creating and garbage collecting them by creating a pool of arrays, holding them in an "empty queue", so the reader would get one from there, fill it, pass it thru the other queue; and the writer would get a filled array, write it out, and stuff the array in the "empty queue" again.
[ADDED]
Forgot to mention the obvious: you need some synchronization mechanism for this to work properly; have a look at the lock statement.
[/ADDED]
|
|
|
|
|
Good Morning,
I work with Visual Studio2008.I create a listview.When running,the items appear in the same ligne and very near to each other.How can arrange their disposition to see them everyone in a ligne? I do that but change nothing in my disposition using the link below:http://msdn.microsoft.com/en-us/library/ms229643.aspx[^]
I wanna informe u that I work with Csharp smart device
Thanks Smile Cry
modified on Thursday, April 22, 2010 11:28 AM
|
|
|
|
|
|
Hmm cant find my error here.
I have the following code
private static Image ImagesToTiff(Image[] pages)
{
try
{
EncoderParameters ep = new EncoderParameters(2);
ep.Param[0] = new EncoderParameter(Encoder.SaveFlag, (long)EncoderValue.MultiFrame);
ep.Param[1] = new EncoderParameter(Encoder.ColorDepth, (long)ColorDepth.Depth32Bit);
MemoryStream ms = new MemoryStream();
Bitmap Tiff = new Bitmap(pages[0]);
Tiff.Save(ms, GetEncoder(ImageFormat.Tiff), ep);
ep.Param[0] = new EncoderParameter(Encoder.SaveFlag, (long)EncoderValue.FrameDimensionPage);
for (int i = 1; i < pages.Length; i++)
{
Tiff.SaveAdd(pages[i], ep);
if (i == pages.Length - 1)
{
EncoderParameters epx = new EncoderParameters(2);
epx.Param[0] = new EncoderParameter(Encoder.SaveFlag, (long)EncoderValue.Flush);
epx.Param[1] = new EncoderParameter(Encoder.SaveFlag, (long)EncoderValue.LastFrame);
Tiff.SaveAdd(epx);
}
}
return Image.FromStream(ms);
}
catch (Exception)
{
throw;
}
}
public static void DemoTheCode()
{
Bitmap b = new Bitmap(100,100);
Bitmap[] imgs = new Bitmap[2];
Graphics g = Graphics.FromImage(b);
g.FillRectangle(Brushes.Red,0,0,100,100);
g.Save();
imgs[0] = b;
g.FillRectangle(Brushes.Blue,0,0,100,100);
g.Save();
imgs[1] = b;
Image MyTiffOfTwoPages = ImagesToTiff(imgs);
int Pages = MyTiffOfTwoPages.GetFrameCount(FrameDimension.Page);
MyTiffOfTwoPages.Save(@"C:\Demo.Tiff", ImageFormat.Tiff);
}
Please look at the 2 last lines of code to see what i mean...
Does anyone know why ? am i missing somwthing here ?
With great code, comes great complexity, so keep it simple stupid...
|
|
|
|
|
I cannot identify the specific problem but you might try looking at Save images into a multi-page TIFF file or add images to an existing TIFF file[^] here on CodeProject. There are several other articles here, this is just the first that I found.
Good luck!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
Thanks for the reply Henry.
Before posting this, I did find all Tiff related article on CP (I hate it to, when people dont do the research themselfs ), but none, did what I did.
I have no problem with the code, if I write the images directly to a file, and dont use the MemoryStream, but in my case i have to make the image in memory, as it will be put into an SQL server as blob data. and later on it will have to be saved to another filesystem.
But ill be searching on. again thx for the reply
With great code, comes great complexity, so keep it simple stupid...
|
|
|
|
|
Hello,
I have window application in windows7. It updates datagrids from sql DB.
In windows XP it works fine .
In windows7- there are computers it works fine and there are computers the application itself loads but it can't connect to the sql server (and update the datagrids). I have .net framework installed on both computer.
What can be the problem?
|
|
|
|
|
Where is the SQL server you are trying to connect to? In same network or any other?
|
|
|
|
|
If the app loads then I would say it isn't a problem with the app, Windows7 or the .net framework. I seems more likely that the issue is with the machine being able to connect to the database. Check for connectivity issues. If you're using integrated security and using the windows login account perhaps these people don't have the proper rights.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
You should post your code or the error generated so we can know what we're dealing with
|
|
|
|
|
I am using server username and password (not windows).
The server is located on the same network that the computer.
The problem is that on some windows7 computer all works fine and on some other it cann't connect to DB. I am not using windows credentials to connect to the DB but the server credentials.
|
|
|
|
|
You'll have to check the connectivity on the machine that don't work. Perhaps it a firewall issue that is preventing connecting to the database server
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
One, you responded to the wrong post
Two, the code is irrelevant
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Hi
Im having a problem getting the code below to work.
compressorHnd = Avi.ICOpen(Avi.FOURCC.ICTYPE_VIDEO, Avi.FOURCC.DIVX, Avi.ICMODE.ICMODE_COMPRESS);
pCV = new Avi.COMPVARS();
pCV.cbSize = Marshal.SizeOf(pCV);
pCV.hic = compressorHnd;
pCV.dwFlags = 1;
pCV.fccHandler = Avi.FOURCC.DIVX;
pCV.fccType = Avi.FOURCC.ICTYPE_VIDEO;
outbi = new Avi.BITMAPINFOHEADER();
outbi.biSize = Marshal.SizeOf(outbi);
outbi.biWidth = 640;
outbi.biHeight = 480;
outbi.biPlanes = 1;
outbi.biBitCount = 24;
outbi.biCompression = 0;
Avi.ICSeqCompressFrameStart(pCV, ref outbi);
bool key = false; long size = 0;
IntPtr r = (IntPtr)Avi.ICSeqCompressFrame(pCV, 0, image.ToArray(), ref key, ref size);
The code causes an "System.AccessViolationException: Attempted to read or write protected memory" exception on the last line.
ICSeqCompressFrame is imported using the code,
[DllImport("MSVFW32.dll")]
public static extern int ICSeqCompressFrame(
COMPVARS pc,
int uiFlags,
byte[] lpBits,
ref bool pfKey,
ref long plSize
);
Can anyone help me out?
|
|
|
|
|
Hi,
AFAIK you can't pass arrays like that, you need to offer some help. Here[^] is a little article explaining some ways that do work.
|
|
|
|
|
|
Hello,
is there any thumbnail control that supports the sorting of thumbnail images by drag & drop?
The reason is that I need a thumbnail control that displays images (similar as e. g. Adobe reader displays the pages on the left side (screenshot), but the user should be able to sort these images by drag & drop.
Thanks in advance for any tips
Andreas
|
|
|
|
|
ab-tools wrote: is there any thumbnail control that supports the sorting of thumbnail images by drag & drop?
Yes and no. It's not a "thumbnail"-control, but the standard PictureBox does provide all the functionality you're after;
- Set the size and width of the desired thumbnail-image
- Set the SizeMode[^] to
StretchImage - Support for Drag and Drop[^]
--edit;
Sounds logical to have multiple of those in a Panel
I are Troll
|
|
|
|
|
Hello Eddy,
first thank you for your fast answer.
Yes, I already thought about doing that with PictureBoxes.
But it's not just the drag & drop of the PictureBoxes themselves, but also an additional label (e. g. for a file name or a page number) for each PictureBox and, of course, it also should look good: so the user can see which PictureBox is selected at the moment and also sees where he has to drop it for changing the sorting.
So I just hoped there exists already a control that does such things. Of course, I would also pay some money for it if I save the time implementing it by myself.
Best regards and thanks for any futher ideas on that topic
Andreas
|
|
|
|