Esempio n. 1
0
        private void workerParse_DoWork(object sender, DoWorkEventArgs e)
        {
            iParser = new INIParser(Program.DataPath);

            iParser.MatchBlocks(xParser);

            iParser.INIChanged      += new EventHandler(iParser_INIChanged);
            iParser.INIChangedStart += new EventHandler(iParser_INIChangedStart);
        }
Esempio n. 2
0
        void iParser_INIChanged(object sender, EventArgs e)
        {
            iParser.MatchBlocks(xParser);

            this.Invoke((MethodInvoker) delegate {
                DisplayBlocks();
                blv.Filter       = filterTextStrip.Text;
                progress.Visible = false;

                if (preChangeSelectedName != "")
                {
                    foreach (INIBlock b in blv)
                    {
                        if (b.Name.ToLower() == preChangeSelectedName && b.Type.ToLower() == preChangeSelectedType)
                        {
                            int i = blv.IndexOf(b);
                            view.Rows[i].Selected = true;
                            break;
                        }
                    }
                }

                if (preChangeDetailsName != "" && details != null)
                {
                    bool found = false;

                    foreach (INIBlock b in blv)
                    {
                        if (b.Name.ToLower() == preChangeDetailsName && b.Type.ToLower() == preChangeDetailsType)
                        {
                            details.Data = b;
                            details.Focus();
                            found = true;
                            break;
                        }
                    }

                    if (!found)
                    {
                        details.Close();
                    }
                }
            });
        }