Beispiel #1
0
 public void OnPlanChanged(PlanSetup ps)
 {
     //Must operate on VMS thread for plan access
     VMS.Invoke(() =>
     {
         Id  = ps?.Id;
         UID = ps?.UID;
         IsDoseCalculated = ps?.Dose != null;
         NBeams           = ps?.Beams.Count();
     });
 }
Beispiel #2
0
        public static Application Application_CreateApplication(string username, string password)
        {
            var         thread = new AppComThread();
            Application xapp   = null;

            thread.Invoke(() =>
            {
                var vms = CreateApplicationFunc(username, password);
                xapp    = new Application(vms);
            });
            var sac = new StandAloneContext(xapp, thread);

            XContext.Instance.CurrentContext = sac;
            XContext.Instance.CurrentContext.UIDispatcher = System.Windows.Application.Current?.Dispatcher;
            return(xapp);
        }
Beispiel #3
0
 public void Invoke(Action a)
 {
     _thread.Invoke(a);
 }