private void AddEvent_(GuiEventArgs ev) { lock (eventsLock_) { hidEvents_.Add(ev); } }
protected override void OnDisposed(GuiEventArgs e, object sender) { for (int i = 0; i < childs.ChildsCount; i++) { childs[i].Dispose(); } base.OnDisposed(e, sender); }
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); } } }
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); } } }
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(); }
private void owner_Checkedd(GuiEventArgs e, object sender) { UpdateCheckMarkerVisibility(); }