|
Hi All,
I created a ClickOnce application, but if I upload it to download sites, they sometimes have problems processing it. For example, they install (copy) the .application file instead of running it.
So what I want to do, is create a ClickOnce application downloadable from my website, and apart from that build an installer around it so it can also be installed via an .msi.
After installing I would like it to behave like a ClickOnce application, that is autmatically checking and updating from the website.
However, I do not know all the ins and outs of both technologies, so I don't know if this is possible.
Any help or suggestions would be nice.
Thanks in advance,
Mathijs Beentjes.
|
|
|
|
|
You could always avoid ClickOnce altogether and serve the files via an automatic update facility - Application Auto-update via Online Files in C#[^]
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
Hi experts,
a software I made provides the user with a PropertyGrid[^] to change certain values. Some of them are enum-based.
Customer doesn't like to be forced to click twice: first to open the UITypeEditor[^], second to choose the value.
Customer would rather want to have possible values constantly displayed as RadioButton[^]s. (See this illustration[^].)
Is PropertyGrid that customizable to draw a property as something other than $PropertyName and $PropertyValue as one-line-texts?
Is there some OwnerDraw possibility I didn't recognize?
Is there a third-party control that supports that (this[^] looks nice but User still has to pull the editor down)?
Ciao,
luker
|
|
|
|
|
lukeer wrote: Customer doesn't like to be forced to click twice
There's an example on a fully custom inline editor in one of the CodeProject articles[^].
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
But it still shows a value as one line. At least I haven't found a way to create multi-line visualizations of multiple-choice options.
Ciao,
luker
|
|
|
|
|
lukeer wrote: But it still shows a value as one line. That's what the PropertyEditor dictates; one property per line. You can "unfold" some of the properties (try the Font property in a WinForm as example), but that's as close as it gets.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Hi,
I have a requirement where I need to lock a object to get data from service. If service takes more time to response due to some reason, after 2 mins of timeout period it gets timed out and then lock gets released. Till that time all the other requests has to wait. In this way, During this abnormal service behavior, all the request has to be in waiting stage. First request will take 2 mins to release the lock and second one would then take 2 more mins (total 4 mins idle time) and third will take another 2 mins and so on. After some time, due to this, application will be hanged.
Now I want a technique where first request will acquire lock and get the response. All the other request should be waiting for this and once first request release the lock, this response should be assigned to all other pending request (as the output response will be same) and make them all released at the same time.So ultimately, all request will get a response in two mins and only one service hit will happen.
Do we have any technique in C# to achieve this?Anybody can help me to fix this?
Cheers
A.M.Jegan
|
|
|
|
|
Sounds like a Queue<Request> , with a loop handling a request. Execute the method that handles the request async, wait until it returns or two minutes pass. When done, fetch next and repeat.
amjegan wrote: all request will get a response in two mins and only one service hit will happen. Not if it works as you described; if there's three items in the pipeline that will timeout, total waiting-time for the next request will be >6 minutes.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
amjegan wrote: Now I want a technique where first request will acquire lock and get the
response. All the other request should be waiting for this and once first
request release the lock, this response should be assigned to all other pending
request (as the output response will be same) and make them all released at the
same time.So ultimately, all request will get a response in two mins and only
one service hit will happen.
And then what happens in the following scenario?
- First request times out.
- Second request succeeds.
|
|
|
|
|
We don't worry about whether it succeed or failed as the data we are pulling is not affect the mainstream of the application. Application can still be running. Only thing is it should not be waited long time to get response. Thanks!
Cheers
A.M.Jegan
|
|
|
|
|
Have you considered reducing the timeout significantly.
|
|
|
|
|
Hi,
I want to read data from MMF File in c#.net framework 3.5
|
|
|
|
|
Same question applies to the NSF question, what is an MMF file, if it is a notes specific file then the same answer applies as well.
For any file type that is proprietary you will need to get the format/api from the owner and some types are just not available.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi,
I want to read content from NSF File c#.net framework 3.5.
|
|
|
|
|
you might want to explain
a) what a NSF file is/what produces it and
b) what you've tried so far
|
|
|
|
|
a) A Lotus Notes database .NSF file stores Lotus Notes information. That information consists of user data, metadata and also design information. There are many different types of Lotus Notes databases, the most common being mailbox databases used to store Lotus Notes mail, usually on a Domino server, or address book databases which are usually stored on a users PC and contain multiple contact records.
b) I am still searching
|
|
|
|
|
cool - the obvious answer, is, does Lotus Notes have an API to do this ? or do you need to do it standalone/where Lotus isnt installed, for some (possibly perverse) reason
|
|
|
|
|
Yes, I need stand alone where lotus isn't installed.
|
|
|
|
|
Good Luck! Without the Notes API, you're pretty much screwed because you'll have to parse a LOT of information. Also hampering your efforts will be that some NSF databases can be encrypted and virtually impossible to read without the Notes API and the fact that IBM keeps changing the damn format of the database files further complicating the crap out of what you're trying to do.
About the only document I ever found on the NSF format was here[^].
|
|
|
|
|
Poor bastard - NSF will almost be a proprietary format coming from Notes, probably some flavour of xml, I would approach IBM with a f***ing big gun and see if they have the format/api available as Garth suggested.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
I want to Update the particular column...but once i give update only the edited column is present in the database..others are absent..
try
{
con.Open();
String q3 = "update testreport set patientname='" + textBox2.Text + "',address='" + textBox3.Text + "',testreports='" +textBox5.Text + "',reportno='" + textBox6.Text + "',date='" + dateTimePicker1.Value.ToString("dd-MMM-yyyy") + "',takentest='" + textBox4.Text + "'where patientid='" + textBox1.Text + "' ";
cmd = new SqlCommand(q3, con);
cmd.ExecuteNonQuery();
MessageBox.Show("details updated successfully");
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString(), "details not updated");
}
con.Close();
|
|
|
|
|
Start by fixing the SQL Injection[^] vulnerability in your code.
using (var con = new SqlConnection("<YOUR CONNECTION STRING HERE>"))
using (var cmd = new SqlCommand("update testreport set patientname = @patientname, address = @address, testreports = @testreports, reportno = @reportno, date = @date, takentest = @takentest where patientid = @patientid", con))
{
cmd.Parameters.AddWithValue("@patientname", textBox2.Text);
cmd.Parameters.AddWithValue("@address", textBox3.Text);
cmd.Parameters.AddWithValue("@testreports", textBox5.Text);
cmd.Parameters.AddWithValue("@reportno", textBox6.Text);
cmd.Parameters.AddWithValue("@date", dateTimePicker1.Value);
cmd.Parameters.AddWithValue("@takentest", textBox4.Text);
cmd.Parameters.AddWithValue("@patientid", textBox1.Text);
con.Open();
cmd.ExecuteNonQuery();
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Handle the OnTextChanged event of your textboxes to save wath field was changed and build the update string based on this data.
|
|
|
|
|
Better yet, don't do updates; do versioning instead. Updates are code smell.
And definitely use a parameterized query as Richard demonstrates.
|
|
|
|
|
Why do you care which field was changed, presumably you populate the control with the existing data and therefore you are just writing back the same information. Save the entire record!
Implement and audit system that records the before and after of each field.
And fix the sql injection exposure highlighted by Richard!
Never underestimate the power of human stupidity
RAH
|
|
|
|