public NotificationCtrl( string style) { _styledir = style; string tmp = String.Format(@"./{0}/style.ini", _styledir); _styleini = new INIFile(tmp); loadSettings(); InitializeComponent(); TaskbarIcon.AddBalloonClosingHandler(this, onNotificationClosing); }
public String getWServerFromConfig() { // set a fixed hostname via environment parameters. String epHostName = System.Environment.GetEnvironmentVariable("ep6HostName"); if (epHostName != null) { return epHostName; } String epConfDir = System.Environment.GetEnvironmentVariable("EPAGES_CONFIG"); INIFile epConf = new INIFile(epConfDir + "\\epages.conf"); String Server = epConf.GetValue("DE_EPAGES::Object", "SystemDomainName", "localhost"); return Server; }
private void fmrMain_Load(object sender, EventArgs e) { WritePIDFile(pidFile); try { iniFile = new INIFile(iniFilePath); } catch (Exception ex) { MessageBox.Show("Error accessing INI file: " + ex.Message); return; } LoadSettings(); if (!Directory.Exists(basePath)) { MessageBox.Show("You need to set the path to your BattlEye folder"); frmOptions frmOptions = new frmOptions(this); frmOptions.Show(this); } if (!appendLogs) { // We're not appending so create/overwrite program log files try { FileStream fs = new FileStream(logFileOutput, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite); fs.Close(); fs = new FileStream(logFileDebug, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite); fs.Close(); fs = new FileStream(logFileRCON, FileMode.Create, FileAccess.ReadWrite, FileShare.ReadWrite); fs.Close(); } catch (Exception ex) { Console.WriteLine(MethodBase.GetCurrentMethod().Name + " " + ex.Message); } } // create and start UI threads Thread tLinesQueued = new Thread(DoLinesQueued); tLinesQueued.IsBackground = true; tLinesQueued.Start(); if (autoStart) { if (Start()) { started = true; btnStartStop.Text = "Stop"; cbRewindOn.Enabled = false; cbConnect.Enabled = false; } } }