public Window() { InitializeComponent(); CreateContextMenu(); StartPosition = FormStartPosition.Manual; SetWindowPos(); BackColor = Color.Pink; TransparencyKey = Color.Pink; memRead = new MemRead(); memRead.GetProcess(); var Timer = new Timer() { Interval = (250) }; Timer.Tick += new EventHandler(UpdateWindow); Timer.Start(); }
public Window() { try { if (File.Exists("settings.ini")) { _settings = LoadSettings(); } else { _settings = new Settings() { CoordsAccessMod = CoordsAccessMods.File, ChatLogConfigs = new ChatLogConfig[] { new ChatLogConfig() { Name = "Default", Path = @"C:\Games\Ragnarok Online\Chat", FileNamePattern = @"Chat_General*", CoordsPattern = @"[^\:]* \((?<city>[0-9a-zA-Z_]+)\) : (?<lat>\d{1,3})\, (?<lon>\d{1,3})\Z", RemoveFilesAfterRead = true }, new ChatLogConfig() { Name = "ruRO", Path = @"C:\Games\Ragnarok Online\Chat", FileNamePattern = @"Chat_Общий чат*", CoordsPattern = @"[^\:]* \((?<city>[0-9a-zA-Z_]+)\) : (?<lat>\d{1,3})\, (?<lon>\d{1,3})\Z", RemoveFilesAfterRead = true } }, CurrentChatLogConfigIndex = 1 }; SaveSettings(_settings); } } catch (Exception ex) { MessageBox.Show(ex.Message.ToString(), "Load Settings Error"); Application.Exit(); } InitializeComponent(); if (_settings.CoordsAccessMod == CoordsAccessMods.File) { cbChangeMode.Checked = true; } else { cbChangeMode.Checked = false; } flashAlert = GetAlertToggleBool(); CreateContextMenu(); StartPosition = FormStartPosition.Manual; SetWindowPos(); BackColor = Color.Pink; TransparencyKey = Color.Pink; memRead = new MemRead(); fileRead = new FileRead(); memRead.GetProcess(); var Timer = new Timer() { Interval = (250) }; Timer.Tick += new EventHandler(UpdateWindow); Timer.Start(); }