本文整理汇总了C#中IPluginHost.Get_Language方法的典型用法代码示例。如果您正苦于以下问题:C# IPluginHost.Get_Language方法的具体用法?C# IPluginHost.Get_Language怎么用?C# IPluginHost.Get_Language使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPluginHost
的用法示例。
在下文中一共展示了IPluginHost.Get_Language方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InfoAni
public InfoAni(Ani.Todo info, IPluginHost pluginHost)
{
InitializeComponent();
this.pluginHost = pluginHost;
LeerIdioma();
this.info = info;
infoPicture1.Idioma = pluginHost.Get_Language();
infoPicture1.Informacion = info;
imagenes = new Bitmap[info.imgs];
for (int i = 0; i < info.imgs; i++)
{
comboBox1.Items.Add(info.imagenes[i].name);
imagenes[i] = (Bitmap)info.imagenes[i].bitmap.Clone();
}
comboBox1.SelectedIndex = 0;
pictureBox1.Image = imagenes[0];
}
示例2: Read
//.........这里部分代码省略.........
// Polygon section
br.BaseStream.Position = modelOffset + data.header.polygonStartOffset;
#region 3DInfo
info = new Info3D();
// Header
info.dummy = br.ReadByte();
info.num_objs = br.ReadByte();
info.section_size = br.ReadUInt16();
// Unknown
info.unknownBlock.header_size = br.ReadUInt16();
info.unknownBlock.section_size = br.ReadUInt16();
info.unknownBlock.constant = br.ReadUInt32();
info.unknownBlock.unknown1 = new ushort[info.num_objs];
info.unknownBlock.unknown2 = new ushort[info.num_objs];
for (int i = 0; i < info.num_objs; i++)
{
info.unknownBlock.unknown1[i] = br.ReadUInt16();
info.unknownBlock.unknown2[i] = br.ReadUInt16();
}
// Data
info.infoBlock.header_size = br.ReadUInt16();
info.infoBlock.data_size = br.ReadUInt16();
info.infoBlock.infoData = new Object[info.num_objs];
for (int i = 0; i < info.num_objs; i++)
{
info.infoBlock.infoData[i] = br.ReadUInt32();
}
// Names
info.names = new string[info.num_objs];
for (int i = 0; i < info.num_objs; i++)
info.names[i] = new String(br.ReadChars(0x10)).Replace("\0", "");
data.polygon.header = info;
#endregion
#region Polygon definition
data.polygon.definition = new sBMD0.Model.ModelData.Polygon.Definition[data.polygon.header.num_objs];
for (int i = 0; i < data.polygon.header.num_objs; i++)
{
br.BaseStream.Position = modelOffset + data.header.polygonStartOffset + (uint)data.polygon.header.infoBlock.infoData[i];
long currPos = br.BaseStream.Position;
sBMD0.Model.ModelData.Polygon.Definition def = new sBMD0.Model.ModelData.Polygon.Definition();
def.unknown1 = br.ReadUInt32();
def.unknown2 = br.ReadUInt32();
def.display_offset = br.ReadUInt32() + (uint)currPos;
def.display_size = br.ReadUInt32();
data.polygon.definition[i] = def;
}
#endregion
#region Display list
data.polygon.display = new sBMD0.Model.ModelData.Polygon.Display[data.polygon.header.num_objs];
for (int i = 0; i < data.polygon.header.num_objs; i++)
{
br.BaseStream.Position = data.polygon.definition[i].display_offset;
byte[] display_list = br.ReadBytes((int)data.polygon.definition[i].display_size);
data.polygon.display[i].commands = new List<Command>();
for (int l = 0; l + 4 < display_list.Length; )
{
byte[] cmdID = new byte[] { display_list[l], display_list[l + 1], display_list[l + 2], display_list[l + 3] };
l += 4;
Command[] commands = new Command[4];
for (int c = 0; c < 4; c++)
{
commands[c] = new Command();
commands[c].cmd = cmdID[c];
int cmd_size = Get_CommandSize(cmdID[c]);
commands[c].param = new uint[cmd_size];
for (int p = 0; p < cmd_size && l + 4 < display_list.Length; p++, l += 4)
commands[c].param[p] = BitConverter.ToUInt32(display_list, l);
}
data.polygon.display[i].commands.AddRange(commands);
}
}
#endregion
bmd.model.mdlData[m] = data;
#endregion
}
Write_Info(bmd, pluginHost.Get_Language());
if (bmd.header.numSect == 2) // There is a Tex0 section
{
br.BaseStream.Position = bmd.header.offset[1];
bmd.texture = BTX0.Read_Section(ref br, bmd.header.offset[1], pluginHost.Get_Language());
}
br.Close();
return bmd;
}
示例3: Read
//.........这里部分代码省略.........
tex.texture_data = new byte[tex.texInfo.num_objs][];
uint compressedStartOffset = 0x00;
for (int i = 0; i < tex.texInfo.num_objs; i++)
{
sBTX0.Texture.TextInfo texInfo = new sBTX0.Texture.TextInfo();
texInfo.tex_offset = br.ReadUInt16();
texInfo.parameters = br.ReadUInt16();
texInfo.width2 = br.ReadByte();
texInfo.unknown = br.ReadByte();
texInfo.unknown2 = br.ReadByte();
texInfo.unknown3 = br.ReadByte();
texInfo.coord_transf = (byte)(texInfo.parameters & 14);
texInfo.color0 = (byte)((texInfo.parameters >> 13) & 1);
texInfo.format = (byte)((texInfo.parameters >> 10) & 7);
texInfo.height = (byte)(8 << ((texInfo.parameters >> 7) & 7));
texInfo.width = (byte)(8 << ((texInfo.parameters >> 4) & 7));
texInfo.flip_Y = (byte)((texInfo.parameters >> 3) & 1);
texInfo.flip_X = (byte)((texInfo.parameters >> 2) & 1);
texInfo.repeat_Y = (byte)((texInfo.parameters >> 1) & 1);
texInfo.repeat_X = (byte)(texInfo.parameters & 1);
if (texInfo.width == 0x00)
switch (texInfo.unknown & 0x3)
{
case 2:
texInfo.width = 0x200;
break;
default:
texInfo.width = 0x100;
break;
}
if (texInfo.height == 0x00)
switch ((texInfo.unknown >> 4) & 0x3)
{
case 2:
texInfo.height = 0x200;
break;
default:
texInfo.height = 0x100;
break;
}
texInfo.depth = FormatDepth[texInfo.format];
if (texInfo.format == 5)
{
texInfo.compressedDataStart = compressedStartOffset;
compressedStartOffset += (uint)(texInfo.width * texInfo.height / 8);
}
tex.texInfo.infoBlock.infoData[i] = texInfo;
}
tex.texInfo.names = new string[tex.texInfo.num_objs];
for (int i = 0; i < tex.texInfo.num_objs; i++)
tex.texInfo.names[i] = new String(br.ReadChars(0x10)).Replace("\0", "");
#endregion
#region Palette Info
br.BaseStream.Position = btx.header.offset[0] + tex.header.paletteInfo_offset;
// Header
tex.palInfo.dummy = br.ReadByte();
tex.palInfo.num_objs = br.ReadByte();
tex.palInfo.section_size = br.ReadUInt16();
// Unknown block
tex.palInfo.unknownBlock.header_size = br.ReadUInt16();
tex.palInfo.unknownBlock.section_size = br.ReadUInt16();
tex.palInfo.unknownBlock.constant = br.ReadUInt32();
tex.palInfo.unknownBlock.unknown1 = new ushort[tex.palInfo.num_objs];
tex.palInfo.unknownBlock.unknown2 = new ushort[tex.palInfo.num_objs];
for (int i = 0; i < tex.palInfo.num_objs; i++)
{
tex.palInfo.unknownBlock.unknown1[i] = br.ReadUInt16();
tex.palInfo.unknownBlock.unknown2[i] = br.ReadUInt16();
}
// Info block
tex.palInfo.infoBlock.header_size = br.ReadUInt16();
tex.palInfo.infoBlock.data_size = br.ReadUInt16();
tex.palette_data = new byte[tex.palInfo.num_objs][];
tex.palInfo.infoBlock.infoData = new object[tex.palInfo.num_objs];
for (int i = 0; i < tex.palInfo.num_objs; i++)
{
sBTX0.Texture.PalInfo palInfo = new sBTX0.Texture.PalInfo();
palInfo.palette_offset = (ushort)(br.ReadUInt16() & 0x1FFF);
palInfo.unknown1 = br.ReadUInt16(); // Not used
tex.palInfo.infoBlock.infoData[i] = palInfo;
}
tex.palInfo.names = new string[tex.palInfo.num_objs];
for (int i = 0; i < tex.palInfo.num_objs; i++)
tex.palInfo.names[i] = new String(br.ReadChars(0x10)).Replace("\0", "");
#endregion
btx.texture = tex;
#endregion
Write_Info(btx, pluginHost.Get_Language());
br.Close();
return btx;
}