Пример #1
0
        public override void OnSelected(object sender, TargetEventArgs e)
        {
            var orcofir = e.Object as OrConfirm;

            if (orcofir != null)
            {
                if (orcofir.Id_confirm != null)
                {
                    orcofirm = orcofir;
                    model.GetFeeList(orcofirm);
                    OnFillData();
                }
                else
                {
                    this.reFreshData();
                }
                this.FireSelected(this);
            }
            else
            {
                ConfirmEvent uiEvent = e.Object as ConfirmEvent;
                if (uiEvent == null)
                {
                    return;
                }
                if (uiEvent.UIEVENT == "addfee")
                {
                    this.setFeeEditable(true);
                }
                else if (uiEvent.UIEVENT == "uneditable")
                {
                    this.setFeeEditable(false);
                }
            }
        }
Пример #2
0
            void OnConfirmEvent(ConfirmEvent e)
            {
                if (!Enabled)
                {
                    Trace.Script("Disabled!", this);
                    return;
                }

                this.Confirm();
            }
Пример #3
0
            void OnConfirmEvent(ConfirmEvent e)
            {
                if (!Enabled)
                {
                    StratusDebug.Log("Disabled!", this);
                    return;
                }

                this.Confirm();
            }
        private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
        {
            string szNameDisplayedInConf = this.textBoxDisplayName.Text.Trim();

            if (string.IsNullOrEmpty(szNameDisplayedInConf))
            {
                this.textBoxDisplayName.Tag = LanguageUtil.Instance.GetValueByKey("NAME_DISPLAYED_IN_CONF");
            }

            Window window = Window.GetWindow(this);
            IMasterDisplayWindow ownerWindow = window as IMasterDisplayWindow;

            if (null == ownerWindow)
            {
                ownerWindow = (MainWindow)Application.Current.MainWindow;
            }

            if (szNameDisplayedInConf.Length > Utils.DISPLAY_NAME_MAX_LENGTH)
            {
                log.InfoFormat("The length of name exceeds {0}.", Utils.DISPLAY_NAME_MAX_LENGTH);
                MessageBoxTip tip = new MessageBoxTip(ownerWindow);
                tip.SetTitleAndMsg(
                    LanguageUtil.Instance.GetValueByKey("PROMPT")
                    , string.Format(LanguageUtil.Instance.GetValueByKey("NAME_DISPLAYED_IN_CONF_MAX_LENGTH"), Utils.DISPLAY_NAME_MAX_LENGTH)
                    , LanguageUtil.Instance.GetValueByKey("CONFIRM")
                    );
                tip.ShowDialog();
                return;
            }

            if (Regex.IsMatch(szNameDisplayedInConf, Utils.INVALID_DISPLAY_NAME_REGEX))
            {
                log.Info("Invalid char in name.");
                MessageBoxTip tip = new MessageBoxTip(ownerWindow);
                tip.SetTitleAndMsg(
                    LanguageUtil.Instance.GetValueByKey("PROMPT")
                    , LanguageUtil.Instance.GetValueByKey("NAME_DISPLAYED_IN_CONF_INCORRECT_PROMPT")
                    , LanguageUtil.Instance.GetValueByKey("CONFIRM")
                    );
                tip.ShowDialog();
                return;
            }

            ConfirmEvent?.Invoke(szNameDisplayedInConf);
        }
Пример #5
0
 private void ConfirmBtn_Click(object sender, RoutedEventArgs e)
 {
     ConfirmEvent?.Invoke(this, new EventArgs());
 }
Пример #6
0
        //public override void Show()
        //{
        //    if (okButton != null && okButton.onClick.GetPersistentEventCount() == 0)
        //    {
        //        okButton.onClick.AddListener(OnConfirm);
        //    }
        //    if (cancelButton != null && cancelButton.onClick.GetPersistentEventCount() == 0)
        //    {
        //        cancelButton.onClick.AddListener(OnCancel);
        //    }
        //    base.Show();
        //}

        public virtual void OnConfirm()
        {
            ConfirmEvent?.Invoke();
            Hide();
        }
Пример #7
0
 private void CheckButton_Click(object sender, EventArgs e)
 {
     ConfirmEvent?.Invoke(setting);
     this.Close();
 }
Пример #8
0
 public void AddEvent(ConfirmEvent @event)
 {
     loginButton.onClick.AddListener(Confirm);
     confirmEvent += @event;
 }
Пример #9
0
 public void Confirm()
 {
     ConfirmEvent?.Invoke();
     Activate(false);
     turnBtn.gameObject.SetActive(true);
 }