示例#1
0
        private void OnFocusChanged(IntPtr current, IntPtr next)
        {
            FocusChangedEventArgs e = new FocusChangedEventArgs();

            e.CurrentView = Registry.GetManagedBaseHandleFromNativePtr(current) as View;
            e.NextView    = Registry.GetManagedBaseHandleFromNativePtr(next) as View;

            if (_focusChangedEventHandler != null)
            {
                _focusChangedEventHandler(this, e);
            }
        }
示例#2
0
        // Callback for AccessibilityManager FocusChangedSignal
        private void OnFocusChanged(IntPtr view1, IntPtr view2)
        {
            if (accessibilityManagerFocusChangedEventHandler != null)
            {
                FocusChangedEventArgs e = new FocusChangedEventArgs();

                // Populate all members of "e" (FocusChangedEventArgs) with real data
                e.ViewCurrent = Registry.GetManagedBaseHandleFromNativePtr(view1) as View;
                e.ViewNext    = Registry.GetManagedBaseHandleFromNativePtr(view2) as View;
                //here we send all data to user event handlers
                accessibilityManagerFocusChangedEventHandler(this, e);
            }
        }
示例#3
0
        private void OnWindowFocusedChanged2(IntPtr window, bool focusGained)
        {
            if (window == IntPtr.Zero)
            {
                NUILog.Error("OnWindowFocusedChanged() Window is null! Do nothing!");
                return;
            }

            if (windowFocusChangedEventHandler2 != null)
            {
                FocusChangedEventArgs e = new FocusChangedEventArgs();
                e.FocusGained = focusGained;
                windowFocusChangedEventHandler2(this, e);
            }
        }
        //NMapPOIdataOverlay poiDataOverlay, NMapPOIitem item
        private void OnFocusChanged(object sender, FocusChangedEventArgs e)
        {
            var item = e.P1;

            if (DEBUG)
            {
                if (item != null)
                {
                    Log.Info(LOG_TAG, "onFocusChanged: " + item.ToString());
                }
                else
                {
                    Log.Info(LOG_TAG, "onFocusChanged: ");
                }
            }
        }
示例#5
0
        private void bindingControl1_CellFocusChanged(object sender, FocusChangedEventArgs e)
        {
            string strError = "";
            int nRet = 0;

            // 收尾上次的对象,从编辑器到对象
            BackItem();

#if ORDERDESIGN_CONTROL
            BackIssue();
#endif


            // 从册对象到编辑器
            if (e.NewFocusObject is Cell)
            {
                Cell cell = null;

                cell = (Cell)e.NewFocusObject;
                if (/*cell.item != this.m_item
                    &&*/ cell.item != null
                    )
                {
                    nRet = this.entityEditControl1.SetData(cell.item.Xml,
                        cell.item.RecPath,
                        null,
                        out strError);
                    if (nRet == -1)
                        goto ERROR1;
                    if (cell.item.Calculated == true
                        || cell.item.Deleted == true
                        || cell.item.Locked == true
                        || (cell.item.ParentItem != null && cell.item.ParentItem.Locked == true))
                        this.entityEditControl1.SetReadOnly("all");
                    else
                        this.entityEditControl1.SetReadOnly("binding");
                    this.entityEditControl1.Changed = false;
                    this.m_item = cell.item;
                    this.entityEditControl1.ContentControl.Invalidate(); // 背景有可能改变
                    this.entityEditControl1.Visible = true;
                    this.orderDesignControl1.Visible = false;
                    return;
                }

            }

#if ORDERDESIGN_CONTROL

            // 从期对象到编辑器
            if (e.NewFocusObject is IssueBindingItem)
            {
                IssueBindingItem issue = null;

                issue = (IssueBindingItem)e.NewFocusObject;
                if (issue != this.m_item
                    && String.IsNullOrEmpty(issue.PublishTime) == false
                    && issue.Virtual == false)
                {
                    string strOrderInfoMessage = "";

                    // 根据期信息初始化采购控件
                    // return:
                    //      -1  出错
                    //      0   没有找到对应的采购信息
                    //      1   找到采购信息
                    nRet = this.bindingControl1.InitialOrderControl(
                        issue,
                        this.orderDesignControl1,
                        out strOrderInfoMessage,
                        out strError);
                    if (nRet == -1)
                        goto ERROR1;

                    if (nRet == 0)
                        goto END1;
                    
                    this.m_item = issue;
                    this.orderDesignControl1.Visible = true;
                    this.entityEditControl1.Visible = false;
                    return;
                }

            }
#endif

            // END1:
            this.orderDesignControl1.Visible = false;
            this.orderDesignControl1.Clear();
            this.m_item = null;

            this.entityEditControl1.Visible = false;
            this.entityEditControl1.Clear();
            return;
        ERROR1:
            MessageBox.Show(this, strError);
        }
