private void FileControl_Load(object sender, EventArgs e) { this.Text = "File Control (" + this.filecontrolDictionary.Count + ")"; dataGridView1.EditMode = DataGridViewEditMode.EditOnEnter; foreach (KeyValuePair <BundleEntryPath, List <BundleRewriteItem> > kvp in filecontrolDictionary) { BundleEntryPath key = kvp.Key; List <BundleRewriteItem> mods = kvp.Value; if (mods.Count(p => !p.ReplacementFile.EndsWith(".script")) == 0) { continue; } String filepath = ""; String path = HashIndex.GetUnhashed(key.EntryPath); String extension = HashIndex.GetUnhashed(key.EntryExtension); if (!string.IsNullOrEmpty(path) && !string.IsNullOrEmpty(extension)) { if (key.IsLanguageSpecific) { filepath = path + "." + key.EntryLanguage + "." + extension; } else { filepath = path + "." + extension; } } List <string> modoptions = new List <string>(); foreach (BundleRewriteItem bm in mods) { modoptions.Add(bm.ModName); } DataGridViewRow dgvRow = new DataGridViewRow(); dgvRow.Cells.Add(new DataGridViewTextBoxCell()); dgvRow.Cells.Add(new DataGridViewComboBoxCell()); dgvRow.Cells[0].Value = filepath; ((DataGridViewComboBoxCell)dgvRow.Cells[1]).DataSource = modoptions; ((DataGridViewComboBoxCell)dgvRow.Cells[1]).Tag = key; if (filecontrolSelectedDictionary.ContainsKey(key)) { ((DataGridViewComboBoxCell)dgvRow.Cells[1]).Value = filecontrolSelectedDictionary[key]; } else { ((DataGridViewComboBoxCell)dgvRow.Cells[1]).Value = modoptions[0]; } dataGridView1.Rows.Add(dgvRow); } }
public bool Equals(BundleEntryPath guest) { if (ReferenceEquals(guest, null)) return false; if(ReferenceEquals(this, guest)) return true; return this == guest; }
public bool Equals(BundleEntryPath guest) { if (ReferenceEquals(guest, null)) { return(false); } if (ReferenceEquals(this, guest)) { return(true); } return(this == guest); }
public BundleEntryPath getBundleEntryPath() { BundleEntryPath bep = new BundleEntryPath(); bep.EntryPath = this.BundlePath; bep.EntryLanguage = this.BundleLanguage; bep.EntryExtension = this.BundleExtension; return bep; }