private void menuTableLoaderTableEnumerator_Click(object sender, System.EventArgs e) { // load a map with all tables opened so far. // clearing the map before this one would be a good idea MapTableLoader tl = new MapTableLoader(Session.Current.Catalog.EnumerateTables()); LoadTables(tl); }
private void menuTableLoaderTableInfo_Click(object sender, System.EventArgs e) { string path; Session.Current.TableSearchPath.FileExists("world.tab", out path); TableInfo ti = TableInfo.CreateFromFile(path); MapTableLoader tl = new MapTableLoader(ti); LoadTables(tl); }
private void menuTableLoaderFileArray_Click(object sender, System.EventArgs e) { string[] tables = new string[3]; tables[0] = "us_cnty.tab"; tables[1] = "usa_caps.tab"; tables[2] = "uscty_1k.tab"; MapTableLoader tl = new MapTableLoader(tables); LoadTables(tl); }
public void ShowMap() { string path = Application.StartupPath; //Assembly.GetExecutingAssembly().Location; String TablePath = Path.Combine(path, "Map"); String MWSPath = Path.Combine(TablePath, "map.mws"); MapInfo.Mapping.MapTableLoader tLoader = new MapTableLoader(); MapWorkSpaceLoader mwsLoader = new MapWorkSpaceLoader(MWSPath); this.Map.Load(mwsLoader); }
/// <summary> /// 初始化地图数据到内存 /// </summary> public void InitMemMap() { mControl = new MapControl(); string path = Application.StartupPath; //Assembly.GetExecutingAssembly().Location; String TablePath = Path.Combine(path, "Map"); String MWSPath = Path.Combine(TablePath, "map.mws"); MapInfo.Mapping.MapTableLoader tLoader = new MapTableLoader(); map = mControl.Map; MapWorkSpaceLoader mwsLoader = new MapWorkSpaceLoader(MWSPath); map.Load(mwsLoader); cs = map.GetDisplayCoordSys(); }
private void menuTableLoaderMultipleTables_Click(object sender, System.EventArgs e) { string path; Session.Current.TableSearchPath.FileExists("world.tab", out path); Table t1 = Session.Current.Catalog.OpenTable(path); Session.Current.TableSearchPath.FileExists("usa.tab", out path); Table t2 = Session.Current.Catalog.OpenTable(path); Session.Current.TableSearchPath.FileExists("mexico.tab", out path); Table t3 = Session.Current.Catalog.OpenTable(path); MapTableLoader tl = new MapTableLoader(t1, t2, t3); LoadTables(tl); }
private void menuItemPickFiles_Click(object sender, System.EventArgs e) { System.Windows.Forms.OpenFileDialog openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); openFileDialog1.Multiselect = true; openFileDialog1.CheckFileExists = true; openFileDialog1.DefaultExt = "TAB"; openFileDialog1.Filter = "MapInfo Tables (*.tab)|*.tab||"; if (openFileDialog1.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { MapTableLoader tl = new MapTableLoader(); foreach (string filename in openFileDialog1.FileNames) { tl.Add(filename); } LoadTables(tl); } }
private void menuTableLoaderMultipleFiles_Click(object sender, System.EventArgs e) { MapTableLoader tl = new MapTableLoader("ocean.tab", "usa.tab", "mexico.tab", "us_hiway.tab"); LoadTables(tl); }
private void menuTableLoaderOneFile_Click(object sender, System.EventArgs e) { MapTableLoader tl = new MapTableLoader("world.tab"); LoadTables(tl); }
private void menuTableLoaderMultipleTables_Click(object sender, System.EventArgs e) { string path; Session.Current.TableSearchPath.FileExists("world.tab", out path); Table t1 = Session.Current.Catalog.OpenTable(path); Session.Current.TableSearchPath.FileExists("usa.tab", out path); Table t2 = Session.Current.Catalog.OpenTable(path); Session.Current.TableSearchPath.FileExists("mexico.tab", out path); Table t3 = Session.Current.Catalog.OpenTable(path); MapTableLoader tl = new MapTableLoader(t1, t2 ,t3); LoadTables(tl); }
private void menuTableLoaderFileArray_Click(object sender, System.EventArgs e) { string[] tables = new string[3]; tables[0]="us_cnty.tab"; tables[1]="usa_caps.tab"; tables[2]="uscty_1k.tab"; MapTableLoader tl = new MapTableLoader(tables); LoadTables(tl); }
private void menuItemPickFiles_Click(object sender, System.EventArgs e) { System.Windows.Forms.OpenFileDialog openFileDialog1=new System.Windows.Forms.OpenFileDialog(); openFileDialog1.Multiselect = true; openFileDialog1.CheckFileExists = true; openFileDialog1.DefaultExt = "TAB"; openFileDialog1.Filter = "MapInfo Tables (*.tab)|*.tab||"; if(openFileDialog1.ShowDialog(this) == System.Windows.Forms.DialogResult.OK) { MapTableLoader tl = new MapTableLoader(); foreach(string filename in openFileDialog1.FileNames) { tl.Add(filename); } LoadTables(tl); } }