Naanou.ResourceExchange
Class frmMonitor

Displays overall progress info on all incoming and outgoing transfers.

As incoming transfers are swarmed, aggregate statistics are shown. Gives the user an idea of how much bandwidth is being used for transfers.

Field Summary
System.ComponentModel.IContainer components
Naanou.Common.IWindowDocker docker
Naanou.ResourceExchange.ResourceExchanger exchanger
System.Windows.Forms.ImageList il
System.Windows.Forms.ColumnHeader inColProgress
System.Windows.Forms.ColumnHeader inColResource
System.Windows.Forms.ColumnHeader inColSize
System.Windows.Forms.ColumnHeader inColSpeed
System.Windows.Forms.ColumnHeader inColState
System.Windows.Forms.ColumnHeader inColSwarm
System.Windows.Forms.ListView incomingList
System.Windows.Forms.Label lblIncomingHeader
System.Windows.Forms.Label lblIncomingStatus
System.Windows.Forms.Label lblOutgoingHeader
System.Windows.Forms.Label lblOutgoingStatus
System.Windows.Forms.ColumnHeader outColProgress
System.Windows.Forms.ColumnHeader outColResource
System.Windows.Forms.ColumnHeader outColSize
System.Windows.Forms.ColumnHeader outColSpeed
System.Windows.Forms.ColumnHeader outColUser
System.Windows.Forms.ListView outgoingList
System.Windows.Forms.PictureBox picIncoming
System.Windows.Forms.PictureBox picOutgoing
System.Windows.Forms.Panel pnlRecvs
System.Windows.Forms.Panel pnlRecvsHeader
System.Windows.Forms.Panel pnlSends
System.Windows.Forms.Panel pnlSendsHeader
ClintHeyer.Httpd.Server server
System.Windows.Forms.Splitter splitter1
System.Windows.Forms.Timer timer

Fields inherited from class System.Windows.Forms.ScrollableControl
scrollPosition

Fields inherited from class System.Windows.Forms.Control
window

Constructor Summary
frmMonitor(Naanou.ResourceExchange.ResourceExchanger exchanger, Naanou.Common.IWindowDocker docker)

Properties inherited from class System.Windows.Forms.Form
AcceptButton, ActiveMdiChild, AllowTransparency, AutoScale, AutoScaleBaseSize, AutoScroll, BackColor, CancelButton, ClientSize, ControlBox, CreateParams, DefaultImeMode, DefaultSize, DesktopBounds, DesktopLocation, DialogResult, FormBorderStyle, HelpButton, Icon, IsMdiChild, IsMdiContainer, IsRestrictedWindow, KeyPreview, MaximizeBox, MaximizedBounds, MaximumSize, MdiChildren, MdiParent, Menu, MergedMenu, MinimizeBox, MinimumSize, Modal, Opacity, OwnedForms, Owner, ShowInTaskbar, Size, SizeGripStyle, StartPosition, TabIndex, TopLevel, TopMost, TransparencyKey, WindowState

Properties inherited from class System.Windows.Forms.ContainerControl
ActiveControl, BindingContext, ParentForm

Properties inherited from class System.Windows.Forms.ScrollableControl
AutoScrollMargin, AutoScrollMinSize, AutoScrollPosition, DisplayRectangle, DockPadding, HScroll, VScroll

Properties inherited from class System.Windows.Forms.Control
AccessibilityObject, AccessibleDefaultActionDescription, AccessibleDescription, AccessibleName, AccessibleRole, AllowDrop, Anchor, BackgroundImage, Bottom, Bounds, CanFocus, CanSelect, Capture, CausesValidation, ClientRectangle, CompanyName, ContainsFocus, ContextMenu, Controls, Created, Cursor, DataBindings, Disposing, Dock, Enabled, Focused, Font, FontHeight, ForeColor, Handle, HasChildren, Height, ImeMode, InvokeRequired, IsAccessible, IsDisposed, IsHandleCreated, Left, Location, Name, Parent, ProductName, ProductVersion, RecreatingHandle, Region, RenderRightToLeft, ResizeRedraw, Right, RightToLeft, ShowFocusCues, ShowKeyboardCues, Site, TabStop, Tag, Text, Top, TopLevelControl, Visible, Width, WindowTarget

Properties inherited from class System.ComponentModel.Component
Container, DesignMode, Events

Method Summary
void Dispose(bool disposing)
         Clean up any resources being used.
