public static void DisplayMessage(DialogBox dialogBox)
            {
                DialogBoxGUI gui = MapView.MapCamera.gameObject.GetComponent <DialogBoxGUI>();

                if (gui == null)
                {
                    LoggingUtil.LogVerbose(typeof(DialogBox), "Adding DialogBoxGUI");
                    gui = MapView.MapCamera.gameObject.AddComponent <DialogBoxGUI>();
                }

                gui.Show(dialogBox);
            }
        protected override void OnFailed()
        {
            foreach (DialogDetail detail in details.Where(d => d.condition == TriggerCondition.CONTRACT_FAILED))
            {
                if (!displayQueue.Contains(detail))
                {
                    displayQueue.Enqueue(detail);
                }
            }

            if (displayQueue.Any())
            {
                DialogBoxGUI.DisplayMessage(this);
            }
        }
        protected void OnFlightReady()
        {
            Vessel v = FlightGlobals.ActiveVessel;

            if (v != null && v.situation == Vessel.Situations.PRELAUNCH)
            {
                foreach (DialogDetail detail in details.Where(d => d.condition == TriggerCondition.VESSEL_PRELAUNCH))
                {
                    if (!displayQueue.Contains(detail))
                    {
                        displayQueue.Enqueue(detail);
                    }
                }
            }

            if (displayQueue.Any())
            {
                DialogBoxGUI.DisplayMessage(this);
            }
        }
        protected override void OnParameterStateChange(ContractParameter param)
        {
            if (param.State == ParameterState.Incomplete)
            {
                return;
            }

            TriggerCondition cond = param.State == ParameterState.Complete ?
                                    TriggerCondition.PARAMETER_COMPLETED :
                                    TriggerCondition.PARAMETER_FAILED;

            foreach (DialogDetail detail in details.Where(d => d.condition == cond && d.parameter == param.ID))
            {
                if (!displayQueue.Contains(detail))
                {
                    displayQueue.Enqueue(detail);
                }
            }

            if (displayQueue.Any())
            {
                DialogBoxGUI.DisplayMessage(this);
            }
        }