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


C# Screen类代码示例

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


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

示例1: ScreenFadeOutTransition

 public ScreenFadeOutTransition(Screen screen, Color color, bool queue = true, float speed = 0.05f, Action onBegin = null, Action onEnd = null)
     : base(screen, queue, speed, onBegin, onEnd)
 {
     _color = color;
     _screen = screen;
     _pixel = ResourceManager.getTexture("pixel");
 }
开发者ID:klutch,项目名称:StasisEngine,代码行数:7,代码来源:ScreenFadeOutTransition.cs

示例2: InsertScreen

        //make a screen in db
        internal int InsertScreen(Screen scrn)
        {
            int result = 0;
            try
            {   //noOfSeats is the number of seats in a row
                  //12 rows, 8 seats pr. row
                dbConn.Open();
                SqlCommand command = new SqlCommand(("INSERT INTO CinemaScreen (screenNo, noOfRows, noOfSeats) VALUES ((@screenNo), (@noOfRows), (@noOfSeats))"), dbConn);

                command.Parameters.Add("@screenNo", SqlDbType.Int).Value = scrn.screenNo;
                command.Parameters.Add("@noOfRows", SqlDbType.Int).Value = scrn.numberOfRows;
                command.Parameters.Add("@noOfSeats", SqlDbType.Int).Value = scrn.numberOfSeatsInARow;

                result = command.ExecuteNonQuery();
            }
            catch (SqlException)
            {
                throw;
            }
            finally
            {
                dbConn.Close();
            }
            return result;
        }
开发者ID:ssoe,项目名称:UCN-3sem-proj-Cinema,代码行数:26,代码来源:ScreenDB.cs

示例3: modeSelect

        public void modeSelect()
        {
            modeScreen = new ModeScreen(this);
            currentScreen = Screen.ModeScene;

            startScreen = null;
        }
开发者ID:WINPROG20142015,项目名称:CockBlockDefense,代码行数:7,代码来源:Game1.cs

示例4: ScreenInput

 public ScreenInput(Screen screen, SpriteFont Font, String Command)
     : base(screen)
 {
     this.Font = Font;
     this.Size.Y = Font.LineSpacing;
     this.Command = Command;
 }
开发者ID:adamgryu,项目名称:HolidayEngine,代码行数:7,代码来源:ScreenInput.cs

示例5: Insert

 ///<summary>Inserts one Screen into the database.  Returns the new priKey.</summary>
 internal static long Insert(Screen screen)
 {
     if(DataConnection.DBtype==DatabaseType.Oracle) {
         screen.ScreenNum=DbHelper.GetNextOracleKey("screen","ScreenNum");
         int loopcount=0;
         while(loopcount<100){
             try {
                 return Insert(screen,true);
             }
             catch(Oracle.DataAccess.Client.OracleException ex){
                 if(ex.Number==1 && ex.Message.ToLower().Contains("unique constraint") && ex.Message.ToLower().Contains("violated")){
                     screen.ScreenNum++;
                     loopcount++;
                 }
                 else{
                     throw ex;
                 }
             }
         }
         throw new ApplicationException("Insert failed.  Could not generate primary key.");
     }
     else {
         return Insert(screen,false);
     }
 }
开发者ID:nampn,项目名称:ODental,代码行数:26,代码来源:ScreenCrud.cs

示例6: quitGame

 public void quitGame()
 {
     startScreen = new StartScreen(this);
     currentScreen = Screen.StartScreen;
     gameScreen = null;
     scoreboardScreen = null;
 }
开发者ID:AdrianPaiva,项目名称:Match-It-Windows,代码行数:7,代码来源:Game1.cs

示例7: Mouseclik

 public Screen Mouseclik(int x, int y)
 {
     Rectangle mouserec = new Rectangle(x, y, 10, 10);
     if (mouserec.Intersects(world1rect))
     {
         current = Screen.ChooseLevelScreen;
         return (current);
     }
     else if (mouserec.Intersects(world2rect))
     {
         current = Screen.ChooseLevelScreen2;
         return (current);
     }
     else if (mouserec.Intersects(world3rect))
     {
         current = Screen.ChooseLevelScreen3;
         return (current);
     }
     else if (mouserec.Intersects(backbuttonw))
     {
         current = Screen.StartScreen;
         return (current);
     }
     return (current);
 }
开发者ID:KGabson,项目名称:testmono,代码行数:25,代码来源:ChooseWorldScreen.cs

示例8: Pane

 // Constructor for custom pane textures
 public Pane(
     Screen screen,
     Texture2D topLeftCorner,
     Texture2D topRightCorner,
     Texture2D bottomRightCorner,
     Texture2D bottomLeftCorner,
     Texture2D leftSide,
     Texture2D topSide,
     Texture2D rightSide,
     Texture2D bottomSide,
     Texture2D background,
     UIAlignment alignment,
     int x,
     int y,
     int width,
     int height)
 {
     _screen = screen;
     _spriteBatch = _screen.screenSystem.spriteBatch;
     _topLeftCorner = topLeftCorner;
     _topRightCorner = topRightCorner;
     _bottomRightCorner = bottomRightCorner;
     _bottomLeftCorner = bottomLeftCorner;
     _leftSide = leftSide;
     _topSide = topSide;
     _rightSide = rightSide;
     _bottomSide = bottomSide;
     _background = background;
     _alignment = alignment;
     _xOffset = x;
     _yOffset = y;
     _width = width;
     _height = height;
 }
开发者ID:klutch,项目名称:StasisEngine,代码行数:35,代码来源:Pane.cs

