public static bool ShowDialog(out AgentPositioningState Result, GameSettings.SettingStructure settingStructure)
        {
            Result = AgentPositioningState.Error;
            var vm = new EnemyAgentSelectViewModel();

            vm.Init(settingStructure.QCCell.GetLength(0), settingStructure.QCCell.GetLength(1), settingStructure.QCAgent);
            var dig = new EnemyAgentSelectDialog(vm);

            if (dig.ShowDialog() == true)
            {
                Result = dig.DataContext.PositionState;
                if (Result == AgentPositioningState.Error)
                {
                    return(false);
                }
                return(true);
            }
            return(false);
        }
 public EnemyAgentSelectDialog(EnemyAgentSelectViewModel viewmodel)
 {
     DataContext      = viewmodel;
     base.DataContext = DataContext;
     InitializeComponent();
 }