Exemple #1
0
        private void OpenToolStripMenuItem_Click(object sender, EventArgs e)
        {
            OpenFileDialog ofd = new OpenFileDialog();

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                var gamePath = System.IO.Path.GetFullPath(System.IO.Path.GetDirectoryName(ofd.FileName) + "\\..\\..\\..\\");

                Program.GamePath = gamePath;

                scene = new WorldMapScene(
                    SARC.UnpackRamN(Yaz0.Decompress(File.ReadAllBytes(ofd.FileName))),
                    System.IO.Path.GetFileName(ofd.FileName));

                gL_ControlModern1.MainDrawable = scene;

                scene.SelectionChanged      += Scene_SelectionChanged;
                scene.ObjectsMoved          += Scene_ObjectsMoved;
                sceneListView1.SelectedItems = scene.SelectedObjects;
                sceneListView1.RootLists.Clear();
                sceneListView1.RootLists.Add("Map", scene.WorldMapObjects);

                foreach (var route in scene.Routes)
                {
                    sceneListView1.RootLists.Add(route.Name, route.RoutePoints);
                }

                sceneListView1.UpdateComboBoxItems();
                sceneListView1.SetRootList("Map");
            }

            sceneListView1.Refresh();
        }
Exemple #2
0
 public ConnectionDrawer(WorldMapScene scene)
 {
     this.scene = scene;
 }