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

C# StateType类代码示例

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

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



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


示例16: Start

	void Start()
	{
		data = MainSystem.Instance.gameData;

		nowType = StateType.human;
		SetTexture (nowType);

		SetData ();

		GUIController.Instance.SetCoolTime (data.StomacCoolTime, data.TrainingCoolTime, data.PreachingCoolTime);

		GUIController.Instance.OnButtonDownStomac = () => {
			Stomac += data.GainStomacValue * (1 - Hotoke * 0.005f);
		};
		GUIController.Instance.OnButtonDownTreaning = () => {
			Hotoke += data.GainHotokeValue;
			hide = true;
		};
		GUIController.Instance.OnButtonDownPreaching = () => {
			Faith += data.GainFaithValue * (1 + Hotoke * 0.01f);
			hide = true;
		};

		GUIController.Instance.OnCoolFinish = () => {
			hide = false;
		};
	}
开发者ID:koppepan,项目名称:buddha,代码行数:27,代码来源:Player.cs


示例17: CreateEditor

		protected override IPropertyEditor CreateEditor (Gdk.Rectangle cell_area, StateType state)
		{
			if (Property.Converter.CanConvertTo (typeof(string)) && Property.Converter.CanConvertFrom (typeof(string)))
				return new TextEditor ();
			else
				return null;
		}
开发者ID:Kalnor,项目名称:monodevelop,代码行数:7,代码来源:ExpandableObjectEditor.cs


示例18: Add

		public static void Add(string description, string userName, Device panelDevice = null, Device device = null, Zone zone = null, StateType stateType = StateType.Info)
		{
			var journalItem = new FS2JournalItem
			{
				DeviceTime = DateTime.Now,
				SystemTime = DateTime.Now,
				Description = description,
				UserName = userName,
				PanelDevice = panelDevice,
				Device = device,
				StateType = stateType,
				SubsystemType = SubsystemType.Other,
			};
			if (panelDevice != null)
			{
				journalItem.PanelName = panelDevice.DottedPresentationNameAndAddress;
				journalItem.PanelUID = panelDevice.UID;
			}
			if (device != null)
			{
				journalItem.DeviceName = device.DottedPresentationNameAndAddress;
				journalItem.DeviceUID = device.UID;
			}
			if (zone != null)
			{
				journalItem.ZoneNo = zone.No;
				journalItem.ZoneName = zone.PresentationName;
			}

			AddJournalItem(journalItem);
		}
开发者ID:saeednazari,项目名称:Rubezh,代码行数:31,代码来源:CustomMessageJournalHelper.cs


示例19: Render

        public override void Render(Drawable window,
                                     Widget widget,
                                     Rectangle cell_area,
                                     Rectangle expose_area,
                                     StateType cell_state,
                                     IPhoto photo)
        {
            string text = GetRenderText (photo);

            var layout = new Pango.Layout (widget.PangoContext);
            layout.SetText (text);

            Rectangle layout_bounds;
            layout.GetPixelSize (out layout_bounds.Width, out layout_bounds.Height);

            layout_bounds.Y = cell_area.Y;
            layout_bounds.X = cell_area.X + (cell_area.Width - layout_bounds.Width) / 2;

            if (layout_bounds.IntersectsWith (expose_area)) {
                Style.PaintLayout (widget.Style, window, cell_state,
                                   true, expose_area, widget, "IconView",
                                   layout_bounds.X, layout_bounds.Y,
                                   layout);
            }
        }
开发者ID:Yetangitu,项目名称:f-spot,代码行数:25,代码来源:ThumbnailTextCaptionRenderer.cs


示例20: StartEditing

		public EditSession StartEditing (Gdk.Rectangle cell_area, StateType state)
		{
			IPropertyEditor ed = CreateEditor (cell_area, state);
			if (ed == null)
				return null;
			return new EditSession (container, obj, property, ed);
		}
开发者ID:CoEST,项目名称:TraceLab,代码行数:7,代码来源:PropertyEditorCell.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Statement类代码示例发布时间:2022-05-24
下一篇:
C# StateSet类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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