本文整理汇总了C#中System.Global类的典型用法代码示例。如果您正苦于以下问题:C# Global类的具体用法?C# Global怎么用?C# Global使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Global类属于System命名空间,在下文中一共展示了Global类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: defineGlobal
public Global defineGlobal(string name, Type type)
{
if (null == name) name = ".G"+m_code.globals.Count;
Global g = new Global(name, type);
m_code.globals.Add(g);
return g;
}
示例2: AlchemyResponse
public static byte[] AlchemyResponse(bool isSuccess, Global.slotItem sItem, byte type, byte totalblue)
{
PacketWriter Writer = new PacketWriter();
Writer.Create(Systems.SERVER_ALCHEMY);
Writer.Byte(1);
Writer.Byte(2);
Writer.Bool(isSuccess);
Writer.Byte(sItem.Slot);
if (!isSuccess) { Writer.Byte(0); }
Writer.DWord(0);
Writer.DWord(sItem.ID);
Writer.Byte(sItem.PlusValue);
Writer.LWord(0);
Writer.DWord(sItem.Durability);
Writer.Byte(Data.ItemBlue[sItem.dbID].totalblue);
for (int i = 0; i <= Data.ItemBlue[sItem.dbID].totalblue - 1; i++)
{
Writer.DWord(Data.MagicOptions.Find(mg => (mg.Name == Convert.ToString(Data.ItemBlue[sItem.dbID].blue[i]))).ID);
Writer.DWord(Data.ItemBlue[sItem.dbID].blueamount[i]);
}
Writer.Word(1);
Writer.Word(2);
Writer.Word(3);
return Writer.GetBytes();
}
示例3: SaveConfigFile
public static void SaveConfigFile(string configFileName, Global.Config config)
{
var xs = new XmlSerializer(typeof(Global.Config));
using (var sw = new StreamWriter(configFileName))
xs.Serialize(sw, config);
}
示例4: _consultaPorDiaViewModel_ProcesoError
void _consultaPorDiaViewModel_ProcesoError(Global.ViewModelEventArgs e)
{
progress.Hide();
if (e.ErrorInMakingRequest)
{
MessageBox.Show(TextosFront.frontMensajeErrorConexion);
}
else
{
e.Error.message = !string.IsNullOrEmpty(e.Error.message) ? e.Error.message : TextosFront.frontMensajeErrorConexion;
switch (e.Error.clave)
{
case Errors.Token.BLOQUEO_TEMPORAL_TOKEN:
Resultado res = CasosDeUso.getResultado((Application.Current as App).matrix, CasosDeUso.getCodigoCU(ClavesOperacion.ConsultaBitacora), (int)(Application.Current as App).EstatusToken, (int)(Application.Current as App).EstatusSoftToken);
if ("TF".Equals(res.token))
{
(Application.Current as App).EstatusToken = EstatusToken.T;
}
else
{
(Application.Current as App).EstatusSoftToken = EstatusToken.T;
}
MessageBox.Show(TextosFront.frontMensajeTokenBloqueadoTemporal2, string.Empty, MessageBoxButton.OK);
break;
case Errors.Generic.GBL_03:
this.NavigateTo(Views._PanoramaPublicoView);
this.App().SesionIniciada = false;
break;
}
}
}
示例5: ChatServerMessage
public ChatServerMessage(Channel chan, string message, Global.Character actor)
: base(PacketType.ChatServerMessage)
{
Channel = chan;
Message = message;
Actor = actor;
}
示例6: ChatServerCopyMessage
public ChatServerCopyMessage(Channel chan, string message, Global.Character target)
: base(PacketID.ChatServerCopyMessage)
{
Channel = chan;
Message = message;
Target = target;
}
示例7: ActorSpeakedArgs
public ActorSpeakedArgs(Global.Character actor, Channel channel, string message)
: base(GameEventArgsType.ActorSpeaked)
{
Channel = channel;
Message = message;
Actor = actor;
}
示例8: serialize
public static void serialize(Utils.Objects.Packet sender, List<int> path, Global.Character actor)
{
sender.WriteShort( (short)path.Count );
foreach (int cell in path)
sender.WriteShort((short)cell);
sender.WriteInt(actor.Guid);
}
示例9: _vm_ViewModelLoaded
void _vm_ViewModelLoaded(Global.ViewModelEventArgs e)
{
this._vm.ProcesoError += _vm_ProcesoError;
this._vm.ProcessSuccess += _vm_ProcessSuccess;
this._vm.CerrarSesionComplete += new Global.ViewModelServiceCallback(_vm_CerrarSesionComplete);
this._vm.ValidaTokenComplete += _vm_ValidaTokenComplete;
lstCompaniasCelular.ItemsSource = this._vm.CompaniasCelulares;
lstCompaniasCelular.DataBind();
tbxTelefonoCelular.Text = this._vm.TelefonoCelular;
if (null != this._vm.CompaniaCelular)
{
tbxCompaniaCelular.Text = this._vm.CompaniaCelular.NombreCompania;
}
tbxCorreoElectronico.Text = this._vm.CorreoElectronico;
token.TokenSelected += token_TokenSelected;
introducirPin.ValidarPinCompleted += new UserControls.IntroducirPin.ValidarPinCompletedEventHandler(introducirPin_ValidarPinCompleted);
this.BackKeyPress += token.CancelBackKeyPress;
this.BackKeyPress += lstCompaniasCelular.CancelBackKeyPress;
this.BackKeyPress += AltaSuperTokenView_BackKeyPress;
if(this._vm.ActualizarDatos == "OK")
Paso1_3();
else
Paso2_3();
}
示例10: _vm_CerrarSesionError
void _vm_CerrarSesionError(Global.ViewModelEventArgs e)
{
if (!e.ErrorInMakingRequest)
{
if (!string.IsNullOrEmpty(e.Error.message))
{
switch (e.Error.clave)
{
case Errors.Generic.GBL_03:
this.NavigateTo(Views._PanoramaPublicoView);
this.App().SesionIniciada = false;
break;
default:
break;
}
MessageBox.Show(e.Error.message);
}
else
{
MessageBox.Show(TextosFront.frontMensajeErrorConexion);
}
}
else
{
MessageBox.Show(TextosFront.frontMensajeErrorConexion);
}
}
示例11: serialize
public static void serialize(Utils.Objects.Packet sender, Global.Character senderChar, Global.Character targetChar)
{
sender.WriteInt(senderChar.Guid);
sender.WriteUTF(senderChar.Name);
sender.WriteInt(targetChar.Guid);
sender.WriteUTF(targetChar.Name);
}
示例12: ProblemFactory
/// <summary>
/// Get the particular Problem object based on the option chosen by user
/// </summary>
/// <param name="problem">Problem ID</param>
/// <returns>Respective problem object</returns>
static Problem ProblemFactory(Global.Problems problem)
{
switch (problem)
{
case Global.Problems.RodCutting: return new RodCutting();
default: return null;
}
}
示例13: serialize
public static void serialize(Utils.Objects.Packet sender, Channel chan, string message, Global.Character target)
{
sender.WriteByte((byte)chan);
sender.WriteUTF(message);
sender.WriteInt(Global.Environnement.getInstance().Timestamp);
sender.WriteUTF("abcdef"); // fingerprint ???
sender.WriteInt(target.Guid);
sender.WriteUTF(target.Name);
}
示例14: ProblemFactory
/// <summary>
/// Get the particular Problem object based on the option chosen by user
/// </summary>
/// <param name="problem">Problem ID</param>
/// <returns>Respective problem object</returns>
static Problem ProblemFactory(Global.Problems problem)
{
switch (problem)
{
case Global.Problems.RodCutting: return new RodCutting();
case Global.Problems.LongestCommonSubSequence: return new LongestCommonSubsequence();
default: return null;
}
}
示例15: serialize
public static void serialize(Utils.Objects.Packet sender, Global.FriendList friends)
{
sender.WriteShort((short)friends.Count);
foreach (Types.context.FriendInformations friend in friends.ToList())
{
sender.WriteShort((short)friend.ProtocolID);
friend.serialize(sender);
}
}