本文整理汇总了C#中Gtk.Label.Hide方法的典型用法代码示例。如果您正苦于以下问题:C# Label.Hide方法的具体用法?C# Label.Hide怎么用?C# Label.Hide使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gtk.Label
的用法示例。
在下文中一共展示了Label.Hide方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VersionInformationDialog
public VersionInformationDialog() : base()
{
AccelGroup accel_group = new AccelGroup();
AddAccelGroup(accel_group);
Modal = true;
Button button = new Button("gtk-close");
button.CanDefault = true;
button.UseStock = true;
button.Show();
DefaultResponse = ResponseType.Close;
button.AddAccelerator("activate", accel_group, (uint)Gdk.Key.Escape,
0, Gtk.AccelFlags.Visible);
AddActionWidget(button, ResponseType.Close);
Title = Catalog.GetString("Assembly Version Information");
BorderWidth = 10;
version_tree = new TreeView();
version_tree.RulesHint = true;
version_tree.AppendColumn(Catalog.GetString("Assembly Name"),
new CellRendererText(), "text", 0);
version_tree.AppendColumn(Catalog.GetString("Version"),
new CellRendererText(), "text", 1);
version_tree.Model = FillStore();
version_tree.CursorChanged += OnCursorChanged;
ScrolledWindow scroll = new ScrolledWindow();
scroll.Add(version_tree);
scroll.ShadowType = ShadowType.In;
scroll.SetSizeRequest(420, 200);
VBox.PackStart(scroll, true, true, 0);
VBox.Spacing = 5;
path_label = new Label();
path_label.Ellipsize = Pango.EllipsizeMode.End;
path_label.Hide();
path_label.Xalign = 0.0f;
path_label.Yalign = 1.0f;
VBox.PackStart(path_label, false, true, 0);
scroll.ShowAll();
}
示例2: UserInfoBox
private Widget UserInfoBox()
{
VBox userInfo = new VBox(false, 0);
string lable = null;
lable = Util.GS("N/A");
lable = string.Format(Util.GS("Server: {0}"),lable);
labeliFolderServer = new Label( string.Format( "<span size=\"medium\">{0}</span>",lable ));
userInfo.PackStart(labeliFolderServer, false, false, 0);
labeliFolderServer.UseMarkup = true;
labeliFolderServer.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
labeliFolderServer.Xalign = 0.0F;
lable = Util.GS("N/A");
lable = string.Format(Util.GS("Last Successfull Sync time: {0}"),lable);
labelLastSyncTime = new Label( string.Format( "<span size=\"medium\">{0}</span>",lable ));
userInfo.PackStart(labelLastSyncTime, false, false, 0);
labelLastSyncTime.UseMarkup = true;
labelLastSyncTime.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
labelLastSyncTime.Xalign = 0.0F;
lable = Util.GS("N/A");
lable = string.Format(Util.GS("File/Folder to synchronize: {0}"),lable);
labelFolderToSync = new Label( string.Format( "<span size=\"medium\">{0}</span>",lable ));
userInfo.PackStart(labelFolderToSync, false, false, 0);
labelFolderToSync.UseMarkup = true;
labelFolderToSync.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
labelFolderToSync.Xalign = 0.0F;
lable = Util.GS("N/A");
lable = string.Format(Util.GS("iFolder Size: {0}"),lable);
labeliFolderSize = new Label( string.Format( "<span size=\"medium\">{0}</span>",lable ));
userInfo.PackStart(labeliFolderSize, false, false, 0);
labeliFolderSize.UseMarkup = true;
labeliFolderSize.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
labeliFolderSize.Xalign = 0.0F;
labeliFolderSize.Hide();
lable = Util.GS("N/A");
lable = string.Format(Util.GS("iFolder Type: {0}"),lable);
labeliFolderType = new Label( string.Format( "<span size=\"medium\">{0}</span>",lable ));
userInfo.PackStart(labeliFolderType, false, false, 0);
labeliFolderType.UseMarkup = true;
labeliFolderType.ModifyFg(StateType.Normal, this.Style.Base(StateType.Selected));
labeliFolderType.Xalign = 0.0F;
labeliFolderType.Hide();
return userInfo;
}
示例3: ShowCustomizePage
private void ShowCustomizePage()
{
Header = CmisSync.Properties_Resources.ResourceManager.GetString("Customize", CultureInfo.CurrentCulture);
Label localfolder_label = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = "<b>" + CmisSync.Properties_Resources.ResourceManager.GetString("EnterLocalFolderName", CultureInfo.CurrentCulture) + "</b>"
};
Entry localfolder_entry = new Entry() {
Text = Controller.SyncingReponame,
ActivatesDefault = false
};
Label localrepopath_label = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = "<b>" + CmisSync.Properties_Resources.ResourceManager.GetString("ChangeRepoPath", CultureInfo.CurrentCulture) + "</b>"
};
Entry localrepopath_entry = new Entry() {
Text = System.IO.Path.Combine(Controller.DefaultRepoPath, localfolder_entry.Text)
};
localfolder_entry.Changed += delegate {
localrepopath_entry.Text = System.IO.Path.Combine(Controller.DefaultRepoPath, localfolder_entry.Text);
};
Label localfolder_error_label = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = ""
};
Button cancel_button = new Button(cancelText);
Button add_button = new Button(
CmisSync.Properties_Resources.ResourceManager.GetString("Add", CultureInfo.CurrentCulture)
);
Button back_button = new Button(
CmisSync.Properties_Resources.ResourceManager.GetString("Back", CultureInfo.CurrentCulture)
);
Controller.UpdateAddProjectButtonEvent += delegate(bool button_enabled) {
Gtk.Application.Invoke(delegate {
add_button.Sensitive = button_enabled;
});
};
string error = Controller.CheckRepoPathAndName(localrepopath_entry.Text, localfolder_entry.Text);
if (!String.IsNullOrEmpty(error)) {
localfolder_error_label.Markup = "<span foreground=\"#ff8080\">" +
CmisSync.Properties_Resources.ResourceManager.GetString(error, CultureInfo.CurrentCulture) +
"</span>";
localfolder_error_label.Show();
} else {
localfolder_error_label.Hide();
}
localfolder_entry.Changed += delegate {
error = Controller.CheckRepoPathAndName(localrepopath_entry.Text, localfolder_entry.Text);
if (!String.IsNullOrEmpty(error)) {
localfolder_error_label.Markup = "<span foreground=\"#ff8080\">" +
CmisSync.Properties_Resources.ResourceManager.GetString(error, CultureInfo.CurrentCulture) +
"</span>";
localfolder_error_label.Show();
} else {
localfolder_error_label.Hide();
}
};
error = Controller.CheckRepoPathAndName(localrepopath_entry.Text, localfolder_entry.Text);
if (!String.IsNullOrEmpty(error)) {
localfolder_error_label.Markup = "<span foreground=\"#ff8080\">" +
CmisSync.Properties_Resources.ResourceManager.GetString(error, CultureInfo.CurrentCulture) +
"</span>";
localfolder_error_label.Show();
} else {
localfolder_error_label.Hide();
}
localrepopath_entry.Changed += delegate {
error = Controller.CheckRepoPathAndName(localrepopath_entry.Text, localfolder_entry.Text);
if (!String.IsNullOrEmpty(error)) {
localfolder_error_label.Markup = "<span foreground=\"#ff8080\">" +
CmisSync.Properties_Resources.ResourceManager.GetString(error, CultureInfo.CurrentCulture) +
"</span>";
localfolder_error_label.Show();
} else {
localfolder_error_label.Hide();
}
};
cancel_button.Clicked += delegate {
Controller.PageCancelled();
};
back_button.Clicked += delegate {
//.........这里部分代码省略.........
示例4: ShowAdd1Page
private void ShowAdd1Page()
{
Header = CmisSync.Properties_Resources.ResourceManager.GetString("Where", CultureInfo.CurrentCulture);
VBox layout_vertical = new VBox (false, 12);
HBox layout_fields = new HBox (true, 12);
VBox layout_address = new VBox (true, 0);
HBox layout_address_help = new HBox(false, 3);
VBox layout_user = new VBox (true, 0);
VBox layout_password = new VBox (true, 0);
// Address
Label address_label = new Label()
{
UseMarkup = true,
Xalign = 0,
Markup = "<b>" +
CmisSync.Properties_Resources.ResourceManager.GetString("EnterWebAddress", CultureInfo.CurrentCulture) +
"</b>"
};
Entry address_entry = new Entry () {
Text = Controller.PreviousAddress,
ActivatesDefault = false
};
Label address_help_label = new Label()
{
Xalign = 0,
UseMarkup = true,
Markup = "<span foreground=\"#808080\" size=\"small\">" +
CmisSync.Properties_Resources.ResourceManager.GetString("Help", CultureInfo.CurrentCulture) + ": " +
"</span>"
};
EventBox address_help_urlbox = new EventBox();
Label address_help_urllabel = new Label()
{
Xalign = 0,
UseMarkup = true,
Markup = "<span foreground=\"blue\" underline=\"single\" size=\"small\">" +
CmisSync.Properties_Resources.ResourceManager.GetString("WhereToFind", CultureInfo.CurrentCulture) +
"</span>"
};
address_help_urlbox.Add(address_help_urllabel);
address_help_urlbox.ButtonPressEvent += delegate(object o, ButtonPressEventArgs args) {
Process process = new Process();
process.StartInfo.FileName = "xdg-open";
process.StartInfo.Arguments = "https://github.com/nicolas-raoul/CmisSync/wiki/What-address";
process.Start ();
};
address_help_urlbox.EnterNotifyEvent += delegate(object o, EnterNotifyEventArgs args) {
address_help_urlbox.GdkWindow.Cursor = hand_cursor;
};
Label address_error_label = new Label()
{
Xalign = 0,
UseMarkup = true,
Markup = ""
};
address_error_label.Hide();
// User
Entry user_entry = new Entry () {
Text = Controller.PreviousPath,
ActivatesDefault = false
};
// Password
Entry password_entry = new Entry () {
Text = Controller.PreviousPath,
Visibility = false,
ActivatesDefault = true
};
Controller.ChangeAddressFieldEvent += delegate (string text,
string example_text) {
Application.Invoke (delegate {
address_entry.Text = text;
});
};
Controller.ChangeUserFieldEvent += delegate (string text,
string example_text) {
Application.Invoke (delegate {
user_entry.Text = text;
});
};
Controller.ChangePasswordFieldEvent += delegate (string text,
string example_text) {
Application.Invoke (delegate {
password_entry.Text = text;
});
};
//.........这里部分代码省略.........
示例5: ShowAdd1Page
private void ShowAdd1Page()
{
this.Present();
Header = CmisSync.Properties_Resources.Where;
VBox layout_vertical = new VBox (false, 12);
HBox layout_fields = new HBox (true, 12);
VBox layout_address = new VBox (true, 0);
HBox layout_address_help = new HBox(false, 3);
VBox layout_user = new VBox (true, 0);
VBox layout_password = new VBox (true, 0);
// Address
Label address_label = new Label()
{
UseMarkup = true,
Xalign = 0,
Markup = "<b>" +
CmisSync.Properties_Resources.EnterWebAddress +
"</b>"
};
Entry address_entry = new Entry () {
Text = (Controller.PreviousAddress == null || String.IsNullOrEmpty(Controller.PreviousAddress.ToString()))?"https://":Controller.PreviousAddress.ToString(),
ActivatesDefault = false
};
Label address_help_label = new Label()
{
Xalign = 0,
UseMarkup = true,
Markup = "<span foreground=\"#808080\" size=\"small\">" +
CmisSync.Properties_Resources.Help + ": " +
"</span>"
};
EventBox address_help_urlbox = new EventBox();
Label address_help_urllabel = new Label()
{
Xalign = 0,
UseMarkup = true,
Markup = "<span foreground=\"blue\" underline=\"single\" size=\"small\">" +
CmisSync.Properties_Resources.WhereToFind +
"</span>"
};
address_help_urlbox.Add(address_help_urllabel);
address_help_urlbox.ButtonPressEvent += delegate(object o, ButtonPressEventArgs args) {
Process process = new Process();
process.StartInfo.FileName = "xdg-open";
process.StartInfo.Arguments = "https://github.com/aegif/CmisSync/wiki/What-address";
process.Start ();
};
address_help_urlbox.EnterNotifyEvent += delegate(object o, EnterNotifyEventArgs args) {
address_help_urlbox.GdkWindow.Cursor = hand_cursor;
};
Label address_error_label = new Label()
{
Xalign = 0,
UseMarkup = true,
Markup = ""
};
address_error_label.Hide();
// User
Entry user_entry = new Entry () {
Text = Controller.PreviousPath,
ActivatesDefault = false
};
if(String.IsNullOrEmpty(Controller.saved_user))
{
user_entry.Text = Environment.UserName;
}
else
{
user_entry.Text = Controller.saved_user;
}
// Password
Entry password_entry = new Entry () {
Visibility = false,
ActivatesDefault = true
};
Controller.ChangeAddressFieldEvent += delegate (string text,
string example_text) {
Application.Invoke (delegate {
address_entry.Text = text;
});
};
Controller.ChangeUserFieldEvent += delegate (string text,
string example_text) {
Application.Invoke (delegate {
user_entry.Text = text;
});
};
//.........这里部分代码省略.........
示例6: ShowCustomizePage
private void ShowCustomizePage()
{
Header = CmisSync.Properties_Resources.Customize;
string localfoldername = Controller.saved_address.Host.ToString();
foreach (KeyValuePair<String, String> repository in Controller.repositories)
{
if (repository.Key == Controller.saved_repository)
{
localfoldername += "/" + repository.Value;
break;
}
}
Label localfolder_label = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = "<b>" + CmisSync.Properties_Resources.EnterLocalFolderName + "</b>"
};
Entry localfolder_entry = new Entry() {
Text = localfoldername,
ActivatesDefault = false
};
Label localrepopath_label = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = "<b>" + CmisSync.Properties_Resources.ChangeRepoPath + "</b>"
};
Entry localrepopath_entry = new Entry() {
Text = System.IO.Path.Combine(Controller.DefaultRepoPath, localfolder_entry.Text)
};
localfolder_entry.Changed += delegate {
try{
localrepopath_entry.Text = System.IO.Path.Combine(Controller.DefaultRepoPath, localfolder_entry.Text);
}catch(Exception){}
};
Label localfolder_error_label = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = ""
};
Button cancel_button = new Button(cancelText);
Button add_button = new Button(
CmisSync.Properties_Resources.Add
);
Button back_button = new Button(
CmisSync.Properties_Resources.Back
);
Controller.UpdateAddProjectButtonEvent += delegate(bool button_enabled) {
Gtk.Application.Invoke(delegate {
add_button.Sensitive = button_enabled;
});
};
string error = Controller.CheckRepoPathAndName(localrepopath_entry.Text, localfolder_entry.Text);
if (!String.IsNullOrEmpty(error)) {
localfolder_error_label.Markup = "<span foreground=\"#ff8080\">" +
error +
"</span>";
localfolder_error_label.Show();
} else {
localfolder_error_label.Hide();
}
localfolder_entry.Changed += delegate {
error = Controller.CheckRepoPathAndName(localrepopath_entry.Text, localfolder_entry.Text);
if (!String.IsNullOrEmpty(error)) {
localfolder_error_label.Markup = "<span foreground=\"#ff8080\">" +
error +
"</span>";
localfolder_error_label.Show();
} else {
localfolder_error_label.Hide();
}
};
error = Controller.CheckRepoPathAndName(localrepopath_entry.Text, localfolder_entry.Text);
if (!String.IsNullOrEmpty(error)) {
localfolder_error_label.Markup = "<span foreground=\"#ff8080\">" +
error +
"</span>";
localfolder_error_label.Show();
} else {
localfolder_error_label.Hide();
}
localrepopath_entry.Changed += delegate {
error = Controller.CheckRepoPathAndName(localrepopath_entry.Text, localfolder_entry.Text);
if (!String.IsNullOrEmpty(error)) {
localfolder_error_label.Markup = "<span foreground=\"#ff8080\">" +
error +
"</span>";
localfolder_error_label.Show();
//.........这里部分代码省略.........
示例7: ShowAdd1Page
private void ShowAdd1Page() {
this.Present();
this.Header = Properties_Resources.Where;
VBox layout_vertical = new VBox(false, 12);
HBox layout_fields = new HBox(true, 12);
VBox layout_address = new VBox(true, 0);
HBox layout_address_help = new HBox(false, 3);
VBox layout_user = new VBox(true, 0);
VBox layout_password = new VBox(true, 0);
// Address
Label address_label = new Label() {
UseMarkup = true,
Xalign = 0,
Markup = "<b>" +
Properties_Resources.EnterWebAddress +
"</b>"
};
Entry address_entry = new Entry() {
Text = (this.controller.PreviousAddress == null || string.IsNullOrEmpty(this.controller.PreviousAddress.ToString())) ? DefaultEntries.Defaults.Url : this.controller.PreviousAddress.ToString(),
IsEditable = DefaultEntries.Defaults.CanModifyUrl,
ActivatesDefault = false
};
Label address_help_label = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = "<span foreground=\"#808080\" size=\"small\">" +
Properties_Resources.Help + ": " +
"</span>"
};
EventBox address_help_urlbox = new EventBox();
Label address_help_urllabel = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = "<span foreground=\"blue\" underline=\"single\" size=\"small\">" +
Properties_Resources.WhereToFind +
"</span>"
};
address_help_urlbox.Add(address_help_urllabel);
address_help_urlbox.ButtonPressEvent += delegate(object o, ButtonPressEventArgs args) {
Process process = new Process();
process.StartInfo.FileName = "xdg-open";
process.StartInfo.Arguments = "https://github.com/nicolas-raoul/CmisSync/wiki/What-address";
process.Start();
};
address_help_urlbox.EnterNotifyEvent += delegate(object o, EnterNotifyEventArgs args) {
address_help_urlbox.GdkWindow.Cursor = handCursor;
};
Label address_error_label = new Label() {
Xalign = 0,
UseMarkup = true,
Markup = string.Empty
};
address_error_label.Hide();
// User
Entry user_entry = new Entry() {
Text = this.controller.PreviousPath,
ActivatesDefault = false
};
if (string.IsNullOrEmpty(this.controller.saved_user)) {
user_entry.Text = DefaultEntries.Defaults.Name;
} else {
user_entry.Text = this.controller.saved_user;
}
// Password
Entry password_entry = new Entry() {
Visibility = false,
ActivatesDefault = true
};
this.controller.ChangeAddressFieldEvent += delegate(string text, string example_text) {
Application.Invoke(delegate {
address_entry.Text = text;
});
};
this.controller.ChangeUserFieldEvent += delegate(string text, string example_text) {
Application.Invoke(delegate {
user_entry.Text = text;
});
};
this.controller.ChangePasswordFieldEvent += delegate(string text, string example_text) {
Application.Invoke(delegate {
password_entry.Text = text;
});
};
address_entry.Changed += delegate {
string error = this.controller.CheckAddPage(address_entry.Text);
if (!string.IsNullOrEmpty(error)) {
address_error_label.Markup = "<span foreground=\"red\">" + Properties_Resources.ResourceManager.GetString(error, CultureInfo.CurrentCulture) + "</span>";
address_error_label.Show();
//.........这里部分代码省略.........
示例8: Install
void Install (Gtk.Alignment commandBox, Button installButton, Update update)
{
if (update.InstallAction == null) {
DesktopService.ShowUrl (update.Url);
return;
}
installButton.Hide ();
if (installing) {
Gtk.Label lab = new Gtk.Label (GettextCatalog.GetString ("Waiting"));
commandBox.Child.Destroy ();
commandBox.Add (lab);
lab.Show ();
installQueue.Enqueue (delegate {
lab.Hide ();
RunInstall (commandBox, update);
});
return;
}
RunInstall (commandBox, update);
}
示例9: Install
void Install (HBox labelBox, Button installButton, Update update)
{
if (update.InstallAction == null) {
DesktopService.ShowUrl (update.Url);
return;
}
installButton.Hide ();
if (installing) {
Gtk.Label lab = new Gtk.Label (GettextCatalog.GetString ("Waiting"));
labelBox.PackStart (lab, false, false, 0);
lab.Show ();
installQueue.Enqueue (delegate {
lab.Hide ();
RunInstall (labelBox, update);
});
return;
}
RunInstall (labelBox, update);
}