• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# System.Boolean类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中System.Boolean的典型用法代码示例。如果您正苦于以下问题:C# Boolean类的具体用法?C# Boolean怎么用?C# Boolean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Boolean类属于System命名空间,在下文中一共展示了Boolean类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Platform

        public Platform(int x, int y, Type type, Texture2D texture, Boolean bottomCollision)
            : base(x, y, texture)
        {
            this.bottomCollision = bottomCollision;

            this.type = type;
        }
开发者ID:Cur10s1ty,项目名称:project2,代码行数:7,代码来源:Platform.cs


示例2: GetRestUrl

        /// <summary>Gets REST url.</summary>
        /// <param name="urlKey">Url key.</param>
        /// <param name="addClientId">Denotes whether client identifier should be composed into final url.</param>
        /// <param name="pagination">Pagination object.</param>
        /// <param name="additionalUrlParams">Additional parameters.</param>
        /// <returns>Final REST url.</returns>
        public String GetRestUrl(String urlKey, Boolean addClientId, Pagination pagination, Dictionary<String, String> additionalUrlParams)
        {
            String url;

            if (!addClientId)
            {
                url = "/v2.01" + urlKey;
            }
            else
            {
                url = "/v2.01/" + _root.Config.ClientId + urlKey;
            }

            bool paramsAdded = false;
            if (pagination != null)
            {
                url += "?page=" + pagination.Page + "&per_page=" + pagination.ItemsPerPage;
                paramsAdded = true;
            }

            if (additionalUrlParams != null)
            {
                foreach (string key in additionalUrlParams.Keys)
                {

                    url += paramsAdded ? Constants.URI_QUERY_PARAMS_SEPARATOR : Constants.URI_QUERY_SEPARATOR;
                    url += key + "=" + Uri.EscapeDataString(additionalUrlParams[key]);
                    paramsAdded = true;
                }
            }

            return url;
        }
开发者ID:ioliver85,项目名称:mangopay2-net-sdk,代码行数:39,代码来源:UrlTool.cs


示例3: ConvertToFontWeight

 FontWeight ConvertToFontWeight(Boolean bold)
 {
     if (bold) {
         return FontWeights.Bold;
     }
     return FontWeights.Normal;
 }
开发者ID:2594636985,项目名称:SharpDevelop,代码行数:7,代码来源:BooleanToFontWeightConverter.cs


示例4: Config

        public Config()
        {
            //check if there is any config file, if not create a new one with some defaults...
            if (File.Exists(AppPath + "\\dufftv.ini"))
            {
                //declare new source ini file
                source = new IniConfigSource(AppPath + "\\dufftv.ini");

                //turn on autosaving, no need to save manually
                source.AutoSave = true;

                // Creates two Boolean aliases.
                source.Alias.AddAlias("On", true);
                source.Alias.AddAlias("Off", false);

                _Version = source.Configs["defaults"].GetString("Version");
                _AutoUpdate = source.Configs["defaults"].GetBoolean("AutoUpdate", false);
                _ConnectionCheckURI = source.Configs["defaults"].GetString("ConnectionCheckURI", "http://www.google.se");
                _LastUpdate = _Version = source.Configs["defaults"].GetString("LastUpdate");
                _IconSize =  source.Configs["defaults"].GetInt("IconSize");
                _XMLTVSourceURI = source.Configs["xmltv"].GetString("SourceURI");
                _Country = source.Configs["xmltv"].GetString("Country");
                _ChannelList = source.Configs["xmltv"].Get("ChannelList").Split('|');

                _CreatedNewFile = false;
            }
            else
            {
                CreateNewConfigFile();
            }
        }
开发者ID:BackupTheBerlios,项目名称:dufftv,代码行数:31,代码来源:Config.cs


示例5: CaptionDef

 public CaptionDef(Point Position, String Text, Color ForeColor, Boolean Visible)
 {
     this.Position = Position;
     this.Text = Text;
     this.ForeColor = ForeColor;
     this.Visible = Visible;
 }
开发者ID:StewartScottRogers,项目名称:RealtimeControlsSolution,代码行数:7,代码来源:CaptionDef.cs


