当前位置: 首页>>代码示例>>C#>>正文


C# System.Global类代码示例

本文整理汇总了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;
 }
开发者ID:JasonWilkins,项目名称:visitor-tk,代码行数:7,代码来源:FlatBuilder.cs

示例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();
        }
开发者ID:CarlosX,项目名称:DarkEmu,代码行数:26,代码来源:AlchemyPackets.cs

示例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);
        }
开发者ID:paveyry,项目名称:MetaStruggle,代码行数:7,代码来源:Serialization.cs

示例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;
                }
            }
        }
开发者ID:jfrausto914,项目名称:FSW,代码行数:34,代码来源:ConsultaPorDiaView.xaml.cs

示例5: ChatServerMessage

 public ChatServerMessage(Channel chan, string message, Global.Character actor)
     : base(PacketType.ChatServerMessage)
 {
     Channel = chan;
     Message = message;
     Actor = actor;
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:ChatServerMessage.cs

示例6: ChatServerCopyMessage

 public ChatServerCopyMessage(Channel chan, string message, Global.Character target)
     : base(PacketID.ChatServerCopyMessage)
 {
     Channel = chan;
     Message = message;
     Target = target;
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:ChatServerCopyMessage.cs

示例7: ActorSpeakedArgs

 public ActorSpeakedArgs(Global.Character actor, Channel channel, string message)
     : base(GameEventArgsType.ActorSpeaked)
 {
     Channel = channel;
     Message = message;
     Actor = actor;
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:EventArgs.cs

示例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);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:7,代码来源:GameMapMovementMessage.cs

示例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();
        }
开发者ID:jfrausto914,项目名称:FSW,代码行数:27,代码来源:AltaSuperToken.xaml.cs

示例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);
            }
        }
开发者ID:jfrausto914,项目名称:FSW,代码行数:29,代码来源:DesbloqueoToken.xaml.cs

示例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);
        }
开发者ID:Emudofus,项目名称:Aldos,代码行数:8,代码来源:PartyInvitationMessage.cs

示例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;
     }
 }
开发者ID:Tyf0n,项目名称:DynamicProgramming,代码行数:13,代码来源:Program.cs

示例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);
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:9,代码来源:ChatServerCopyMessage.cs

示例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;
     }
 }
开发者ID:diptarag,项目名称:DynamicProgramming,代码行数:14,代码来源:Program.cs

示例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);
     }
 }
开发者ID:Emudofus,项目名称:Aldos,代码行数:9,代码来源:FriendsListMessage.cs


注:本文中的System.Global类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。