private void OnUpdate(object sender, NeedUpdateEventArgs e) { if (Update != null) { //GC.Collect(); Update(sender, e); } }
public void OnUpdate(object sender,NeedUpdateEventArgs e) { OnShutDown(sender, e); var path = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var command = string.Format("{0}", Path.Combine(path, "backup.exe")); var process = new ProcessStartInfo {Arguments = e.Endpoint, FileName = command, CreateNoWindow = false}; Process.Start(process); //Unload(); //var update = new Update( // e.Mask, // e.UpdatePath, // e.BackupPath, // e.FilesExclude); //update.Start(); //Load(); //guiController.Restart(new EndpointAddress(e.Endpoint)); }
private void NeedUpdate(object sender, NeedUpdateEventArgs e) { if (Update != null) Update( sender, new NeedUpdateEventArgs(e.Endpoint) { BackupPath = ClientServer.Properties.Settings.Default.BackupPath, FilesExclude = ClientServer.Services.Utils.ConvertToArray(ClientServer.Properties.Settings.Default.FilesExclude), UpdatePath = ClientServer.Properties.Settings.Default.UpdatePath, Mask = ClientServer.Properties.Settings.Default.Mask }); }