Example #1
0
        public MainForm()
        {
            InitializeComponent();
            // reduce flickering by setting the datagridview and listbox to double buffered drawing
            grid.DoubleBuffered(true);
            lstOccurrences.DoubleBuffered(true);

            // create a new async loader to update the status and progress bar
            loader = new Loader(lblStatus, progress);

            // initialize a spell check manager that will do most of the word logic
            List <string> warnings;

            manager = new SpellCheckManager(out warnings);

            // if there are warnings (like missing dictionary.txt) show them
            if (warnings.Count > 0)
            {
                MessageBox.Show(this, "Warning: " + Environment.NewLine + string.Join(Environment.NewLine, warnings.Select(w => " - " + w)), "Warnings while loading data", MessageBoxButtons.OK);
            }
        }