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


C# Microsoft类代码示例

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


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

示例1: Invoke

 public override IMethodReturn Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation input, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate getNext)
 {
     IMethodReturn methodReturn = null;
     try
     {
         try
         {
             methodReturn = getNext()(input, getNext);
         }
         catch (Exception exception1)
         {
             Exception exception = exception1;
             methodReturn = input.CreateMethodReturn(null);
             methodReturn.Exception = exception;
         }
     }
     finally
     {
         if (methodReturn.Exception != null)
         {
             methodReturn.Exception = this.HandlerException(input, methodReturn.Exception);
         }
     }
     return methodReturn;
 }
开发者ID:RandyCode,项目名称:MyFramework,代码行数:25,代码来源:ExceptionAttribute.cs

示例2: update

        /// <summary>
        /// Main game loop, checks for UI-related inputs and tells game objects to update.
        /// </summary>
        /// <param name="gameTime"></param>
        /// <returns></returns>
        public override void update(Microsoft.Xna.Framework.GameTime gameTime)
        {
            //if (InputSet.getInstance().getButton(InputsEnum.BUTTON_3))
            //{
            //    EngineManager.pushState(new EngineStateMap());
            //    return;
            //}

            Area area = GameplayManager.ActiveArea;
            area.GameObjects.ForEach(i => i.update());
            area.GameObjects.ForEach(i => { if (!i.isAlive() && i is ICollidable) ((ICollidable)i).getCollider().unregister(); });
            area.GameObjects.RemoveAll(i => !i.isAlive());

            // This is the code to add a house when the mouse is clicked. We don't need this.
            //if (InputSet.getInstance().getButton(InputsEnum.LEFT_TRIGGER))
            //{
            //    InputSet.getInstance().setToggle(InputsEnum.LEFT_TRIGGER);

            //    Vector2 rclickspot = new Vector2(InputSet.getInstance().getRightDirectionalX(), InputSet.getInstance().getRightDirectionalY());
            //    DecorationSet ds = DecorationSet.construct("World/town");
            //    Decoration d = ds.makeDecoration("house1", rclickspot);

            //    GameplayManager.ActiveArea.add(d);
            //}
        }
开发者ID:gripp,项目名称:psychic-octo-nemesis,代码行数:30,代码来源:EngineStateGameplay.cs

示例3: Draw

 public override void Draw(Microsoft.Xna.Framework.GameTime gameTime)
 {
     spriteBatch.Begin();
     spriteBatch.Draw(Art.gameover, new Rectangle(0, 0, 1280, 720), Microsoft.Xna.Framework.Color.White);
     //spriteBatch.DrawString(Art.Font, "GAME OVER MOTHERFUCKER", new Microsoft.Xna.Framework.Vector2(550, 360),Microsoft.Xna.Framework.Color.Red);
     spriteBatch.End();
 }
开发者ID:Bigtalljosh,项目名称:GGJ2014,代码行数:7,代码来源:GameOver.cs

示例4: Draw

        public override void Draw(Microsoft.Xna.Framework.Graphics.Texture2D ImageToProcess, RenderHelper rHelper, Microsoft.Xna.Framework.GameTime gt, PloobsEngine.Engine.GraphicInfo GraphicInfo, IWorld world, bool useFloatBuffer)
        {

            if (firstTime)
            {
                oldViewProjection = world.CameraManager.ActiveCamera.ViewProjection;
                firstTime = false;
            }

            effect.Parameters["attenuation"].SetValue(Attenuation);
            effect.Parameters["halfPixel"].SetValue(GraphicInfo.HalfPixel);
            effect.Parameters["InvertViewProjection"].SetValue(Matrix.Invert(world.CameraManager.ActiveCamera.ViewProjection));
            effect.Parameters["oldViewProjection"].SetValue(oldViewProjection);
            effect.Parameters["numSamples"].SetValue(NumSamples);
            effect.Parameters["depth"].SetValue(rHelper[PrincipalConstants.DephRT]);
            effect.Parameters["extra"].SetValue(rHelper[PrincipalConstants.extra1RT]);
            effect.Parameters["cena"].SetValue(ImageToProcess);

            oldViewProjection = world.CameraManager.ActiveCamera.ViewProjection;

            if (useFloatBuffer)
                rHelper.RenderFullScreenQuadVertexPixel(effect, SamplerState.PointClamp);
            else
                rHelper.RenderFullScreenQuadVertexPixel(effect, GraphicInfo.SamplerState);
        }
