本文整理汇总了C#中ZedGraph.ZoomState类的典型用法代码示例。如果您正苦于以下问题:C# ZoomState类的具体用法?C# ZoomState怎么用?C# ZoomState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ZoomState类属于ZedGraph命名空间,在下文中一共展示了ZoomState类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ZoomState
/// <summary>
/// The Copy Constructor
/// </summary>
/// <param name="rhs">The <see cref="ZoomState"/> object from which to copy</param>
public ZoomState( ZoomState rhs )
{
_xAxis = new ScaleState( rhs._xAxis );
_x2Axis = new ScaleState( rhs._x2Axis );
_yAxis = new ScaleStateList( rhs._yAxis );
_y2Axis = new ScaleStateList( rhs._y2Axis );
}
开发者ID:kjburns31,项目名称:vixen-modules,代码行数:11,代码来源:ZoomState.cs
示例2: Graph_ZoomEvent
private void Graph_ZoomEvent(ZedGraphControl sender, ZoomState oldState, ZoomState newState)
{
_isUpdateAxis = false;
}
开发者ID:Kelvin312,项目名称:KantVino,代码行数:4,代码来源:GraphTemp.cs
示例3: MyZoomEvent
// Respond to a Zoom Event
private void MyZoomEvent( ZedGraphControl control, ZoomState oldState,
ZoomState newState)
{
// Here we get notification everytime the user zooms
}
开发者ID:dunghand,项目名称:msrds,代码行数:6,代码来源:Form1.cs
示例4: ZoomStateSave
/// <summary>
/// Save the current states of the GraphPanes to a separate collection. Save a single
/// (<see paramref="primaryPane" />) GraphPane if the panes are not synchronized
/// (see <see cref="IsSynchronizeXAxes" /> and <see cref="IsSynchronizeYAxes" />),
/// or save a list of states for all GraphPanes if the panes are synchronized.
/// </summary>
/// <param name="primaryPane">The primary GraphPane on which zoom/pan/scroll operations
/// are taking place</param>
/// <param name="type">The <see cref="ZoomState.StateType" /> that describes the
/// current operation</param>
/// <returns>The <see cref="ZoomState" /> that corresponds to the
/// <see paramref="primaryPane" />.
/// </returns>
private ZoomState ZoomStateSave( GraphPane primaryPane, ZoomState.StateType type )
{
ZoomStateClear();
if ( _isSynchronizeXAxes || _isSynchronizeYAxes )
{
foreach ( GraphPane pane in _masterPane._paneList )
{
ZoomState state = new ZoomState( pane, type );
if ( pane == primaryPane )
_zoomState = state;
_zoomStateStack.Add( state );
}
}
else
_zoomState = new ZoomState( primaryPane, type );
return _zoomState;
}
开发者ID:kjburns31,项目名称:vixen-modules,代码行数:32,代码来源:ZedGraphControl.cs
示例5: ZedGraphControl
/// <summary>
/// Default Constructor
/// </summary>
public ZedGraphControl()
{
InitializeComponent();
// These commands do nothing, but they get rid of the compiler warnings for
// unused events
bool b = MouseDown == null || MouseUp == null || MouseMove == null;
// Link in these events from the base class, since we disable them from this class.
base.MouseDown += new System.Windows.Forms.MouseEventHandler( this.ZedGraphControl_MouseDown );
base.MouseUp += new System.Windows.Forms.MouseEventHandler( this.ZedGraphControl_MouseUp );
base.MouseMove += new System.Windows.Forms.MouseEventHandler( this.ZedGraphControl_MouseMove );
//this.MouseWheel += new System.Windows.Forms.MouseEventHandler( this.ZedGraphControl_MouseWheel );
// Use double-buffering for flicker-free updating:
SetStyle( ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint
| ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw, true );
//isTransparentBackground = false;
//SetStyle( ControlStyles.Opaque, false );
SetStyle( ControlStyles.SupportsTransparentBackColor, true );
//this.BackColor = Color.Transparent;
_resourceManager = new ResourceManager( "VixenModules.App.Curves.ZedGraph.ZedGraphLocale",
Assembly.GetExecutingAssembly());
Rectangle rect = new Rectangle( 0, 0, this.Size.Width, this.Size.Height );
_masterPane = new MasterPane( "", rect );
_masterPane.Margin.All = 0;
_masterPane.Title.IsVisible = false;
string titleStr = _resourceManager.GetString( "title_def" );
string xStr = _resourceManager.GetString( "x_title_def" );
string yStr = _resourceManager.GetString( "y_title_def" );
//GraphPane graphPane = new GraphPane( rect, "Title", "X Axis", "Y Axis" );
GraphPane graphPane = new GraphPane( rect, titleStr, xStr, yStr );
using ( Graphics g = this.CreateGraphics() )
{
graphPane.AxisChange( g );
//g.Dispose();
}
_masterPane.Add( graphPane );
this.hScrollBar1.Minimum = 0;
this.hScrollBar1.Maximum = 100;
this.hScrollBar1.Value = 0;
this.vScrollBar1.Minimum = 0;
this.vScrollBar1.Maximum = 100;
this.vScrollBar1.Value = 0;
_xScrollRange = new ScrollRange( true );
_yScrollRangeList = new ScrollRangeList();
_y2ScrollRangeList = new ScrollRangeList();
_yScrollRangeList.Add( new ScrollRange( true ) );
_y2ScrollRangeList.Add( new ScrollRange( false ) );
_zoomState = null;
_zoomStateStack = new ZoomStateStack();
}
开发者ID:kjburns31,项目名称:vixen-modules,代码行数:65,代码来源:ZedGraphControl.cs
示例6: MyZoomEvent
private void MyZoomEvent(ZedGraph.ZedGraphControl control, ZoomState oldState,
ZoomState newState)
{
}
开发者ID:wyvictor,项目名称:ReducerDesign,代码行数:4,代码来源:MyPlot.cs
示例7: RestoreScale
/// <summary>
/// Handler for the "Set Scale to Default" context menu item. Sets the scale ranging to
/// full auto mode for all axes.
/// </summary>
/// <remarks>
/// This method differs from the <see cref="ZoomOutAll" /> method in that it sets the scales
/// to full auto mode. The <see cref="ZoomOutAll" /> method sets the scales to their initial
/// setting prior to any user actions (which may or may not be full auto mode).
/// </remarks>
/// <param name="primaryPane">The <see cref="GraphPane" /> object which is to have the
/// scale restored</param>
public void RestoreScale(GraphPane primaryPane)
{
if (primaryPane != null) {
//Go ahead and save the old zoomstates, which provides an "undo"-like capability
//ZoomState oldState = primaryPane.ZoomStack.Push( primaryPane, ZoomState.StateType.Zoom );
ZoomState oldState = new ZoomState(primaryPane, ZoomState.StateType.Zoom);
using (Graphics g = this.CreateGraphics()) {
if (_isSynchronizeXAxes || _isSynchronizeYAxes) {
foreach (GraphPane pane in _masterPane._paneList) {
pane.ZoomStack.Push(pane, ZoomState.StateType.Zoom);
ResetAutoScale(pane, g);
}
}
else {
primaryPane.ZoomStack.Push(primaryPane, ZoomState.StateType.Zoom);
ResetAutoScale(primaryPane, g);
}
// Provide Callback to notify the user of zoom events
if (this.ZoomEvent != null)
this.ZoomEvent(this, oldState, new ZoomState(primaryPane, ZoomState.StateType.Zoom));
//g.Dispose();
}
Refresh();
}
}
开发者ID:Jchuchla,项目名称:vixen,代码行数:39,代码来源:ZedGraphControl.ContextMenu.cs
示例8: zgc_ScrollProgressEvent
void zgc_ScrollProgressEvent( ZedGraphControl sender, ScrollBar scrollBar, ZoomState oldState,
ZoomState newState )
{
//this.toolStripStatusLabel1.Text = sender.GraphPane.XAxis.Scale.Max.ToString();
// When scroll action is finished, recalculate the axis ranges
sender.AxisChange();
sender.Refresh();
}
开发者ID:Jungwon,项目名称:ZedGraph,代码行数:8,代码来源:Form1.cs
示例9: zg1_ZoomEvent
void zg1_ZoomEvent(ZedGraphControl sender, ZoomState oldState, ZoomState newState)
{
UpdateGraph();
}
开发者ID:SSheldon,项目名称:IntegralApproximator,代码行数:4,代码来源:IntegralApproximator.cs
示例10: Push
/// <summary>
/// Add the scale range information from the specified <see cref="GraphPane"/> object as a
/// new <see cref="ZoomState"/> entry on the stack.
/// </summary>
/// <param name="pane">The <see cref="GraphPane"/> object from which the scale range
/// information should be copied.</param>
/// <param name="type">A <see cref="ZoomState.StateType"/> enumeration that indicates whether this
/// state is the result of a zoom or pan operation.</param>
/// <returns>The resultant <see cref="ZoomState"/> object that was pushed on the stack.</returns>
public ZoomState Push( GraphPane pane, ZoomState.StateType type )
{
ZoomState state = new ZoomState( pane, type );
List.Add( state );
return state;
}
开发者ID:JohnChantzis,项目名称:bark_GUI,代码行数:15,代码来源:ZoomStateStack.cs
示例11: Add
/// <summary>
/// Add a new <see cref="ZoomState" /> object to the <see cref="ZoomStateStack" />.
/// </summary>
/// <param name="state">The <see cref="ZoomState" /> object to be added.</param>
public void Add( ZoomState state )
{
List.Add( state );
}
开发者ID:JohnChantzis,项目名称:bark_GUI,代码行数:8,代码来源:ZoomStateStack.cs
示例12: zg_ZoomEvent
void zg_ZoomEvent(ZedGraphControl sender, ZoomState oldState, ZoomState newState)
{
_autoScrollSize = null;
}
开发者ID:brookpatten,项目名称:VisualSail,代码行数:4,代码来源:GraphForm.cs
示例13: Graph_ZoomEvent
private void Graph_ZoomEvent(ZedGraphControl sender, ZoomState oldState, ZoomState newState)
{
PauseUpdateGraph();
}
开发者ID:Kelvin312,项目名称:KantVino,代码行数:4,代码来源:ItemGraph.cs
示例14: ScrollTest_ScrollProgressEvent
void ScrollTest_ScrollProgressEvent( ZedGraphControl sender, ScrollBar scrollBar,
ZoomState oldState, ZoomState newState )
{
//MessageBox.Show( "ScrollProgressEvent" );
}
开发者ID:Jungwon,项目名称:ZedGraph,代码行数:5,代码来源:Form1.cs
示例15: zg1_ZoomEvent
private void zg1_ZoomEvent(ZedGraphControl sender, ZoomState oldState, ZoomState newState)
{
GraphPane myPane = zg1.GraphPane;
nudGraphX.Value = (decimal)(myPane.XAxis.Scale.Max-myPane.XAxis.Scale.Min);
}
开发者ID:yoflippo,项目名称:btlabjackstreamer,代码行数:5,代码来源:frmGraph.cs
示例16: zgc_ScrollDoneEvent
void zgc_ScrollDoneEvent( ZedGraphControl sender, ScrollBar scrollBar, ZoomState oldState,
ZoomState newState )
{
// When scroll action is finished, recalculate the axis ranges
sender.AxisChange();
sender.Refresh();
}
开发者ID:Jungwon,项目名称:ZedGraph,代码行数:7,代码来源:Form1.cs
示例17: zedGraph_ZoomEvent
void zedGraph_ZoomEvent(ZedGraphControl sender, ZoomState oldState, ZoomState newState)
{
GraphPane pane = sender.GraphPane;
pane.XAxis.Scale.Min = 0;
pane.XAxis.Scale.Max = 50;
pane.YAxis.Scale.Min = 0;
pane.YAxis.Scale.Max = 100;
}
开发者ID:subTee,项目名称:Task-Manager,代码行数:8,代码来源:MainWindow.xaml.cs
示例18: MSGraphControl_ZoomEvent
void MSGraphControl_ZoomEvent( ZedGraphControl sender, ZoomState oldState, ZoomState newState, PointF mousePosition )
{
MSGraphPane pane = MasterPane.FindChartRect(mousePosition) as MSGraphPane;
if( pane == null )
mousePosition = PointToClient(new Point(ContextMenuStrip.Left, ContextMenuStrip.Top));
pane = MasterPane.FindChartRect( mousePosition ) as MSGraphPane;
if( pane == null )
return;
Graphics g = CreateGraphics();
pane.SetScale(g);
if( IsSynchronizeXAxes )
{
foreach( MSGraphPane syncPane in MasterPane.PaneList )
{
if( syncPane == pane )
continue;
syncPane.SetScale(g);
}
}
Refresh();
}
开发者ID:lgatto,项目名称:proteowizard,代码行数:25,代码来源:MSGraphControl.cs
示例19: HandlePanFinish
private void HandlePanFinish()
{
// push the prior saved zoomstate, since the scale ranges have already been changed on
// the fly during the panning operation
if (_zoomState != null && _zoomState.IsChanged(_dragPane))
{
//_dragPane.ZoomStack.Push( _zoomState );
ZoomStatePush(_dragPane);
// Provide Callback to notify the user of pan events
if (ZoomEvent != null)
ZoomEvent(this, _zoomState,
new ZoomState(_dragPane, ZoomState.StateType.Pan));
_zoomState = null;
}
}
开发者ID:apravdivy,项目名称:MagistrSolution,代码行数:17,代码来源:ZedGraphControl.cs
示例20: ZoomOutAll
/// <summary>
/// Handler for the "Undo All Zoom/Pan" context menu item. Restores the scale ranges to the values
/// before all zoom and pan operations
/// </summary>
/// <remarks>
/// This method differs from the <see cref="RestoreScale" /> method in that it sets the scales
/// to their initial setting prior to any user actions. The <see cref="RestoreScale" /> method
/// sets the scales to full auto mode (regardless of what the initial setting may have been).
/// </remarks>
/// <param name="primaryPane">The <see cref="GraphPane" /> object which is to be zoomed out</param>
public void ZoomOutAll(GraphPane primaryPane)
{
if (primaryPane != null && !primaryPane.ZoomStack.IsEmpty) {
ZoomState.StateType type = primaryPane.ZoomStack.Top.Type;
ZoomState oldState = new ZoomState(primaryPane, type);
//ZoomState newState = pane.ZoomStack.PopAll( pane );
ZoomState newState = null;
if (_isSynchronizeXAxes || _isSynchronizeYAxes) {
foreach (GraphPane pane in _masterPane._paneList) {
ZoomState state = pane.ZoomStack.PopAll(pane);
if (pane == primaryPane)
newState = state;
}
}
else
newState = primaryPane.ZoomStack.PopAll(primaryPane);
// Provide Callback to notify the user of zoom events
if (this.ZoomEvent != null)
this.ZoomEvent(this, oldState, newState);
Refresh();
}
}
开发者ID:Jchuchla,项目名称:vixen,代码行数:35,代码来源:ZedGraphControl.ContextMenu.cs
注:本文中的ZedGraph.ZoomState类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论