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


C# DialogType类代码示例

本文整理汇总了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);
            };
        }
开发者ID:leloulight,项目名称:magicgrove,代码行数:29,代码来源:Shell.cs

示例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);  //加载完成后卸载
    }
开发者ID:dafei2015,项目名称:UIProject,代码行数:33,代码来源:PanelManager.cs

示例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);
        }
开发者ID:sr3dna,项目名称:big5sync,代码行数:32,代码来源:DialogWindow.xaml.cs

示例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);
        }
开发者ID:andywhitfield,项目名称:StatLight,代码行数:25,代码来源:DialogMonitorRunner.cs

示例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;
        }
开发者ID:vnl,项目名称:Monies,代码行数:34,代码来源:ModalMessageDialog.xaml.cs

示例6: RemoveDialog

 public void RemoveDialog(DialogType type)
 {
     if (this.DialogExist(type))
     {
         this.dialogs.Remove(type);
     }
 }
开发者ID:dafei2015,项目名称:UIProject,代码行数:7,代码来源:DialogManager.cs

示例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;
     }
 }
开发者ID:GAMP,项目名称:Plugins,代码行数:25,代码来源:Shared.cs

示例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);
 }
开发者ID:ELMASTERS,项目名称:SagaRevised,代码行数:7,代码来源:Common.Actions.cs

示例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();
 }
开发者ID:gan123,项目名称:Productivity-Tracker,代码行数:7,代码来源:DialogService.cs

示例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);
        }
开发者ID:sr3dna,项目名称:big5sync,代码行数:42,代码来源:DialogWindow.xaml.cs

示例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>>();
 }
开发者ID:netoffice,项目名称:NetOffice,代码行数:14,代码来源:DialogUtils.cs

示例12: ListChildInfoDialog

 public ListChildInfoDialog(int selectedListFamilyId)
     : this()
 {
     dialogType = DialogType.Add;
     this.selectedListFamilyId = selectedListFamilyId;
     this.chkNeverEnd.IsChecked = true;
 }
开发者ID:HADB,项目名称:ListManager,代码行数:7,代码来源:ListChildInfoDialog.xaml.cs

示例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;
 }
开发者ID:DBailey635,项目名称:C1-CMS,代码行数:8,代码来源:MessageBoxActionToken.cs

示例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);
		}
	}
开发者ID:JuanJosePol,项目名称:ggjmallorca2016,代码行数:8,代码来源:JammerDialog.cs

示例15: Dialog

 public Dialog(bool allowCancel, DialogType dialogType)
     : this()
 {
     CancelButton.Visibility = allowCancel
                                   ? System.Windows.Visibility.Visible
                                   : System.Windows.Visibility.Collapsed;
     SetImage(dialogType);
 }
开发者ID:gan123,项目名称:Productivity-Tracker,代码行数:8,代码来源:Dialog.xaml.cs


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