Crownwood.Magic.Menus.MenuCommand GetSwarmMenus(Naanou.ResourceExchange.Downloader d)
void incomingList_ItemActivate(object sender, System.EventArgs e)
void incomingList_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
void InitializeComponent()
         Required method for Designer support - do not modify the contents of this method with the code editor.
System.Windows.Forms.ListViewItem NewIncomingItem(Naanou.ResourceExchange.Downloader d)
System.Windows.Forms.ListViewItem NewOutgoingItem(ClintHeyer.Httpd.HttpReply reply)
void OnDownloadStarted(Naanou.ResourceExchange.DownloadStartedEventArgs args)
void OnReplyStarted(ClintHeyer.Httpd.Context c, ClintHeyer.Httpd.ReplyArgs args)
void outgoingList_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
bool RefreshIncomingItem(System.Windows.Forms.ListViewItem item)
         Refreshes the given item. Returns true if closed
bool RefreshOutgoingItem(System.Windows.Forms.ListViewItem item)
void ShowTransferInspecter(Naanou.ResourceExchange.Downloader d)
void StartUpdating()
void StopUpdating()
void SyncIncoming()
void SyncOutgoing()
void timer_Tick(object sender, System.EventArgs e)
void UpdateIncoming()
void UpdateOutgoing()
void UpdateUI()

Methods inherited from class System.Windows.Forms.Form
Activate, ActivateMdiChild, AddOwnedForm, AdjustFormScrollbars, ApplyAutoScaling, AssignParent, CenterToParent, CenterToScreen, Close, CreateControlsInstance, CreateHandle, DefWndProc, FocusInternal, LayoutMdi, OnActivated, OnClosed, OnClosing, OnCreateControl, OnDeactivate, OnFontChanged, OnHandleCreated, OnHandleDestroyed, OnInputLanguageChanged, OnInputLanguageChanging, OnLoad, OnMaximizedBoundsChanged, OnMaximumSizeChanged, OnMdiChildActivate, OnMenuComplete, OnMenuStart, OnMinimumSizeChanged, OnPaint, OnResize, OnStyleChanged, OnTextChanged, OnVisibleChanged, ProcessCmdKey, ProcessDialogKey, ProcessKeyPreview, ProcessTabKey, RecreateHandleCore, RemoveOwnedForm, ScaleCore, Select, SetBoundsCore, SetClientSizeCore, SetDesktopBounds, SetDesktopLocation, SetVisibleCore, ShouldSerializeAutoScaleBaseSize, ShouldSerializeSize, ShowDialog, ShowDialog, ToString, UpdateDefaultButton, WndProc

Methods inherited from class System.Windows.Forms.ContainerControl
IContainerControl.ActivateControl, OnControlRemoved, ProcessDialogChar, ProcessMnemonic, Validate

Methods inherited from class System.Windows.Forms.ScrollableControl
GetScrollState, OnLayout, OnMouseWheel, ScrollControlIntoView, SetAutoScrollMargin, SetDisplayRectLocation, SetScrollState

