Exemple #1
0
        public void OpenPopupDialog(string message)
        {
            Dispatcher.Invoke(DispatcherPriority.Normal, new Action(delegate
            {
                PopupNotificationDialog popup;

                if (popupNotificationDialogs.Count > 0)
                {
                    for (int i = 0; i < popupNotificationDialogs.Count; i++)
                    {
                        if (popupNotificationDialogs[i].popup.Opacity == 0)
                        {
                            if (i == 0)
                            {
                                popupNotificationDialogs[i] = new PopupNotificationDialog(message, null);
                            }
                            else
                            {
                                popupNotificationDialogs[i] = new PopupNotificationDialog(message, popupNotificationDialogs[i - 1]);
                            }
                            popupNotificationDialogs[i].popup.Show();
                            return;
                        }
                    }
                    popup = new PopupNotificationDialog(message, popupNotificationDialogs[popupNotificationDialogs.Count - 1]);
                }
                else
                {
                    popup = new PopupNotificationDialog(message, null);
                }

                popupNotificationDialogs.Add(popup);
                popup.Show();
            }));
        }
Exemple #2
0
        public PopupNotificationDialog(string message, PopupNotificationDialog dialog)
        {
            popup = new Popup();

            popup.text.Text = Korean.ReplaceJosa(message);

            popup.Width = 60 + MeasureString(popup.text.Text);
            CornerRadius cornerRadius = new CornerRadius(5);

            popup.background.CornerRadius = cornerRadius;

            popup.Left = 20;

            if (dialog != null)
            {
                popup.Top = 7 + dialog.popup.Top + dialog.popup.Height;
            }
            else
            {
                popup.Top = 20;
            }
        }
Exemple #3
0
 public void SetDialog(PopupNotificationDialog dialog)
 {
     popupDialog = dialog;
 }