public EventCommandWaitForRouteCompletion(
            WaitForRouteCommand refCommand,
            FrmEvent eventEditor,
            MapBase currentMap,
            EventBase currentEvent
            )
        {
            InitializeComponent();

            //Grab event editor reference
            mEventEditor    = eventEditor;
            mEditingEvent   = currentEvent;
            mEditingCommand = refCommand;
            mCurrentMap     = currentMap;
            InitLocalization();
            cmbEntities.Items.Clear();
            if (!mEditingEvent.CommonEvent)
            {
                cmbEntities.Items.Add(Strings.EventWaitForRouteCompletion.player);
                if (mEditingCommand.TargetId == Guid.Empty)
                {
                    cmbEntities.SelectedIndex = -1;
                }

                foreach (var evt in mCurrentMap.LocalEvents)
                {
                    cmbEntities.Items.Add(
                        evt.Key == mEditingEvent.Id
                            ? Strings.EventWaitForRouteCompletion.This + " "
                            : "" + evt.Value.Name
                        );

                    if (mEditingCommand.TargetId == evt.Key)
                    {
                        cmbEntities.SelectedIndex = cmbEntities.Items.Count - 1;
                    }
                }
            }

            if (cmbEntities.SelectedIndex == -1 && cmbEntities.Items.Count > 0)
            {
                cmbEntities.SelectedIndex = 0;
            }

            mEditingCommand = refCommand;
            mEventEditor    = eventEditor;
        }
 private static string GetCommandText(WaitForRouteCommand command, MapInstance map)
 {
     if (command.TargetId == Guid.Empty)
     {
         return(Strings.EventCommandList.waitforroute.ToString(Strings.EventCommandList.moverouteplayer));
     }
     else if (map.LocalEvents.ContainsKey(command.TargetId))
     {
         return(Strings.EventCommandList.waitforroute.ToString(
                    Strings.EventCommandList.moverouteevent.ToString(map.LocalEvents[command.TargetId].Name)
                    ));
     }
     else
     {
         return(Strings.EventCommandList.waitforroute.ToString(Strings.EventCommandList.deletedevent));
     }
 }