Methods inherited from class System.Windows.Forms.Control
AccessibilityNotifyClients, BeginInvoke, BeginInvoke, BringToFront, CanSelectCore, Contains, CreateAccessibilityInstance, CreateControl, CreateGraphics, DestroyHandle, DisposeAxControls, DoDragDrop, EndInvoke, FindForm, Focus, GetChildAtPoint, GetContainerControl, GetNextControl, GetStyle, GetTopLevel, GetVisibleCore, Hide, InitializeDCForWmCtlColor, InitLayout, Invalidate, Invalidate, Invalidate, Invalidate, Invalidate, Invalidate, Invoke, Invoke, InvokeGotFocus, InvokeLostFocus, InvokeOnClick, InvokePaint, InvokePaintBackground, IsInputChar, IsInputKey, NotifyInvalidate, NotifyValidationResult, OnBackColorChanged, OnBackgroundImageChanged, OnBindingContextChanged, OnCausesValidationChanged, OnChangeUICues, OnClick, OnContextMenuChanged, OnControlAdded, OnCursorChanged, OnDockChanged, OnDoubleClick, OnDragDrop, OnDragEnter, OnDragLeave, OnDragOver, OnEnabledChanged, OnEnter, OnForeColorChanged, OnGiveFeedback, OnGotFocus, OnHelpRequested, OnImeModeChanged, OnInvalidated, OnKeyDown, OnKeyPress, OnKeyUp, OnLeave, OnLocationChanged, OnLostFocus, OnMouseDown, OnMouseEnter, OnMouseHover, OnMouseLeave, OnMouseMove, OnMouseUp, OnMove, OnNotifyMessage, OnPaintBackground, OnParentBackColorChanged, OnParentBackgroundImageChanged, OnParentBindingContextChanged, OnParentChanged, OnParentEnabledChanged, OnParentFontChanged, OnParentForeColorChanged, OnParentRightToLeftChanged, OnParentVisibleChanged, OnQueryContinueDrag, OnRightToLeftChanged, OnSizeChanged, OnSystemColorsChanged, OnTabIndexChanged, OnTabStopChanged, OnValidated, OnValidating, PerformLayout, PerformLayout, PointToClient, PointToScreen, PreProcessMessage, ProcessKeyEventArgs, ProcessKeyMessage, RaiseDragEvent, RaiseKeyEvent, RaiseMouseEvent, RaisePaintEvent, RecreateHandle, RectangleToClient, RectangleToScreen, Refresh, ResetBackColor, ResetBindings, ResetCursor, ResetFont, ResetForeColor, ResetImeMode, ResetMouseEventArgs, ResetRightToLeft, ResetText, ResumeLayout, ResumeLayout, RtlTranslateAlignment, RtlTranslateAlignment, RtlTranslateAlignment, RtlTranslateContent, RtlTranslateHorizontal, RtlTranslateLeftRight, Scale, Scale, Select, SelectNextControl, SendToBack, SetBounds, SetBounds, SetStyle, SetTopLevel, ShouldSerializeBackColor, ShouldSerializeCursor, ShouldSerializeFont, ShouldSerializeForeColor, ShouldSerializeImeMode, ShouldSerializeLocation, ShouldSerializeRightToLeft, ShouldSerializeText, Show, SuspendLayout, UnsafeNativeMethods+IOleControl.FreezeEvents, UnsafeNativeMethods+IOleControl.GetControlInfo, UnsafeNativeMethods+IOleControl.OnAmbientPropertyChange, UnsafeNativeMethods+IOleControl.OnMnemonic, UnsafeNativeMethods+IOleInPlaceActiveObject.ContextSensitiveHelp, UnsafeNativeMethods+IOleInPlaceActiveObject.EnableModeless, UnsafeNativeMethods+IOleInPlaceActiveObject.GetWindow, UnsafeNativeMethods+IOleInPlaceActiveObject.OnDocWindowActivate, UnsafeNativeMethods+IOleInPlaceActiveObject.OnFrameWindowActivate, UnsafeNativeMethods+IOleInPlaceActiveObject.ResizeBorder, UnsafeNativeMethods+IOleInPlaceActiveObject.TranslateAccelerator, UnsafeNativeMethods+IOleInPlaceObject.ContextSensitiveHelp, UnsafeNativeMethods+IOleInPlaceObject.GetWindow, UnsafeNativeMethods+IOleInPlaceObject.InPlaceDeactivate, UnsafeNativeMethods+IOleInPlaceObject.ReactivateAndUndo, UnsafeNativeMethods+IOleInPlaceObject.SetObjectRects, UnsafeNativeMethods+IOleInPlaceObject.UIDeactivate, UnsafeNativeMethods+IOleObject.Advise, UnsafeNativeMethods+IOleObject.Close, UnsafeNativeMethods+IOleObject.DoVerb, UnsafeNativeMethods+IOleObject.EnumAdvise, UnsafeNativeMethods+IOleObject.EnumVerbs, UnsafeNativeMethods+IOleObject.GetClientSite, UnsafeNativeMethods+IOleObject.GetClipboardData, UnsafeNativeMethods+IOleObject.GetExtent, UnsafeNativeMethods+IOleObject.GetMiscStatus, UnsafeNativeMethods+IOleObject.GetMoniker, UnsafeNativeMethods+IOleObject.GetUserClassID, UnsafeNativeMethods+IOleObject.GetUserType, UnsafeNativeMethods+IOleObject.InitFromData, UnsafeNativeMethods+IOleObject.IsUpToDate, UnsafeNativeMethods+IOleObject.OleUpdate, UnsafeNativeMethods+IOleObject.SetClientSite, UnsafeNativeMethods+IOleObject.SetColorScheme, UnsafeNativeMethods+IOleObject.SetExtent, UnsafeNativeMethods+IOleObject.SetHostNames, UnsafeNativeMethods+IOleObject.SetMoniker, UnsafeNativeMethods+IOleObject.Unadvise, UnsafeNativeMethods+IOleWindow.ContextSensitiveHelp, UnsafeNativeMethods+IOleWindow.GetWindow, UnsafeNativeMethods+IPersist.GetClassID, UnsafeNativeMethods+IPersistPropertyBag.GetClassID, UnsafeNativeMethods+IPersistPropertyBag.InitNew, UnsafeNativeMethods+IPersistPropertyBag.Load, UnsafeNativeMethods+IPersistPropertyBag.Save, UnsafeNativeMethods+IPersistStorage.GetClassID, UnsafeNativeMethods+IPersistStorage.HandsOffStorage, UnsafeNativeMethods+IPersistStorage.InitNew, UnsafeNativeMethods+IPersistStorage.IsDirty, UnsafeNativeMethods+IPersistStorage.Load, UnsafeNativeMethods+IPersistStorage.Save, UnsafeNativeMethods+IPersistStorage.SaveCompleted, UnsafeNativeMethods+IPersistStreamInit.GetClassID, UnsafeNativeMethods+IPersistStreamInit.GetSizeMax, UnsafeNativeMethods+IPersistStreamInit.InitNew, UnsafeNativeMethods+IPersistStreamInit.IsDirty, UnsafeNativeMethods+IPersistStreamInit.Load, UnsafeNativeMethods+IPersistStreamInit.Save, UnsafeNativeMethods+IQuickActivate.GetContentExtent, UnsafeNativeMethods+IQuickActivate.QuickActivate, UnsafeNativeMethods+IQuickActivate.SetContentExtent, UnsafeNativeMethods+IViewObject.Draw, UnsafeNativeMethods+IViewObject.Freeze, UnsafeNativeMethods+IViewObject.GetAdvise, UnsafeNativeMethods+IViewObject.GetColorSet, UnsafeNativeMethods+IViewObject.SetAdvise, UnsafeNativeMethods+IViewObject.Unfreeze, UnsafeNativeMethods+IViewObject2.Draw, UnsafeNativeMethods+IViewObject2.Freeze, UnsafeNativeMethods+IViewObject2.GetAdvise, UnsafeNativeMethods+IViewObject2.GetColorSet, UnsafeNativeMethods+IViewObject2.GetExtent, UnsafeNativeMethods+IViewObject2.SetAdvise, UnsafeNativeMethods+IViewObject2.Unfreeze, Update, UpdateBounds, UpdateBounds, UpdateBounds, UpdateStyles, UpdateStylesCore, UpdateZOrder