开发者ID:brunoduartec,项目名称:port-ploobsengine,代码行数:25,代码来源:MotionBlurPostEffect.cs

示例5: FeatureSetup

 public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext)
 {
     testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
     TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("de-DE"), "Speichern der Personenstammdaten", "Als Verwaltungsfachangestellter möchte ich eine Person mit ihrem Vor- und Zunahme" +
             "n, sowie Geburtsdatum anlegen können.", ProgrammingLanguage.CSharp, ((string[])(null)));
     testRunner.OnFeatureStart(featureInfo);
 }
开发者ID:HerrLoesch,项目名称:RefactoringExample,代码行数:7,代码来源:SpeichernDerPersonenStammdaten.feature.cs

示例6: AudioManager

 private AudioManager(Microsoft.Xna.Framework.Game game, string settingsFile, string waveBankFile, string soundBankFile)
     : base(game)
 {
     this.SoundEffectInstances = new List<SoundEffectInstance>();
     try
     {
         this.audioEngine = new AudioEngine(settingsFile);
         this.waveBank = new WaveBank(this.audioEngine, waveBankFile, 0, 16);
         this.soundBank = new SoundBank(this.audioEngine, soundBankFile);
     }
     catch (NoAudioHardwareException)
     {
         this.audioEngine = null;
         this.waveBank = null;
         this.soundBank = null;
     }
     catch (InvalidOperationException)
     {
         this.audioEngine = null;
         this.waveBank = null;
         this.soundBank = null;
     }
     while (!this.waveBank.IsPrepared)
     {
         this.audioEngine.Update();
     }
 }
开发者ID:castroev,项目名称:StardriveBlackBox-verRadicalElements-,代码行数:27,代码来源:AudioManager.cs

示例7: FeatureSetup

 public static void FeatureSetup(Microsoft.VisualStudio.TestTools.UnitTesting.TestContext testContext)
 {
     testRunner = TechTalk.SpecFlow.TestRunnerManager.GetTestRunner();
     TechTalk.SpecFlow.FeatureInfo featureInfo = new TechTalk.SpecFlow.FeatureInfo(new System.Globalization.CultureInfo("en-US"), "Score Calculation", "As a player\r\nI want the system to calculate my total score\r\nSo that I know my per" +
             "formance", GenerationTargetLanguage.CSharp, ((string[])(null)));
     testRunner.OnFeatureStart(featureInfo);
 }
开发者ID:GabyZu,项目名称:SpecFlow-Examples,代码行数:7,代码来源:ScoreCalculation.feature.cs

