Exemplo n.º 1
0
 public void RaiseUpdateReady(LookupSettings config)
 {
     if (NotifyUpdateReady != null)
     {
         NotifyUpdateReady(config);
     }
 }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
        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;
        }
Exemplo n.º 8
0
 public void RaiseUpdateReady(LookupSettings config)
 {
     if (NotifyUpdateReady != null)
         NotifyUpdateReady(config);
 }