Esempio n. 1
0
 private static void AVLUpdateMessage(AVL_Instance inst, AVLEventArgs e)
 {
     if (OnUpdateMessages != null)
     {
         OnUpdateMessages(inst, e);
     }
 }
Esempio n. 2
0
        private void BeginNextCase(AVL_Instance inst)
        {
            if (inst == null)
            {
                return;
            }

            lock (Analyze_Cases)
            {
                foreach (Run_Case rc in Analyze_Cases)
                {
                    //If it isnt marked pending, dont touch it
                    if (rc.Current_Status == Run_Case.Case_Status.Pending)
                    {
                        inst.ExecuteCase(rc);
                        return;
                    }
                }
            }

            if (PrimaryInstance != inst)
            {
                inst.Close();
                this.instances.Remove(inst);
            }
        }
Esempio n. 3
0
        public CommandWindow(AVL_Instance instance)
        {
            if (instance == null)
                return;
            m_inst = instance;
            InitializeComponent();

            m_inst.AVL_Process.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(AVL_process_OutputDataReceived);

            configLabel.Text = instance.AVL_aircraft.Configuration_Name;
            avl_instanceLabel.Text = m_inst.Instance_Notes;
        }
Esempio n. 4
0
        private AVL_Instance Spawn_Instance(string FilePath, string Notes)
        {
            if (FilePath != string.Empty)
            {
                AVL_Instance instance = new AVL_Instance(FilePath, this);
                instance.Instance_Notes = Notes;
                instances.Add(instance);
                instance.Load();

                OnUpdate(this, new AircraftUpdateEventArgs(AircraftUpdateEventArgs.Update_Type.New_AVLInstance, instance));
                return(instance);
            }
            return(null);
        }
Esempio n. 5
0
        public CommandWindow(AVL_Instance instance)
        {
            if (instance == null)
            {
                return;
            }
            m_inst = instance;
            InitializeComponent();

            m_inst.AVL_Process.OutputDataReceived += new System.Diagnostics.DataReceivedEventHandler(AVL_process_OutputDataReceived);

            configLabel.Text       = instance.AVL_aircraft.Configuration_Name;
            avl_instanceLabel.Text = m_inst.Instance_Notes;
        }
Esempio n. 6
0
        private void AVL_Instance_OnUpdateMessages(AVL_Instance sender, AVLEventArgs e)
        {
            //if the AVL isntance is part of this aircraft's collection
            if (instances.Contains(sender))
            {
                switch (e.DataSource)
                {
                case AVLEventArgs.AVLData_Source.Case_Started: OnUpdate(this, new AircraftUpdateEventArgs(AircraftUpdateEventArgs.Update_Type.Started_Case, e.Message)); break;

                case AVLEventArgs.AVLData_Source.Case_Ended:
                {
                    OnUpdate(this, new AircraftUpdateEventArgs(AircraftUpdateEventArgs.Update_Type.Ended_Case, e.Message));
                    BeginNextCase(sender);
                }; break;
                }
            }
        }
Esempio n. 7
0
 private void AVL_Instance_OnUpdateMessages(AVL_Instance sender, AVLEventArgs e)
 {
     if (this.InvokeRequired)
     {
         this.Invoke((MethodInvoker) delegate { AVL_Instance_OnUpdateMessages(sender, e); });
     }
     else
     {
         //if the AVL_Instance's airplane is our airplane
         if (sender.AVL_aircraft == m_ap)
         {
             //if this is a geom pict update
             // if (e.DataSource == AVLEventArgs.AVLData_Source.Geometry_Pict)
             //this.pictureBox1.Image = ((AVL_PictureEventArgs)e).Img;
         }
     }
 }
Esempio n. 8
0
 private void AVL_Instance_OnUpdateMessages(AVL_Instance sender, AVLEventArgs e)
 {
     if (this.InvokeRequired)
         this.Invoke((MethodInvoker)delegate { AVL_Instance_OnUpdateMessages(sender, e); });
     else
     {
         //if the AVL_Instance's airplane is our airplane
         if (sender.AVL_aircraft == m_ap)
         {
             //if this is a geom pict update
             // if (e.DataSource == AVLEventArgs.AVLData_Source.Geometry_Pict)
             //this.pictureBox1.Image = ((AVL_PictureEventArgs)e).Img;
         }
     }
 }