示例6: Update

		public void Update(PlayerButton input, Facing facing, Boolean paused)
		{
			m_inputbuffer.Add(input, facing);

			if (paused == false)
			{
				foreach (BufferCount count in m_commandcount.Values) count.Tick();
			}

			foreach (Command command in Commands)
			{
				if (command.IsValid == false) continue;

				if (CommandChecker.Check(command, m_inputbuffer) == true)
				{
					Int32 time = command.BufferTime;
					if (paused == true) ++time;

					m_commandcount[command.Name].Set(time);
				}
			}

			m_activecommands.Clear();
			foreach (var data in m_commandcount) if (data.Value.IsActive == true) m_activecommands.Add(data.Key);
		}
开发者ID:lodossDev,项目名称:xnamugen,代码行数:25,代码来源:CommandManager.cs


示例7: fromFile

        public Boolean fromFile(String path)
        {
            FileStream fs = new FileStream(path, FileMode.Open);
            BinaryReader reader = new BinaryReader(fs);
            try
            {
                String h = reader.ReadString();
                float v = BitConverter.ToSingle(reader.ReadBytes(sizeof(float)), 0);
                drawFloorModel = reader.ReadBoolean();
                showAlwaysFloorMap = reader.ReadBoolean();
                lockMapSize = reader.ReadBoolean();
                mapXsize = reader.ReadInt32();
                mapYsize = reader.ReadInt32();

                //edgeXのxはmapX-1
                //yはmapYsize

                return true;

            }
            catch (EndOfStreamException eex)
            {
                //握りつぶす
                return false;
            }
            finally
            {
                reader.Close();
            }
        }
开发者ID:kistvan,项目名称:geditor,代码行数:30,代码来源:EditorConfig.cs


示例8: TicTacToeTransaction

 public TicTacToeTransaction(String[,] board, int x, int y, Boolean playerXTurn)
 {
     this.board = board;
     this.x = x;
     this.y = y;
     this.playerXTurn = playerXTurn;
 }
开发者ID:physic,项目名称:18xx,代码行数:7,代码来源:TicTacToeTransaction.cs


示例9: RunFlashDevelopWithErrorHandling

 /// <summary>
 /// Run FlashDevelop and catch any unhandled exceptions.
 /// </summary>
 static void RunFlashDevelopWithErrorHandling(String[] arguments, Boolean isFirst)
 {
     Application.EnableVisualStyles();
     Application.SetCompatibleTextRenderingDefault(false);
     MainForm.IsFirst = isFirst;
     MainForm.Arguments = arguments;
     MainForm mainForm = new MainForm();
     SingleInstanceApp.NewInstanceMessage += delegate(Object sender, Object message)
     {
         MainForm.Arguments = message as String[];
         mainForm.ProcessParameters(message as String[]);
     };
     try
     {
         SingleInstanceApp.Initialize();
         Application.Run(mainForm);
     }
     catch (Exception ex)
     {
         MessageBox.Show("There was an unexpected problem while running FlashDevelop: " + ex.Message, "Error");
     }
     finally
     {
         SingleInstanceApp.Close();
     }
 }
开发者ID:zpLin,项目名称:flashdevelop,代码行数:29,代码来源:Program.cs


示例10: PersistFile

        internal void PersistFile(Web web, ProvisioningTemplateCreationInformation creationInfo, PnPMonitoredScope scope, string folderPath, string fileName, Boolean decodeFileName = false)
        {
            if (creationInfo.FileConnector != null)
            {
                SharePointConnector connector = new SharePointConnector(web.Context, web.Url, "dummy");

                Uri u = new Uri(web.Url);
                if (folderPath.IndexOf(u.PathAndQuery, StringComparison.InvariantCultureIgnoreCase) > -1)
                {
                    folderPath = folderPath.Replace(u.PathAndQuery, "");
                }

                using (Stream s = connector.GetFileStream(fileName, folderPath))
                {
                    if (s != null)
                    {
                        creationInfo.FileConnector.SaveFileStream(decodeFileName ? HttpUtility.UrlDecode(fileName) : fileName, s);
                    }
                }
            }
            else
            {
                WriteWarning("No connector present to persist homepage.", ProvisioningMessageType.Error);
                scope.LogError("No connector present to persist homepage");
            }
        }
开发者ID:rgueldenpfennig,项目名称:PnP-Sites-Core,代码行数:26,代码来源:ObjectContentHandlerBase.cs


