mirror of
https://github.com/crskycode/GARbro.git
synced 2024-12-25 12:24:12 +08:00
always forget that linq First() accepts delegate.
This commit is contained in:
parent
9beff31fee
commit
977d4f215f
@ -78,7 +78,7 @@ namespace GameRes.Formats.KiriKiri
|
|||||||
|
|
||||||
public override void Init (ArcFile arc)
|
public override void Init (ArcFile arc)
|
||||||
{
|
{
|
||||||
var list_bin = arc.Dir.Where (e => e.Name == "plugin/list.bin").FirstOrDefault() as Xp3Entry;
|
var list_bin = arc.Dir.FirstOrDefault (e => e.Name == "plugin/list.bin") as Xp3Entry;
|
||||||
if (null == list_bin || list_bin.UnpackedSize <= 0x30)
|
if (null == list_bin || list_bin.UnpackedSize <= 0x30)
|
||||||
return;
|
return;
|
||||||
var bin = new byte[list_bin.UnpackedSize];
|
var bin = new byte[list_bin.UnpackedSize];
|
||||||
|
@ -290,7 +290,7 @@ namespace GameRes.Formats.ShiinaRio // 椎名里緒
|
|||||||
|
|
||||||
static EncryptionScheme GetScheme (string scheme)
|
static EncryptionScheme GetScheme (string scheme)
|
||||||
{
|
{
|
||||||
return Decoder.KnownSchemes.Where (s => s.Name == scheme).FirstOrDefault();
|
return Decoder.KnownSchemes.FirstOrDefault (s => s.Name == scheme);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -658,7 +658,7 @@ namespace GARbro.GUI
|
|||||||
items = items.Skip (start_index).Concat (items.Take (start_index));
|
items = items.Skip (start_index).Concat (items.Take (start_index));
|
||||||
}
|
}
|
||||||
string input = m_current_input.Phrase.ToString();
|
string input = m_current_input.Phrase.ToString();
|
||||||
var matched = items.Where (e => e.Name.StartsWith (input, StringIgnoreCase)).FirstOrDefault();
|
var matched = items.FirstOrDefault (e => e.Name.StartsWith (input, StringIgnoreCase));
|
||||||
if (null != matched)
|
if (null != matched)
|
||||||
lv_SelectItem (matched);
|
lv_SelectItem (matched);
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user