示例#6
0
 private void FocusHelper_FocusChanged(FocusHelper sender, FocusChangedEventArgs e)
 {
     HideMainMenu();
 }
 /// <summary>
 /// Focus event handler
 /// </summary>
 /// <param name="e"></param>
 protected override void OnGotFocus(FocusChangedEventArgs e)
 {
     // Whenever this window gets focus, it gives it to listbox
     Buttons.Focus(menuListBox);
     base.OnGotFocus(e);
 }
示例#8
0
 public void OnFocusChanged(FocusChangedEventArgs e) => RefreshHover();
示例#9
0
 /// <summary>
 ///     An event announcing that the buttons is no longer focused on this element
 /// </summary>
 protected virtual void OnLostFocus(FocusChangedEventArgs e)
 {
 }
示例#10
0
 private void OnSubPanelFocusChanged(object sender, FocusChangedEventArgs args)
 {
     SubPanelFocusChanged?.Invoke(sender, args);
 }
示例#11
0
 /// <summary>
 /// Called whenever a subpanel of the CharacterPanel has its focus changed to coordinate changes in this panel.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 public void OnSubPanelFocusChanged(object sender, FocusChangedEventArgs args)
 {
     subPanelFocus = args.NewFocus;
 }
示例#12
0
 /// <summary>
 /// Called when the CharacterPanel has its focus changed to coordinate changes in this panel.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="args"></param>
 public void OnCharacterPanelFocusChanged(object sender, FocusChangedEventArgs args)
 {
     characterPanelFocus = args.NewFocus;
 }
 private void AutoCompleteHouses_OnFocusChanged(object sender, FocusChangedEventArgs e)
 {
     // autoCompleteHouses.HeightRequest =  GetHeight(e.HasFocus);
 }
示例#14
0
        private void bindingControl1_CellFocusChanged(object sender, FocusChangedEventArgs e)
        {
            string strError = "";
            int    nRet     = 0;

            // 收尾上次的对象,从编辑器到对象
            BackItem();

#if ORDERDESIGN_CONTROL
            BackIssue();
#endif


            // 从册对象到编辑器
            if (e.NewFocusObject is Cell)
            {
                Cell cell = null;

                cell = (Cell)e.NewFocusObject;
                if (/*cell.item != this.m_item
                     * &&*/cell.item != null
                    )
                {
                    nRet = this.entityEditControl1.SetData(cell.item.Xml,
                                                           cell.item.RecPath,
                                                           null,
                                                           out strError);
                    if (nRet == -1)
                    {
                        goto ERROR1;
                    }
                    if (cell.item.Calculated == true ||
                        cell.item.Deleted == true ||
                        cell.item.Locked == true ||
                        (cell.item.ParentItem != null && cell.item.ParentItem.Locked == true))
                    {
                        this.entityEditControl1.SetReadOnly("all");
                    }
                    else
                    {
                        this.entityEditControl1.SetReadOnly("binding");
                    }
                    this.entityEditControl1.Changed = false;
                    this.m_item = cell.item;
                    this.entityEditControl1.ContentControl.Invalidate(); // 背景有可能改变
                    this.entityEditControl1.Visible  = true;
                    this.orderDesignControl1.Visible = false;
                    return;
                }
            }

#if ORDERDESIGN_CONTROL
            // 从期对象到编辑器
            if (e.NewFocusObject is IssueBindingItem)
            {
                IssueBindingItem issue = null;

                issue = (IssueBindingItem)e.NewFocusObject;
                if (issue != this.m_item &&
                    String.IsNullOrEmpty(issue.PublishTime) == false &&
                    issue.Virtual == false)
                {
                    string strOrderInfoMessage = "";

                    // 根据期信息初始化采购控件
                    // return:
                    //      -1  出错
                    //      0   没有找到对应的采购信息
                    //      1   找到采购信息
                    nRet = this.bindingControl1.InitialOrderControl(
                        issue,
                        this.orderDesignControl1,
                        out strOrderInfoMessage,
                        out strError);
                    if (nRet == -1)
                    {
                        goto ERROR1;
                    }

                    if (nRet == 0)
                    {
                        goto END1;
                    }

                    this.m_item = issue;
                    this.orderDesignControl1.Visible = true;
                    this.entityEditControl1.Visible  = false;
                    return;
                }
            }
#endif

            // END1:
            this.orderDesignControl1.Visible = false;
            this.orderDesignControl1.Clear();
            this.m_item = null;

            this.entityEditControl1.Visible = false;
            this.entityEditControl1.Clear();
            return;

ERROR1:
            MessageBox.Show(this, strError);
        }
示例#15
0
 protected virtual void OnLostFocus(FocusChangedEventArgs e)
 {
 }