public void RaiseUpdateReady(LookupSettings config) { if (NotifyUpdateReady != null) { NotifyUpdateReady(config); } }
public DeOpsContext(SimInstance sim, string startupPath, Icon defaultIcon) { StartupPath = startupPath; DefaultIcon = defaultIcon; LookupConfig = new LookupSettings(startupPath); // starting up simulated context context->simulator->instances[]->context Sim = sim; }
public DeOpsContext(string startupPath, Icon defaultIcon) { StartupPath = startupPath; DefaultIcon = defaultIcon; LookupConfig = new LookupSettings(startupPath); ContextThread = Thread.CurrentThread; // start timers SecondTimer = new Timer(SecondTimer_Tick, null, 0, 1000); SignedUpdate = UpdateService.LoadUpdate(LookupConfig); }
public bool NotifyUpdateReady(LookupSettings config) { var signedUpdate = Context.SignedUpdate; UpdateForm form = new UpdateForm(signedUpdate); if (form.ShowDialog() != DialogResult.OK) { return(false); } try { string finalpath = Application.StartupPath + Path.DirectorySeparatorChar + signedUpdate.Name; Utilities.DecryptTagFile(config.UpdatePath, finalpath, signedUpdate.Key, null); try { Process.Start("UpdateOp.exe", "\"" + finalpath + "\""); // try to close interfaces Context.Cores.LockReading(() => Context.Cores.ToList().ForEach(c => c.Exit())); Logins.ForEach(l => l.Close()); CheckExit(); } catch (Exception ex) { MessageBox.Show(ex.Message); } return(true); } catch (Exception ex) { MessageBox.Show("Update Error: " + ex.Message); } return(false); }
public bool NotifyUpdateReady(LookupSettings config) { var signedUpdate = Context.SignedUpdate; UpdateForm form = new UpdateForm(signedUpdate); if (form.ShowDialog() != DialogResult.OK) return false; try { string finalpath = Application.StartupPath + Path.DirectorySeparatorChar + signedUpdate.Name; Utilities.DecryptTagFile(config.UpdatePath, finalpath, signedUpdate.Key, null); try { Process.Start("UpdateOp.exe", "\"" + finalpath + "\""); // try to close interfaces Context.Cores.LockReading(() => Context.Cores.ToList().ForEach(c => c.Exit())); Logins.ForEach(l => l.Close()); CheckExit(); } catch (Exception ex) { MessageBox.Show(ex.Message); } return true; } catch (Exception ex) { MessageBox.Show("Update Error: " + ex.Message); } return false; }
public void RaiseUpdateReady(LookupSettings config) { if (NotifyUpdateReady != null) NotifyUpdateReady(config); }