Methods inherited from class System.ComponentModel.Component
Dispose, Finalize, GetService

Methods inherited from class System.MarshalByRefObject
CreateObjRef, GetLifetimeService, InitializeLifetimeService

Methods inherited from class System.Object
Equals, GetHashCode, GetType, MemberwiseClone

Events inherited from class System.Windows.Forms.Form
Activated, Closed, Closing, Deactivate, InputLanguageChanged, InputLanguageChanging, Load, MaximizedBoundsChanged, MaximumSizeChanged, MdiChildActivate, MenuComplete, MenuStart, MinimumSizeChanged

Events inherited from class System.Windows.Forms.Control
BackColorChanged, BackgroundImageChanged, BindingContextChanged, CausesValidationChanged, ChangeUICues, Click, ContextMenuChanged, ControlAdded, ControlRemoved, CursorChanged, DockChanged, DoubleClick, DragDrop, DragEnter, DragLeave, DragOver, EnabledChanged, Enter, FontChanged, ForeColorChanged, GiveFeedback, GotFocus, HandleCreated, HandleDestroyed, HelpRequested, ImeModeChanged, Invalidated, KeyDown, KeyPress, KeyUp, Layout, Leave, LocationChanged, LostFocus, MouseDown, MouseEnter, MouseHover, MouseLeave, MouseMove, MouseUp, MouseWheel, Move, Paint, ParentChanged, QueryAccessibilityHelp, QueryContinueDrag, Resize, RightToLeftChanged, SizeChanged, StyleChanged, SystemColorsChanged, TabIndexChanged, TabStopChanged, TextChanged, Validated, Validating, VisibleChanged

Events inherited from class System.ComponentModel.Component
Disposed


Field Detail

components

private System.ComponentModel.IContainer components


docker

