private void textBox_IndicatorRelease(object sender, IndicatorReleaseEventArgs e)
{
if (!ModifierKeys.HasFlag(Keys.Control))
return;
int indicator = this.getIndicatorAt(e.Position);
if (indicator == kI18nIndicator)
{
var locKey = this.getLocKey(e.Position);
if (locKey != null)
{
this.mI18nLocKey = locKey;
EditLocStringCallback callback = new EditLocStringCallback(this.mI18nLocKey);
string translated = ModuleDataManager.GetInstance().LocalizeString(this.mI18nLocKey);
InputDialog dialog = new InputDialog("Edit Loc String", $"Edit Loc Text For: {mI18nLocKey}", translated, "Edit");
dialog.SetCallback(callback);
dialog.ShowDialog();
}
}
else if (indicator == kFileIndicator)
{
var text = this.getIndicatorText(this.mFileIndicator, e.Position);
ModuleFile module;
if (!this.tryGetModuleFile(text, out module) || module == null)
return;
var selectable = mOwner as IFileDataSelectable;
// TODO: instead of using an interface, try to have some function in
// the main view that allows switching to the manifest view + displaying a modulefile/filedata
if (selectable != null)
selectable.SetSelectedFileData(module.FileData);
}
}