Exemple #1
0
 private void AddEvent_(GuiEventArgs ev)
 {
     lock (eventsLock_)
     {
         hidEvents_.Add(ev);
     }
 }
Exemple #2
0
        protected override void OnDisposed(GuiEventArgs e, object sender)
        {
            for (int i = 0; i < childs.ChildsCount; i++)
            {
                childs[i].Dispose();
            }

            base.OnDisposed(e, sender);
        }
Exemple #3
0
        private void OnCheckedd(GuiEventArgs e, object sender)
        {
            GuiEventHandler <GuiEventArgs> eventHandler = (GuiEventHandler <GuiEventArgs>)eventHandlers[EventCheckedd];

            if (eventHandler != null)
            {
                eventHandler(e, sender);
            }
        }
 private void FireGuiEvent_(GuiEventArgs args)
 {
     if (null != GuiEvent)
     {
         try
         {
             lock (guiEventLock_)
             {
                 GuiEvent(this, args);
             }
         }
         catch (Exception ex)
         {
             CommonUtils.LogExceptionStackTrace(logger_, Stage.General, ex);
         }
     }
 }
Exemple #5
0
 private void FireGuiEvent_(GuiEventArgs args)
 {
     if (null != GuiEvent)
     {
         try
         {
             lock (guiEventLock_)
             {
                 GuiEvent(this, args);
             }
         }
         catch (Exception ex)
         {
             logger_.Log("Fire Gui event handler failed: {0}", ex);
         }
     }
 }
Exemple #6
0
        private void CaptureApiGuiEventHandler_(object sender, GuiEventArgs e)
        {
            var oldContext = context_;

            try
            {
                if (e.IsWindowEvent)
                {
                    HandleWindowEvent_(oldContext, e as WindowEventArgs);
                    if (context_ == null)
                    {
                        logger_.Log("CaptureApiGuiEventHandler_(): context is null!");
                    }
                }
                else if (oldContext == null)
                {
                    return;
                }
                else if (e.IsKeyboardEvent)
                {
                    logger_.Verbose(e.ToString());
                    AddEvent_(e);
                }
                else
                {
                    HandleMouseEvent_(oldContext, e as MouseEventArgs);
                }
            }
            catch (Exception ex)
            {
                CommonUtils.LogExceptionStackTrace(logger_, Stage.General, ex);
                throw;
            }
            finally
            {
                if (oldContext != null && context_ == null)
                {
                    ClearCaptureBackground_();
                }
            }
        }
 /// <summary>
 ///   Updates the scrollbar's page size to be one page, and step size to be one line
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void HandleFontChanged(object sender, GuiEventArgs e)
 {
     vertScrollbar.PageSize     = TextRenderArea.Height / this.Font.LineSpacing;
     vertScrollbar.StepSize     = this.Font.LineSpacing;
     vertScrollbar.DocumentSize = GetTextHeight();
 }
Exemple #8
0
 private void owner_Checkedd(GuiEventArgs e, object sender)
 {
     UpdateCheckMarkerVisibility();
 }