コード例 #1
0
 internal void Update(HexLineSpan lineSpan, VSTA.PopupStyles style)
 {
     if (lineSpan.IsDefault)
     {
         throw new ArgumentException();
     }
     if ((style & (VSTA.PopupStyles.DismissOnMouseLeaveText | VSTA.PopupStyles.DismissOnMouseLeaveTextOrContent)) == (VSTA.PopupStyles.DismissOnMouseLeaveText | VSTA.PopupStyles.DismissOnMouseLeaveTextOrContent))
     {
         throw new ArgumentOutOfRangeException(nameof(style));
     }
     this.lineSpan = lineSpan;
     this.style    = style;
     wpfHexView.QueueSpaceReservationStackRefresh();
 }
コード例 #2
0
 public override void AddAgent(HexSpaceReservationAgent agent)
 {
     if (wpfHexView.IsClosed)
     {
         throw new InvalidOperationException();
     }
     if (agent is null)
     {
         throw new ArgumentNullException(nameof(agent));
     }
     if (spaceReservationAgents.Contains(agent))
     {
         throw new InvalidOperationException();
     }
     spaceReservationAgents.Add(agent);
     agent.GotFocus  += HexSpaceReservationAgent_GotFocus;
     agent.LostFocus += HexSpaceReservationAgent_LostFocus;
     AgentChanged?.Invoke(this, new HexSpaceReservationAgentChangedEventArgs(null, agent));
     UpdateAggregateFocus();
     wpfHexView.QueueSpaceReservationStackRefresh();
 }