Exemplo n.º 1
0
        private void URL_TextBox_KeyUp(object sender, Windows.UI.Xaml.Input.KeyRoutedEventArgs e)
        {
            bool validURL = false;
            Uri  newUri   = Website.URL;

            try
            {
                newUri   = new Uri(URL_TextBox.Text.ToString());
                validURL = true;
            }
            catch
            {
                // Create the message dialog and set its content
                DisplayDialog("Error", "The URL entered was not a valid URL. A URL has to look like http://www.bing.com ");
            }

            if (validURL)
            {
                WebsiteDataSource.ChangeUrl(Website.ID, newUri);
                Result = RenameResult.RenameOK;
            }
        }