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


C# System.Action类代码示例

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


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

示例1: Init

    public void Init(System.Action<Card> cardPartsPushDown, System.Action cardPartsPushUp)
    {
        SetDeck();

        this.cardPartsPushDown = cardPartsPushDown;
        this.cardPartsPushUp = cardPartsPushUp;
    }
开发者ID:yum-kvn,项目名称:simarisu,代码行数:7,代码来源:CardManager.cs

示例2: MainPage

        public MainPage()
        {
            System.Action action = null;
            this.currentPanoramaItemName = string.Empty;
            this.passwordErrorMessage = string.Empty;
            this.image = string.Empty;
            this.margin12120000 = new Thickness(12.0, 12.0, 0.0, 0.0);
            base.Resources.Add("GlobalAppNameLower", AppSetting.Instance.AppName.ToLowerInvariant());
            this.InitializeComponent();
            if (action == null)
            {
                action = delegate
                {
                    this.NavigateTo("/Pages/DataSynchronizationPage.xaml");
                };
            }

            App.GoToRestoreBackupSdfPage = action;
            TiltEffect.SetIsTiltEnabled(this, true);
            backgroundImageSetter = new System.Action<Stream>(this.setBackgroundImage);
            IsolatedAppSetingsHelper.LoadLastMainPageIndex();
            this.mainPageViewModel = ViewModelLocator.MainPageViewModel;
            base.DataContext = this.mainPageViewModel;
            this.InitializeMenu();
            this.StartApp();
            base.Loaded += new RoutedEventHandler(this.MainPage_Loaded);
            base.BackKeyPress += new System.EventHandler<CancelEventArgs>(this.MainPage_BackKeyPress);
            System.DateTime? lastAccessTime = App.LastAccessTime;
            if (lastAccessTime.HasValue)
            {
                System.TimeSpan span = (System.TimeSpan)(System.DateTime.Now.Date - lastAccessTime.Value.Date);
                this.daysWithoutTally = span.Days;
                this.needShowNotificatioToDoTally = this.daysWithoutTally >= 7;
            }
            if (System.Diagnostics.Debugger.IsAttached)
            {
                this.needShowNotificatioToDoTally = true;
            }
            IsolatedAppSetingsHelper.LastMainPageIndexCache = (IsolatedAppSetingsHelper.LastMainPageIndexCache < 0) ? 0 : IsolatedAppSetingsHelper.LastMainPageIndexCache;

            if (UpdatingController.HasSomeThingToDoBeforeGoToMainPage(this))
            {
                IsolatedAppSetingsHelper.LastMainPageIndexCache = 0;
            }

            this.MainPanorama.DefaultItem = this.MainPanorama.Items[IsolatedAppSetingsHelper.LastMainPageIndexCache];
            TextBlock block = new TextBlock
            {
                Text = AppResources.Today.ToLowerInvariant(),
                FontSize = 48.0,
                Margin = new Thickness(0.0, 40.0, 0.0, 0.0)
            };
            this.RecentItemList.Header = block;
            Binding binding = new Binding("FavoritesPageVisibiable")
            {
                Source = AppSetting.Instance
            };
            this.RecentItemList.SetBinding(UIElement.VisibilityProperty, binding);
        }
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:59,代码来源:MainPage.xaml.cs

示例3: Act

 Act(Person s, Verb v, Noun o1, Noun o2, Act c, System.Action<Act> R)
     : this()
 {
     //Debug.Assert(Arity(v) == 2 || o2, v.ToString() + " is a ternary verb.");
     subject = s; verb = v; primaryObject = o1; secondaryObject = o2; parent = c; Register = R;
     args = new VerbArguments(this);
     Register(this);
 }
开发者ID:roguelikedev,项目名称:HoS_proto,代码行数:8,代码来源:Act.cs

