本文整理汇总了C#中ViewBase类的典型用法代码示例。如果您正苦于以下问题:C# ViewBase类的具体用法?C# ViewBase怎么用?C# ViewBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ViewBase类属于命名空间,在下文中一共展示了ViewBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ViewManager
/// <summary>
/// Initialize a new instance of the ViewManager class.
/// </summary>
/// <param name="control">Owning control.</param>
/// <param name="root">Root of the view hierarchy.</param>
public ViewManager(Control control, ViewBase root)
{
_root = root;
_root.OwningControl = control;
_control = control;
_alignControl = control;
}
示例2: GraphView
/// <summary>
/// Initializes a new instance of the <see cref="GraphView" /> class.
/// </summary>
public GraphView(ViewBase owner = null)
: base(owner)
{
Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.GraphView.glade", "vbox1");
gxml.Autoconnect(this);
_mainWidget = vbox1;
plot1 = new PlotView();
plot1.Model = new PlotModel();
plot1.SetSizeRequest(-1, 100);
vbox2.PackStart(plot1, true, true, 0);
smallestDate = DateTime.MaxValue;
largestDate = DateTime.MinValue;
this.LeftRightPadding = 40;
expander1.Visible = false;
captionEventBox.Visible = true;
plot1.Model.MouseDown += OnChartClick;
captionLabel.Text = null;
captionEventBox.ButtonPressEvent += OnCaptionLabelDoubleClick;
_mainWidget.Destroyed += _mainWidget_Destroyed;
BackColor = OxyPlot.OxyColors.White;
}
示例3: ViewLayoutControl
/// <summary>
/// Initialize a new instance of the ViewLayoutControl class.
/// </summary>
/// <param name="viewControl">View control to use as child.</param>
/// <param name="rootControl">Top level visual control.</param>
/// <param name="viewChild">View used to size and position the child control.</param>
public ViewLayoutControl(ViewControl viewControl,
VisualControl rootControl,
ViewBase viewChild)
{
Debug.Assert(viewControl != null);
Debug.Assert(rootControl != null);
Debug.Assert(viewChild != null);
// Default values
_layoutOffset = Point.Empty;
// Remember the view
_viewChild = viewChild;
// Ensure the child is hooked into the hierarchy of elements
_viewChild.Parent = this;
// Create the view control instance
_viewControl = viewControl;
// Back reference hookup
_viewControl.ViewLayoutControl = this;
// Start off invisible until first layed out
_viewControl.Visible = false;
// Ensure that all view elements inside here use our control
OwningControl = _viewControl;
// Add our new control to the provided parent collection
CommonHelper.AddControlToParent(rootControl, _viewControl);
}
示例4: LegendView
/// <summary>
/// Construtor
/// </summary>
public LegendView(ViewBase owner)
: base(owner)
{
Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.LegendView.glade", "hbox1");
gxml.Autoconnect(this);
_mainWidget = hbox1;
combobox1.Model = comboModel;
combobox1.PackStart(comboRender, false);
combobox1.AddAttribute(comboRender, "text", 0);
combobox1.Changed += OnPositionComboChanged;
combobox1.Focused += OnTitleTextBoxEnter;
listview.Model = listModel;
TreeViewColumn column = new TreeViewColumn();
column.Title = "Series name";
column.PackStart(listToggle, false);
listRender.Editable = false;
column.PackStart(listRender, true);
column.SetAttributes(listToggle, "active", 0);
column.SetAttributes(listRender, "text", 1);
listview.AppendColumn(column);
listToggle.Activatable = true;
listToggle.Toggled += OnItemChecked;
_mainWidget.Destroyed += _mainWidget_Destroyed;
}
示例5: configure
public void configure(int controllerID, ControllerBase controller, ModelBase model, ViewBase view)
{
addControllerRoute(new RouteBase(controllerID, controller));
controller.configure(view, model);
model.configure();
view.configure(model);
}
示例6: drawLine
private void drawLine(Point p1, Point p2, ViewBase view)
{
TSD.Line newLine = new TSD.Line(view, p1, p2);
LineTypeAttributes lineParams = new LineTypeAttributes(LineTypes.SolidLine, DrawingColors.Black);
newLine.Attributes.Line = lineParams;
newLine.Insert();
}
示例7: Dodaj_Click
private void Dodaj_Click(object sender, RoutedEventArgs e)
{
ViewBase vb = new ViewBase(1);
vb.AddItemCallback = new AddItemDelegate(this.AddItemCallbackFn);
vb.ShowDialog();
}
示例8: SeriesView
/// <summary>Initializes a new instance of the <see cref="SeriesView" /> class</summary>
public SeriesView(ViewBase owner)
: base(owner)
{
Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.SeriesView.glade", "vbox1");
gxml.Autoconnect(this);
_mainWidget = vbox1;
graphView1 = new GraphView(this);
vbox1.PackStart(graphView1.MainWidget, true, true, 0);
dropDownView1 = new DropDownView(this);
dropDownView2 = new DropDownView(this);
dropDownView3 = new DropDownView(this);
dropDownView4 = new DropDownView(this);
dropDownView5 = new DropDownView(this);
dropDownView6 = new DropDownView(this);
dropDownView7 = new DropDownView(this);
dropDownView8 = new DropDownView(this);
dropDownView9 = new ColourDropDownView(this);
dropDownView10 = new DropDownView(this);
dropDownView11 = new DropDownView(this);
checkBoxView1 = new CheckBoxView(this);
checkBoxView1.TextOfLabel = "on top?";
checkBoxView2 = new CheckBoxView(this);
checkBoxView2.TextOfLabel = "on right?";
checkBoxView3 = new CheckBoxView(this);
checkBoxView3.TextOfLabel = "cumulative?";
checkBoxView4 = new CheckBoxView(this);
checkBoxView4.TextOfLabel = "cumulative?";
checkBoxView5 = new CheckBoxView(this);
checkBoxView5.TextOfLabel = "Show in legend?";
checkBoxView6 = new CheckBoxView(this);
checkBoxView6.TextOfLabel = "Include series name in legend?";
editView1 = new EditView(this);
table1.Attach(dropDownView1.MainWidget, 1, 2, 0, 1, AttachOptions.Fill, 0, 10, 2);
table1.Attach(dropDownView2.MainWidget, 1, 2, 1, 2, AttachOptions.Fill, 0, 10, 2);
table1.Attach(dropDownView3.MainWidget, 1, 2, 2, 3, AttachOptions.Fill, 0, 10, 2);
table1.Attach(dropDownView5.MainWidget, 1, 2, 3, 4, AttachOptions.Fill, 0, 10, 2);
table1.Attach(dropDownView4.MainWidget, 1, 2, 4, 5, AttachOptions.Fill, 0, 10, 2);
table1.Attach(dropDownView6.MainWidget, 1, 2, 5, 6, AttachOptions.Fill, 0, 10, 2);
table1.Attach(dropDownView7.MainWidget, 1, 2, 6, 7, AttachOptions.Fill, 0, 10, 2);
table1.Attach(dropDownView8.MainWidget, 1, 2, 7, 8, AttachOptions.Fill, 0, 10, 2);
table1.Attach(dropDownView9.MainWidget, 1, 2, 8, 9, AttachOptions.Fill, 0, 10, 2);
table1.Attach(editView1.MainWidget, 1, 2, 9, 10, AttachOptions.Fill, 0, 10, 2);
table1.Attach(checkBoxView1.MainWidget, 2, 3, 1, 2, AttachOptions.Fill, 0, 0, 0);
table1.Attach(checkBoxView2.MainWidget, 2, 3, 2, 3, AttachOptions.Fill, 0, 0, 0);
table1.Attach(checkBoxView3.MainWidget, 3, 4, 1, 2, AttachOptions.Fill, 0, 0, 0);
table1.Attach(checkBoxView4.MainWidget, 3, 4, 2, 3, AttachOptions.Fill, 0, 0, 0);
table1.Attach(checkBoxView5.MainWidget, 2, 4, 8, 9, AttachOptions.Fill, 0, 0, 0);
table1.Attach(checkBoxView6.MainWidget, 2, 4, 9, 10, AttachOptions.Fill, 0, 0, 0);
table1.Attach(dropDownView10.MainWidget, 3, 4, 6, 7, AttachOptions.Fill, 0, 0, 5);
table1.Attach(dropDownView11.MainWidget, 3, 4, 7, 8, AttachOptions.Fill, 0, 0, 5);
}
示例9: EditView
/// <summary>Constructor</summary>
public EditView(ViewBase owner)
: base(owner)
{
textentry1 = new Entry();
_mainWidget = textentry1;
textentry1.FocusOutEvent += OnSelectionChanged;
_mainWidget.Destroyed += _mainWidget_Destroyed;
}
示例10: OutlookMiniController
/// <summary>
/// Initialize a new instance of the OutlookMiniController class.
/// </summary>
/// <param name="target">Target for state changes.</param>
/// <param name="needPaint">Delegate for notifying paint requests.</param>
public OutlookMiniController(ViewBase target,
NeedPaintHandler needPaint)
{
Debug.Assert(needPaint != null);
_target = target;
NeedPaint = needPaint;
}
示例11: ToolTipEventArgs
/// <summary>
/// Initialize a new instance of the ButtonSpecEventArgs class.
/// </summary>
/// <param name="target">Reference to view element that requires tooltip.</param>
/// <param name="screenPt">Screen location of mouse when tooltip was required.</param>
public ToolTipEventArgs(ViewBase target, Point screenPt)
{
Debug.Assert(target != null);
// Remember parameter details
_target = target;
_screenPt = screenPt;
}
示例12: ButtonView
/// <summary>Constructor</summary>
public ButtonView(ViewBase owner)
: base(owner)
{
button = new Button();
_mainWidget = button;
button.Clicked += OnButtonClick;
button.SetSizeRequest(80, 36);
_mainWidget.Destroyed += _mainWidget_Destroyed;
}
示例13: TitleView
/// <summary>
/// Construtor
/// </summary>
public TitleView(ViewBase owner)
: base(owner)
{
Glade.XML gxml = new Glade.XML("ApsimNG.Resources.Glade.TitleView.glade", "hbox1");
gxml.Autoconnect(this);
_mainWidget = hbox1;
entry1.Changed += OnPositionComboChanged;
_mainWidget.Destroyed += _mainWidget_Destroyed;
}
示例14: ViewHightlightController
/// <summary>
/// Initialize a new instance of the ViewHightlightController class.
/// </summary>
/// <param name="target">Target for state changes.</param>
/// <param name="needPaint">Delegate for notifying paint requests.</param>
public ViewHightlightController(ViewBase target,
NeedPaintHandler needPaint)
{
Debug.Assert(target != null);
Debug.Assert(needPaint != null);
_target = target;
NeedPaint = needPaint;
}
示例15: button1_Click
private void button1_Click(object sender, RoutedEventArgs e)
{
AptekaDataDataContext con = new AptekaDataDataContext();
ViewBase viewbase = new ViewBase();
List<Lek> lek = (from l in con.Leks where l.Nazwa.StartsWith(textBox1.Text) || l.M_nazwa.StartsWith(textBox2.Text) select l).ToList();
viewbase.LekGird.ItemsSource = lek;
viewbase.search = 1;
viewbase.ShowDialog();
}