本文整理汇总了C#中Expander.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# Expander.ShowAll方法的具体用法?C# Expander.ShowAll怎么用?C# Expander.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Expander
的用法示例。
在下文中一共展示了Expander.ShowAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: MetadataDisplayWidget
public MetadataDisplayWidget()
{
main_vbox = new VBox ();
main_vbox.Spacing = 6;
metadata_message = new Label (String.Empty);
metadata_message.UseMarkup = true;
metadata_message.LineWrap = true;
metadata_vbox = new VBox ();
metadata_vbox.Spacing = 6;
main_vbox.PackStart (metadata_vbox, false, false, 0);
AddWithViewport (metadata_message);
((Viewport)Child).ShadowType = ShadowType.None;
BorderWidth = 3;
display = State.message;
ExposeEvent += HandleExposeEvent;
open_list = new List<string> ();
// Create Expander and TreeView for
// extended metadata
var tree_view = new TreeView ();
tree_view.HeadersVisible = false;
tree_view.RulesHint = true;
var col = new TreeViewColumn ();
col.Sizing = TreeViewColumnSizing.Autosize;
CellRenderer colr = new CellRendererText ();
col.PackStart (colr, false);
col.AddAttribute (colr, "markup", 0);
tree_view.AppendColumn (col);
extended_metadata = new ListStore (typeof(string));
tree_view.Model = extended_metadata;
var expander = new Expander (String.Format ("<span weight=\"bold\"><small>{0}</small></span>", Catalog.GetString ("Extended Metadata")));
expander.UseMarkup = true;
expander.Add (tree_view);
expander.Expanded = true;
main_vbox.PackStart (expander, false, false, 6);
expander.ShowAll ();
update_delay = new DelayedOperation (Update);
update_delay.Start ();
}
示例2: DeviceWidget
public DeviceWidget(DevicePropertyData dpd,Gtk.Window parent)
{
parentWindow = parent;
this.dpd = dpd;
this.Build();
skinThemeControl = new SkinThemeControl();
//table2.Attach(skinThemeControl,0,1,0,1,AttachOptions.Expand|AttachOptions.Fill,AttachOptions.Expand,0,0);
/*this.WidthRequest = 650;
this.HeightRequest = 500;*/
hbox1.PackStart(skinThemeControl,true,true,0);
//table2.Attach(skinThemeControl,0,2,0,1,AttachOptions.Expand|AttachOptions.Fill,AttachOptions.Expand,0,0);
if(dpd.Device.Devicetype == DeviceType.iOS_5_0)
GetIdentify();
skinThemeControl.SetLabelWidth(115);
skinThemeControl.SetDevice(dpd.Device);
this.dpd.Project.GenerateDevices();
switch (dpd.Device.Devicetype) {
//switch ((DeviceType)dpd.Device.TargetPlatformId) {
case DeviceType.Android_1_6:{
table2.NRows = table2.NRows+5;
PublishProperty pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_ICON);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp = new PublishProperty(Project.KEY_ICON));
GenerateFileMaskEntry(ref table2,Project.KEY_ICON,MainClass.Languages.Translate("icon"),pp.PublishValue,1);
//GenerateFileEntry
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_SPLASH);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp =new PublishProperty(Project.KEY_SPLASH));
GenerateFileMaskEntry(ref table2,Project.KEY_SPLASH,MainClass.Languages.Translate("splash"),pp.PublishValue,2);
//
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_BUNDLEIDENTIFIER);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp =new PublishProperty(Project.KEY_BUNDLEIDENTIFIER));
GenerateBundleEntry(ref table2,Project.KEY_BUNDLEIDENTIFIER,MainClass.Languages.Translate("bundleIdentifier"),pp.PublishValue,3);
Gtk.Expander expanderAndr16 = new Expander("Android signing");
Table tblAndr16 = new Table(4,2,false);
tblAndr16.RowSpacing = 3;
expanderAndr16.Add(tblAndr16);
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_KEYSTORE);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp = new PublishProperty(Project.KEY_KEYSTORE));
GenerateFileMaskEntry(ref tblAndr16,Project.KEY_KEYSTORE,MainClass.Languages.Translate("keystore")+" ",pp.PublishValue,0);
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_STOREPASSWORD);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp = new PublishProperty(Project.KEY_STOREPASSWORD));
GenerateEntry(ref tblAndr16,Project.KEY_STOREPASSWORD,MainClass.Languages.Translate("storepassword")+" ",pp.PublishValue,1);
//
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_ALIAS);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp = new PublishProperty(Project.KEY_ALIAS));
GenerateEntry(ref tblAndr16,Project.KEY_ALIAS,MainClass.Languages.Translate("alias")+" ",pp.PublishValue,2);
//
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_KEYPASSWORD);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp = new PublishProperty(Project.KEY_KEYPASSWORD));
GenerateEntry(ref tblAndr16,Project.KEY_KEYPASSWORD,MainClass.Languages.Translate("keypassword")+" ",pp.PublishValue,3);
//
table2.Attach(expanderAndr16,0,2,6,7,AttachOptions.Expand|AttachOptions.Fill,AttachOptions.Shrink,0,0);
expanderAndr16.ShowAll();
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_SUPPORTEDDEVICES);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp = new PublishProperty(Project.KEY_SUPPORTEDDEVICES));
GenerateComboBox(ref table2,Project.KEY_SUPPORTEDDEVICES,MainClass.Languages.Translate("supportedDevices"),pp.PublishValue,5,MainClass.Settings.AndroidSupportedDevices,true);
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_PERMISSION);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp = new PublishProperty(Project.KEY_PERMISSION));
GeneratePermissionEditor(ref table2,Project.KEY_PERMISSION,MainClass.Languages.Translate("permisions"),pp.PublishValue,6);
break;
}
case DeviceType.Android_2_2:{
if ((MainClass.Settings.InstallLocations == null) || ((MainClass.Settings.InstallLocations.Count <1 )) ){
MainClass.Settings.GenerateInstallLocation();
}
table2.NRows = table2.NRows+6;
PublishProperty pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_ICON);
if (pp == null)
dpd.Device.PublishPropertisMask.Add(pp = new PublishProperty(Project.KEY_ICON));
GenerateFileMaskEntry(ref table2,Project.KEY_ICON,MainClass.Languages.Translate("icon"),pp.PublishValue,1);
//GenerateFileEntry
pp = FindPublishProperty(dpd.Device.PublishPropertisMask, Project.KEY_SPLASH);
//.........这里部分代码省略.........
示例3: AddExpander
ListStore AddExpander(string name, int pos)
{
TreeView tree_view = new TreeView ();
tree_view.HeadersVisible = false;
tree_view.RulesHint = true;
TreeViewColumn col = new TreeViewColumn ();
col.Sizing = TreeViewColumnSizing.Autosize;
CellRenderer colr = new CellRendererText ();
col.PackStart (colr, false);
col.AddAttribute (colr, "markup", 0);
tree_view.AppendColumn (col);
ListStore model = new ListStore (typeof(string));
tree_view.Model = model;
Expander expander = new Expander (String.Format ("<span weight=\"bold\"><small>{0}</small></span>", name));
expander.UseMarkup = true;
expander.Add (tree_view);
expander.Expanded = true;
metadata_vbox.PackStart (expander, false, false, 6);
metadata_vbox.ReorderChild (expander, pos);
if (open_list.Contains (name))
expander.Expanded = true;
expander.Activated += HandleExpanderActivated;
expander.ShowAll ();
return model;
}
示例4: VBox
/*protected void AddCommentToGui(CommentData comment)
{
// create the expander which will contain this
Expander container = new Gtk.Expander(comment.Author);
// Create a HBox which will contain the comment entry and buttons
VBox entryContainer = new VBox();
// Create a VBox for the subject and comment body
VBox commentVBox = new VBox();
Label subjectLabel = new Label("Subject: " + comment.Title);
TextView commentView = new TextView();
commentView.Buffer.Text = comment.Content;
// Make sure that the comment view content is sufficiently large
commentView.SetSizeRequest(1,100);
HBox hbox_1 = new HBox();
Button quoteButton = new Button("Quote");
Button replyButton = new Button("Reply");
// Subject | Quote | Reply
hbox_1.PackStart(subjectLabel, true, false, 0);
hbox_1.PackStart(quoteButton, true, false, 0);
hbox_1.PackStart(replyButton, true, false, 0);
// pack the subject and comment into it
commentVBox.PackStart(hbox_1, false, true, 0);
commentVBox.PackStart(commentView, true, true, 0);
// Pack both the boxes togetherin the entryContainer
entryContainer.PackStart(commentVBox, true, false, 0);
// Add the entry container to the main expander widget
container.Add(entryContainer);
// Add the main expander to the comment vbox
// commentVBox.PackStart(container, false, false, 0); //WTF?
// hook into the Expand event so that we can resize the widget
container.Activated += ContainerActivated;
}*/
protected void AddCommentToGui(CommentData comment)
{
// Create a new HBox to hold the subject line and the reply buttons, content, etc
Label subjectLabel = new Label (comment.Title);
Button quoteButton = new Button ("Quote");
Button replyButton = new Button ("Reply");
// Push the comment with little ">"s to the reply window
quoteButton.Clicked += delegate(object sender, EventArgs e) { this.AddCommentQuote (comment); };
replyButton.Clicked += delegate(object sender, EventArgs e) {
this.AddCommentQuote (comment);
// set the reply title as "Re:"
subjectEntry.Text = "Re: " + comment.Title;
};
HBox subjectHBox = new HBox ();
subjectHBox.PackStart (subjectLabel, true, true, 0);
subjectHBox.PackStart (quoteButton, false, false, 0);
subjectHBox.PackStart (replyButton, false, false, 0);
// Create the entry and the VBox to hold the comment together
TextView iterCommentView = new TextView ();
iterCommentView.Buffer.Text = comment.Content;
iterCommentView.HeightRequest = 100;
iterCommentView.WrapMode = WrapMode.Word;
iterCommentView.Editable = false;
VBox iterVBox = new VBox ();
iterVBox.PackStart (subjectHBox, false, false, 0);
iterVBox.PackStart (iterCommentView, true, true, 0);
// Create an expander
Expander iterContainer = new Expander (comment.Author);
iterContainer.Add (iterVBox);
iterContainer.Activated += ContainerActivated;
iterContainer.ShowAll ();
commentVBox.PackStart (iterContainer, true, true, 0);
}