示例11: Map

        /// <summary>
        /// Initializes the map with values from parameter.
        /// </summary>
        /// <param name="folderName">Deprecated</param>
        /// <param name="id"></param>
        /// <param name="title"></param>
        /// <param name="description"></param>
        /// <param name="fieldSize"></param>
        /// <param name="hitbox"></param>
        /// <param name="carStartSpeed"></param>
        /// <param name="carStartDirection"></param>
        /// <param name="published"></param>
        /// <param name="carStartPositions"></param>
        /// <param name="roundFinishedPositions"></param>
        /// <param name="forbiddenPositions"></param>
        public Map(
            String folderName, String id, String title, String description,
            int fieldSize, int hitbox, int carStartSpeed,
            String carStartDirection, Boolean published, BindingList<Node> carStartPositions,
            BindingList<Node> roundFinishedPositions, BindingList<Node> forbiddenPositions,
            Image image
            )
        {
            this.FolderName = folderName;

            this.Id = id;
            this.Title = title;
            this.Description = description;

            this.FieldSize = fieldSize;
            this.Hitbox = hitbox;
            this.CarStartSpeed = carStartSpeed;
            this.CarStartDirection = carStartDirection;
            this.Published = published;

            this.CarStartPositions = carStartPositions;
            this.RoundFinishedPositions = roundFinishedPositions;
            this.ForbiddenPositions = forbiddenPositions;

            this.Image = image;
        }
开发者ID:AMartinNo1,项目名称:AWE-Projekt-Autorennen,代码行数:41,代码来源:Map.cs


示例12: initSimulation

        public static void initSimulation(Airport.Airport airport, Boolean enableMultiThreading)
        {
            Simulation.airport = airport;
            Simulation.multiThreadingEnabled = enableMultiThreading;

            Console.ForegroundColor = ConsoleColor.White;
        }
开发者ID:quintstoffers,项目名称:Introductieproject,代码行数:7,代码来源:Simulation.cs


示例13: parse

        public override void parse(BinaryReader br, ChunkMap chkMap, Boolean dbg, int endPosition)
        {
            if (dbg) Console.Out.WriteLine("|---| " + ChunkHeader.W3D_CHUNK_TEXTURE);

            HeaderID = (int)ChunkHeader.W3D_CHUNK_TEXTURE;
            HeaderName = ChunkHeader.W3D_CHUNK_TEXTURE.ToString();
        }
开发者ID:RavenB,项目名称:Earth-and-Beyond-server,代码行数:7,代码来源:TextureChunk.cs


示例14: Configuration

 protected Configuration(ConfigurationType type, string name, Boolean standard)
 {
     Name = name;
     Type = type;
     Standard = standard;
     ID = name;
 }
开发者ID:TheAirlineProject,项目名称:tap-desktop,代码行数:7,代码来源:Configuration.cs


示例15: LogTo

        public static void LogTo(Level level, Boolean fireEvent, String rawMessage)
        {
            String message = Regex.Replace(rawMessage, "cardno=[^&]*", "****************");

            switch (level)
            {
                case Level.INFO:
                     NLogger.Info(message);
                    break;
                case Level.TRACE:
                    NLogger.Trace(message);
                    break;
                case Level.DEBUG:
                     NLogger.Debug(message);
                    break;
                case Level.WARNING:
                     NLogger.Warn(message);
                    break;
                case Level.ERROR:
                    NLogger.Error(message);
                    break;
                case Level.FATAL:
                    NLogger.Fatal(message);
                    break;
            }

            if (fireEvent)
            {
                InvokeLogToGui(new GuiEventArgs(level, message));
            }
        }
开发者ID:alexkasp,项目名称:monitor,代码行数:31,代码来源:Logger.cs


示例16: IsFormEnabled

 /// <summary>
 /// Function to enable or not the fields to modify the connection string to the SQL server.
 /// </summary>
 /// <param name="IsEnabled"></param>
 private void IsFormEnabled(Boolean IsEnabled)
 {
     this.txtServerName.IsEnabled = IsEnabled;
     this.txtDBName.IsEnabled = IsEnabled;
     this.txtUserID.IsEnabled = IsEnabled;
     this.txtPassword.IsEnabled = IsEnabled;
 }
开发者ID:s-heer,项目名称:Modulus,代码行数:11,代码来源:frmSettings.xaml.cs


