コード例 #1
0
        private void ResetValues()
        {
            Flags1 = _record.Flags1;
            Flags2 = _record.Flags2;
            Flags3 = _record.Flags3;
            FormID = _record.FormID;
            subRecords.Clear();
            var srs = _record.SubRecords.Select(x => x.Clone()).OfType <SubRecord>().ToArray();

            _record.MatchRecordStructureToRecord(srs);
            subRecords.AddRange(srs);
            subrecordListEditor.SubRecords = subRecords;

            tbName.Text   = _record.Name;
            tbFormID.Text = _record.FormID.ToString("X8");
            textBox1.Text = _record.Flags1.ToString("X8");

            try
            {
                comboBox1.ItemCheck -= comboBox1_ItemCheck;
                comboBox1.SetState(_record.Flags1);
            }
            finally
            {
                comboBox1.ItemCheck += comboBox1_ItemCheck;
            }
            tbFlags2.Text = _record.Flags2.ToString("X8");
            tbFlags3.Text = _record.Flags3.ToString("X8");
        }
コード例 #2
0
        public void Reload(Plugin[] plugins)
        {
            Plugins = plugins;
            listStrings.DataSource = null;
            strings.Clear();
            addStrings.Clear();
            remStrings.Clear();
            updateStrings.Clear();

            var strPlugins = new List <string>();

            foreach (var plugin in Plugins)
            {
                strPlugins.Add(plugin.Name);
            }
            cboPlugins.DataSource    = strPlugins;
            cboPlugins.SelectedIndex = 0;
            PopulateStrings();
            listStrings.DataSource = strings;
            FitColumns();
            UpdateStatusBar();
        }