示例8: OnGamePadButtonUpdate

 /// <summary>
 /// Handles the button press event to track which focused menu item will get the activation
 /// </summary>
 /// <param name="backButton"></param>
 /// <param name="startButton"></param>
 /// <param name="systemButton"></param>
 /// <param name="aButton"></param>
 /// <param name="bButton"></param>
 /// <param name="xButton"></param>
 /// <param name="yButton"></param>
 /// <param name="leftShoulder"></param>
 /// <param name="rightShoulder"></param>
 /// <param name="player"></param>
 protected override void OnGamePadButtonUpdate(CCGamePadButtonStatus backButton, CCGamePadButtonStatus startButton, CCGamePadButtonStatus systemButton, CCGamePadButtonStatus aButton, CCGamePadButtonStatus bButton, CCGamePadButtonStatus xButton, CCGamePadButtonStatus yButton, CCGamePadButtonStatus leftShoulder, CCGamePadButtonStatus rightShoulder, Microsoft.Xna.Framework.PlayerIndex player)
 {
     base.OnGamePadButtonUpdate(backButton, startButton, systemButton, aButton, bButton, xButton, yButton, leftShoulder, rightShoulder, player);
     if (!HasFocus)
     {
         return;
     }
     if (backButton == CCGamePadButtonStatus.Pressed || aButton == CCGamePadButtonStatus.Pressed || bButton == CCGamePadButtonStatus.Pressed ||
         xButton == CCGamePadButtonStatus.Pressed || yButton == CCGamePadButtonStatus.Pressed || leftShoulder == CCGamePadButtonStatus.Pressed ||
         rightShoulder == CCGamePadButtonStatus.Pressed)
     {
         CCMenuItem item = FocusedItem;
         item.Selected();
         m_pSelectedItem = item;
         m_eState = CCMenuState.TrackingTouch;
     }
     else if (backButton == CCGamePadButtonStatus.Released || aButton == CCGamePadButtonStatus.Released || bButton == CCGamePadButtonStatus.Released ||
         xButton == CCGamePadButtonStatus.Released || yButton == CCGamePadButtonStatus.Released || leftShoulder == CCGamePadButtonStatus.Released ||
         rightShoulder == CCGamePadButtonStatus.Released)
     {
         if (m_eState == CCMenuState.TrackingTouch)
         {
             // Now we are selecting the menu item
             CCMenuItem item = FocusedItem;
             if (item != null && m_pSelectedItem == item)
             {
                 // Activate this item
                 item.Unselected();
                 item.Activate();
                 m_eState = CCMenuState.Waiting;
                 m_pSelectedItem = null;
             }
         }
     }
 }
开发者ID:netonjm,项目名称:cocos2d-xna,代码行数:48,代码来源:CCMenu.cs

示例9: Initialize

        public void Initialize(Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSComponentMetaData100 dtsComponentMetadata, IServiceProvider serviceProvider)
        {
            this.serviceProvider = serviceProvider;
              this.metaData = dtsComponentMetadata;

              this.connectionService = (IDtsConnectionService)serviceProvider.GetService(typeof(IDtsConnectionService));
        }
开发者ID:WillByron,项目名称:SSISHDFS,代码行数:7,代码来源:HDFSDestinationUI.cs

示例10: Shoot

 public override bool Shoot(Player player, ref Microsoft.Xna.Framework.Vector2 position, ref float speedX, ref float speedY, ref int type, ref int damage, ref float knockBack)
 {
     Vector2 direction = new Vector2(speedX, speedY);
     direction.Normalize();
     position += direction * item.width;
     return true;
 }
开发者ID:Eldrazi,项目名称:Pletharia,代码行数:7,代码来源:SuperSapphireStaff.cs

示例11:

        public void MiseÀJour(Microsoft.Xna.Framework.GameTime p_gameTime)
        {
            KeyboardState kbs = Keyboard.GetState();

            if (kbs.IsKeyDown(m_touche))
            {
                m_toucheEnfoncé = true;
                m_gestionnaireÉtat.ChangetÉtat(new ClÉtatHistoire(m_gestionnaireÉtat));
            }

            m_msDepuisMÀJ += p_gameTime.ElapsedGameTime.TotalMilliseconds;

            if (m_msDepuisMÀJ >= m_msEntreMÀJ)
            {
                if (++m_indice > m_messageCommencement.Length)
                    m_indice = 0;

                if (m_toucheEnfoncé)
                    m_couleurTexte = (m_couleurTexte == COULEUR_TEXTE_FLASH) ? COULEUR_TEXTE_NORMAL : COULEUR_TEXTE_FLASH;

                m_msDepuisMÀJ -= m_msEntreMÀJ;
            }

            m_texteÀAfficher = m_messageCommencement.Substring(0, (m_toucheEnfoncé) ? m_messageCommencement.Length : m_indice);
        }
