Server.Gumps.RelayInfo.IsSwitched C# (CSharp) Метод

IsSwitched() публичный Метод

public IsSwitched ( int switchID ) : bool
switchID int
Результат bool
		public bool IsSwitched( int switchID )
		{
			for ( int i = 0; i < m_Switches.Length; ++i )
			{
				if ( m_Switches[i] == switchID )
				{
					return true;
				}
			}

			return false;
		}

Usage Example

Пример #1
0
        public void OnResponse(Server.Network.NetState sender, Server.Gumps.RelayInfo info)
        {
            Mobile    from = sender.Mobile;
            TMSS4Skin skin = sk;

            SkillReportsHelper.EnableSelectionReport = info.IsSwitched(2000);
            SkillReportsHelper.EnableProfileReport   = info.IsSwitched(1000);
            //PluginSaver.SavePluginSettings(this);
            Dictionary <string, object> args = new Dictionary <string, object>();

            if (skin != null)
            {
                args.Add("Skin", skin);
            }
            else
            {
                SkillSettings.DoTell("Reports: Skin is null.");
            }
            if (from != null)
            {
                args.Add("Mobile", from);
            }
            else
            {
                SkillSettings.DoTell("Reports: From is null.");
            }
            from.SendGump(new TMQueryPage("Main Menu", args));
        }
All Usage Examples Of Server.Gumps.RelayInfo::IsSwitched