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


C# StateType类代码示例

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


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

示例1: DataSource

 public DataSource(TwainDevice twain, TwIdentity identity)
 {
   fTwain = twain;
   fIdent = identity;
   fState = StateType.Closed;
   fSettings = null;
   fCapabilities = null;
 }
开发者ID:leighwoltman,项目名称:PDF-Scanning-App,代码行数:8,代码来源:Scanning.TwainDataSource.cs

示例2: ChangeState

        public void ChangeState(StateType type)
        {
            if (EditPanel.LayerInfo == null)
                return;

            switch (type)
            {
                case StateType.CreateButton:
                    m_currentState = new CreateControlState(new CreateButton(m_editPanel), this, m_commandManager);
                    break;
                case StateType.CreateLabel:
                    m_currentState = new CreateControlState(new CreateLabel(m_editPanel), this, m_commandManager);
                    break;
                case StateType.CreatePanel:
                    m_currentState = new CreateControlState(new CreatePanel(m_editPanel), this, m_commandManager);
                    break;
                case StateType.Move:
                    m_currentState = new MoveState(m_editPanel.SelectedControls, this, m_commandManager);
                    break;
                case StateType.Resize:
                    m_currentState = new ResizeControlState(m_editPanel.SelectedControls, this, m_commandManager, m_flagPosition);
                    break;
                case StateType.Idle:
                    m_currentState = new IdleState(m_editPanel, this, m_commandManager);
                    break;
            }
        }
开发者ID:microm,项目名称:eplib,代码行数:27,代码来源:StateManager.cs

示例3: Awake

 void Awake()
 {
     // 減算から開始する
     stateType = StateType.Sub;
     image = GetComponent<Image>();
     color = image.color;
 }
开发者ID:yuta-ishikawa,项目名称:cogj02_team3,代码行数:7,代码来源:FlashingButton.cs

示例4: CheckLength

 void CheckLength()
 {
     if( ( transform.position - PlayerControl.player.transform.position ).magnitude > LengthLimitation )
     {
         state = StateType.Recive;
     }
 }
开发者ID:notox,项目名称:Hello-World,代码行数:7,代码来源:SingleHand.cs

示例5: Render

        public override void Render (CellContext context, StateType state, double cellWidth, double cellHeight)
        {
            if (data_handler == null) {
                return;
            }

            if (!has_sort) {
                base.Render (context, state, cellWidth, cellHeight);
                return;
            }

            Gdk.Rectangle arrow_alloc = new Gdk.Rectangle ();
            arrow_alloc.Width = (int)(cellHeight / 3.0);
            arrow_alloc.Height = (int)((double)arrow_alloc.Width / 1.6);
            arrow_alloc.X = (int)cellWidth - arrow_alloc.Width - Spacing;
            arrow_alloc.Y = ((int)cellHeight - arrow_alloc.Height) / 2;

            double textWidth = arrow_alloc.X - Spacing;
            if (textWidth > 0) {
                base.Render (context, state, textWidth, cellHeight);
            }

            SortType sort_type = ((ISortableColumn)data_handler ()).SortType;
            if (sort_type != SortType.None) {
                context.Theme.DrawArrow (context.Context, arrow_alloc, sort_type);
            }
        }
开发者ID:rubenv,项目名称:tripod,代码行数:27,代码来源:ColumnHeaderCellText.cs

示例6: observer

 protected override void observer(StateType x, double t)
 {
     if (OdeObserver != null)
     {
         OdeObserver(x, t);
     }
 }
开发者ID:OlegJakushkin,项目名称:CSharpOdeLibrary,代码行数:7,代码来源:LambdaOde.cs

示例7: system

 protected override void system(StateType x, StateType dxdt, double t)
 {
     if (OdeSystem != null)
     {
         OdeSystem(x, dxdt, t);
     }
 }
开发者ID:OlegJakushkin,项目名称:CSharpOdeLibrary,代码行数:7,代码来源:LambdaOde.cs

