本文整理汇总了C#中Pane类的典型用法代码示例。如果您正苦于以下问题:C# Pane类的具体用法?C# Pane怎么用?C# Pane使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Pane类属于命名空间,在下文中一共展示了Pane类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetHighlights
public override IMapViewerHighlight[] GetHighlights(Pane pane)
{
if (pane != Pane.Map)
return null;
return new CourseObj[1] { courseObj };
}
示例2: GetMouseCursor
public override Cursor GetMouseCursor(Pane pane, PointF location, float pixelSize)
{
if (pane == Pane.Topology) {
return Cursors.SizeAll;
}
else {
return Cursors.Arrow;
}
}
示例3: LeftButtonCancelDrag
public override void LeftButtonCancelDrag(Pane pane, ref bool displayUpdateNeeded)
{
Debug.Assert(pane == Pane.Topology);
// Drag was cancelled. Go back to normal mode.
dropTargetHighlight = null;
displayUpdateNeeded = true;
controller.DefaultCommandMode();
}
示例4: GetHighlights
public override IMapViewerHighlight[] GetHighlights(Pane pane)
{
if (pane != Pane.Topology)
return null;
if (dropTargetHighlight == null)
return new CourseObj[] { courseObjectDrag };
else
return new CourseObj[] { courseObjectDrag, dropTargetHighlight };
}
示例5: ToPane
internal Pane ToPane()
{
Pane p = new Pane();
if (this.HorizontalSplit != 0) p.HorizontalSplit = this.HorizontalSplit;
if (this.VerticalSplit != 0) p.VerticalSplit = this.VerticalSplit;
if (this.TopLeftCell != null) p.TopLeftCell = this.TopLeftCell;
if (this.ActivePane != PaneValues.TopLeft) p.ActivePane = this.ActivePane;
if (this.State != PaneStateValues.Split) p.State = this.State;
return p;
}
示例6: Add
public override void Add(Widget c)
{
if( front == null )
{
front = Find<Pane>("Front");
if( front == null )
{
base.Add( c );
return;
}
}
front.Add (c);
}
示例7: LeftButtonDown
public override MapViewer.DragAction LeftButtonDown(Pane pane, PointF location, float pixelSize, ref bool displayUpdateNeeded)
{
if (pane != Pane.Map)
return MapViewer.DragAction.None;
// Create the new corner
RotateToAngle(location);
controller.Rotate(courseObj.orientation);
controller.DefaultCommandMode();
return MapViewer.DragAction.None;
}
示例8: graphListForm_showAsNewGraph
void graphListForm_showAsNewGraph( object sender, EventArgs e )
{
GraphForm newGraph = OpenGraph( true );
GraphItem g = ( ( sender as ToolStripMenuItem ).Owner as ContextMenuStrip ).Tag as GraphItem;
Pane pane = new Pane();
pane.Add( g );
newGraph.PaneList.Add( pane );
newGraph.Refresh();
}
示例9: graphListForm_showAllAsStackOnCurrentGraph
void graphListForm_showAllAsStackOnCurrentGraph( object sender, EventArgs e )
{
GraphForm currentGraphForm = CurrentGraphForm;
if( currentGraphForm == null )
throw new Exception( "current graph should not be null" );
List<GraphItem> gList = ( ( sender as ToolStripMenuItem ).Owner as ContextMenuStrip ).Tag as List<GraphItem>;
currentGraphForm.PaneList.Clear();
foreach( GraphItem g in gList )
{
Pane pane = new Pane();
pane.Add( g );
currentGraphForm.PaneList.Add( pane );
}
currentGraphForm.Refresh();
}
示例10: showData
private void showData( GraphForm hostGraph, GraphItem item )
{
Pane pane;
if( hostGraph.PaneList.Count == 0 || hostGraph.PaneList.Count > 1 )
{
hostGraph.PaneList.Clear();
pane = new Pane();
hostGraph.PaneList.Add( pane );
} else
{
pane = hostGraph.PaneList[0];
pane.Clear();
}
pane.Add( item );
hostGraph.Refresh();
}
示例11: GenerateWorksheetPartContent
//.........这里部分代码省略.........
else
sheetView.ShowOutlineSymbols = false;
if (xlWorksheet.ShowRowColHeaders)
sheetView.ShowRowColHeaders = null;
else
sheetView.ShowRowColHeaders = false;
if (xlWorksheet.ShowRuler)
sheetView.ShowRuler = null;
else
sheetView.ShowRuler = false;
if (xlWorksheet.ShowWhiteSpace)
sheetView.ShowWhiteSpace = null;
else
sheetView.ShowWhiteSpace = false;
if (xlWorksheet.ShowZeros)
sheetView.ShowZeros = null;
else
sheetView.ShowZeros = false;
if (xlWorksheet.RightToLeft)
sheetView.RightToLeft = true;
else
sheetView.RightToLeft = null;
if (xlWorksheet.SheetView.View == XLSheetViewOptions.Normal)
sheetView.View = null;
else
sheetView.View = xlWorksheet.SheetView.View.ToOpenXml();
var pane = sheetView.Elements<Pane>().FirstOrDefault();
if (pane == null)
{
pane = new Pane();
sheetView.AppendChild(pane);
}
pane.State = PaneStateValues.FrozenSplit;
Double hSplit = xlWorksheet.SheetView.SplitColumn;
Double ySplit = xlWorksheet.SheetView.SplitRow;
pane.HorizontalSplit = hSplit;
pane.VerticalSplit = ySplit;
pane.TopLeftCell = XLHelper.GetColumnLetterFromNumber(xlWorksheet.SheetView.SplitColumn + 1)
+ (xlWorksheet.SheetView.SplitRow + 1);
if (hSplit == 0 && ySplit == 0)
sheetView.RemoveAllChildren<Pane>();
if (xlWorksheet.SelectedRanges.Any() || xlWorksheet.ActiveCell != null)
{
sheetView.RemoveAllChildren<Selection>();
var firstSelection = xlWorksheet.SelectedRanges.FirstOrDefault();
var selection = new Selection();
if (xlWorksheet.ActiveCell != null)
selection.ActiveCell = xlWorksheet.ActiveCell.Address.ToStringRelative(false);
else if (firstSelection != null)
selection.ActiveCell = firstSelection.RangeAddress.FirstAddress.ToStringRelative(false);
示例12: LeftButtonDown
public override MapViewer.DragAction LeftButtonDown(Pane pane, PointF location, float pixelSize, ref bool displayUpdateNeeded)
{
if (pane != Pane.Map)
return MapViewer.DragAction.None;
if (numberFixedPoints == 0) {
// The first point. Fix it at the location.
AddFixedPoint(location);
}
displayUpdateNeeded = true;
return MapViewer.DragAction.DelayedDrag;
}
示例13: LeftButtonClick
public override void LeftButtonClick(Pane pane, PointF location, float pixelSize, ref bool displayUpdateNeeded)
{
if (pane != Pane.Map)
return;
// Left button clicked. Ends creating the item and we're done.
CreateObject();
controller.DefaultCommandMode();
displayUpdateNeeded = true;
}
示例14: MouseMoved
public override void MouseMoved(Pane pane, PointF location, float pixelSize, ref bool displayUpdateNeeded)
{
if (pane == Pane.Map) {
PointF highlightLocation;
Id<ControlPoint> controlId = HitTestPoint(location, pixelSize, out highlightLocation);
SetHighlightLocation(highlightLocation, pixelSize, ref displayUpdateNeeded);
}
}
示例15: GenerateWorksheetPart1Content
// Generates content of worksheetPart1.
private void GenerateWorksheetPart1Content(WorksheetPart worksheetPart1)
{
Worksheet worksheet1 = new Worksheet();
worksheet1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
SheetProperties sheetProperties1 = new SheetProperties();
PageSetupProperties pageSetupProperties1 = new PageSetupProperties() { FitToPage = true };
sheetProperties1.Append(pageSetupProperties1);
SheetDimension sheetDimension1 = new SheetDimension() { Reference = "B3:AR42" };
SheetViews sheetViews1 = new SheetViews();
SheetView sheetView1 = new SheetView() { ShowZeros = false, TabSelected = true, TopLeftCell = "B1", ZoomScale = (UInt32Value)85U, WorkbookViewId = (UInt32Value)0U };
Pane pane1 = new Pane() { HorizontalSplit = 5D, TopLeftCell = "G1", ActivePane = PaneValues.TopRight, State = PaneStateValues.FrozenSplit };
Selection selection1 = new Selection() { ActiveCell = "B13", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "B13 B13" } };
Selection selection2 = new Selection() { Pane = PaneValues.TopRight, ActiveCell = "AM21", SequenceOfReferences = new ListValue<StringValue>() { InnerText = "AM21:AM26" } };
sheetView1.Append(pane1);
sheetView1.Append(selection1);
sheetView1.Append(selection2);
sheetViews1.Append(sheetView1);
SheetFormatProperties sheetFormatProperties1 = new SheetFormatProperties() { BaseColumnWidth = (UInt32Value)10U, DefaultColumnWidth = 11.42578125D, DefaultRowHeight = 12.75D };
Columns columns1 = new Columns();
Column column1 = new Column() { Min = (UInt32Value)1U, Max = (UInt32Value)1U, Width = 6.140625D, Style = (UInt32Value)4U, CustomWidth = true };
Column column2 = new Column() { Min = (UInt32Value)2U, Max = (UInt32Value)2U, Width = 39.7109375D, Style = (UInt32Value)4U, BestFit = true, CustomWidth = true };
Column column3 = new Column() { Min = (UInt32Value)3U, Max = (UInt32Value)3U, Width = 30D, Style = (UInt32Value)4U, CustomWidth = true };
Column column4 = new Column() { Min = (UInt32Value)4U, Max = (UInt32Value)4U, Width = 17.85546875D, Style = (UInt32Value)4U, BestFit = true, CustomWidth = true };
Column column5 = new Column() { Min = (UInt32Value)5U, Max = (UInt32Value)5U, Width = 12.42578125D, Style = (UInt32Value)4U, CustomWidth = true };
Column column6 = new Column() { Min = (UInt32Value)6U, Max = (UInt32Value)6U, Width = 14.5703125D, Style = (UInt32Value)4U, BestFit = true, CustomWidth = true };
Column column7 = new Column() { Min = (UInt32Value)7U, Max = (UInt32Value)20U, Width = 3.85546875D, Style = (UInt32Value)44U, CustomWidth = true };
Column column8 = new Column() { Min = (UInt32Value)21U, Max = (UInt32Value)21U, Width = 4.140625D, Style = (UInt32Value)44U, CustomWidth = true };
Column column9 = new Column() { Min = (UInt32Value)22U, Max = (UInt32Value)22U, Width = 3.85546875D, Style = (UInt32Value)44U, CustomWidth = true };
Column column10 = new Column() { Min = (UInt32Value)23U, Max = (UInt32Value)23U, Width = 3.140625D, Style = (UInt32Value)44U, BestFit = true, CustomWidth = true };
Column column11 = new Column() { Min = (UInt32Value)24U, Max = (UInt32Value)33U, Width = 3.85546875D, Style = (UInt32Value)44U, CustomWidth = true };
Column column12 = new Column() { Min = (UInt32Value)34U, Max = (UInt32Value)37U, Width = 4D, Style = (UInt32Value)44U, CustomWidth = true };
Column column13 = new Column() { Min = (UInt32Value)38U, Max = (UInt32Value)38U, Width = 10.42578125D, Style = (UInt32Value)44U, BestFit = true, CustomWidth = true };
Column column14 = new Column() { Min = (UInt32Value)39U, Max = (UInt32Value)39U, Width = 14D, Style = (UInt32Value)44U, BestFit = true, CustomWidth = true };
Column column15 = new Column() { Min = (UInt32Value)40U, Max = (UInt32Value)40U, Width = 13.7109375D, Style = (UInt32Value)44U, BestFit = true, CustomWidth = true };
Column column16 = new Column() { Min = (UInt32Value)41U, Max = (UInt32Value)41U, Width = 10D, Style = (UInt32Value)4U, CustomWidth = true };
Column column17 = new Column() { Min = (UInt32Value)42U, Max = (UInt32Value)44U, Width = 13.7109375D, Style = (UInt32Value)4U, CustomWidth = true };
Column column18 = new Column() { Min = (UInt32Value)45U, Max = (UInt32Value)45U, Width = 11.42578125D, Style = (UInt32Value)4U, CustomWidth = true };
Column column19 = new Column() { Min = (UInt32Value)46U, Max = (UInt32Value)16384U, Width = 11.42578125D, Style = (UInt32Value)4U };
columns1.Append(column1);
columns1.Append(column2);
columns1.Append(column3);
columns1.Append(column4);
columns1.Append(column5);
columns1.Append(column6);
columns1.Append(column7);
columns1.Append(column8);
columns1.Append(column9);
columns1.Append(column10);
columns1.Append(column11);
columns1.Append(column12);
columns1.Append(column13);
columns1.Append(column14);
columns1.Append(column15);
columns1.Append(column16);
columns1.Append(column17);
columns1.Append(column18);
columns1.Append(column19);
SheetData sheetData1 = new SheetData();
Row row1 = new Row() { RowIndex = (UInt32Value)3U, Spans = new ListValue<StringValue>() { InnerText = "2:44" } };
Cell cell1 = new Cell() { CellReference = "B3", StyleIndex = (UInt32Value)5U };
Cell cell2 = new Cell() { CellReference = "C3", StyleIndex = (UInt32Value)5U };
Cell cell3 = new Cell() { CellReference = "D3", StyleIndex = (UInt32Value)5U };
Cell cell4 = new Cell() { CellReference = "E3", StyleIndex = (UInt32Value)5U };
Cell cell5 = new Cell() { CellReference = "F3", StyleIndex = (UInt32Value)6U };
Cell cell6 = new Cell() { CellReference = "AO3", StyleIndex = (UInt32Value)6U };
Cell cell7 = new Cell() { CellReference = "AP3", StyleIndex = (UInt32Value)6U };
Cell cell8 = new Cell() { CellReference = "AQ3", StyleIndex = (UInt32Value)6U };
Cell cell9 = new Cell() { CellReference = "AR3", StyleIndex = (UInt32Value)6U };
row1.Append(cell1);
row1.Append(cell2);
row1.Append(cell3);
row1.Append(cell4);
row1.Append(cell5);
row1.Append(cell6);
row1.Append(cell7);
row1.Append(cell8);
row1.Append(cell9);
Row row2 = new Row() { RowIndex = (UInt32Value)5U, Spans = new ListValue<StringValue>() { InnerText = "2:44" } };
Cell cell10 = new Cell() { CellReference = "B5", StyleIndex = (UInt32Value)7U };
Cell cell11 = new Cell() { CellReference = "C5", StyleIndex = (UInt32Value)7U };
Cell cell12 = new Cell() { CellReference = "D5", StyleIndex = (UInt32Value)7U };
Cell cell13 = new Cell() { CellReference = "E5", StyleIndex = (UInt32Value)8U, DataType = CellValues.SharedString };
CellValue cellValue1 = new CellValue();
cellValue1.Text = "0";
cell13.Append(cellValue1);
//.........这里部分代码省略.........