void m_List_ObjectSelected(object sender, CustomEventArgs <ObjectStorageFileDescription> e)
        {
            // Выводим предупреждение о затирании объекта
            if (MessageBox.Show(Localization.ObjectSaveDialog_Replace_Message, Localization.Warning, MessageBoxButton.OKCancel) != MessageBoxResult.OK)
            {
                return;
            }
            m_Dlg.Close();
            EventHandler handler = DialogOk;

            if (handler != null)
            {
                handler(this, EventArgs.Empty);
            }
        }
Exemplo n.º 2
0
        void m_List_ObjectSelected(object sender, CustomEventArgs <ObjectStorageFileDescription> e)
        {
            if (CurrentObject != null)
            {
                if (String.IsNullOrEmpty(CurrentObject.ContentFileName))
                {
                    MessageBox.Show(Localization.ObjectLoadDialog_ContentError_Message, Localization.Error, MessageBoxButton.OK);
                    return;
                }

                m_Dlg.Close();
                EventHandler handler = DialogOk;
                if (handler != null)
                {
                    handler(this, EventArgs.Empty);
                }
            }
        }
Exemplo n.º 3
0
    private void Update()
    {
        if (inputDisabled)
        {
            return;
        }

        if (Input.GetKeyDown(KeyCode.LeftArrow) || Input.GetKeyDown(KeyCode.A))
        {
            if (selectedIndex > 0)
            {
                selectedIndex -= 1;
            }
            UpdatePointers();
        }
        else if (Input.GetKeyDown(KeyCode.RightArrow) || Input.GetKeyDown(KeyCode.D))
        {
            if (selectedIndex < options.Count - 1)
            {
                selectedIndex += 1;
            }
            UpdatePointers();
        }

        if (Input.GetButtonDown("Fire1"))
        {
            AudioManager.Instance.Play("action");
            if (dialog.IsOpened)
            {
                dialog.Close();
            }
            else
            {
                PickItem();
            }
        }
    }
Exemplo n.º 4
0
        public async void Ok_Clicked()
        {
            try
            {
                if (string.IsNullOrWhiteSpace(UserLink.UserLink.Text) && string.IsNullOrWhiteSpace(UserLink.UserLink.Url))
                {
                    //ModalDialogResult result = await ModalDialogService.ShowDialogAsync<ValidationErrorForm>("Validation Errors");
                    //if (result.Success == false)
                    //    ModalDialogService.Close(false);
                }
                else
                {
                    ModalDialogParameters resultParameters = new ModalDialogParameters();

                    resultParameters.Set("Link", UserLink);
                    ModalDialog.Close(true, resultParameters);
                }
            }
            catch (Exception ex)
            {
                // pass the exception back to the ShowDialogAsync call that opened the Dialog
                ModalDialog.Close(ex);
            }
        }
Exemplo n.º 5
0
 public void Cancel_Clicked()
 {
     ModalDialog.Close(false);
 }