// ========================================================================================================= public MainForm() { InitializeComponent(); this.AddToLog = new AddToTextBoxDelegate(this.AddToLogMethod); this.AddToMessages = new AddToTextBoxDelegate(this.AddToMessagesMethod); this.Log = new CLog(this.tbLog, this.AddToLog); this.Messages = new CMessages(this.tbMessages, this.AddToMessages); var base_path = Environment.GetEnvironmentVariable("USERPROFILE"); if (base_path == null) { base_path = Environment.GetEnvironmentVariable("HOME"); } if (base_path == null) { base_path = Path.GetDirectoryName(Application.ExecutablePath); } this._settings_file_name = Path.Combine(base_path, ".wialon_ips_emulator.settings"); this._log_file_name = Path.Combine(base_path, ".wialon_ips_emulator.log"); this.tmrPing = new System.Threading.Timer(new TimerCallback(this.PingTimerCallback), null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); }
public CMessages(TextBox output, AddToTextBoxDelegate add_to_messages) { this._output = output; this._add_to_messages = add_to_messages; }
public CLog(TextBox output, AddToTextBoxDelegate add_to_log) { this._output = output; this._add_to_log = add_to_log; }
// ========================================================================================================= public MainForm() { InitializeComponent(); this.AddToLog = new AddToTextBoxDelegate(this.AddToLogMethod); this.AddToMessages = new AddToTextBoxDelegate(this.AddToMessagesMethod); this.Log = new CLog(this.tbLog, this.AddToLog); this.Messages = new CMessages(this.tbMessages, this.AddToMessages); var base_path = Environment.GetEnvironmentVariable("USERPROFILE"); if (base_path == null) base_path = Environment.GetEnvironmentVariable("HOME"); if (base_path == null) base_path = Path.GetDirectoryName(Application.ExecutablePath); this._settings_file_name = Path.Combine(base_path, ".wialon_ips_emulator.settings"); this._log_file_name = Path.Combine(base_path, ".wialon_ips_emulator.log"); this.tmrPing = new System.Threading.Timer(new TimerCallback(this.PingTimerCallback), null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); }
// ========================================================================================================= public MainForm() { InitializeComponent(); this.AddToLog = new AddToTextBoxDelegate(this.AddToLogMethod); this.AddToMessages = new AddToTextBoxDelegate(this.AddToMessagesMethod); this.Log = new CLog(this.tbLog, this.AddToLog); this.Messages = new CMessages(this.tbMessages, this.AddToMessages); this._settings_file_name = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "settings.xml"); this._last_log_file_name = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "last_log.txt"); this.tmrPing = new System.Threading.Timer(new TimerCallback(this.PingTimerCallback), null, System.Threading.Timeout.Infinite, System.Threading.Timeout.Infinite); }