-Please keep in mind I am still a beginner programmer when adding replies. I need stuff explained in simple terms with some comments so I can understand it better. Thanks.-
For some reason I cannot seem to add items to various colums in my listview. I set all three columns up in the designer as well as the listview.
A little more info on what I am trying to achieve. I have this XML file:
<?xml version="1.0" encoding="utf-8">;
<tem Name="One" Version="1.0" Filename="file.exe" />;
<Item Name="Two" Version="2.0" Filename="file2.exe" />;
I have two queries as such:
var query_name = from n in ModListUser.Root.Descendants("Mod")
var query_ver = from v in ModListUser.Root.Descendants("Mod")
I need to line up the name and Version attributes into two different colums, but yet keep them lined up. So it would need to be like this:
Column1 | Column2 | Column3
One | 1.0 | file.exe
Two | 2.0 | file2.exe
For every item in the list which I don't know how many but eventually I am going to compare only selected values.
I realize I need a new Attribute for the file names that way I can match a directory and get only the needed items. Is there a way I can combine my query to get all the attributes for item with a specific name. Like being able to get 1.0 from One and so on?
So say if user only has Two but not One I would want to only display Two.
Thanks man, works great. Been waiting all day for a reply. Is there a way to check a directory for the file name and only display those that exist? Or do I need to display them all all the time? I knwo I am way overcomplicating this but once I figure this out I should be ok for the rest of my application. I think. Would you be able to put detailed comments in your code for me to understand better please?
I tried to add
if (File.Exists(PathVariable + Filename))
before the output but as soon as I do I get no output at all.
I strongly recommend you consider a redesign of your service. A service that takes 20 seconds to execute is far from scaleable as you've already seen with just 2 concurrent clients.
You should consider converting the service to one that requests that the operation be performed (in a separate thread) and returns quickly (after submitting the request). You'll also need APIs to check if the request has finished, and get the returned results (or error status).
How are you starting your service host? Are you using a single instance of the service class or are you passing the service type to the ServiceHost constructor?
In the service code, there is some call to synchronization methods or some external API that could cause concurrent execution to block?
Edit: another possibility: are you executing SQL queries with transactions?
Thanks for the code Dave but I think I couldn't explain well.Here is more detail;
I created a custom control and put a normal textbox in it and placed this custom control on a form. When the form is running, all I want is When I click on the textbox, I want to use the click event of the custom control,not the textbox.
Also, I use singleton for the form if that differs
When you click in that textbox, only the textbox's Click event is going to fire. You didn't click on the surface of the custom control so its Click event won't fire. In order for the Form to see the TextBox's Click event, you're going to have to handle the Click event in your custom control and, in that event handler, Raise your custom controls Click event.
I have an application that is (should) save blobs in the database. It saves all the columns except the blob. I have been trying everything I can think of. If anyone has something to try, please let me know. I keep telling myself this should not be hard. Thanks in advance.
Here is the table (SQL Server 2005).
CREATE TABLE [dbo].[publication] (
[id] INT IDENTITY(1,1) NOT NULL,
[category] VARCHAR(50) NULL,
[orig_file_name] VARCHAR(255) NULL,
[publish_date] DATETIME NOT NULL DEFAULT(GETDATE()),
[data] IMAGE NOT NULL,
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]