Exemplo n.º 1
0
        void SceneClosed(Object sender, EventArgs e)
        {
            ARScene closedScene = (ARScene)sender;

            //若有激活的界面则返回,若无则激活集合最前面的界面
            foreach (var scene in ARSceneList)
            {
                if (scene.IsActive)
                {
                    return;
                }
            }
            ARSceneList[0].Activate();
        }
Exemplo n.º 2
0
 /// <summary>
 /// 添加新界面
 /// </summary>
 /// <param name="addingscene"></param>
 public void AddScene(ARScene addingscene)
 {
     ARSceneList.Add(addingscene);
     addingscene.Acivated += new EventHandler(SceneActived);
     addingscene.Closed   += new EventHandler(SceneClosed);
     foreach (var scene in ARSceneList)
     {
         if (scene.IsActive)
         {
             return;
         }
     }
     ARSceneList[0].Activate();
 }
Exemplo n.º 3
0
        void SceneActived(Object sender, EventArgs e)
        {
            ARScene activedScene = (ARScene)sender;

            foreach (var scene in ARSceneList)
            {
                if (scene != activedScene)
                {
                    if (scene.IsActive)
                    {
                        scene.Close();
                    }
                }
            }
            CurrentActiveScene = activedScene;
        }