本文整理汇总了C#中DialogType类的典型用法代码示例。如果您正苦于以下问题:C# DialogType类的具体用法?C# DialogType怎么用?C# DialogType使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DialogType类属于命名空间,在下文中一共展示了DialogType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowDialog
public void ShowDialog(object dialog, DialogType type, InteractionState? interactionState = null)
{
var dialogHost = Screen as IIsDialogHost;
var revert = ChangeMode(interactionState);
if (dialogHost == null)
{
Dialog = dialog;
}
else
{
dialogHost.AddDialog(dialog, type);
}
((IClosable) dialog).Closed += delegate
{
if (dialogHost == null)
{
Dialog = null;
}
else
{
dialogHost.RemoveDialog(dialog);
}
ChangeMode(revert);
};
}
示例2: OnCreatePanel
/// <summary>
/// 将游戏打包成ios或Android 后运行的,打包成assetbundle
/// </summary>
/// <param name="type"></param>
/// <returns></returns>
private IEnumerator OnCreatePanel(DialogType type)
{
path = Util.AppContentDataUri + "UI/" + type.ToString() + "Panel.unity3d";
GameObject go = null;
WWW bundle = new WWW(path);
yield return bundle; //等待加载完成后进行其他操作
try
{
if (bundle.assetBundle.Contains(type.ToString()+"Panel"))
{
go =
Instantiate(bundle.assetBundle.LoadAsset(type.ToString() + "Panel", typeof (GameObject))) as
GameObject;
}
}
catch (Exception e)
{
Debug.Log(e.ToString());
}
go.name = type.ToString() + "Panel";
go.transform.parent = UIContainer.instance.transform;
go.transform.localPosition = Vector3.zero;
go.transform.localScale = Vector3.one;
bundle.assetBundle.Unload(false); //加载完成后卸载
}
示例3: StyleDialogBox
/// <summary>
/// Styles the Dialog Box (Components Visibility etc.) according to the dialog box type
/// </summary>
/// <param name="dt">Enumerated type - Dialog Type</param>
private void StyleDialogBox(DialogType dt)
{
switch (dt)
{
case DialogType.Error:
Title = "Error";
OkCommandPanel.Visibility = Visibility.Visible;
break;
case DialogType.Warning:
Title = "Warning";
OkCancelCommandPanel.Visibility = Visibility.Visible;
break;
case DialogType.Information:
Title = "Information";
OkCommandPanel.Visibility = Visibility.Visible;
break;
case DialogType.Indeterminate:
CannotBeClosed = true;
Title = (string) LblCaption.Content;
ProgressBarTermination.IsEnabled = true;
ProgressBarTermination.Visibility = Visibility.Visible;
MinimizePanel.Visibility = Visibility.Visible;
break;
}
// Gets the approriate image type to show besides dialog message
ImgIcon.Source = GetSystemImage(dt);
}
示例4: ExecuteDialogSlapdown
private void ExecuteDialogSlapdown(IDialogMonitor dialogMonitor, DialogType dialogType)
{
Action<string> a = msg =>
{
if (msg.Contains("836D4425-DB59-48BB-BA7B-03AB20A57499"))
{
_eventPublisher
.SendMessage(new FatalSilverlightExceptionServerEvent(dialogType) { Message = msg, });
_eventPublisher
.SendMessage<TestRunCompletedServerEvent>();
}
else
{
_eventPublisher.SendMessage(
new DialogAssertionServerEvent(dialogType)
{
Message = msg,
});
}
};
dialogMonitor.ExecuteDialogSlapDown(a);
}
示例5: ShowMessage
internal DialogResponse ShowMessage(string message, string header, DialogType dialogueType, Window owner)
{
Owner = owner;
DataTemplate figureTemplate = null;
switch (dialogueType)
{
case DialogType.Message:
figureTemplate = Application.Current.TryFindResource("InformationTemplate") as DataTemplate;
btnCancel.Visibility = btnYes.Visibility = btnNo.Visibility = Visibility.Collapsed;
break;
case DialogType.Error:
figureTemplate = Application.Current.TryFindResource("ErrorTemplate") as DataTemplate;
btnCancel.Visibility = btnYes.Visibility = btnNo.Visibility = Visibility.Collapsed;
break;
case DialogType.Question:
figureTemplate = Application.Current.TryFindResource("IterrogationTemplate") as DataTemplate;
btnCancel.Visibility = btnOk.Visibility = Visibility.Collapsed;
break;
case DialogType.QuestionWithCancel:
figureTemplate = Application.Current.TryFindResource("IterrogationTemplate") as DataTemplate;
btnOk.Visibility = Visibility.Collapsed;
break;
}
if (null != figureTemplate)
imageShower.ContentTemplate = figureTemplate;
txtHeader.Text = header;
txtBody.Text = message;
ShowDialog();
return _response;
}
示例6: RemoveDialog
public void RemoveDialog(DialogType type)
{
if (this.DialogExist(type))
{
this.dialogs.Remove(type);
}
}
示例7: DialogContext
public DialogContext(DialogType type, IApplicationLicenseKey key, ILicenseProfile profile)
{
this.Key = key;
this.Profile = profile;
switch (type)
{
case DialogType.Steam:
this.Content = new AddSteamKey();
break;
case DialogType.UserNamePassword:
this.Content = new AddSteamKey(false);
break;
case DialogType.Executable:
case DialogType.Process:
this.Content = new AddProcessKey();
break;
case DialogType.Registry:
this.Content = new AddRegistryKey();
break;
case DialogType.RegistryImport:
this.Content = new RegistryImportKey();
break;
default: break;
}
}
示例8: OpenMenu
public static void OpenMenu(Character target, MapObject source, uint dialogScript, DialogType type, params DialogType[] icons)
{
byte[] dialogs = new byte[icons.Length];
for (int i = 0; i < icons.Length; i++)
dialogs[i] = (byte)icons[i];
OpenMenu(target, source, dialogScript, type, dialogs);
}
示例9: Show
public void Show(string caption, string message, DialogType type, bool showOk, bool showCancel, Action<bool> closeAction)
{
var dialog = new Dialog(showCancel, type) {Caption = caption, Message = message, CloseAction = closeAction};
dialog.Closed += new EventHandler(OnDialogClosed);
ParentGrid.Children.Add(dialog);
dialog.Show();
}
示例10: DialogWindow
private bool _closingAnimationNotCompleted = true; // status of whether closing animation is complete
/// <summary>
/// Initializes the DialogWindow
/// </summary>
/// <param name="parentWindow">Reference to the parent window</param>
/// <param name="caption">Caption to Show in Dialog Box</param>
/// <param name="message">Message to Show in Dialog Box</param>
/// <param name="dt">Enumerated type - DialogType</param>
public DialogWindow(Window parentWindow, string caption, string message, DialogType dt)
{
InitializeComponent();
// Resets Choice for Warning DialogBoxType
Application.Current.Properties["DialogWindowChoice"] = false;
// Sets up window properties for Indeterminate Dialog Box Type
try
{
if (dt != DialogType.Indeterminate)
{
ShowInTaskbar = false;
Owner = parentWindow;
CannotBeClosed = false;
}
else
{
CannotBeClosed = true;
}
}
catch (InvalidOperationException)
{
}
// Sets the caption & message of the Dialog Box
LblCaption.Content = caption;
TxtBlkMessageBoxText.Text = message;
// Styles the Dialog Box
StyleDialogBox(dt);
PlayDialogSound(dt);
}
示例11: DialogShowEventArgs
/// <summary>
/// Creates an instance of the class
/// </summary>
/// <param name="type">dialog type</param>
/// <param name="suppressed">dialog want not shown</param>
/// <param name="modal">dialog want shown as modal to its parent</param>
/// <param name="arguments">arguments dependent on dialog type</param>
internal DialogShowEventArgs(DialogType type, bool suppressed, bool modal, IEnumerable<KeyValuePair<string, object>> arguments)
{
Type = type;
Suppressed = suppressed;
Modal = modal;
Arguments = null != arguments ? arguments : new List<KeyValuePair<string, object>>();
}
示例12: ListChildInfoDialog
public ListChildInfoDialog(int selectedListFamilyId)
: this()
{
dialogType = DialogType.Add;
this.selectedListFamilyId = selectedListFamilyId;
this.chkNeverEnd.IsChecked = true;
}
示例13: MessageBoxActionToken
/// <exclude />
public MessageBoxActionToken(string title, string message, DialogType dialogType, List<PermissionType> permissionTypes)
{
_permissionTypes = permissionTypes;
this.Title = title;
this.Message = message;
this.DialogType = dialogType;
}
示例14: LoadDialog
public void LoadDialog(DialogType type) {
if (spriteRenderer != null) {
spriteRenderer.sprite = AssetCatalog.instance.dialogs.GetByName("Dialog"+type);
transform.localScale=Vector3.zero;
transform.DOScale(startScale, 2f).SetEase(Ease.OutElastic);
transform.DOPunchPosition(transform.up, 0.1f);
}
}
示例15: Dialog
public Dialog(bool allowCancel, DialogType dialogType)
: this()
{
CancelButton.Visibility = allowCancel
? System.Windows.Visibility.Visible
: System.Windows.Visibility.Collapsed;
SetImage(dialogType);
}