public static byte[] ReadFile(string filename) { byte[] array = null; ZoggrOptions options = new ZoggrOptions(); options.LoadConfiguration(); FileStream stream = null; try { stream = File.OpenRead(filename); array = new byte[(int)stream.Length]; stream.Read(array, 0, (int)stream.Length); } catch (Exception exception) { throw new Exception(string.Format("Error reading {0}!", filename), exception); } finally { if (stream != null) { stream.Close(); } } return(array); }
public static byte[] ReadFile(string filename) { byte[] array = null; ZoggrOptions options = new ZoggrOptions(); options.LoadConfiguration(); FileStream stream = null; try { stream = File.OpenRead(filename); array = new byte[(int)stream.Length]; stream.Read(array, 0, (int)stream.Length); } catch (Exception exception) { throw new Exception(string.Format("Error reading {0}!", filename), exception); } finally { if (stream != null) { stream.Close(); } } return array; }
public ZoggrUploader() { ZoggrLogger.Log(AppInfo.GetTitle() + " v" + AppInfo.GetVersion() + " - (c) 2008 Zoggr"); ZoggrLogger.LogThanks(); this.options = new ZoggrOptions(); this.options.LoadConfiguration(); }
public ZoggrSender() { ZoggrLogger.Log(AppInfo.GetTitle() + " v" + AppInfo.GetVersion() + " - (c) 2008 Zoggr"); ZoggrLogger.LogThanks(); this.options = new ZoggrOptions(); this.options.LoadConfiguration(); if (this.options.Options.rddnsip.Length > 0) { this.rddnsServer = this.options.Options.rddnsip; } }