|
That would be silly to wait. Anyway thanks! I've figured it out.
|
|
|
|
|
How exactly do you know that it "stops automatically"?
How do know it even started? How do you know it started successfully?
Did you check to see if the server restarted? And if it did restart then did the service correctly start?
|
|
|
|
|
Hello
when the user print any document in virtual printer how i can receive what he print in my application.
How I can receive what the user print in my application.
Note :I use Redmon and Ghostscript
And Redmon redirect to my application but how I can receive in my application
thanks
|
|
|
|
|
i am have WPF app to capture image ((BitmapSource)imgCapture.Source )from camera after capture image i want to rotate this image 180 degree pixel by pixel ????
|
|
|
|
|
Then try the WPF forum.
Veni, vidi, abiit domum
|
|
|
|
|
Hello all,
I added a new dynamicdata\custompage aspx page to the existing Data Scaffolding project. I want to remove the existing "delete" option in the gridview, and hence need to create a custompage to accomplish this.
How to make sure the default page is reading this newly created page? I rebuilt the solution. but every time I try to access this page, it comes back with a page not found message.
Am i missing something?
Thank you!
|
|
|
|
|
vkEE wrote: Am i missing something? Yes, this is the C# forum, you want the ASP.NET one.
Veni, vidi, abiit domum
|
|
|
|
|
Not able to generate reports (which has large data 16000 lines) in production server (high configuration 6 GB, MySQL, 32-bit OS) which takes at least 25min to load 'Generating Report' message.
Where as the same report is able to generate in test server (low configuration 2GB, MySQL, 64-bit OS which takes 15sec to load 'Generating Report' message.
Please advise.
Language: C#,
Reporting Tool: Telerik.
|
|
|
|
|
0) For quick response you should post this question in Telerik forum.
1) Optimize your database & query
2) Filter data while generating report.
3) Optimize your code. (Dispose the report related things properly after use)
4) Cross verify the report process.(Run the report from test server application using the production server database)
thatrajaCode converters | Education Needed
No thanks, I am all stocked up. - Luc Pattyn
When you're wrestling a gorilla, you don't stop when you're tired, you stop when the gorilla is - Henry Minute
|
|
|
|
|
Hi,
We have winform application, We already publish the application via clickonce that publish contains the all assemblies and files, but we want to publish certain files (not all files or Assembly) via clickonce in VS2010.
Thks in advance
|
|
|
|
|
AFAICT, it's not supported. ClickOnce always builds an entire distribution. It does not just "update" an existing one with new content.
|
|
|
|
|
Hi ,
I have two .xml files with contents as below:
demo1.xml
------------
="1.0"="ISO-8859-1"
<agenda>
<Appointment>
<Id> 7 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> test </Subject>
<Description> testttt </Description>
<Place> paris </Place>
<Modtime> 182204 </Modtime>
</Appointment>
<Appointment>
<Id> 8 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> whatever </Subject>
<Description> whateverrr </Description>
<Place> where ever </Place>
<Modtime> 182204 </Modtime>
</Appointment>
</agenda>
demo.xml
-----------
="1.0"="ISO-8859-1"
<agenda>
<Appointment>
<Id> 7 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> test </Subject>
<Description> testttt </Description>
<Place> paris </Place>
<Modtime> 182204 </Modtime>
</Appointment>
</agenda>
See from the two files above, Id=7 is common in both .xml files.
I want to select Id=8 which is not present in demo.xml.
So my output should be as below:
<Appointment>
<Id> 8 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> whatever </Subject>
<Description> whateverrr </Description>
<Place> where ever </Place>
<Modtime> 182204 </Modtime>
</Appointment>
I tried the below code but I could not arrive at what I need.
string origPath = @"F:\demo.xml";
string inPath = @"F:\demo1.xml";
XElement xmlObject = XElement.Load(origPath);
var xDoc = xmlObject.Descendants("Appointment");
XElement xmlObject1 = XElement.Load(inPath);
var xDoc1 = xmlObject1.Descendants("Appointment");
var notIn = xDoc1.Except(xDoc);
foreach (XElement ele in notIn)
{
richTextBox1.AppendText(ele.ToString() + "\n");
}
When executing the code above I got:
<Appointment>
<Id> 7 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> test </Subject>
<Description> testttt </Description>
<Place> paris </Place>
<Modtime> 182204 </Modtime>
</Appointment>
<Appointment>
<Id> 8 </Id>
<Date> 20060426 </Date>
<Time> 120000 </Time>
<Subject> whatever </Subject>
<Description> whateverrr </Description>
<Place> where ever </Place>
<Modtime> 182204 </Modtime>
</Appointment>
But the below code provides me the result what actually I need:
double[] numbers1 = { 2.0, 2.1, 2.2, 2.3, 2.4, 2.5 };
double[] numbers2 = { 2.2 };
IEnumerable<double> onlyInFirstSet = numbers1.Except(numbers2);
foreach (double number in onlyInFirstSet)
richTextBox1.AppendText(number.ToString() +"\n");
The immediate above code provided:
2,2.1,2.3,2.4,2.5
Please let me know what is wrong in my code to fetch distinct elements from xml file?
BR,
Arjun
modified 30-Dec-13 5:06am.
|
|
|
|
|
You did not explain what results you did get.
Veni, vidi, abiit domum
|
|
|
|
|
Hi,
Please see my post.I have edited it.
|
|
|
|
|
I have tried various combinations but cannot get the correct result. I can only assume that the default comparator has some problem in determining the differences so you will need to write a custom method.
Veni, vidi, abiit domum
|
|
|
|
|
i want to upload pdf file with some description which will be shown in a grid view. I am new to C#. How can i do it?? or any reference??
|
|
|
|
|
Ummm...Upload it to WHAT? Whether or not you can provide a description is entirely up to the server you're sending it to.
|
|
|
|
|
There is way too much code to be able to hand you everything. However, you'll want to look into these items:
1. Use the FileUpload control from the Ajax Toolkit
2. Save the file to a directory on your IIS server.
3. Save the path to the file in your database.
4. Add a column to your grid where the user can then add a description.
There are only 10 types of people in the world, those who understand binary and those who don't.
|
|
|
|
|
Hello,
I am writing my first Windows Service in .Net (4.0, VS2010), and I am getting the results I expect, but there is one thing I would like to optimize, but do not know how.. and googlin' it has been infructuous so far..
Basically, I want to know what I have to write in the OnStart method to actually make sure the service does not go into "running" mode if something fails (ex: loading the config).
It's all ok when everything loads well, but I have no idea how to abort the startup when an error is encountered.
Any idea ?
Thanks in advance,
Best regards,
Fred
modified 29-Dec-13 11:07am.
|
|
|
|
|
Fred2834 wrote: I want to know what I have to write in the OnStart method to actually make sure the service does not go into "running" mode if something fails (ex: loading the config). I would assume throwing an exception would suffice.
/ravi
|
|
|
|
|
There's various ways of doing it, with equally various opinions on what's appropriate.
The quick'n'dirty method is to set the this.ExitCode to a non-zero value specifying what the Win32 error was and then call the this.Stop() method.
|
|
|
|
|
.. geez, should have thought about that!
Thanks ! 
|
|
|
|
|
I have a C# application with a ListView and GridView control.
I would like to simulate the mouse click in both control simultaneously.
I would like to work this functionality even if the wind is not foreground.
So I used PostMessage to do the selection.
private void PerformSelection( List<int> rows, SelectionType selctionType )
{
IntPtr wParam = MK_CONTROL;
switch ( selctionType )
{
case SelectionType.Ctrl:
wParam = MK_CONTROL;
dataGridView1.VirtualKey = Keys.Control;
break;
case SelectionType.Shift:
wParam = MK_SHIFT;
dataGridView1.VirtualKey = Keys.Shift;
break;
case SelectionType.CtrlShift:
wParam = MK_CONTROLSHIFT;
break;
}
dataGridView1.Focus();
foreach (int rowIndex in rows)
{
SetScrollPositionListView( rowIndex );
NativeMethods.PostMessage( listView1.Handle, WM_LBUTTONDOWN, wParam,
(IntPtr) ( ( listView1.Items[rowIndex].Position.Y << 16 ) | listView1.Items[rowIndex].Position.X ) );
NativeMethods.PostMessage( listView1.Handle, WM_LBUTTONUP, wParam,
(IntPtr) ( ( listView1.Items[rowIndex].Position.Y << 16 ) | listView1.Items[rowIndex].Position.X ) );
SetScrollPosition(rowIndex);
dataGridView1.Focus();
Rectangle dgvRect = dataGridView1.GetRowDisplayRectangle(rowIndex, true);
NativeMethods.PostMessage(dataGridView1.Handle, WM_LBUTTONDOWN, wParam, (IntPtr)((dgvRect.Top + 1 << 16) | dgvRect.Left + 1));
NativeMethods.PostMessage(dataGridView1.Handle, WM_LBUTTONUP, wParam, (IntPtr)((dgvRect.Top + 1 << 16) | dgvRect.Left + 1));
}
}
private void SetScrollPositionListView( int rowIndex )
{
listView1.EnsureVisible( rowIndex );
}
private Point GetRowLocationListView( int rowIndex )
{
SetScrollPositionListView( rowIndex );
Point listViewlocation = listView1.PointToScreen( Point.Empty );
Rectangle listViewRect = listView1.GetItemRect( rowIndex );
int left = listViewlocation.X + listViewRect.X + ( listViewRect.Width / 2 );
int right = listViewlocation.Y + listViewRect.Y + ( listViewRect.Height / 2 );
return new Point( left, right );
}
For ListView the Ctrl + selection working fine. But for datagridview the only single Selection is working, the Ctrl Keydown is not working for datagridview.
When I give 1 2 3 as items to be selcected, the corresponding items selected in lisview, but for datagrid view only the last given item (3) is selected.
Could you please let me know why the above code is not working fro datagrid view.
Note: DataGridView.MulitiSelect property is True
aks
modified 30-Dec-13 3:01am.
|
|
|
|
|
From MSDN: "If the function succeeds, the return value is nonzero."
What's your return value? And which of the two currently has input-focus? (Receiving keyboard events)?
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Yes, the PostMessage is returning true as always.
The focus is in datagidview.
I have updated my query with an explanatory code snippet. Could you please have a look at that also.
aks
|
|
|
|