本文整理汇总了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;
}
示例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);
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}