示例4: FlexibleMenu

 public FlexibleMenu(IFlexibleMenuItemProvider itemProvider, int selectionIndex, FlexibleMenuModifyItemUI modifyItemUi, System.Action<int, object> itemClickedCallback)
 {
   this.m_ItemProvider = itemProvider;
   this.m_ModifyItemUI = modifyItemUi;
   this.m_ItemClickedCallback = itemClickedCallback;
   this.m_SeperatorIndices = this.m_ItemProvider.GetSeperatorIndices();
   this.selectedIndex = selectionIndex;
   this.m_ShowAddNewPresetItem = this.m_ModifyItemUI != null;
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:9,代码来源:FlexibleMenu.cs

示例5: MyGuiScreenEnterSectorProgress

 public MyGuiScreenEnterSectorProgress(MyMwcTravelTypeEnum travelType, MyMwcVector3Int targetSectorPosition, Vector3 currentShipPosition, System.Action<MyMwcObjectBuilder_Sector, Vector3> enterSectorSuccessfulAction)
     : base(MyTextsWrapperEnum.EnterSectorInProgressPleaseWait, false)
 {
     m_backgroundFadeColor = MyGuiConstants.SCREEN_BACKGROUND_FADE_BLANK_DARK_PROGRESS_SCREEN;
     m_travelType = travelType;
     m_targetSectorPosition = targetSectorPosition;
     m_currentShipPosition = currentShipPosition;
     m_enterSectorSuccessfulAction = enterSectorSuccessfulAction;
 }
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:9,代码来源:MyGuiScreenEnterSectorProgress.cs

示例6: IL2CPPBuilder

 public IL2CPPBuilder(string tempFolder, string stagingAreaData, IIl2CppPlatformProvider platformProvider, System.Action<string> modifyOutputBeforeCompile, RuntimeClassRegistry runtimeClassRegistry, bool developmentBuild)
 {
   this.m_TempFolder = tempFolder;
   this.m_StagingAreaData = stagingAreaData;
   this.m_PlatformProvider = platformProvider;
   this.m_ModifyOutputBeforeCompile = modifyOutputBeforeCompile;
   this.m_RuntimeClassRegistry = runtimeClassRegistry;
   this.m_DevelopmentBuild = developmentBuild;
 }
开发者ID:BlakeTriana,项目名称:unity-decompiled,代码行数:9,代码来源:IL2CPPBuilder.cs

示例7: RelayCommand

 public RelayCommand(System.Action<object> execute, System.Predicate<object> canExecute)
 {
     if (execute == null)
     {
         throw new System.ArgumentNullException("execute");
     }
     this._execute = execute;
     this._canExecute = canExecute;
 }
开发者ID:super860327,项目名称:firstwpftest,代码行数:9,代码来源:RelayCommand.cs

示例8: Connect

        /// <summary>
        /// Initialize the network connection
        /// </summary>
		public void Connect(string host, int port, System.Action<bool> onResult = null) {

			this.onResult = onResult;
            client = new TcpClient();
			client.NoDelay = true;
			client.BeginConnect(host, port, new AsyncCallback(this.DoСonnect), client);
            isHead = true;

        }
开发者ID:MJunak,项目名称:Unity3d.UI.Windows,代码行数:12,代码来源:NetClient.cs

示例9: Initialize

 public void Initialize(string url, Action<string> onMessage, Action onClose, Action onOpen, Action<string> onError)
 {
     this.SocketId = nextSocketId++;
     this.onMessage = onMessage;
     this.onClose = onClose;
     this.onOpen = onOpen;
     this.onError = onError;
     this.url = url;
 }
开发者ID:gorecode,项目名称:they-will-burn,代码行数:9,代码来源:IOSWebSocket.cs

示例10: Connect

        /// <summary>
        /// Initialize the network connection
        /// </summary>
        //TODO onResult is called in a foreign thread
		public void Connect(string host, int port, System.Action<bool> onResult = null) {
			if (client != null) Close();
			this.onResult = onResult;
			client = new TcpClientDebug(name);
//			client.NoDelay = true;
			//Debug.Log(name + " C: Connect(" + endConnected + ")");
			endConnected = false;
			client.BeginConnect(host, port, new AsyncCallback(this.DoСonnect), client);
            isHead = true;
        }
开发者ID:Cyberbanan,项目名称:Unity3d.UI.Windows,代码行数:14,代码来源:NetClient.cs

示例11: MyGuiScreenLoadCheckpointProgress

 public MyGuiScreenLoadCheckpointProgress(MyMwcSectorTypeEnum sessionType, MyMwcSessionStateEnum sessionStartType, int? userId, MyMwcVector3Int? position, string checkpointName, System.Action<MyMwcObjectBuilder_Checkpoint> enterSectorSuccessfulAction)
     : base(MyTextsWrapperEnum.EnterSectorInProgressPleaseWait, false, TimeSpan.FromSeconds(360)) // Some missions loads very long (Roch's junkyard)
 {
     m_backgroundFadeColor = MyGuiConstants.SCREEN_BACKGROUND_FADE_BLANK_DARK_PROGRESS_SCREEN;
     m_sessionType = sessionType;
     m_sessionStartType = sessionStartType;
     m_userId = userId;
     m_sectorPosition = position;
     m_checkpointName = checkpointName;
     m_loadCheckpointSuccessfulAction = enterSectorSuccessfulAction;
 }
开发者ID:Bunni,项目名称:Miner-Wars-2081,代码行数:11,代码来源:MyGuiScreenLoadCheckpointProgress.cs

示例12: Initialize

        public void Initialize(string url, Action<string> onMessage, Action onClose, Action onOpen, Action<string> onError)
        {
            this.SocketId = socketCount;
            socketCount++;

            this.url = url;
            this.messageCallback = onMessage;
            this.closeCallback = onClose;
            this.openCallback = onOpen;
            this.errorCallback = onError;
        }
开发者ID:Barnaff,项目名称:Chromania,代码行数:11,代码来源:WebGLWebSocket.cs

示例13: PeopleImporter

 public PeopleImporter()
 {
     this.InitializeComponent();
     TiltEffect.SetIsTiltEnabled(this, true);
     this.currentSelector = this.buddies;
     base.Loaded += new RoutedEventHandler(this.PeopleImporter_Loaded);
     System.Action<ApplicationBarIconButton>[] setters = new System.Action<ApplicationBarIconButton>[] { delegate (ApplicationBarIconButton p) {
         p.Text = AppResources.ShowGroups;
     } };
     base.ApplicationBar.GetIconButtonFrom(0).SetPropertyValue(setters).IsEnabled = false;
 }
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:11,代码来源:PeopleImporter.xaml.cs

示例14: Init

        public void Init(string content, System.Action<TopAlertItem> callbackDisappear, float delay = 1f)
		{
			hideDelay = delay;

			tween.delay = 0f;
			tween.SetOnFinished(OnStart);
			tween.PlayForward();
			
			label.color = originColor;
			label.text = content;
			CallbackDisappear = callbackDisappear;
		}
开发者ID:sigmadruid,项目名称:NewMaze,代码行数:12,代码来源:TopAlertItem.cs

示例15: MonthSelectorPage

 public MonthSelectorPage()
 {
     this.InitializeComponent();
     this.mbs = new MessageBoxService(this);
     this.viewModel = new DateConfigViewModel();
     base.Loaded += new RoutedEventHandler(this.MonthSelectorPage_Loaded);
     Microsoft.Unsupported.TiltEffect.SetIsTiltEnabled(this, true);
     System.Action<ApplicationBarIconButton>[] setters = new System.Action<ApplicationBarIconButton>[] { delegate (ApplicationBarIconButton p) {
         p.Text = AppResources.Search;
     } };
     base.ApplicationBar.GetIconButtonFrom(0).SetPropertyValue(setters);
 }
开发者ID:RukaiYu,项目名称:TinyMoneyManager.WP8,代码行数:12,代码来源:MonthSelectorPage.xaml.cs


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