本文整理汇总了C#中Glade.XML类的典型用法代码示例。如果您正苦于以下问题:C# XML类的具体用法?C# XML怎么用?C# XML使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XML类属于Glade命名空间,在下文中一共展示了XML类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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!");
}
示例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 ();
}
示例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;
}
}
示例4: LLViewPictureWindow
public LLViewPictureWindow(Life myLife)
{
this.myLife = myLife;
Glade.XML gxml = new Glade.XML (null, "llviewpicturewindow.glade", "ViewPictureWindow", null);
gxml.Autoconnect(this);
}
示例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();
}
示例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();
}
示例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();
}
示例8: MonoCovGui
public MonoCovGui()
{
xml = new Glade.XML (typeof (MonoCovGui).Assembly, "monocov.glade", null, null);
xml.Autoconnect (this);
main.Title = CAPTION;
}
示例9: GladeWindow
public GladeWindow(string name)
{
glade = new Glade.XML (glade_resource, name);
glade.Autoconnect (this);
window = glade[name] as Window;
}
示例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 ();
}
示例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 ();
}
示例12: GUIAbout
public GUIAbout()
{
Glade.XML gxml = new Glade.XML("../../src/GUI/Glade/ekranabout.glade", "AboutWindow", null);
gxml.Autoconnect(this);
setEvents();
}
示例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();
}
示例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);
}
示例15: EntryEditor
public EntryEditor()
{
Glade.XML gxml = new Glade.XML (Util.GladePath("slogger.glade"),
"NewEntryDialog", null);
gxml.Autoconnect (this);
OKButton.Sensitive = false;
}