示例17: EnsureArgumentNotEmpty

        public void EnsureArgumentNotEmpty(IEnumerable argument, Boolean shouldCorrupt)
        {
            try
            {
                // ReSharper disable once PossibleMultipleEnumeration
                Ensure.ArgumentNotEmpty(argument, "argument");
                Assert.False(shouldCorrupt);
            } catch (ArgumentNullException)
            {
                throw new InvalidOperationException("Unexpected exception.");
            } catch (ArgumentException)
            {
                Assert.True(shouldCorrupt);
            }

            try
            {
                // ReSharper disable once PossibleMultipleEnumeration
                Ensure.ArgumentNotEmpty(argument, "argument", "Argument should not be null.");
                Assert.False(shouldCorrupt);
            } catch (ArgumentNullException)
            {
                throw new InvalidOperationException("Unexpected exception.");
            } catch (ArgumentException)
            {
                Assert.True(shouldCorrupt);
            }
        }
开发者ID:JasonMing,项目名称:Nextension,代码行数:28,代码来源:EnsureTests.cs


示例18: Init

        void Init(String domainName, String connStringName, Boolean pSecure, bool chekControllers)
        {
            //_LdapWrapper = new LdapWrapper();

            //LoadControllersFromDatabase( pConnString);


            _DomainUrlInfo = DomainsUrl_Get_FromSp(connStringName, domainName);// _DomainUrlInfoList.First<DomainUrlInfo>(p => p.DomainName == domainName);
            if (_DomainUrlInfo == null)
            {
                throw new Fwk.Exceptions.TechnicalException("No se encontró la información del dominio especificado");
            }

            if (chekControllers)
            {
                _DomainControllers = GetDomainControllersByDomainId(System.Configuration.ConfigurationManager.ConnectionStrings[connStringName].ConnectionString, _DomainUrlInfo.Id);
                if (_DomainControllers == null || _DomainControllers.Count == 0)
                    throw new Fwk.Exceptions.TechnicalException("No se encuentra configurado ningún controlador de dominio para el sitio especificado.");


                // Prueba de conectarse a algún controlador de dominio disponible, siempre arranando del primero. debería 
                // TODO: reemplazarse por un sistema de prioridad automática para que no intente conectarse primero a los funcionales conocidos
                //LdapException wLastExcept = GetDomainController(pSecure, _DomainControllers);
                if (_DomainController == null)
                {
                    throw new Fwk.Exceptions.TechnicalException("No se encontró ningún controlador de dominio disponible para el sitio especificado.");//, wLastExcept);
                }
            }
        }
开发者ID:gpanayir,项目名称:sffwk,代码行数:29,代码来源:LDAPHelper.cs


示例19: UpdateProfile

 public void UpdateProfile(Repeater rpData, Boolean debugMode = false)
 {
     const string profileupload = "NBStore\\profileupload";
     Utils.CreateFolder(PortalSettings.Current.HomeDirectoryMapPath + profileupload);
     var strXml = GenXmlFunctions.GetGenXml(rpData, "", PortalSettings.Current.HomeDirectoryMapPath + profileupload);
     Save(strXml, debugMode);
 }
开发者ID:fujinguyen,项目名称:NBrightBuy,代码行数:7,代码来源:ProfileData.cs


示例20: Bullet

        //public:
        public Bullet(Double x_, Double y_, Int32 width_, Int32 height_, Int32 damage_, BulletKind kind_)
        {
            PosX = x_;
            PosY = y_;
            Width = width_;
            Height = height_;
            switch (kind_)
            {
                case BulletKind.Laser:
                    {
                        _type = BulletType.Laser;
                        break;
                    }
                case BulletKind.Exploded:
                    {
                        _type = BulletType.Exploded;
                        break;
                    }
                case BulletKind.Rocket:
                    {
                        _type = BulletType.Rocket;
                        break;
                    }
            }
            Damage = damage_+_type._bonusdamage;
            _active = true;

            _vx = 1; _vy = 0;
            _speed = _type.speed;
        }
开发者ID:porcellus,项目名称:UniScrollShooter,代码行数:31,代码来源:Bullet.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# System.Buffer类代码示例发布时间:2022-05-26
下一篇:
C# System.Attribute类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap