NET:LavishScriptAPI.LavishScriptIterator

From Lavish Software Wiki
Jump to: navigation, search
       private void LoadLandmarks()
       {
           RegionGroup rg = new RegionGroup("landmark");
           LavishScriptIterator i = new LavishScriptIterator(rg.NewIterator());
           lstLandmarks.BeginUpdate();
           lstLandmarks.Items.Clear();
           if (i.First())
           {
               do
               {
                   LavishNavAPI.Regions.Region r = new LavishNavAPI.Regions.Region(i.PersistentValue);
                   MessageBox.Show(r.Name);
                   ListViewItem li = new ListViewItem();
                   li.Text = r.Name;
                   lstLandmarks.Items.Add(li);
               }
               while (i.Next());
           }
           lstLandmarks.EndUpdate();
       }