开发者ID:jpboudreau,项目名称:ExerciceDP,代码行数:25,代码来源:ClÉtatDémarrage.cs

示例12: CheckGesture

        /// <summary>
        /// Checks the gesture.
        /// </summary>
        /// <param name="skeleton">The skeleton.</param>
        /// <returns>GesturePartResult based on if the gesture part has been completed</returns>
        public GesturePartResult CheckGesture(Microsoft.Kinect.Skeleton skeleton)
        {
            // //left hand in front of left Shoulder
            if (skeleton.Joints[JointType.HandLeft].Position.Z < skeleton.Joints[JointType.ElbowLeft].Position.Z && skeleton.Joints[JointType.HandRight].Position.Y < skeleton.Joints[JointType.HipCenter].Position.Y)
            {
                // Debug.WriteLine("GesturePart 1 - left hand in front of left Shoulder - PASS");
                // /left hand below shoulder height but above hip height
                if (skeleton.Joints[JointType.HandLeft].Position.Y < skeleton.Joints[JointType.Head].Position.Y && skeleton.Joints[JointType.HandLeft].Position.Y > skeleton.Joints[JointType.HipCenter].Position.Y)
                {
                    // Debug.WriteLine("GesturePart 1 - left hand below shoulder height but above hip height - PASS");
                    // //left hand left of left Shoulder
                    if (skeleton.Joints[JointType.HandLeft].Position.X < skeleton.Joints[JointType.ShoulderRight].Position.X && skeleton.Joints[JointType.HandLeft].Position.X > skeleton.Joints[JointType.ShoulderLeft].Position.X)
                    {
                        // Debug.WriteLine("GesturePart 1 - left hand left of left Shoulder - PASS");
                        return GesturePartResult.Suceed;
                    }

                    // Debug.WriteLine("GesturePart 1 - left hand left of left Shoulder - UNDETERMINED");
                    return GesturePartResult.Pausing;
                }

                // Debug.WriteLine("GesturePart 1 - left hand below shoulder height but above hip height - FAIL");
                return GesturePartResult.Fail;
            }

            // Debug.WriteLine("GesturePart 1 - left hand in front of left Shoulder - FAIL");
            return GesturePartResult.Fail;
        }
开发者ID:jhgao,项目名称:kinectDemo2,代码行数:33,代码来源:SwipeRightSegment2.cs

示例13: AddToAverage

        /// <summary>
        /// 
        /// </summary>
        /// <param name="skel"></param>
        /// <returns></returns>
        protected override double AddToAverage(Microsoft.Kinect.Skeleton skel)
        {
            SkeletonPoint hand = JointToPos(skel, handType);
            SkeletonPoint torso = JointToPos(skel, JointType.Spine);

            return SkelPointMath.XZDistance(hand, torso);
        }
开发者ID:zeromeus,项目名称:gest_tracker,代码行数:12,代码来源:CalibrateArmOut.cs

示例14: InterpretKey

 public static String InterpretKey(Microsoft.Xna.Framework.Input.Keys key)
 {
     if (m_CameraControls.ContainsKey(key))
         return m_CameraControls[key];
     else
         return Enum.GetName(key.GetType(), key);
 }
开发者ID:TheEtiologist,项目名称:tantric,代码行数:7,代码来源:InputMap.cs

示例15: LoadContent

        public override void LoadContent(Microsoft.Xna.Framework.Content.ContentManager content)
        {
            //do not remove this
            base.LoadBasicContent(content);

            logo = content.Load<Texture2D>("logo");
        }
开发者ID:Kairna,项目名称:TouchAndPlay,代码行数:7,代码来源:CartesianTestScreen.cs


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