当前位置: 首页>>代码示例>>C#>>正文


C# Label.ShowAll方法代码示例

本文整理汇总了C#中Gtk.Label.ShowAll方法的典型用法代码示例。如果您正苦于以下问题:C# Label.ShowAll方法的具体用法?C# Label.ShowAll怎么用?C# Label.ShowAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Gtk.Label的用法示例。


在下文中一共展示了Label.ShowAll方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: UpdateiFolder

 public void UpdateiFolder(iFolderWeb ifolder)
 {
     this.ifolder = ifolder;
        if (ifolder.LastSyncTime == null || ifolder.LastSyncTime == "")
     LastSuccessfulSync.Text = Util.GS("N/A");
        else
     LastSuccessfulSync.Text = ifolder.LastSyncTime;
        FFSyncValue.Text = "0";
        int syncInterval = 0;
        if (ifolder.SyncInterval <= 0)
        {
     try
     {
      syncInterval = ifws.GetDefaultSyncInterval();
     }
     catch
     {}
        }
        else
        {
     syncInterval = ifolder.SyncInterval;
        }
        if (syncInterval > 0)
        {
     syncInterval = syncInterval / 60;
        }
        SyncIntervalValue.Text = syncInterval + " " + Util.GS("minute(s)");
        NameLabel.Markup = string.Format("<span weight=\"bold\">{0}</span>", ifolder.Name);
        OwnerLabel.Markup = string.Format("<span size=\"small\">{0}</span>", ifolder.Owner);
        LocationLabel.Markup = string.Format("<span size=\"small\">{0}</span>", ifolder.UnManagedPath);
        try
        {
     SyncSize ss = ifws.CalculateSyncSize(ifolder.ID);
     FFSyncValue.Text = string.Format("{0}", ss.SyncNodeCount);
        }
        catch(Exception e)
        {
     FFSyncValue.Text = Util.GS("N/A");
        }
        try
        {
     ds = ifws.GetiFolderDiskSpace(ifolder.ID);
        }
        catch(Exception e)
        {
     ds = null;
        }
        if(ifolder.CurrentUserID == ifolder.OwnerID)
        {
     if(LimitCheckButton == null)
     {
      LimitCheckButton =
       new CheckButton(Util.GS("Set _Quota:"));
      LimitCheckButton.Toggled +=
     new EventHandler(OnLimitSizeButton);
      diskTable.Attach(LimitCheckButton, 0,1,1,2,
       AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
      LimitEntry = new Entry();
      LimitEntry.Changed +=
       new EventHandler(OnLimitChanged);
      LimitEntry.Activated +=
       new EventHandler(OnLimitEdited);
      LimitEntry.FocusOutEvent +=
       new FocusOutEventHandler(OnLimitFocusLost);
      LimitEntry.WidthChars = 6;
      LimitEntry.MaxLength = 10;
      LimitEntry.Layout.Alignment = Pango.Alignment.Left;
      diskTable.Attach(LimitEntry, 1,2,1,2,
       AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
      LimitCheckButton.ShowAll();
      LimitEntry.ShowAll();
     }
     else
     {
      LimitCheckButton.Visible = true;
      LimitEntry.Visible = true;
     }
     if(LimitLabel != null)
     {
      LimitLabel.Visible = false;
      LimitValue.Visible = false;
     }
        }
        else
        {
     if(LimitLabel == null)
     {
      LimitLabel = new Label(Util.GS("Quota:"));
      LimitLabel.Xalign = 0;
      diskTable.Attach(LimitLabel, 0,1,1,2,
       AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
      LimitValue = new Label("0");
      LimitValue.Xalign = 1;
      diskTable.Attach(LimitValue, 1,2,1,2,
       AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
      LimitLabel.ShowAll();
      LimitValue.ShowAll();
     }
     else
     {
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:iFolderPropSettingsPage.cs

示例2: Initialize

 public void Initialize(IPadWindow window)
 {
     window.Title = "title";
     lbl = new Label("Test Label");
     lbl.ShowAll();
 }
开发者ID:nomit007,项目名称:MonoDevelop.Xunit,代码行数:6,代码来源:UnitTestPad.cs

示例3: UpdateiFolder

 public void UpdateiFolder(iFolderWeb ifolder)
 {
     DomainController domainController = DomainController.GetDomainController();
        this.domain = domainController.GetDomain(ifolder.DomainID);
        this.ifolder = ifolder;
        if (ifolder.LastSyncTime == null || ifolder.LastSyncTime == "")
     LastSuccessfulSync.Text = Util.GS("N/A");
        else
     LastSuccessfulSync.Text = ifolder.LastSyncTime;
        FFSyncValue.Text = Util.GS("0");
        int syncInterval = 0;
        if (ifolder.EffectiveSyncInterval <= 0)
        {
     try
     {
      syncInterval = ifws.GetDefaultSyncInterval();
     }
     catch
     {}
        }
        else
        {
     syncInterval = ifolder.EffectiveSyncInterval;
        }
        if (syncInterval > 0)
        {
     syncInterval = syncInterval / 60;
        }
        SyncIntervalValue.Text = syncInterval + " " + Util.GS("minute(s)");
        string ifolderName = null, ifolderLocation = null;
        ifolderName = ifolder.Name;
        ifolderLocation = ifolder.UnManagedPath;
        if(ifolder.Name.Length > displayName)
        {
        ifolderName = ifolder.Name.Substring(0,displayName) + "..." ;
        }
        if(ifolder.UnManagedPath.Length > displayableLocation)
        {
        ifolderLocation = ifolder.UnManagedPath.Substring(0,displayableLocation) + "..." ;
        }
        NameLabel.Markup = string.Format("<span weight=\"bold\">{0}</span>", GLib.Markup.EscapeText(ifolderName));
        OwnerLabel.Markup = string.Format("<span size=\"small\">{0}</span>", GLib.Markup.EscapeText(ifolder.Owner));
        LocationLabel.Markup = string.Format("<span size=\"small\">{0}</span>", GLib.Markup.EscapeText(ifolderLocation));
        AccountLabel.Markup = string.Format("<span size=\"small\">{0}</span>", GLib.Markup.EscapeText(domain.Name));
        try
        {
     SyncSize ss = ifws.CalculateSyncSize(ifolder.ID);
     FFSyncValue.Text = string.Format("{0}", ss.SyncNodeCount);
        }
        catch(Exception)
        {
     FFSyncValue.Text = Util.GS("N/A");
        }
        try
        {
     ds = ifws.GetiFolderDiskSpace(ifolder.ID);
        }
        catch(Exception)
        {
     ds = null;
        }
     if(LimitLabel == null)
     {
      LimitLabel = new Label(Util.GS("Quota:"));
      LimitLabel.Xalign = 0;
      diskTable.Attach(LimitLabel, 0,1,1,2,
       AttachOptions.Expand | AttachOptions.Fill, 0,0,0);
      LimitValue = new Label(Util.GS("0"));
      LimitValue.Xalign = 1;
      diskTable.Attach(LimitValue, 1,2,1,2,
       AttachOptions.Shrink | AttachOptions.Fill, 0,0,0);
      LimitLabel.ShowAll();
      LimitValue.ShowAll();
     }
     else
     {
      LimitLabel.Visible = true;
      LimitValue.Visible = true;
     }
     if(LimitCheckButton != null)
     {
      LimitCheckButton.Visible = false;
      LimitEntry.Visible = false;
     }
        if(ds != null)
        {
     int tmpValue;
     if(ds.Limit == 0)
     {
      LimitUnit.Sensitive = false;
      AvailLabel.Sensitive = false;
      AvailValue.Sensitive = false;
      AvailUnit.Sensitive = false;
      DiskUsageBar.Sensitive = false;
      DiskUsageFrame.Sensitive = false;
      DiskUsageFullLabel.Sensitive = false;
      DiskUsageEmptyLabel.Sensitive = false;
      if(LimitCheckButton != null)
      {
       LimitCheckButton.Active = false;
//.........这里部分代码省略.........
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:101,代码来源:iFolderPropSettingsPage.cs

示例4: RunModal

        public override ResponseType RunModal()
        {
            List <Dependencies.Dependency> status;
            Gdk.Color color;
            Pixbuf image;
            const int icon_size = 16;

            if (dependencies == null)
                dependencies = new Dependencies ();

            status = dependencies.Status;

            CellRendererText action_cell = new CellRendererText ();
            action_cell.WrapWidth = 300;
            action_cell.WrapMode = Pango.WrapMode.Word;

            CellRendererPixbuf status_cell = new CellRendererPixbuf ();
            status_cell.StockSize = (uint)Gtk.IconSize.Menu;

            treeview.AppendColumn (Catalog.GetString ("Status"), status_cell, "pixbuf", COL_STATUS);
            treeview.AppendColumn (Catalog.GetString ("Dependency"), new CellRendererText (), "text", COL_DEPEN);
            treeview.AppendColumn (Catalog.GetString ("Action"), action_cell, "text", COL_ACTION);

            treeview.Model = store  = new ListStore (typeof (Gdk.Pixbuf), typeof (string), typeof (string));

            for (int row = 0; row < status.Count; row++)
            {
                if (status[row].Available)
                    image = Gtk.IconTheme.Default.LoadIcon ("gtk-yes", icon_size, (Gtk.IconLookupFlags) 0);
                else
                    image = Gtk.IconTheme.Default.LoadIcon ("gtk-no", icon_size, (Gtk.IconLookupFlags) 0);

                store.AppendValues (image, status[row].Component, status[row].Action);
            }

            text_buffer.Text = dependencies.CapabilitiesSummary;

            Gtk.Label label = new Gtk.Label ();
            dependencies_vbox.Add (label);
            label.ShowAll ();
            color = label.Style.Background (StateType.Normal);
            dependencies_vbox.Remove (label);

            textview_intro.ModifyBase (Gtk.StateType.Normal, color);
            capabilitiesview.ModifyBase (Gtk.StateType.Normal, color);
            return base.RunModal ();
        }
开发者ID:GNOME,项目名称:mistelix,代码行数:47,代码来源:CheckDependenciesDialog.cs


注:本文中的Gtk.Label.ShowAll方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。