本文整理汇总了C#中VBox.PackEnd方法的典型用法代码示例。如果您正苦于以下问题:C# VBox.PackEnd方法的具体用法?C# VBox.PackEnd怎么用?C# VBox.PackEnd使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VBox
的用法示例。
在下文中一共展示了VBox.PackEnd方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Splash
public Splash()
{
Decorated = false;
ShowInTaskbar = false;
box = new VBox {
Margin = -2,
};
imageView = new ImageView {
Image = Image.FromResource (Resources.Splash),
};
progressBar = new ProgressBar {
Indeterminate = true,
TooltipText = Catalog.GetString ("Loading..."),
};
info = new Label {
Text = Catalog.GetString ("Loading..."),
TextAlignment = Alignment.Center,
};
box.PackStart (imageView);
box.PackEnd (progressBar);
box.PackEnd (info);
Content = box;
InitialLocation = WindowLocation.CenterScreen;
}
示例2: LauncherWindow
public LauncherWindow()
{
this.Title = "TrueCraft Launcher";
this.Width = 1200;
this.Height = 576;
this.User = new TrueCraftUser();
MainContainer = new HBox();
WebScrollView = new ScrollView();
WebView = new WebView("http://truecraft.io/updates");
LoginView = new LoginView(this);
OptionView = new OptionView(this);
MultiplayerView = new MultiplayerView(this);
SingleplayerView = new SingleplayerView(this);
InteractionBox = new VBox();
using (var stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("TrueCraft.Launcher.Content.truecraft_logo.svg"))
TrueCraftLogoImage = new ImageView(Image.FromStream(stream));
WebScrollView.Content = WebView;
MainContainer.PackStart(WebScrollView, true);
InteractionBox.PackStart(TrueCraftLogoImage);
InteractionBox.PackEnd(LoginView);
MainContainer.PackEnd(InteractionBox);
this.Content = MainContainer;
}
示例3: InitializeBackend
public override void InitializeBackend(object frontend, ApplicationContext context)
{
base.InitializeBackend (frontend, context);
mainBox = new VBox () {
Spacing = 0,
Margin = 0
};
buttonBox = new HBox () {
Spacing = 0,
Margin = 0
};
mainBox.PackEnd (buttonBox);
base.SetChild ((IWidgetBackend) Toolkit.GetBackend (mainBox));
}
示例4: LicenseAcceptanceDialog
public LicenseAcceptanceDialog (LicenseAcceptanceViewModel viewModel)
{
Height = 350;
Resizable = false;
Padding = 0;
Title = GettextCatalog.GetString ("License Acceptance");
this.viewModel = viewModel;
this.imageLoader = new ImageLoader ();
this.imageLoader.Loaded += HandleImageLoaded;
var titleLabel = new Label ();
titleLabel.Text = GettextCatalog.GetPluralString (
"The following package requires that you accept its license terms before installing:",
"The following packages require that you accept their license terms before installing:",
viewModel.HasMultiplePackages ? 2 : 1);
var descriptionLabel = new Label ();
descriptionLabel.Wrap = WrapMode.Word;
descriptionLabel.Markup = GettextCatalog.GetString ("By clicking <b>Accept</b> you agree to the license terms for the packages listed above.\n" +
"If you do not agree to the license terms click <b>Decline</b>.");
packagesList = new VBox ();
packagesList.Spacing = 0;
scroll = new ScrollView (packagesList);
scroll.HorizontalScrollPolicy = ScrollPolicy.Never;
scroll.VerticalScrollPolicy = ScrollPolicy.Automatic;
scroll.BorderVisible = false;
scroll.BackgroundColor = Ide.Gui.Styles.BackgroundColor;
var container = new VBox ();
container.MarginTop = container.MarginLeft = container.MarginRight = 15;
container.PackStart (titleLabel);
container.PackStart (scroll, true, true);
container.PackEnd (descriptionLabel);
Content = container;
var declineButton = new DialogButton (GettextCatalog.GetString ("Decline"), Command.Cancel);
var acceptButton = new DialogButton (GettextCatalog.GetString ("Accept"), Command.Ok);
Buttons.Add (declineButton);
Buttons.Add (acceptButton);
AddPackages ();
}
示例5: Images
public Images()
{
ImageView img = new ImageView ();
img.Image = Image.FromResource (GetType (), "cow.jpg");
PackStart (img);
var stockIcons = typeof (StockIcons).GetFields (BindingFlags.Public | BindingFlags.Static);
var perRow = 6;
HBox row = null;
for (var i = 0; i < stockIcons.Length; i++) {
if (stockIcons [i].FieldType != typeof (string))
continue;
if ((i % perRow) == 0) {
if (row != null)
PackStart (row);
row = new HBox ();
}
var vbox = new VBox ();
var stockId = (string)stockIcons [i].GetValue (null);
var imageView = new ImageView ();
var label = new Label (stockId);
try {
var icon = Image.FromIcon (stockId, IconSize.Medium);
if (icon != null)
imageView.Image = icon;
} catch { }
vbox.PackStart (imageView);
vbox.PackEnd (label);
row.PackStart (vbox);
}
if (row != null)
PackStart (row);
}
示例6: HelpWindow
public HelpWindow()
{
VBox mainContent = new VBox ();
_messageDisplay = new RichTextView {
WidthRequest = 500
};
ScrollView scroller = new ScrollView (_messageDisplay) {
VerticalScrollPolicy = ScrollPolicy.Automatic,
HorizontalScrollPolicy = ScrollPolicy.Never,
HeightRequest = 500
};
mainContent.PackStart (scroller);
HBox buttonRow = new HBox ();
Button ok = new Button {
Label = I18N._ ("Close"),
Image = Icons.Ok
};
ok.Clicked += (sender, args) => Close ();
buttonRow.PackEnd (ok);
mainContent.PackEnd (buttonRow);
Content = mainContent;
Width = 400;
}
示例7: BuildContent
void BuildContent(string license)
{
double textWidth = 480;
double textHeight = 480;
VBox mainContent = new VBox ();
RichTextView textView = new RichTextView ();
textView.LoadText (license, TextFormat.Markdown);
textView.MinWidth = textWidth;
ScrollView scroller = new ScrollView (textView);
scroller.HorizontalScrollPolicy = ScrollPolicy.Never;
scroller.VerticalScrollPolicy = ScrollPolicy.Automatic;
scroller.MinHeight = textHeight;
scroller.MinWidth = textWidth + textView.MarginLeft + textView.MarginRight + 20;
mainContent.PackStart (scroller);
HBox buttonRow = new HBox ();
Button ok = new Button { Label = I18N._ ("Close"), Image = Icons.Ok };
ok.Clicked += (sender, args) => Close ();
buttonRow.PackEnd (ok);
mainContent.PackEnd (buttonRow);
Content = mainContent;
}
示例8: WizardDialog
public WizardDialog (IWizardDialogController controller)
{
Controller = controller;
Dialog = new Dialog ();
Dialog.Name = "wizard_dialog";
Dialog.Resizable = false;
Dialog.Padding = 0;
if (string.IsNullOrEmpty (controller.Title))
Dialog.Title = BrandingService.ApplicationName;
else
Dialog.Title = controller.Title;
// FIXME: Gtk dialogs don't support ThemedImage
//if (controller.Image != null)
// Dialog.Icon = controller.Image.WithSize (IconSize.Large);
Dialog.ShowInTaskbar = false;
Dialog.Shown += HandleDialogShown;
Dialog.CloseRequested += HandleDialogCloseRequested;
container = new VBox ();
container.Spacing = 0;
header = new MonoDevelop.Components.ExtendedHeaderBox (controller.Title, null, controller.Icon);
header.BackgroundColor = Styles.Wizard.BannerBackgroundColor;
header.TitleColor = Styles.Wizard.BannerForegroundColor;
header.SubtitleColor = Styles.Wizard.BannerSecondaryForegroundColor;
header.BorderColor = Styles.Wizard.BannerShadowColor;
buttonBox = new HBox ();
var buttonFrame = new FrameBox (buttonBox);
buttonFrame.Padding = 20;
buttonFrame.PaddingRight = 0;
cancelButton = new Button (GettextCatalog.GetString ("Cancel"));
cancelButton.Clicked += HandleCancelButtonClicked;
backButton = new Button (GettextCatalog.GetString ("Back"));
backButton.Clicked += HandleBackButtonClicked;
nextButton = new Button (GettextCatalog.GetString ("Next"));
nextButton.Clicked += HandleNextButtonClicked;
statusImage = new ImageView (ImageService.GetIcon ("md-empty", Gtk.IconSize.Button));
if (Toolkit.CurrentEngine.Type == ToolkitType.XamMac) {
var s = cancelButton.Surface.GetPreferredSize ();
cancelButton.MinWidth = Math.Max (s.Width + 16, 100);
s = backButton.Surface.GetPreferredSize ();
backButton.MinWidth = Math.Max (s.Width + 16, 100);
s = nextButton.Surface.GetPreferredSize ();
nextButton.MinWidth = Math.Max (s.Width + 16, 100);
buttonBox.Spacing = 0;
statusImage.MarginRight = 6;
#if MAC
var nativeNext = nextButton.Surface.NativeWidget as AppKit.NSButton;
nativeNext.KeyEquivalent = "\r";
#endif
} else {
cancelButton.MinWidth = 70;
backButton.MinWidth = 70;
nextButton.MinWidth = 70;
statusImage.MarginRight = 3;
}
if (ImageService.IsAnimation ("md-spinner-18", Gtk.IconSize.Button)) {
animatedStatusIcon = ImageService.GetAnimatedIcon ("md-spinner-18", Gtk.IconSize.Button);
}
buttonBox.PackStart (cancelButton, false, false);
buttonBox.PackEnd (statusImage, false, false);
buttonBox.PackEnd (nextButton, false, false);
buttonBox.PackEnd (backButton, false, false);
statusImage.VerticalPlacement = cancelButton.VerticalPlacement = nextButton.VerticalPlacement = backButton.VerticalPlacement = WidgetPlacement.Center;
container.PackStart (header);
var contentHBox = new HBox ();
contentHBox.Spacing = 0;
currentPageFrame = new FrameBox ();
currentPageFrame.BackgroundColor = Styles.Wizard.PageBackgroundColor;
contentHBox.PackStart (currentPageFrame, true, true);
rightSideFrame = new FrameBox () { Visible = false };
//rightSideFrame.BorderColor = Styles.Wizard.ContentSeparatorColor;
//rightSideFrame.BorderWidthLeft = 1;
rightSideFrame.WidthRequest = RightSideWidgetWidth;
rightSideFrame.BackgroundColor = Styles.Wizard.RightSideBackgroundColor;
contentHBox.PackEnd (rightSideFrame, false, true);
rightSideFrame.VerticalPlacement = rightSideFrame.HorizontalPlacement = WidgetPlacement.Fill;
var contentFrame = new FrameBox (contentHBox);
contentFrame.Padding = 0;
contentFrame.BorderColor = Styles.Wizard.ContentShadowColor;
contentFrame.BorderWidth = 0;
contentFrame.BorderWidthBottom = 1;
container.PackStart (contentFrame, true, true);
container.PackEnd (buttonFrame);
//.........这里部分代码省略.........
示例9: SetLayout
void SetLayout ()
{
var vbox = new VBox ();
vbox.MinWidth = 450;
vbox.PackStart (new Label (GettextCatalog.GetString ("Breakpoint Action")) {
Font = vbox.Font.WithWeight (FontWeight.Bold)
});
var breakpointActionGroup = new VBox {
MarginLeft = 12
};
breakpointActionGroup.PackStart (breakpointActionPause);
breakpointActionGroup.PackStart (breakpointActionPrint);
var printExpressionGroup = new HBox {
MarginLeft = 18
};
printExpressionGroup.PackStart (entryPrintExpression, true);
printExpressionGroup.PackStart (warningPrintExpression);
breakpointActionGroup.PackStart (printExpressionGroup);
breakpointActionGroup.PackEnd (printMessageTip);
vbox.PackStart (breakpointActionGroup);
vbox.PackStart (new Label (GettextCatalog.GetString ("When to Take Action")) {
Font = vbox.Font.WithWeight (FontWeight.Bold)
});
var whenToTakeActionRadioGroup = new VBox {
MarginLeft = 12
};
// Function group
{
whenToTakeActionRadioGroup.PackStart (stopOnFunction);
hboxFunction.PackStart (entryFunctionName, true);
hboxFunction.PackEnd (warningFunction);
whenToTakeActionRadioGroup.PackStart (hboxFunction);
}
// Exception group
{
whenToTakeActionRadioGroup.PackStart (stopOnException);
hboxException = new HBox ();
hboxException.PackStart (entryExceptionType, true);
hboxException.PackEnd (warningException);
vboxException.PackStart (hboxException);
vboxException.PackStart (checkIncludeSubclass);
whenToTakeActionRadioGroup.PackStart (vboxException);
}
// Location group
{
whenToTakeActionRadioGroup.PackStart (stopOnLocation);
hboxLocation.PackStart (entryLocationFile, true);
hboxLocation.PackStart (warningLocation);
vboxLocation.PackEnd (hboxLocation);
whenToTakeActionRadioGroup.PackStart (vboxLocation);
}
vbox.PackStart (whenToTakeActionRadioGroup);
vbox.PackStart (new Label (GettextCatalog.GetString ("Advanced Conditions")) {
Font = vbox.Font.WithWeight (FontWeight.Bold)
});
var vboxAdvancedConditions = new VBox {
MarginLeft = 30
};
var hboxHitCount = new HBox ();
hboxHitCount.PackStart (ignoreHitType, true);
hboxHitCount.PackStart (ignoreHitCount);
vboxAdvancedConditions.PackStart (hboxHitCount);
vboxAdvancedConditions.PackStart (conditionalHitType);
hboxCondition = new HBox ();
hboxCondition.PackStart (entryConditionalExpression, true);
hboxCondition.PackStart (warningCondition);
vboxAdvancedConditions.PackStart (hboxCondition);
vboxAdvancedConditions.PackEnd (conditionalExpressionTip);
vbox.PackStart (vboxAdvancedConditions);
Buttons.Add (new DialogButton (Command.Cancel));
Buttons.Add (buttonOk);
Content = vbox;
if (IdeApp.Workbench != null) {
Gtk.Widget parent = ((Gtk.Widget)Xwt.Toolkit.CurrentEngine.GetNativeWidget (vbox)).Parent;
//.........这里部分代码省略.........
示例10: Options
public override Widget Options()
{
if (main != null) {
main.Dispose();
}
main = new VBox();
// filename
HBox file = new HBox();
filenameEntry = new TextEntry();
filenameEntry.Text = Filename;
filenameEntry.ReadOnly = true;
filenameEntry.ShowFrame = false;
filenameEntry.BackgroundColor = Color.FromBytes(232, 232, 232);
Button browseButton = new Button("Browse...");
browseButton.SetFocus();
browseButton.Clicked += Browse;
// print to std out
HBox exportToStdOutBox = new HBox();
CheckBox exportTSCheck = new CheckBox();
exportToStdOutBox.PackStart(new Label("Export to standard out?"));
exportToStdOutBox.PackEnd(exportTSCheck);
exportTSCheck.Toggled += delegate {
if (exportTSCheck.Active) {
browseButton.Style = ButtonStyle.Flat;
browseButton.Clicked -= Browse;
exportToStdOut = true;
} else {
browseButton.Style = ButtonStyle.Normal;
browseButton.Clicked += Browse;
exportToStdOut = false;
}
};
file.PackStart(filenameEntry, true);
file.PackEnd(browseButton);
main.PackEnd(file, true);
main.PackEnd(exportToStdOutBox, true);
return main;
}
示例11: BuildWidget
void BuildWidget()
{
VBox vbox = new VBox {
ExpandVertical = true,
ExpandHorizontal = true
};
HBox buttonBox = new HBox ();
_connectButton = new Button (Icons.Connect, I18N._ ("Connect"));
buttonBox.PackStart (_connectButton);
_disconnectButton = new Button (Icons.Disconnect, I18N._ ("Disconnect"));
buttonBox.PackStart (_disconnectButton);
vbox.PackStart (buttonBox);
_inTreeView = new ConnectableTreeView ();
_outTreeView = new ConnectableTreeView ();
_connectionArea = new ConnectionArea (_outTreeView, _inTreeView) {
MinWidth = 200,
MinHeight = 200,
ExpandVertical = true,
ExpandHorizontal = true
};
HBox connectionBox = new HBox {
ExpandVertical = true,
ExpandHorizontal = true
};
connectionBox.PackStart (_outTreeView, false, false);
connectionBox.PackStart (_connectionArea, true, true);
connectionBox.PackStart (_inTreeView, false, false);
vbox.PackStart (connectionBox, true, true);
_messageDisplay = new RichTextView ();
_messageContainer = new ScrollView (_messageDisplay) {
HorizontalScrollPolicy = ScrollPolicy.Never,
VerticalScrollPolicy = ScrollPolicy.Automatic,
HeightRequest = 40,
BorderVisible = true,
Margin = 2
};
_messageContainer.Hide ();
vbox.PackEnd (_messageContainer);
Content = vbox;
ExpandHorizontal = true;
ExpandVertical = true;
}
示例12: BuildContent
void BuildContent()
{
VBox mainContent = new VBox ();
_programName = new Label ();
_programName.Font = _programName.Font.WithScaledSize (1.5).WithWeight (FontWeight.Bold);
mainContent.PackStart (_programName);
_comments = new Label ();
_comments.Wrap = WrapMode.Word;
mainContent.PackStart (_comments);
_copyright = new Label ();
_copyright.Font = _copyright.Font.WithScaledSize (0.8);
mainContent.PackStart (_copyright);
_website = new LinkLabel ();
_website.Font = _website.Font.WithScaledSize (0.8);
mainContent.PackStart (_website);
HBox buttonRow = new HBox ();
Button authors = new Button {
Label = I18N._ ("Authors"),
Image = Icons.Info
};
authors.Clicked += (sender, args) => ShowAuthors ();
buttonRow.PackStart (authors);
Button license = new Button {
Label = I18N._ ("License"),
Image = Icons.Info
};
license.Clicked += (sender, args) => ShowLicense ();
buttonRow.PackStart (license);
Button ok = new Button { Label = I18N._ ("Close"), Image = Icons.Ok };
ok.Clicked += (sender, args) => Close ();
buttonRow.PackEnd (ok);
mainContent.PackEnd (buttonRow);
Content = mainContent;
}
示例13: InitializeUI
//.........这里部分代码省略.........
MenuItem menuExport = new MenuItem("Export");
menuExport.SubMenu = new Menu();
pipelineMenu.SubMenu.Items.Add(menuExport);
Type exporterType = typeof(BaseExporter);
IEnumerable<Type> exporter = AppDomain.CurrentDomain.GetAssemblies()
.SelectMany(s => s.GetTypes())
.Where(t => t.BaseType == exporterType);
foreach (Type export in exporter) {
MenuItem ni = new MenuItem(string.Format("As {0}...", export.Name));
ni.Tag = export.Name;
menuExport.SubMenu.Items.Add(ni);
var lExport = export;
ni.Clicked += delegate(object sender, EventArgs e) {
MenuItem s = sender as MenuItem;
if (s != null) {
if (exporterList.ContainsKey(s.Tag.ToString())) {
exporterList[s.Tag.ToString()].ShowDialog(pipelineController.CurrentPipeline.Nodes);
} else {
BaseExporter instance =
Activator.CreateInstance(lExport, pipelineController.CurrentPipeline.PipelineName) as BaseExporter;
if (instance != null) {
exporterList[s.Tag.ToString()] = instance;
instance.ShowDialog(pipelineController.CurrentPipeline.Nodes);
}
}
}
};
}
// Extras menu
MenuItem extrasMenu = new MenuItem("E_xtras");
extrasMenu.SubMenu = new Menu();
MenuItem menuResetAllMasks = new MenuItem("_Reset all masks");
menuResetAllMasks.Clicked += delegate {
foreach (BaseScan scan in project.scanCollection) {
scan.Mask.ResetMask();
}
};
MenuItem menuExportLog = new MenuItem("Export _logs");
menuExportLog.Clicked += delegate {
SaveFileDialog d = new SaveFileDialog("Export logs");
if (d.Run()) {
string filename = d.FileName;
if (!string.IsNullOrEmpty(filename)) {
System.IO.File.WriteAllText(filename, Log.ToText());
}
}
d.Dispose();
};
extrasMenu.SubMenu.Items.Add(menuResetAllMasks);
extrasMenu.SubMenu.Items.Add(menuExportLog);
// main menu
Menu menu = new Menu();
menu.Items.Add(fileMenu);
menu.Items.Add(viewMenu);
menu.Items.Add(editMenu);
menu.Items.Add(pipelineMenu);
menu.Items.Add(extrasMenu);
MainMenu = menu;
// initialize preview widget
preview = new Preview();
// load tree view with all available files
fileTree = new FileTreeView();
VBox splitFileTreeSearch_FileTree = new VBox();
splitFileTreeSearch_FileTree.PackStart(new FileTreeFilter(fileTree));
splitFileTreeSearch_FileTree.PackStart(fileTree, true);
// load pipeline controller
pipelineShelf = new VBox();
pipelineController = new PipelineController(project, pipelineShelf);
splitFiletree_Preview = new HPaned();
splitFiletree_Preview.Panel1.Content = splitFileTreeSearch_FileTree;
splitFiletree_Preview.Panel1.Shrink = true;
fileTree.HorizontalScrollPolicy = ScrollPolicy.Never;
splitFiletree_Preview.Panel2.Content = preview;
splitFiletree_Preview.Panel2.Resize = true;
splitController_Preview = new VBox();
//splitController_Preview.PackStart(controllbarShelf, false, false);
splitController_Preview.PackEnd(splitFiletree_Preview, true, true);
splitScan_Pipeline = new VPaned();
splitScan_Pipeline.Panel1.Content = splitController_Preview;
splitScan_Pipeline.Panel2.Content = pipelineShelf;
splitScan_Pipeline.Panel2.Resize = true;
splitMain_Status = new VBox();
splitMain_Status.PackStart(splitScan_Pipeline, true, true);
splitMain_Status.PackEnd(new StatusBar());
Content = splitMain_Status;
}
示例14: BuildContent
/// <summary>
/// builds dialog window
/// </summary>
void BuildContent()
{
Table table = new Table ();
_jackdPathEntry = BuildRow (table, 0, I18N._ ("Jackd Startup Path"), I18N._ ("e.g. /usr/bin/jackd"));
_jackdPathEntry.FileSelector ();
_jackdGeneralOptionsEntry = BuildRow (table, 1, I18N._ ("General Options"), I18N._ ("optional"));
_jackdDriverEntry = BuildRow (table, 2, I18N._ ("Driver Infrastructure"), I18N._ ("e.g. alsa"));
_jackdDriverOptionsEntry = BuildRow (table, 3, I18N._ ("Driver Options"), I18N._ ("optional"));
HBox buttonBox = new HBox ();
_okButton = new Button (I18N._ ("Save")) { Image = Icons.Ok };
_cancelButton = new Button (I18N._ ("Cancel")) {
Image = Icons.Cancel,
Style = ButtonStyle.Flat
};
buttonBox.PackStart (_cancelButton);
buttonBox.PackEnd (_okButton);
VBox box = new VBox ();
box.PackStart (table);
box.PackEnd (buttonBox);
Content = box;
}
示例15: BuildContent
/// <summary>
/// builds window content
/// </summary>
void BuildContent()
{
Title = "MonoMultiJack";
_connectionNotebook = new Notebook {
ExpandHorizontal = true,
ExpandVertical = true
};
_appButtonBox = new VBox { ExpandVertical = true };
HBox mainContent = new HBox {
ExpandHorizontal = true,
ExpandVertical = true
};
mainContent.PackStart (_appButtonBox);
mainContent.PackStart (_connectionNotebook, true, true);
VBox container = new VBox {
Margin = new WidgetSpacing (0),
};
container.PackStart (mainContent, true, true);
_statusbar = new Label {
Margin = new WidgetSpacing (0),
};
_statusbar.Font = _statusbar.Font.WithScaledSize (0.8);
_statusbar.TextAlignment = Alignment.End;
PaddingBottom = PaddingBottom / 2;
container.PackEnd (_statusbar);
Content = container;
((IMainWindow)this).JackdIsRunning = false;
}