public WebDeployOptionsPanelWidget(AspNetAppProject project)
        {
            localCollection = project.WebDeployTargets.Clone();

            //fill model and set it up
            this.Build();
            foreach (WebDeployTarget target in localCollection)
            {
                targetList.AppendValues(target.GetMarkup(), target);
            }
            targetView.HeadersVisible = false;
            targetList.SetSortFunc(LISTCOL_TEXT, delegate(TreeModel m, TreeIter a, TreeIter b)
            {
                return(string.Compare((string)m.GetValue(a, LISTCOL_TEXT), (string)m.GetValue(b, LISTCOL_TEXT)));
            });
            targetList.SetSortColumnId(LISTCOL_TEXT, SortType.Ascending);

            //set up the view
            targetView.Model = targetList;
            targetView.AppendColumn("", new Gtk.CellRendererText(), "markup", LISTCOL_TEXT);
            targetView.Selection.Changed += delegate(object sender, EventArgs e)
            {
                UpdateButtonState();
            };

            UpdateButtonState();
        }
Esempio n. 2
0
        internal WebDeployTargetCollection Clone()
        {
            WebDeployTargetCollection clone = new WebDeployTargetCollection();

            foreach (WebDeployTarget target in this)
            {
                clone.Add((WebDeployTarget)target.Clone());
            }
            return(clone);
        }
		public WebDeployOptionsPanelWidget (AspNetAppProject project)
		{
			localCollection = project.WebDeployTargets.Clone ();
			
			//fill model and set it up
			this.Build ();
			foreach (WebDeployTarget target in localCollection) {
				targetList.AppendValues (target.GetMarkup (), target);
			}
			targetView.HeadersVisible = false;
			targetList.SetSortFunc (LISTCOL_TEXT, delegate (TreeModel m, TreeIter a, TreeIter b) {
				return string.Compare ((string) m.GetValue (a, LISTCOL_TEXT), (string) m.GetValue (b, LISTCOL_TEXT));
			});
			targetList.SetSortColumnId (LISTCOL_TEXT, SortType.Ascending);
			
			//set up the view
			targetView.Model = targetList;
			targetView.AppendColumn ("", new Gtk.CellRendererText (), "markup", LISTCOL_TEXT);			
			targetView.Selection.Changed += delegate (object sender, EventArgs e) {
				UpdateButtonState ();
			};
			
			UpdateButtonState ();
		}
		internal WebDeployTargetCollection Clone ()
		{
			WebDeployTargetCollection clone = new WebDeployTargetCollection ();
			foreach (WebDeployTarget target in this)
				clone.Add ((WebDeployTarget) target.Clone ());
			return clone;
		}