|
If it's on a lan, and you are in control of the location on server for the binarries, then make your own solution.
Create something like a launcher app that checks for updates, updates(copies the new files on clients) if necessary...
and then starts/launches the actuall app/exe.
All the best,
Dan
|
|
|
|
|
Thanks for reply!
But i have some problems with windows 7 authentication for sharing folder.
I wanna something like update of ClickOnes that doesnt check authentication.
How it updates the App.
Can we only use the update strategy of clickOnce?
|
|
|
|
|
1) Why do you ask yourself?
2) what kind of problem. It's a basic sharing stuff. Easy as bacon.
3) Is your app on lan, workgruop, do you have AD... Are you in control or the IT admin/resp? ...
All the best,
Dan
|
|
|
|
|
I know that but i have lots of problem with the authentication in win7.
How can i solve the authentication like ClickOnce.
(How to share the folder and connect to it without any authentication)
|
|
|
|
|
Hi.
I need some help How to stop downloading progress in WebClient ? The CancelAsync() and Dispose() methods don't work . I read in other sources that I can't stop the downloading progress while it is in progress, it's true?
What is the best way to download a file/multiple files ?
I am sorry for my bad english.
Thank you in advance.
|
|
|
|
|
amx_tiger wrote: How to stop downloading progress in WebClient ? The CancelAsync() and Dispose() methods don't work .
Using CancelAsync[^]; what does "don't work" mean, did they throw an exception?
amx_tiger wrote: I read in other sources that I can't stop the downloading progress while it is in progress, it's true?
For some of the methods of the WebClient class, yes. You should be able to cancel the async versions though.
amx_tiger wrote: What is the best way to download a file/multiple files ?
"BITS", there's even an article on a nice wrapper[^] here on CodeProject
Bastard Programmer from Hell
|
|
|
|
|
No, CancelAsync don't make anything. It don't stop the downloading progress.
Thank you for response .
|
|
|
|
|
amx_tiger wrote: No, CancelAsync don't make anything. It don't stop the downloading progress.
It only does if one of the Async-versions of the methods was used to start the download. How about posting some relevant code?
Bastard Programmer from Hell
|
|
|
|
|
I hope you understand:
public WebClient webClient = new WebClient();
webClient.DownloadFileCompleted += new AsyncCompletedEventHandler(Completed);
webClient.DownloadProgressChanged += new DownloadProgressChangedEventHandler(ProgressChanged);
Uri url = new Uri(file_name);
file_name = Path.GetFileName(url.LocalPath);
string location = textBox2.Text + "\\" + file_name;
webClient.DownloadFileAsync(new Uri(link), location);
And in an user control I have a button called Stop:
private void stop_button_Click(object sender, EventArgs e)
{
Form1 form1 = new Form1();
form1.webClient.CancelAsync();
form1.webClient.Dispose();
}
Something like this. The CancelAsync() methods don´t work even if i make a button in main form (form1).
|
|
|
|
|
amx_tiger wrote: Something like this.
Something like that should work. The one below has been tested and works;
WebClient wc = new WebClient();
public Form1()
{
InitializeComponent();
}
void Button1_Click(object sender, EventArgs e)
{
wc.DownloadFileCompleted += delegate { Text="Done"; };
wc.DownloadProgressChanged += new DownloadProgressChangedEventHandler(wc_DownloadProgressChanged);
wc.DownloadFileAsync(
new Uri(@"http://dumps.wikimedia.org/nnwiki/20120430/nnwiki-20120430-pages-meta-history.xml.bz2"),
"test.data");
}
void wc_DownloadProgressChanged(object sender, DownloadProgressChangedEventArgs e)
{
Text = e.BytesReceived.ToString();
}
void Button2_Click(object sender, EventArgs e)
{
wc.CancelAsync();
}
Bastard Programmer from Hell
|
|
|
|
|
I did that but without a button in main form which cancel the async and didn't work. The button which cancel the async was in user control...
I tried now with the button which cancel async in the main form and it´s work ...
I am very confused ... why didn't work in user control?
|
|
|
|
|
How did you pass the WebClient object to the usercontrol?
Bastard Programmer from Hell
|
|
|
|
|
|
Good you found it
amx_tiger wrote: Last edited: I have one more question... Why download form take so long time while it is show ?
That would largely depend on the code in the constructor. Perhaps you could move some of that code to the "OnShown"-event?
Bastard Programmer from Hell
|
|
|
|
|
I solve this problem . It was because of the internet cable, so I connect my laptop to wi-fi and all it's work The downloader form appear immediately.
Thank you very much for your response
|
|
|
|
|
Cool, and you're welcome
Bastard Programmer from Hell
|
|
|
|
|
I have wrote C# programs similar to the one that I am working on right now time and time again, but on this particular occasion, I am having issues in making my code insert values into an Access Database. BTW, I am using Visual Studio 2010 and .net 4. Maybe it is something with .net 4...... Anyway, this is my code
private void btnAddRecord_Click(object sender, EventArgs e)
{
this.Cursor = Cursors.WaitCursor;
string connstr = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=Steinar.accdb";
OleDbConnection conn = new OleDbConnection(connstr);
da.InsertCommand = conn.CreateCommand();
da.InsertCommand.CommandText = "INSERT INTO Returns" +
"(DateReceived, Dealer, Department, CustomerName, Address, Zip, City, Email, Phone)" +
"VALUES(@DateReceived, @Dealer, @Department, @CustomerName, @Address, @Zip, @City, @Email, @Phone)";
AddParams(da.InsertCommand, "DateReceived", "Dealer", "Department", "CustomerName", "Address", "Zip", "City", "Email", "Phone");
DataRow row = dt.NewRow();
dt.Rows.Add(row);
totalRecord = dt.Rows.Count;
currRecord = totalRecord - 1;
this.Cursor = Cursors.Default;
}
private void AddParams(OleDbCommand cmd, params string[] cols)
{
foreach (string col in cols)
cmd.Parameters.Add("@" + col, OleDbType.Char, 0, col);
}
I have set breakpoints and the AddParams method never executes... I can't figure out why it doesn't but it doesn't.
Can anyone see what I have wrong in this code? I am declaring all of my globals inside the class declaration
private OleDbDataAdapter da = new OleDbDataAdapter();
private OleDbConnection conn = new OleDbConnection();
private DataTable dt = new DataTable();
private DataSet ds = new DataSet();
int currRecord = 0;
int totalRecord = 0;
Any help would be greatly appreciated.
|
|
|
|
|
When you say "It never executes" what do you mean?
Have you put a breakpoint on the
this.Cursor = Cursors.WaitCursor; Line, and stepped into through the method?
Or just put a breakpoint on the
foreach (string col in cols) and never hit it?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
|
|
|
|
|
I should have been clearer on that because you raised an excellent question.... I placed a breakpoint on the initial cursor change and then stepped through the code. When it gets to the call to AddParams, it seems to read that line of code, but it never executes that method. Instead, it just steps on to the
DataRow row = dt.NewRow(); line. Of course, that can't execute either. It seems to read all the code. I even added a message box right after where I call the default cursor back and the message box will display, so it is reading through the code, but it just will not execute.
|
|
|
|
|
Premisoft wrote: it just steps on to the
Did you use F10 or F11?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
Hello
Does someone knows either
1- Is there an altenativer to Winmm.dll on Windows CE CF ?
2- Or is there some class that can be used on CF to read Microphone and play sound ?
Thanks for any help
|
|
|
|
|
I need to implement collision detection algorithm for a program i'm working on. The objects i have here is ball/circle and a rectangle. The balls are moving vertically, while the rectangle is moving horizontally. The condition is that if the ball and rectangle touch each other then an event should be raised. I have been trying to do that for a while with my colleague but without success. This is my first program in C# so please bear with me.
|
|
|
|
|
|
I checked the article you referred me to. This example makes use of vectors and i didn't use vectors. However, I'll make time to study it.
|
|
|
|
|
Circle-rectangle is pretty straightforward: translate the circle into the rectangle's local space and check its distance to all four sides. If the circle is small you should also check if the centre is inside the box.
|
|
|
|