CUAHSI / HydroDesktop

HydroDesktop is a free and open source GIS enabled desktop application that helps you search for, download, visualize, and analyze hydrologic and climate data registered with the CUAHSI Hydrologic Information System. HydroDesktop is part of the legacy CUAHSI toolkit and is not under active development. Click the "releases" link below to download the latest installer for Microsoft Windows.
73 stars 20 forks source link

Data Site Popups (Mono) #102

Open xhqiao89 opened 6 years ago

xhqiao89 commented 6 years ago

shieldst[CodePlex]
Problem The little yellow pop-ups that appear when a user hovers over a data site are not functional in Linux or Mac.

The Popup lives in DataDownload (look inside Layer Information gt PopupControl).

On Linux, the Popups just do not work, which is a minor problem; however on Mac OS an exception is thrown every time a pop up is supposed to appear. (Disable Popups in the menu to make error messages stop).

Temporary Solution I have disabled the popups when running on Mono by adding a condition in DataDownloadPlugin.

The Popup button will be added only if NOT running on Mono. if (!DotSpatial.Mono.Mono.IsRunningOnMono()) { App.HeaderControl.Add(_btnShowPopups = new SimpleActionItem(quotShow Map Popupsquot, ShowPopups_Click) { RootKey = SharedConstants.SearchRootkey, GroupCaption = Msg.Results, SmallImage = Resources.popup_16x16, ToggleGroupKey = Msg.Download_Tools_Group, Enabled = false }); _btnShowPopups.Toggling += ShowPopups_Click; _btnShowPopups.Enabled = false; } And the ShowPopups property can be set only if not on Mono. public bool ShowPopups { get { return _showPopups; } set { if (_showPopups == value || DotSpatial.Mono.Mono.IsRunningOnMono()) return; _showPopups = value;

            var handler = ShowPopupsChanged;
            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }
    }

This is just a temporary solution to the errors being thrown on Mac OS, but we need to find a way to either make the popups work on Mono or display the same information in a different way.

xhqiao89 commented 6 years ago

cuylerfris[CodePlex]
marking as active