Ejemplo n.º 1
0
    void Update()
    {
        if (Input.GetMouseButtonDown(0) && !EventSystem.current.IsPointerOverGameObject(-1))
        {
            if (LeftClick != null)
            {
                LeftClick.Invoke(this, EventArgs.Empty);
            }
            else
            {
            }
        }

        if (Input.GetMouseButtonDown(1) && !EventSystem.current.IsPointerOverGameObject(-1))
        {
            if (RightClick != null)
            {
                RightClick.Invoke(this, EventArgs.Empty);
            }
            else
            {
            }
        }

        if (Input.GetKeyDown(KeyCode.Escape))
        {
            CancelClick?.Invoke(this, EventArgs.Empty);
        }
    }
 private void _cancelButton_Click(object sender, EventArgs e)
 {
     //throw new NotImplementedException();
     CancelClick?.Invoke(this, new EventArgs());
     Collapse = true;
     CollapseOrExpand();
 }
Ejemplo n.º 3
0
        private void btnCancel_Click(object sender, EventArgs e)
        {
            if (CancelClick == null)
            {
                return;
            }

            Close();
            CancelClick?.Invoke(sender, e);
        }
Ejemplo n.º 4
0
        public RequireAdminRightsWindow()
        {
            InitializeComponent();

            btApply.Click += (o, e) =>
            {
                btCancel.IsEnabled = btApply.IsEnabled = false;
                ApplyClick?.Invoke();
            };
            btCancel.Click += (o, e) => CancelClick?.Invoke();
        }
Ejemplo n.º 5
0
        public UpgradePage()
        {
            InitializeComponent();

            PanelTop.Visible = false;

            // labels
            BtnCancel.Text              = LocaleEN.TEXT_CANCEL;
            BtnUpgradeSelected.Text     = LocaleEN.TEXT_UPGRADE_SELECTED;
            BtnUpgradeAll.Text          = LocaleEN.TEXT_UPGRADE_ALL;
            LblAdmin.Text               = LocaleEN.TEXT_NO_ADMIN_HINT;
            LblLoading.Text             = LocaleEN.TEXT_LOADING;
            LblSelected.Text            = String.Empty;
            LstPackages.Columns[0].Text = LocaleEN.TEXT_COL_NAME;
            LstPackages.Columns[1].Text = LocaleEN.TEXT_COL_CURRENT;
            LstPackages.Columns[2].Text = LocaleEN.TEXT_COL_AVAILABLE;
            LstPackages.Columns[3].Text = LocaleEN.TEXT_COL_PINNED;

            // event handlers
            LstPackages.ItemChecked  += LstPackages_ItemChecked;
            LstPackages.Resize       += LstPackages_Resize;
            BtnUpgradeAll.Click      += new EventHandler((sender, e) => { UpgradeAllClick?.Invoke(this, e); });
            BtnUpgradeSelected.Click += new EventHandler((sender, e) => { UpgradeSelectedClick?.Invoke(this, e); });
            BtnCancel.Click          += new EventHandler((sender, e) => { CancelClick?.Invoke(this, e); });

            // context menu
            // deactivate in release build until refactor
            //var itemPin = new ToolStripMenuItem("&Pin package");
            //itemPin.Click += new EventHandler((sender, e) =>
            //{
            //    if (LstPackages.SelectedItems.Count > 0)
            //    {
            //        TogglePinnedClicked?.Invoke(this, LstPackages.SelectedItems[0].Text);
            //    }
            //});

            //var contextMenu = new ContextMenuStrip();
            //contextMenu.Opening += new System.ComponentModel.CancelEventHandler((sender, e) =>
            //{
            //    itemPin.Checked = Boolean.Parse(LstPackages.SelectedItems[0].SubItems[3].Text);
            //});

            //contextMenu.Items.Add(itemPin);
            //LstPackages.ContextMenuStrip = contextMenu;
        }
        private void DrawFooter()
        {
            GUILayout.Space(LayoutSettings.SectionSpacing);

            using (new EditorGUILayout.HorizontalScope())
            {
                if (GUILayout.Button(new GUIContent("Cancel", "Discard changes to the list."), GUILayout.ExpandWidth(false), GUILayout.MinWidth(50), GUILayout.Height(25)))
                {
                    CancelClick?.Invoke();
                }

                GUILayout.FlexibleSpace();

                if (GUILayout.Button(new GUIContent("Save", "Save current list as quick scenes."), GUILayout.ExpandWidth(false), GUILayout.MinWidth(50), GUILayout.Height(25)))
                {
                    SaveClick?.Invoke(_sceneAssets.ToArray());
                }
            }
        }
Ejemplo n.º 7
0
 public void cancelPreviousClick()
 {
     CancelClick?.Invoke(this, EventArgs.Empty);
 }
 private void Cancel_Click(object sender, RoutedEventArgs e)
 {
     CancelClick?.Invoke(sender, e);
 }
 private void CancelButton_Click(object sender, RoutedEventArgs e)
 {
     CancelClick?.Invoke(this, new RoutedEventArgs());
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Button_Click_Cancel
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 private void Button_Click_Cancel(object sender, RoutedEventArgs e)
 {
     OFDWReturnCode = OpenFileDlgWindowReturnCode.Camcel;
     CancelClick?.Invoke(null, null);
     Hide();
 }
Ejemplo n.º 11
0
 private void BtnCancel_Click(object sender, EventArgs e)
 {
     CancelClick?.Invoke(sender, e);
 }