示例8: ZoomState

 /// <summary>
 /// Construct a <see cref="ZoomState"/> object from the scale ranges settings contained
 /// in the specified <see cref="GraphPane"/>.
 /// </summary>
 /// <param name="pane">The <see cref="GraphPane"/> from which to obtain the scale
 /// range values.
 /// </param>
 /// <param name="type">A <see cref="StateType"/> enumeration that indicates whether
 /// this saved state is from a pan or zoom.</param>
 public ZoomState(GraphPane pane, StateType type)
 {
     _xAxis = new ScaleState(pane.XAxis);
     _yAxis = new ScaleStateList(pane.YAxisList);
     _y2Axis = new ScaleStateList(pane.Y2AxisList);
     _type = type;
 }
开发者ID:apravdivy,项目名称:MagistrSolution,代码行数:16,代码来源:ZoomState.cs

示例9: GetAllExistingDiagnosticStates

                    public IEnumerable<Tuple<DiagnosticState, ProviderId, StateType>> GetAllExistingDiagnosticStates(StateType type, string languageOpt)
                    {
                        if (languageOpt != null)
                        {
                            PerLanguageAnalyzersAndStates analyzersStates;
                            if (_perLanguageAnalyzersAndStatesMap.TryGetValue(languageOpt, out analyzersStates))
                            {
                                return analyzersStates.GetAllExistingDiagnosticStates(type);
                            }
                            else
                            {
                                return SpecializedCollections.EmptyEnumerable<Tuple<DiagnosticState, ProviderId, StateType>>();
                            }
                        }

                        // This might be a removed or closed document/project/solution.
                        // Return all existing states.
                        var current = SpecializedCollections.EmptyEnumerable<Tuple<DiagnosticState, ProviderId, StateType>>();
                        foreach (var analyzersAndStates in _perLanguageAnalyzersAndStatesMap.Values)
                        {
                            current = current.Concat(analyzersAndStates.GetAllExistingDiagnosticStates(type));
                        }

                        return current;
                    }
开发者ID:JinGuoGe,项目名称:roslyn,代码行数:25,代码来源:DiagnosticAnalyzerService.WorkspaceAnalyzersAndStates.cs

示例10: SwitchState

        public void SwitchState(StateType type)
        {
            switch (type)
            {
                case StateType.MainMenu:
                    if (Logic.CurrentParty != null && Logic.CurrentWorld != null)
                    {
                        for (int i = 0; i < Logic.CurrentParty.MainParty.MyParty.Count; i++)
                        {
                            Logic.CurrentParty.MainParty.MyParty[i].CurMap.SpawnedLivingThing[Logic.CurrentParty.MainParty.MyParty[i].Y + Logic.CurrentParty.MainParty.MyParty[i].CurMap.MinY][Logic.CurrentParty.MainParty.MyParty[i].X + Logic.CurrentParty.MainParty.MyParty[i].CurMap.MinX].Remove(Logic.CurrentParty.MainParty.MyParty[i].Index);
                            Logic.CurrentParty.MainParty.MyParty[i].CurMap.LivingThing[Logic.CurrentParty.MainParty.MyParty[i].Index] = null;
                        }
                        CurrentState = 0;
                    }
                    break;
                case StateType.InGame:
                    if (Logic.CurrentParty != null && Logic.CurrentWorld != null)
                    {
                        for (int i = 0; i < Logic.CurrentParty.MainParty.MyParty.Count; i++)
                        {
                            Logic.CurrentParty.MainParty.MyParty[i].OnMapType = Logic.CurrentWorld.SpawnPlaceMapType;
                            Logic.CurrentParty.MainParty.MyParty[i].SideMapID = Logic.CurrentWorld.SpawnMapIndex;
                            Logic.CurrentParty.MainParty.MyParty[i].X = Logic.CurrentWorld.SpawnMapX;
                            Logic.CurrentParty.MainParty.MyParty[i].Y = Logic.CurrentWorld.SpawnMapY;
                            Logic.CurrentParty.MainParty.MyParty[i].PutOnMap();

                            InGameState s = (InGameState)Program.SM.States[1];
                            s.Initialize();
                            CurrentState = 1;
                        }
                    }
                    break;
            }
        }
