/// <summary> /// Creates a new WWPlaceListView object, initializing place-specific columns and menus /// </summary> public WWPlaceListView() : base( new WWListView.ColumnDescriptor [] { new WWListView.ColumnDescriptor("Name", "Name", 70, false), new WWListView.ColumnDescriptor("State", "State", 100, false), new WWListView.ColumnDescriptor("County", "County", 100, false), new WWListView.ColumnDescriptor("Country", "Country", 130, false), new WWListView.ColumnDescriptor("Layer", "Layer", 170, false), new WWListView.ColumnDescriptor("Type", "Feature Type", 50, false), new WWListView.ColumnDescriptor("Elevation", "Elevation", 40, true), new WWListView.ColumnDescriptor("Population", "Population", 50, true), new WWListView.ColumnDescriptor("Latitude", "Latitude", 60, true), new WWListView.ColumnDescriptor("Longitude", "Longitude", 60, true), // Attributes present in WWP: feature type, country, state, county, state code, elevation, population } ) { ContextMenu placeListMenu = new ContextMenu( new MenuItem [] { new WWPlaceMenuItem("&Goto", new EventHandler(placeListMenu_Goto), WWPlaceMenuItem.RequiredElement.SingleSelection), new WWPlaceMenuItem("&Copy URL", new EventHandler(placeListMenu_CopyURL), WWPlaceMenuItem.RequiredElement.SingleSelection), new WWPlaceMenuItem("&Remove selected", new EventHandler(placeListMenu_Del), WWPlaceMenuItem.RequiredElement.Selection), new WWPlaceMenuItem("Remove &all", new EventHandler(placeListMenu_Clear), WWPlaceMenuItem.RequiredElement.Items), new MenuItem("-"), new WWPlaceMenuItem("&Import from GPX", new EventHandler(placeListMenu_GpxLoad), WWPlaceMenuItem.RequiredElement.None), new WWPlaceMenuItem("&Export to GPX", new EventHandler(placeListMenu_GpxSave), WWPlaceMenuItem.RequiredElement.Items), new MenuItem("-"), }); placeListMenu.Popup += new EventHandler(ContextMenu_Popup); this.ContextMenu = placeListMenu; this.addPlaceDelegate = new AddPlaceDelegate(AddPlace); }
/// <summary> /// Creates a new WWPlaceListView object, initializing place-specific columns and menus /// </summary> public WWPlaceListView() : base ( new WWListView.ColumnDescriptor [] { new WWListView.ColumnDescriptor("Name", "Name", 70, false), new WWListView.ColumnDescriptor("State", "State", 100, false), new WWListView.ColumnDescriptor("County", "County", 100, false), new WWListView.ColumnDescriptor("Country", "Country", 130, false), new WWListView.ColumnDescriptor("Layer", "Layer", 170, false), new WWListView.ColumnDescriptor("Type", "Feature Type", 50, false), new WWListView.ColumnDescriptor("Elevation", "Elevation", 40, true), new WWListView.ColumnDescriptor("Population", "Population", 50, true), new WWListView.ColumnDescriptor("Latitude", "Latitude", 60, true), new WWListView.ColumnDescriptor("Longitude", "Longitude", 60, true), // Attributes present in WWP: feature type, country, state, county, state code, elevation, population } ) { ContextMenu placeListMenu = new ContextMenu( new MenuItem [] { new WWPlaceMenuItem("&Goto", new EventHandler(placeListMenu_Goto), WWPlaceMenuItem.RequiredElement.SingleSelection), new WWPlaceMenuItem("&Copy URL", new EventHandler(placeListMenu_CopyURL), WWPlaceMenuItem.RequiredElement.SingleSelection), new WWPlaceMenuItem("&Remove selected", new EventHandler(placeListMenu_Del), WWPlaceMenuItem.RequiredElement.Selection), new WWPlaceMenuItem("Remove &all", new EventHandler(placeListMenu_Clear), WWPlaceMenuItem.RequiredElement.Items), new MenuItem("-"), new WWPlaceMenuItem("&Import from GPX", new EventHandler(placeListMenu_GpxLoad), WWPlaceMenuItem.RequiredElement.None), new WWPlaceMenuItem("&Export to GPX", new EventHandler(placeListMenu_GpxSave), WWPlaceMenuItem.RequiredElement.Items), new MenuItem("-"), }); placeListMenu.Popup += new EventHandler(ContextMenu_Popup); this.ContextMenu = placeListMenu; this.addPlaceDelegate = new AddPlaceDelegate(AddPlace); }