示例9: ScreenTextureSelector

        /// <summary>
        /// The constructor for this selector.
        /// </summary>
        public ScreenTextureSelector(Engine engine, Screen screen)
            : base(screen)
        {
            // Adds the page forward and back buttons to the screen.
            int _buttonHeight = screen.GetTotalElementHeight();
            ScreenButton _but = new ScreenButton(screen, "Back", "<", engine.FontMain);
            _but.Position.X = Screen.boarderSize;
            _but.Size.X = 32;
            _but.Position.Y = _buttonHeight;
            screen.ElementList.Add(_but);
            _but = new ScreenButton(screen, "Forward", ">", engine.FontMain);
            _but.Position.X = Screen.boarderSize + 32 + Screen.boarderSize;
            _but.Size.X = 32;
            _but.Position.Y = _buttonHeight;
            screen.ElementList.Add(_but);

            // Creates a new input field and adds it to the screen.
            this.InputField = new ScreenInput(screen, engine.FontMain);
            screen.AddElement(InputField);

            // Resizes and places the bread and butter of this element.
            this.Position.Y = screen.GetTotalElementHeight();
            this.Size.Y = 128;

            // Determines the max rows and columns that will fit.
            this.PrevMaximumColumns = (int)Math.Floor(Size.X / TilePreviewSize);
            this.PrevMaximumRows = (int)Math.Floor(Size.Y / TilePreviewSize);

            // Creates new lists to display.
            FilterTiles(engine);
        }
开发者ID:adamgryu,项目名称:HolidayEngine,代码行数:34,代码来源:ScreenTextureSelector.cs

示例10: ParentItemIsUnsetOnRemovedConductedItem

 public void ParentItemIsUnsetOnRemovedConductedItem() {
     var conductor = new Conductor<IScreen>.Collection.OneActive();
     var conducted = new Screen();
     conductor.Items.Add(conducted);
     conductor.Items.RemoveAt(0);
     Assert.NotEqual(conductor, conducted.Parent);
 }
开发者ID:bartenders,项目名称:EnterpriseProjectTemplate,代码行数:7,代码来源:ConductorWithCollectionOneActiveTests.cs

示例11: LabelTextureButton

 public LabelTextureButton(
     Screen screen,
     SpriteBatch spriteBatch,
     UIAlignment alignment,
     int x,
     int y,
     Texture2D selectedTexture,
     Texture2D deselectedTexture,
     Rectangle localHitBox,
     SpriteFont font,
     TextAlignment textAlignment,
     string text,
     int textXOffset,
     int textYOffset,
     int outline,
     Color selectedColor,
     Color deselectedColor,
     Action onActivate,
     Action onMouseOver,
     Action onMouseOut)
     : base(screen, spriteBatch, alignment, x, y, selectedTexture, deselectedTexture, localHitBox, onActivate, onMouseOver, onMouseOut)
 {
     _font = font;
     _textAlignment = textAlignment;
     _text = text;
     _textXOffset = textXOffset;
     _textYOffset = textYOffset;
     _outline = outline;
     _selectedColor = selectedColor;
     _deselectedColor = deselectedColor;
 }
开发者ID:klutch,项目名称:StasisEngine,代码行数:31,代码来源:LabelTextureButton.cs

示例12: BasicCore

 public BasicCore(Game1 game)
 {
     this.game = game;
     this.screen = new Screen();
     this.content = new ContentHandler(this.game.Content);
     this.r = new Registry();
 }
开发者ID:joseruizjimenez,项目名称:personal-training-martial-arts,代码行数:7,代码来源:BasicCore.cs

示例13: CalculateRealScreenPosition

        private void CalculateRealScreenPosition(Screen screen, Vector intersection)
        {
            CursorPositionX += (intersection.x * screen.WidthPixels - CursorPositionX) * VelocityResponse;
            CursorPositionY += ((1 - intersection.y) * screen.HeightPixels - CursorPositionY) * VelocityResponse;

            mouseFacade.SetCursorPosition((int)CursorPositionX, (int)CursorPositionY);
        }
开发者ID:ufouz1990,项目名称:leap-windows-controller,代码行数:7,代码来源:LeapMouseController.cs

示例14: Draw

 public override void Draw(Screen screen)
 {
     if(Parent is Level)
     {
         base.Draw(screen);
     }
 }
开发者ID:steynh,项目名称:GamingMinor,代码行数:7,代码来源:NpcSpawn.cs

示例15: ReadAndRenderFile

 public void ReadAndRenderFile ( string _filename )
 {
     IAnsiDecoder vt100 = new AnsiDecoder();
     //vt100.Encoding = encodingInfo.GetEncoding (); // encodingInfo.Name, new EncoderExceptionFallback(), new DecoderReplacementFallback ("U") );
     Screen screen = new Screen ( 80, 160 );
     vt100.Subscribe ( screen );
     
     using ( BinaryReader reader = new BinaryReader(File.Open(_filename, FileMode.Open)) )
     {
         try
         {
             int read = 0;
             while ( (read = reader.Read()) != -1 )
             {
                 vt100.Input ( new byte[] { (byte) read } );
             }
         }
         catch ( EndOfStreamException )
         {
         }
     }
     System.Console.Write ( screen.ToString() );
     Bitmap bitmap = screen.ToBitmap ( new Font("Courier New", 10) );
     bitmap.Save ( _filename + ".png", System.Drawing.Imaging.ImageFormat.Png );
 }
开发者ID:taterbase,项目名称:libvt100,代码行数:25,代码来源:TestPrograms.cs


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