//Load all initial program settings (width, height, refresh interval, download folder...) public bool LoadProgramSettings() { try { ProxyKind = CConfiguration.ProxyType.None; //WindowAttributes Window.X = (int)GConfClient.Get(gangGconfPath + "xPosition"); Window.Y = (int)GConfClient.Get(gangGconfPath + "yPosition"); Window.Width = (int)GConfClient.Get(gangGconfPath + "width"); Window.Height = (int)GConfClient.Get(gangGconfPath + "height"); //Program paths themesDownloadPath = (string)GConfClient.Get(gangGconfPath + "themesDownloadPath"); XmlRefreshInterval = (int)GConfClient.Get(gangGconfPath + "xmlRefreshInterval"); //ProxySettings ProxyKind = (CConfiguration.ProxyType)GConfClient.Get(gangGconfPath + "proxyKind"); gangProxy.Ip = (string)GConfClient.Get(gangGconfPath + "proxyIp"); gangProxy.Port = (int)GConfClient.Get(gangGconfPath + "proxyPort"); readSystemProxySettings(); //UpdateSettings DontBotherForUpdates = (bool)GConfClient.Get(gangGconfPath + "dontBotherMeForUpdates"); return(true); } catch { Console.Out.WriteLine("Old gconf settings detected...writing new settings!"); SaveProgramSettings(); return(false); } }
//Load all initial program settings (width, height, refresh interval, download folder...) public bool LoadProgramSettings() { try { ProxyKind = CConfiguration.ProxyType.None; //WindowAttributes Window.X = (int)GConfClient.Get(gangGconfPath+"xPosition"); Window.Y = (int)GConfClient.Get(gangGconfPath+"yPosition"); Window.Width = (int)GConfClient.Get(gangGconfPath+"width"); Window.Height = (int)GConfClient.Get(gangGconfPath+"height"); //Program paths themesDownloadPath = (string)GConfClient.Get(gangGconfPath+"themesDownloadPath"); XmlRefreshInterval = (int)GConfClient.Get(gangGconfPath+"xmlRefreshInterval"); //ProxySettings ProxyKind=(CConfiguration.ProxyType)GConfClient.Get(gangGconfPath+"proxyKind"); gangProxy.Ip=(string)GConfClient.Get(gangGconfPath+"proxyIp"); gangProxy.Port=(int)GConfClient.Get(gangGconfPath+"proxyPort"); readSystemProxySettings(); //UpdateSettings DontBotherForUpdates = (bool)GConfClient.Get(gangGconfPath+"dontBotherMeForUpdates"); return true; } catch { Console.Out.WriteLine("Old gconf settings detected...writing new settings!"); SaveProgramSettings(); return false; } }