Hi, I've been trying to work on a patcher for flyff in C# for the past few days due to boredom
I've been able to use NavigationService() linked to my frame in XAML to do webpage navigation, but when I try to use variables to set up the navigation, I get an exception.
This is the code for how I have the NavigationService() set up
I had also tried using new Uri() and inputting the contents for the string there, but I kept getting the same exception.PHP Code:String NewsPageNavigation = "http://" + Configuration.IPaddress + "/" + Configuration.Newspage;
NewsPage.NavigationService.Navigate(new Uri(NewsPageNavigation));
This is the code for the classes (it seemed the easiest way to make my configuration variables universal throughout the program)
This is how I was reading in the contents of my configuration filePHP Code:public static string configfile = "config.txt";
public static string UpdateCheckerFile = "list.txt.gz";
public static float UpdaterVersion;
public static string NeuzParam;
public static string IPaddress;
public static string Newspage;
public static string Registerpage;
public static string PatchDir;
public static string ResourcesFolder;
Lastly, Here's the contents of my config.txtPHP Code:TextReader txtConfig = new StreamReader(Configuration.configfile);
{
Configuration.UpdaterVersion = txtConfig.Read();
txtConfig.ReadLine(); //I added this because I was getting an exception with the Navigation trying to use NeuzParam in the URI string
Configuration.NeuzParam = txtConfig.ReadLine();
Configuration.IPaddress = txtConfig.ReadLine();
Configuration.Newspage = txtConfig.ReadLine();
Configuration.Registerpage = txtConfig.ReadLine();
Configuration.PatchDir = txtConfig.ReadLine();
Configuration.ResourcesFolder = txtConfig.ReadLine();
}
txtConfig.Close();
I'm using VS 2010 Beta 2 so I don't know if that's the problem or not. When I used Uri("http://localhost/newspage.php") it works fine, just not when I try to do it with my configuration variables and the + operator. I set up a try...catch to make sure it's reading in the correct lines for the Uri, and the ouput it's giving says that it is. I can post some screenshots if it'll help.Code:1.0 sunkist localhost newspage.php register.php Neurospace/RESCLIENT Resources
If you've got any suggestions, please let me know. I've spent a few hours googling around with no luck.


Reply With Quote![[C#] URI behaving badly](http://ragezone.com/hyper728.png)

