Ejemplo n.º 1
0
        public FormSelectNamesEntry(
            NamesBINFile names, string current, string restriction) :
            base(current)
        {
            InitializeComponent();

            myNames       = names;
            myRestriction = new Regex(restriction);
        }
Ejemplo n.º 2
0
        protected override bool OnLoad(Progress progress)
        {
            try
            {
                myBIN = new NamesBINFile();

                myBIN.Load(FileName, progress);
            }
            catch (Exception ex)
            {
                FormMain.Instance.ErrorMessage(ex.Message);
                return(false);
            }

            return(true);
        }
Ejemplo n.º 3
0
        public void Build(NamesBINFile bin, Progress progress)
        {
            myNames = bin;

            progress.Begin(bin.EntryCount);

            for (int i = 0; i < bin.EntryCount; ++i)
            {
                NamesBINEntry entry = bin.get_Entries(i);

                ListViewItem item = new ListViewItem();
                item.Text = entry.Name;

                item.SubItems.Add(entry.Enum.ToString());
                item.SubItems.Add(entry.Offset.ToString());

                listViewEntries.Items.Add(item);

                progress.Update();
            }

            progress.End();
        }