private Naanou.Common.IWindowDocker docker


exchanger

private Naanou.ResourceExchange.ResourceExchanger exchanger


il

private System.Windows.Forms.ImageList il


inColProgress

private System.Windows.Forms.ColumnHeader inColProgress


inColResource

private System.Windows.Forms.ColumnHeader inColResource


inColSize

private System.Windows.Forms.ColumnHeader inColSize


inColSpeed

private System.Windows.Forms.ColumnHeader inColSpeed


inColState

private System.Windows.Forms.ColumnHeader inColState


inColSwarm

private System.Windows.Forms.ColumnHeader inColSwarm


incomingList

private System.Windows.Forms.ListView incomingList


lblIncomingHeader

private System.Windows.Forms.Label lblIncomingHeader


lblIncomingStatus

private System.Windows.Forms.Label lblIncomingStatus


lblOutgoingHeader

private System.Windows.Forms.Label lblOutgoingHeader


lblOutgoingStatus

private System.Windows.Forms.Label lblOutgoingStatus


outColProgress

private System.Windows.Forms.ColumnHeader outColProgress


outColResource

private System.Windows.Forms.ColumnHeader outColResource


outColSize

private System.Windows.Forms.ColumnHeader outColSize


outColSpeed

private System.Windows.Forms.ColumnHeader outColSpeed


outColUser

private System.Windows.Forms.ColumnHeader outColUser


outgoingList

private System.Windows.Forms.ListView outgoingList


picIncoming

private System.Windows.Forms.PictureBox picIncoming


picOutgoing

private System.Windows.Forms.PictureBox picOutgoing


pnlRecvs

private System.Windows.Forms.Panel pnlRecvs


pnlRecvsHeader

private System.Windows.Forms.Panel pnlRecvsHeader


pnlSends

private System.Windows.Forms.Panel pnlSends


pnlSendsHeader

private System.Windows.Forms.Panel pnlSendsHeader


server

private ClintHeyer.Httpd.Server server


splitter1

private System.Windows.Forms.Splitter splitter1


timer

private System.Windows.Forms.Timer timer

Constructor Detail

frmMonitor

public frmMonitor(Naanou.ResourceExchange.ResourceExchanger exchanger,
                  Naanou.Common.IWindowDocker docker)

Method Detail

Dispose

protected void Dispose(bool disposing)

Clean up any resources being used.


GetSwarmMenus

private Crownwood.Magic.Menus.MenuCommand GetSwarmMenus(Naanou.ResourceExchange.Downloader d)


incomingList_ItemActivate

private void incomingList_ItemActivate(object sender,
                                       System.EventArgs e)


incomingList_MouseUp

private void incomingList_MouseUp(object sender,
                                  System.Windows.Forms.MouseEventArgs e)


InitializeComponent

private void InitializeComponent()

Required method for Designer support - do not modify the contents of this method with the code editor.


NewIncomingItem

private System.Windows.Forms.ListViewItem NewIncomingItem(Naanou.ResourceExchange.Downloader d)


NewOutgoingItem

private System.Windows.Forms.ListViewItem NewOutgoingItem(ClintHeyer.Httpd.HttpReply reply)


OnDownloadStarted

private void OnDownloadStarted(Naanou.ResourceExchange.DownloadStartedEventArgs args)


OnReplyStarted

private void OnReplyStarted(ClintHeyer.Httpd.Context c,
                            ClintHeyer.Httpd.ReplyArgs args)


outgoingList_MouseUp

private void outgoingList_MouseUp(object sender,
                                  System.Windows.Forms.MouseEventArgs e)


RefreshIncomingItem

private bool RefreshIncomingItem(System.Windows.Forms.ListViewItem item)

Refreshes the given item. Returns true if closed

Parameters:
item -
Returns:

RefreshOutgoingItem

private bool RefreshOutgoingItem(System.Windows.Forms.ListViewItem item)


ShowTransferInspecter

private void ShowTransferInspecter(Naanou.ResourceExchange.Downloader d)


StartUpdating

private void StartUpdating()


StopUpdating

private void StopUpdating()


SyncIncoming

private void SyncIncoming()


SyncOutgoing

private void SyncOutgoing()


timer_Tick

private void timer_Tick(object sender,
                        System.EventArgs e)


UpdateIncoming

private void UpdateIncoming()


UpdateOutgoing

private void UpdateOutgoing()


UpdateUI

private void UpdateUI()