本文整理汇总了C#中Glade.XML类的典型用法代码示例。如果您正苦于以下问题:C# XML类的具体用法?C# XML怎么用?C# XML使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XML类属于Glade命名空间,在下文中一共展示了XML类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: WorkbenchView
public WorkbenchView(WorkbenchController controller)
{
SplashWindow.Update ("Creating GUI");
XML gxml = new Glade.XML (null,
WorkbenchSingleton.GLADEFILE,
"Workbench",
null);
window = (Gtk.Window) gxml["Workbench"];
Gtk.VPaned splitter = (Gtk.VPaned) gxml["mainPane"];
editorNotebook = new EditorNotebook ();
splitter.Pack1 (editorNotebook, true, false);
ScrolledWindow sw = new ScrolledWindow ();
console = new TextView ();
console.Editable = false;
console.WrapMode = WrapMode.Word;
sw.Add (console);
Notebook bottomNotebook = new Notebook ();
bottomNotebook.AppendPage (sw, new Label ("Console"));
splitter.Pack2 (bottomNotebook, true, false);
window.Icon = icon;
this.WindowTitle = "";
gxml.Autoconnect (controller);
bottomNotebook.ShowAll ();
editorNotebook.ShowAll ();
SplashWindow.Update ("Simetron is ready!");
}
开发者ID:BackupTheBerlios,项目名称:simetron,代码行数:31,代码来源:WorkbenchView.cs
示例2: MainClass
public MainClass(string[] args)
{
DateTime startTimestamp;
startTimestamp = DateTime.Now;
Console.WriteLine (startTimestamp);
Gtk.Application.Init ();
Glade.XML gxml = new Glade.XML (null, "TimeManager.gui.glade", "topWindow", null);
TimePeriodAdderView tpv = new TimePeriodAdderView (gxml);
TimePeriodAdderModel tpm = new TimePeriodAdderModel (tpv);
TimePeriodAdderController tpc = new TimePeriodAdderController (gxml, tpm, tpv);
ScreenshotViewerView nvv = new ScreenshotViewerView (gxml);
ScreenshotViewerModel ssViewerModel = new ScreenshotViewerModel (nvv, tpm, startTimestamp);
tpm.setNVM (ssViewerModel);
ScreenshotViewerController screenshotViewerController =
new ScreenshotViewerController (gxml, ssViewerModel);
TmEventHandler eventHandler = new TmEventHandler (gxml);
Gtk.Application.Run ();
}
开发者ID:simon-g-crosby,项目名称:time-track-client,代码行数:25,代码来源:MainClass.cs
示例3: BrunetChatLogin
public BrunetChatLogin(ChatConfigSerialization config)
{
_chat_config = config;
string fname = "BrunetChat.glade";
string root = "dialogBrunetChatLogin";
Glade.XML gxml = new Glade.XML (fname, root, null);
//Glade.XML gxml = new Glade.XML (null,fname, root, null);
gxml.Autoconnect(this);
int init_users = _chat_config.UserList.Users.Length;
if (0 < init_users){
userStrings = new ArrayList();
userHashtable = new Hashtable();
foreach(User user in _chat_config.UserList.Users ){
userHashtable.Add(user.Email,user);
userStrings.Add(user.Email);
}
int count = userStrings.Count;
Console.WriteLine("User count: {0}",count);
string[] popstring = new string[count];
for (int loop = 0;loop<count;loop++){
popstring[loop] = (string)userStrings[loop];
Console.WriteLine(popstring[loop]);
}
comboEmail.PopdownStrings = popstring;
}
}
开发者ID:xujyan,项目名称:brunet,代码行数:30,代码来源:BrunetChatLogin.cs
示例4: LLViewPictureWindow
public LLViewPictureWindow(Life myLife)
{
this.myLife = myLife;
Glade.XML gxml = new Glade.XML (null, "llviewpicturewindow.glade", "ViewPictureWindow", null);
gxml.Autoconnect(this);
}
开发者ID:MonoBrasil,项目名称:historico,代码行数:7,代码来源:LLViewPictureWindow.cs
示例5: UploadFileChooserUI
private UploadFileChooserUI()
{
Glade.XML gxml = new Glade.XML (null, "organizer.glade", "filechooserdialog1", null);
gxml.Autoconnect (this);
_job = new ThreadStart(ProcessThumbnail);
_previewthread = new Thread(_job);
label16.WidthRequest = eventbox7.WidthRequest;
eventbox7.ModifyBg(Gtk.StateType.Normal, bgcolor);
eventbox8.ModifyBg(Gtk.StateType.Normal, bgcolor);
eventbox9.ModifyBg(Gtk.StateType.Normal, bgcolor);
filechooserdialog1.Title = "Select files to upload";
filechooserdialog1.SetIconFromFile(DeskFlickrUI.ICON_PATH);
filechooserdialog1.SetFilename(PersistentInformation.GetInstance().UploadFilename);
filechooserdialog1.SelectMultiple = true;
FileFilter imagefilter = new FileFilter();
imagefilter.AddMimeType("image/jpeg");
imagefilter.AddMimeType("image/png");
filechooserdialog1.Filter = imagefilter;
filechooserdialog1.SelectionChanged += new EventHandler(OnFileSelectedChanged);
filechooserdialog1.FileActivated += new EventHandler(OnOpenButtonClicked);
button10.Clicked += new EventHandler(OnOpenButtonClicked);
button11.Clicked += new EventHandler(OnCancelButtonClicked);
DeskFlickrUI.GetInstance().SetUploadWindow(false);
filechooserdialog1.ShowAll();
}
开发者ID:joshuacox,项目名称:dfo,代码行数:30,代码来源:UploadFileChooserUI.cs
示例6: PreferencesDialog
public PreferencesDialog(ItemShelf itemShelf)
: base()
{
this.itemShelf = itemShelf;
this.Title = Mono.Posix.Catalog.GetString ("Preferences");
this.HasSeparator = false;
this.SetDefaultSize (300, 200);
Notebook notebook = new Notebook ();
Glade.XML gxml = new Glade.XML (null, "themeselection.glade", "hbox1", null);
HBox hBox = (HBox)gxml["hbox1"];
ScrolledWindow scrolledwindow = (ScrolledWindow)gxml["scrolledwindow1"];
TreeView themeTreeview = CreateThemeTreeView ();
themeTreeview.Selection.Changed += OnThemeTreeViewSelectionChanged;
scrolledwindow.Add (themeTreeview);
notebook.AppendPage (hBox, new Label (Mono.Posix.Catalog.GetString ("Theme")));
this.VBox.Add (notebook);
Button closeButton = (Button)this.AddButton (Gtk.Stock.Close, 1);
closeButton.Clicked += OnCloseButtonClicked;
this.ShowAll();
}
开发者ID:MonoBrasil,项目名称:historico,代码行数:28,代码来源:PreferencesDialog.cs
示例7: AlbumEditorUI
private AlbumEditorUI(Album album, bool isnew)
{
Glade.XML gxml = new Glade.XML (null, "organizer.glade", "window3", null);
gxml.Autoconnect (this);
this._isnew = isnew;
this._album = album;
window3.Title = String.Format("Editing information for {0}", album.Title);
window3.SetIconFromFile(DeskFlickrUI.ICON_PATH);
label8.Text = "Edit";
label9.Text = "Title: ";
label10.Text = "Description: ";
entry3.Text = album.Title;
textview6.Buffer.Text = album.Desc;
entry3.Changed += new EventHandler(OnTitleChanged);
textview6.Buffer.Changed += new EventHandler(OnDescriptionChanged);
button7.Clicked += new EventHandler(OnCancelButtonClicked);
button8.Clicked += new EventHandler(OnSaveButtonClicked);
image4.Pixbuf = PersistentInformation.GetInstance()
.GetSmallImage(album.PrimaryPhotoid);
window3.ShowAll();
}
开发者ID:joshuacox,项目名称:dfo,代码行数:27,代码来源:AlbumEditorUI.cs
示例8: MonoCovGui
public MonoCovGui()
{
xml = new Glade.XML (typeof (MonoCovGui).Assembly, "monocov.glade", null, null);
xml.Autoconnect (this);
main.Title = CAPTION;
}
开发者ID:vidalon,项目名称:monocov,代码行数:7,代码来源:MonoCov.cs
示例9: GladeWindow
public GladeWindow(string name)
{
glade = new Glade.XML (glade_resource, name);
glade.Autoconnect (this);
window = glade[name] as Window;
}
开发者ID:manicolosi,项目名称:questar,代码行数:7,代码来源:GladeWindow.cs
示例10: Main
public static void Main (string[] args)
{
if (args.Length < 2) {
Console.WriteLine ("Use: ./glade-viewer.exe \"fname\" \"root\"");
return;
}
Application.Init ();
string fname = args [0];
string root = args [1];
Glade.XML gxml = new Glade.XML (fname, root, null);
Widget wid = gxml [root];
wid.Show ();
Console.WriteLine ("The filename: {0}", gxml.Filename);
Console.WriteLine ("A relative filename: {0}", gxml.RelativeFile ("image.png"));
Console.WriteLine ("The name of the root widget: {0}", Glade.XML.GetWidgetName (wid));
Console.WriteLine ("It is {0} that it was created using a Glade.XML object",
Glade.XML.GetWidgetTree (wid) != null);
Console.WriteLine ("\nList of created widgets:");
foreach (Widget w in gxml.GetWidgetPrefix ("")) {
Console.WriteLine ("{0} {1}",
w.GetType (),
Glade.XML.GetWidgetName (w));
}
Application.Run ();
}
开发者ID:ystk,项目名称:debian-gtk-sharp2,代码行数:32,代码来源:GladeViewer.cs
示例11: Tree
public Tree(string[] args)
{
Application.Init ();
store = new TreeStore (typeof (string), typeof (string));
Glade.XML gxml = new Glade.XML(null, "tree.glade", "window", null );
gxml.Autoconnect( this );
window.Resize(500, 400 );
// eventos
window.DeleteEvent += new DeleteEventHandler( Salir );
b_agregar.Clicked += new EventHandler( Agregar );
b_eliminar.Clicked += new EventHandler( Borrar );
b_limpiar.Clicked += new EventHandler( Limpiar );
b_salir.Clicked += new EventHandler( Cerrar );
// crear arbol
tv = new TreeView ();
tv.Model = store;
tv.HeadersVisible = true;
tv.AppendColumn ("Nombre", new CellRendererText (), "text", 0);
tv.AppendColumn ("Apellidos", new CellRendererText (), "text", 1);
scrolledwindow1.Add (tv);
window.ShowAll ();
Application.Run ();
}
开发者ID:BackupTheBerlios,项目名称:boxerp-svn,代码行数:30,代码来源:tree.cs
示例12: GUIAbout
public GUIAbout()
{
Glade.XML gxml = new Glade.XML("../../src/GUI/Glade/ekranabout.glade", "AboutWindow", null);
gxml.Autoconnect(this);
setEvents();
}
开发者ID:shark555,项目名称:Resources-Reservation-System,代码行数:7,代码来源:GUIAbout.cs
示例13: ResizeDialog
public ResizeDialog(Sector sector, Tilemap tilemap)
{
this.sector = sector;
this.tilemap = tilemap;
Glade.XML gxml = new Glade.XML("editor.glade", "resizeDialog");
gxml.Autoconnect(this);
if (resizeDialog == null ||
XOffsetEntry == null ||
YOffsetEntry == null ||
WidthEntry == null ||
HeightEntry == null)
{
throw new Exception("Couldn't load resize Dialog");
}
if (tilemap == null) {
XOffsetEntry.Text = "0";
YOffsetEntry.Text = "0";
WidthEntry.Text = sector.Width.ToString();
HeightEntry.Text = sector.Height.ToString();
undoTitleBase = "Sector \"" + sector.Name + "\"";
} else {
XOffsetEntry.Text = "0";
YOffsetEntry.Text = "0";
WidthEntry.Text = tilemap.Width.ToString();
HeightEntry.Text = tilemap.Height.ToString();
undoTitleBase = "Tilemap \"" + tilemap.Name + "\"";
}
resizeDialog.Title += " " + undoTitleBase;
resizeDialog.Icon = EditorStock.WindowIcon;
resizeDialog.ShowAll();
}
开发者ID:Karkus476,项目名称:supertux-editor,代码行数:33,代码来源:ResizeDialog.cs
示例14: ViewGui
public ViewGui()
: base("")
{
string fullName = "MainView.gui.glade";
Assembly a = Assembly.GetAssembly(this.GetType());
Console.WriteLine(a.CodeBase);
if (!System.IO.File.Exists(a.CodeBase + "/" + fullName))
fullName = "gui.glade";
glade = new XML (Assembly.GetCallingAssembly (), fullName, "ViewGui", null);
glade.Autoconnect (this);
Window win = (Window) glade ["ViewGui"];
win.Maximize();
//Initialisation du menu principal
MainUIManager uim = new MainUIManager (this);
vboxMain.PackStart (uim.MenuBar, false, false, 0);
((Gtk.Box.BoxChild)(vboxMain[uim.MenuBar])).Position = 0;
//Pagecontrol des vues
notebookViews = new Notebook ();
hpanedMain.Pack2 (notebookViews, true, false);
notebookViews.Show ();
//notebookViews.RemovePage(0);
}
开发者ID:BackupTheBerlios,项目名称:sofia-svn,代码行数:29,代码来源:GtkGui.cs
示例15: EntryEditor
public EntryEditor()
{
Glade.XML gxml = new Glade.XML (Util.GladePath("slogger.glade"),
"NewEntryDialog", null);
gxml.Autoconnect (this);
OKButton.Sensitive = false;
}
开发者ID:RoDaniel,项目名称:featurehouse,代码行数:7,代码来源:EntryEditor.cs
示例16: GUI
public GUI(string[] args)
{
Application.Init();
Glade.XML mainWindowGlade = new Glade.XML(null, "gui.glade",
"mainWindow", null);
mainWindowGlade.Autoconnect(this);
Glade.XML aboutDialogGlade = new Glade.XML(null, "gui.glade",
"aboutDialog", null);
aboutDialogGlade.Autoconnect(this);
Glade.XML fileSaveDialogGlade = new Glade.XML(null, "gui.glade",
"fileSaveDialog", null);
fileSaveDialogGlade.Autoconnect(this);
Glade.XML fileOpenDialogGlade = new Glade.XML(null, "gui.glade",
"fileOpenDialog", null);
fileOpenDialogGlade.Autoconnect(this);
this.fileOpenDialog.SelectMultiple = true;
this.SetupSlicesTreeView();
Application.Run();
}
开发者ID:fthomas,项目名称:drohne,代码行数:25,代码来源:gui.cs
示例17: MainWindow
public MainWindow(string[] Args)
{
gxml = new Glade.XML(null, "gui.glade", "MainWindow", null);
gxml.Autoconnect(this);
events = new Queue<Event>();
deltas = new Queue<Delta>();
curr = new BugDisplay(frmCurrent);
//curr.render(false,"hello world");
dupl = new BugDisplay(frmDupl);
((Window)gxml.GetWidget("MainWindow")).Maximize();
((Window)gxml.GetWidget("MainWindow")).ShowAll();
hrfBrowser.Clicked += OnNoClicked;
//GlobalProxySelection.Select = new WebProxy("http://taz:8118");
bugz = new Bugzilla("http://bugzilla.gnome.org/");
BugDB.bugz = bugz;
if (Args.Length !=0)
product = Args[0];
todo = new Queue<Bug>();
ready();
hasprocess = true;
GLib.Idle.Add(new GLib.IdleHandler(processTask));
notify = new ThreadNotify (new ReadyEvent (ready));
}
开发者ID:palfrey,项目名称:pyro,代码行数:28,代码来源:MainWindow.cs
示例18: GladeWidgetExtract
protected GladeWidgetExtract(string resource_name, string dialog_name)
: this(dialog_name)
{
// we must do it from *here* otherwise, we get this assembly, not the caller
glade = new XML (Assembly.GetCallingAssembly (), resource_name, dialog_name, null);
Init ();
}
开发者ID:slluis,项目名称:monodevelop-prehistoric,代码行数:7,代码来源:GladeWidgetExtract.cs
示例19: BrunetChatIM
/** ChatIM constructor.
* @param core the main application
* @param r_add the recipient address
*/
public BrunetChatIM(User u, Buddy bud, BrunetChatMain bcm)
{
_user = u;
_recipient_buddy = bud;
_bcm = bcm;
string fname = "BrunetChat.glade";
string root = "windowBrunetChatIM";
Glade.XML gxml = new Glade.XML (fname, root, null);
//Glade.XML gxml = new Glade.XML (null,fname, root, null);
gxml.Autoconnect(this);
_text_buf_display = textviewDisplay.Buffer;
_text_buf_input = textviewInput.Buffer;
_text_buf_recipient = textviewRecipient.Buffer;
_text_buf_recipient.Text = _recipient_buddy.Alias;
Gdk.Color red_color = new Gdk.Color (0xff, 0, 0);
Gdk.Color blue_color = new Gdk.Color (0, 0, 0xff);
TextTag sendercolor = new TextTag("Sender Color");
sendercolor.ForegroundGdk = blue_color;
TextTag recipientcolor = new TextTag("Recipient Color");
recipientcolor.ForegroundGdk = red_color;
_text_buf_display.TagTable.Add(sendercolor);
_text_buf_display.TagTable.Add(recipientcolor);
}
开发者ID:xujyan,项目名称:brunet,代码行数:33,代码来源:BrunetChatIM.cs
示例20: Show
public void Show( string[] userlist )
{
Console.WriteLine("showusersdialog.Show()");
if (showusersdialog != null)
{
showusersdialog.Destroy();
}
Glade.XML app = new Glade.XML( EnvironmentHelper.GetExeDirectory() + "/metaverse.client.glade", "showusersdialog", "" );
app.Autoconnect( this );
btnclose.Clicked += new EventHandler( btnclose_Clicked );
ListStore liststore = new ListStore( typeof( string ) );
userstreeview.Model = liststore;
userstreeview.AppendColumn( "User name:", new CellRendererText(), "text", 0 );
userstreeview.ShowAll();
foreach (string username in userlist)
{
liststore.AppendValues( username );
}
}
开发者ID:hughperkins,项目名称:osmp-cs,代码行数:26,代码来源:ShowUsersDialog.cs
注:本文中的Glade.XML类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论