Example #1
0
        public MainForm()
        {
            currentDirectory = Directory.GetCurrentDirectory();

            try
            {
                jsonData = OverlayData.FromJson(File.ReadAllText(String.Format("{0}\\{1}", currentDirectory, "configuration.json")));
            }
            catch (Exception e)
            {
                MessageBox.Show(
                    "The configuration file could not be found within the directory of the application (configuration.json)",
                    "PoeCompass - error while reading configuration file",
                    MessageBoxButtons.OK,
                    MessageBoxIcon.Error
                    );

                Environment.Exit(0);
            }

            logPath = jsonData[0].clientLogFile.ToString();

            // Initialize the app
            InitializeComponent();
            InitializeStream();

            // Define the regex to scan ...
            zoneEntered = new Regex(@"You have entered (.*)\.", RegexOptions.IgnoreCase);
        }
        public MainForm()
        {
            currentDirectory = Directory.GetCurrentDirectory();
            jsonData         = OverlayData.FromJson(File.ReadAllText(String.Format("{0}\\{1}", currentDirectory, "configuration.json")));

            logPath = jsonData[0].clientLogFile.ToString();
            MessageBox.Show("Reading client.log from : " + logPath);

            // Initialize the app
            InitializeComponent();
            InitializeStream();

            // Define the regex to scan ...
            zoneEntered = new Regex(@"You have entered (.*)\.", RegexOptions.IgnoreCase);
        }