Esempio n. 1
0
        protected void Build()
        {
            // Widget OpenGraal.GraalIM.PMWindow
            this.CanFocus       = true;
            this.Name           = "OpenGraal.GraalIM.RCFileBrowser";
            this.Title          = global::Mono.Unix.Catalog.GetString("File Browser");
            this.Icon           = global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rcicon.ico");
            this.WindowPosition = ((global::Gtk.WindowPosition)(1));
            // Container child OpenGraal.GraalIM.PMWindow.Gtk.Container+ContainerChild
            this.table1               = new global::Gtk.Table(((uint)(2)), ((uint)(2)), false);
            this.table1.Name          = "table1";
            this.table1.WidthRequest  = 600;
            this.table1.HeightRequest = 434;
            Gtk.Frame frame = new Gtk.Frame();
            frame.Label = " Files ";
            //this.table1.Add(frame);
            this.table1.Attach(frame, 0, 1, 0, 1, Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand, Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand, 5, 4);
            Gtk.HBox      hbox   = new Gtk.HBox(true, 5);
            Gtk.Alignment halign = new Gtk.Alignment(1, 0, 0, 0);
            hbox.Add(new Gtk.Button("_Close"));
            halign.Add(hbox);
            this.table1.Attach(halign, 0, 1, 1, 2, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 5, 5);
            // Container child table1.Gtk.Table+TableChild
            this.GtkScrolledWindow            = new global::Gtk.ScrolledWindow();
            this.GtkScrolledWindow.Name       = "GtkScrolledWindow";
            this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
            // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
            this.FileBrowserMessage            = new global::Gtk.TextView();
            this.FileBrowserMessage.Name       = "FileBrowserMessage";
            this.FileBrowserMessage.Editable   = false;
            this.FileBrowserMessage.AcceptsTab = false;
            this.FileBrowserMessage.WrapMode   = ((global::Gtk.WrapMode)(3));
            this.GtkScrolledWindow.Add(this.FileBrowserMessage);
            //frame.Add(this.GtkScrolledWindow);
            Gtk.Label currentFolder = new Gtk.Label("Current folder: ");
            //Gtk.HBox currentFolderHorizontalBox = new Gtk.HBox();
            Gtk.Alignment currentFolderAlignment = new Gtk.Alignment(0, 0, 0, 0);
            currentFolderAlignment.Add(currentFolder);
            Gtk.Table table2 = new global::Gtk.Table(((uint)(4)), ((uint)(2)), false);
            table2.Name = "table2";
            frame.Add(table2);
            Gtk.Label spacer = new Gtk.Label();
            spacer.SetSizeRequest(10, 1);

            #region Folder List

            tree.HeadersVisible = false;

            Gtk.TreeViewColumn artistColumn = new Gtk.TreeViewColumn();
            //artistColumn.Title = "Artist";
            artistColumn.Resizable = false;
            //artistColumn.Clickable = false;
            //artistColumn.Visible = false;

            Gtk.CellRendererText artistNameCell = new Gtk.CellRendererText();
            artistNameCell.Visible = true;
            artistColumn.PackStart(artistNameCell, true);

            tree.AppendColumn("Icon", new Gtk.CellRendererPixbuf(), "pixbuf", 0);
            tree.AppendColumn(artistColumn);


            artistColumn.AddAttribute(artistNameCell, "text", 1);

            //this.musicListStore = new Gtk.TreeStore(typeof(Gdk.Pixbuf), typeof(string));
            //this.musicListStore.AppendValues("", "Loading...");
            Gtk.TreeIter iter;
            //iter = musicListStore.AppendValues(global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rc_images.rcfiles_folderclosed.png"), "levels/");

            //musicListStore.AppendValues(iter, global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rc_images.rcfiles_folderclosed.png"), "staff/");
            //musicListStore.RowChanged += RowChanged;
            tree.RowExpanded   += RowExpanded;
            tree.RowCollapsed  += RowCollapsed;
            tree.CursorChanged += new System.EventHandler(RowSelected);
            tree.SearchColumn   = 1;
            tree.EnableSearch   = true;
            //tree.

            tree.Model = musicListStore;

            #endregion

            table2.Attach(tree, 0, 1, 2, 3, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 4, 0);
            table2.Attach(spacer, 0, 2, 0, 1, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
            table2.Attach(currentFolderAlignment, 0, 2, 1, 2, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 4, 0);
            table2.Attach(this.GtkScrolledWindow, 0, 2, 3, 4, Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand, Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand, 4, 4);

            this.Add(this.table1);
            if ((this.Child != null))
            {
                this.Child.ShowAll();
            }
            this.DefaultWidth  = 616;
            this.DefaultHeight = 472;
            this.DefaultSize   = new Gdk.Size(616, 472);

            this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.RemoveRCFileBrowserWindow);
            this.HideOnDelete();

            //this.SendToallMessageButton.Clicked += new global::System.EventHandler(this.SendToallMessageButtonClicked);
        }
		protected void Build()
		{
			// Widget OpenGraal.GraalIM.PMWindow
			this.CanFocus = true;
			this.Name = "OpenGraal.GraalIM.RCFileBrowser";
			this.Title = global::Mono.Unix.Catalog.GetString("File Browser");
			this.Icon = global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rcicon.ico");
			this.WindowPosition = ((global::Gtk.WindowPosition)(1));
			// Container child OpenGraal.GraalIM.PMWindow.Gtk.Container+ContainerChild
			this.table1 = new global::Gtk.Table(((uint)(2)), ((uint)(2)), false);
			this.table1.Name = "table1";
			this.table1.WidthRequest = 600;
			this.table1.HeightRequest = 434;
			Gtk.Frame frame = new Gtk.Frame();
			frame.Label = " Files ";
			//this.table1.Add(frame);
			this.table1.Attach(frame, 0, 1, 0, 1, Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand, Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand, 5, 4);
			Gtk.HBox hbox = new Gtk.HBox(true, 5);
			Gtk.Alignment halign = new Gtk.Alignment(1, 0, 0, 0);
			hbox.Add(new Gtk.Button("_Close"));
			halign.Add(hbox);
			this.table1.Attach(halign, 0, 1, 1, 2, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 5, 5);
			// Container child table1.Gtk.Table+TableChild
			this.GtkScrolledWindow = new global::Gtk.ScrolledWindow();
			this.GtkScrolledWindow.Name = "GtkScrolledWindow";
			this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
			// Container child GtkScrolledWindow.Gtk.Container+ContainerChild
			this.FileBrowserMessage = new global::Gtk.TextView();
			this.FileBrowserMessage.Name = "FileBrowserMessage";
			this.FileBrowserMessage.Editable = false;
			this.FileBrowserMessage.AcceptsTab = false;
			this.FileBrowserMessage.WrapMode = ((global::Gtk.WrapMode)(3));
			this.GtkScrolledWindow.Add(this.FileBrowserMessage);
			//frame.Add(this.GtkScrolledWindow);
			Gtk.Label currentFolder = new Gtk.Label("Current folder: ");
			//Gtk.HBox currentFolderHorizontalBox = new Gtk.HBox();
			Gtk.Alignment currentFolderAlignment = new Gtk.Alignment(0, 0, 0, 0);
			currentFolderAlignment.Add(currentFolder);
			Gtk.Table table2 = new global::Gtk.Table(((uint)(4)), ((uint)(2)), false);
			table2.Name = "table2";
			frame.Add(table2);
			Gtk.Label spacer = new Gtk.Label();
			spacer.SetSizeRequest(10, 1);

			#region Folder List
			
			tree.HeadersVisible = false;

			Gtk.TreeViewColumn artistColumn = new Gtk.TreeViewColumn();
			//artistColumn.Title = "Artist";
			artistColumn.Resizable = false;
			//artistColumn.Clickable = false;
			//artistColumn.Visible = false;

			Gtk.CellRendererText artistNameCell = new Gtk.CellRendererText();
			artistNameCell.Visible = true;
			artistColumn.PackStart(artistNameCell, true);

			tree.AppendColumn("Icon", new Gtk.CellRendererPixbuf(), "pixbuf", 0);
			tree.AppendColumn(artistColumn);
			

			artistColumn.AddAttribute(artistNameCell, "text", 1);

			//this.musicListStore = new Gtk.TreeStore(typeof(Gdk.Pixbuf), typeof(string));
			//this.musicListStore.AppendValues("", "Loading...");
			Gtk.TreeIter iter;
			//iter = musicListStore.AppendValues(global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rc_images.rcfiles_folderclosed.png"), "levels/");
			
			//musicListStore.AppendValues(iter, global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rc_images.rcfiles_folderclosed.png"), "staff/");
			//musicListStore.RowChanged += RowChanged;
			tree.RowExpanded += RowExpanded;
			tree.RowCollapsed += RowCollapsed;
			tree.CursorChanged += new System.EventHandler(RowSelected); 
			tree.SearchColumn = 1;
			tree.EnableSearch = true;
			//tree.

			tree.Model = musicListStore;

			#endregion

			table2.Attach(tree, 0, 1, 2, 3, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 4, 0);
			table2.Attach(spacer, 0, 2, 0, 1, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
			table2.Attach(currentFolderAlignment, 0, 2, 1, 2, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 4, 0);
			table2.Attach(this.GtkScrolledWindow, 0, 2, 3, 4, Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand, Gtk.AttachOptions.Fill | Gtk.AttachOptions.Expand, 4, 4);

			this.Add(this.table1);
			if ((this.Child != null))
			{
				this.Child.ShowAll();
			}
			this.DefaultWidth = 616;
			this.DefaultHeight = 472;
			this.DefaultSize = new Gdk.Size(616,472);

			this.DeleteEvent += new global::Gtk.DeleteEventHandler(this.RemoveRCFileBrowserWindow);
			this.HideOnDelete();
			
			//this.SendToallMessageButton.Clicked += new global::System.EventHandler(this.SendToallMessageButtonClicked);
		}