开发者ID:ComposerCookie,项目名称:WanderingSoul,代码行数:34,代码来源:StateManager.cs

示例11: observer

 protected override void observer(StateType x, double t)
 {
     if (x.Capacity != 0)
     {
         Console.WriteLine("{0} : {1} : {2}", x[0], x[1], x[2]);
     }
 }
开发者ID:OlegJakushkin,项目名称:CSharpOdeLibrary,代码行数:7,代码来源:LorenzOde.cs

示例12: GoToState

	public void GoToState( StateType newState ) {
		if ( curState != null ) {
			curState.UnLoad();
		}
		switch ( newState ) {
			case StateType.Menu:
				Header.ShowBack = false;
				Header.IsShow = true;
				Header.UpdateInfo();
				curState = Menu;
				break;
			case StateType.Character:
				Header.ShowBack = true;
				curState = Character;
				break;
			case StateType.Map:
				Header.ShowBack = true;
				curState = Map;
				break;
			case StateType.MatchScore:
				curState = MatchScore;
				break;
			case StateType.EnterName:
				curState = EnterName;
				break;
			default:
				Debug.LogError( "state " + newState + " doesn't implemented!" );
				break;
		}
		curState.Load();
	}
开发者ID:StarkTT,项目名称:TestTask,代码行数:31,代码来源:MainContext.cs

示例13: DeviceViewModel

 public DeviceViewModel(DeviceState deviceState)
 {
     DeviceState = deviceState;
     _stateType = deviceState.StateType;
     FiresecCallbackService.DeviceStateChangedEvent += new Action<Guid>(OnDeviceStateChangedEvent);
     Name = DeviceState.Device.Driver.ShortName + " - " + DeviceState.Device.DottedAddress;
 }
开发者ID:hjlfmy,项目名称:Rubezh,代码行数:7,代码来源:DeviceViewModel.cs

示例14: Push

 public void Push( Vector3 dir )
 {
     transform.position = PlayerControl.player.transform.position;
     rigidbody.velocity = dir.normalized * PlayerControl.HandPushspeed;
     state = StateType.Throw;
     Debug.Log("Push");
 }
开发者ID:notox,项目名称:Hello-World,代码行数:7,代码来源:SingleHand.cs

示例15: Render

        public override void Render(CellContext context, StateType state, double cellWidth, double cellHeight)
        {
            if (BoundObject == null) {
                return;
            }

            if (!(BoundObject is TrackInfo)) {
                throw new InvalidCastException ("CubanoTitleCell can only bind to TrackInfo objects");
            }

            TrackInfo track = (TrackInfo)BoundObject;

            context.Layout.Width = (int)((cellWidth - 8) * Pango.Scale.PangoScale);
            context.Layout.Ellipsize = Pango.EllipsizeMode.End;
            //context.Layout.FontDescription = context.Widget.PangoContext.FontDescription.Copy ();
            context.Layout.FontDescription.Weight = font_weight;
            context.Layout.SetMarkup (String.Format ("<big>{0}</big>  {1}",
                track.TrackNumber,
                GLib.Markup.EscapeText (track.DisplayTrackTitle)));

            int text_width;
            int text_height;
            context.Layout.GetPixelSize (out text_width, out text_height);

            context.Context.MoveTo (4, ((int)cellHeight - text_height) / 2);
            Cairo.Color color = context.Theme.Colors.GetWidgetColor (
                context.TextAsForeground ? GtkColorClass.Foreground : GtkColorClass.Text, state);
            color.A = (!context.Sensitive) ? 0.3 : 1.0;
            context.Context.Color = color;

            PangoCairoHelper.ShowLayout (context.Context, context.Layout);
        }
开发者ID:abock,项目名称:cubano,代码行数:32,代码来源:CubanoTitleCell.cs


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