dotgnu-pnet-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms Binding.cs,NONE


From: Gopal.V <address@hidden>
Subject: [Dotgnu-pnet-commits] CVS: pnetlib/System.Windows.Forms Binding.cs,NONE,1.1 BindingManagerBase.cs,NONE,1.1 BindingsCollection.cs,NONE,1.1 CurrencyManager.cs,NONE,1.1 ListControl.cs,NONE,1.1Screen.cs,1.1,1.2
Date: Wed, 02 Jul 2003 15:55:17 -0400

Update of /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms
In directory subversions:/tmp/cvs-serv22287/System.Windows.Forms

Modified Files:
        Screen.cs 
Added Files:
        Binding.cs BindingManagerBase.cs BindingsCollection.cs 
        CurrencyManager.cs ListControl.cs 
Log Message:
Patch #1685 and some minor fixes


--- NEW FILE ---
/*
 * Binding.cs - Implementation of the
 *                      "System.Windows.Forms.Binding" class.
 *
 * Copyright (C) 2003 Free Software Foundation
 *
 * Contributions from Cecilio Pardo <address@hidden>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;

namespace System.Windows.Forms
{

[TODO]
public class Binding
{
        private BindingMemberInfo bindingMemberInfo;
        
        
        [TODO]
        public Binding( String propertyName, Object dataSource, String 
dataMember ) 
        {
                bindingMemberInfo = new BindingMemberInfo( dataMember );
        }

        [TODO]
        public BindingManagerBase BindingManagerBase
        {
                get
                {
                        return null;
                }
        }

        [TODO]
        public BindingMemberInfo BindingMemberInfo
        {
                get
                {
                        return bindingMemberInfo;
                }
        }

        [TODO]
        public Control Control
        {
                get 
                {
                        return null;
                }
        }

        [TODO]
        public Object DataSource
        {
                get
                {
                        return null;
                }
        }

        [TODO]
        public bool IsBinding
        {
                get
                {
                        return false;
                }
        }

        [TODO]
        public string PropertyName
        {
                get 
                {
                        return null;
                }
        }

        [TODO]
        public event ConvertEventHandler Format;

        [TODO]
        public event ConvertEventHandler Parse;


        [TODO]
        protected virtual void OnFormat( ConvertEventArgs cev )
        {
        }

        [TODO]
        protected virtual void OnParse( ConvertEventArgs cev )
        {
        }
        
}; // class Binding
        
}; // namespace System.Windows.Forms

--- NEW FILE ---
/*
 * BindingManagerBase.cs - Implementation of the
 *                      "System.Windows.Forms.BindingManagerBase" class.
 *
 * Copyright (C) 2003 Free Software Foundation
 *
 * Contributions from Cecilio Pardo <address@hidden>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
using System.ComponentModel;
using System.Collections;

namespace System.Windows.Forms
{

[TODO]
public abstract class BindingManagerBase
{
        [TODO]
        public BindingManagerBase()
        {
        }

        [TODO]
        public BindingsCollection Bindings
        {
                get
                {
                        return null;
                }
                
        }

        public abstract int Count 
        {
                get;
        }

        public abstract Object Current
        {
                get;
        }

        public abstract int Position 
        {
                get;
                set;
        }

        public abstract void AddNew();
        public abstract void CancelCurrentEdit();
        public abstract void EndCurrentEdit();
        public abstract PropertyDescriptorCollection GetItemProperties();

        [TODO]
        protected internal virtual 
        PropertyDescriptorCollection GetItemProperties( ArrayList dataSources, 
                                                                                
                        ArrayList listAccessors )
        {
                return null;
        }

        [TODO]
        protected virtual PropertyDescriptorCollection GetItemProperties( 
                                                                                
                        Type listType, 
                                                                                
                         int offset, 
                                                                                
                         ArrayList dataSources, 
                                                                                
                        ArrayList listAccessors )
        {
                return null;
        }
        
        public abstract void RemoveAt( int index );
        
        public abstract void ResumeBinding();
        
        public abstract void SuspendBinding();


        public event EventHandler CurrentChanged;
        
        protected EventHandler onCurrentChangedHandler;
        
        public event EventHandler PositionChanged;
        protected EventHandler onPositionChangedHandler;


        protected internal abstract string GetListName( ArrayList listAccessors 
);
        protected internal abstract void OnCurrentChanged( EventArgs ev );

        [TODO]
        protected void PullData()
        {
        }
        
        [TODO]
        protected void PushData()
        {
        }

        protected abstract void UpdateIsBinding();
        
}; // class BindingManagerBase
        
}; // namespace System.Windows.Forms

--- NEW FILE ---
/*
 * BindingsCollection.cs - Implementation of the
 *                      "System.Windows.Forms.BindingsCollection" class.
 *
 * Copyright (C) 2003 Free Software Foundation
 *
 * Contributions from Cecilio Pardo <address@hidden>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
using System.ComponentModel;
using System.Collections;

namespace System.Windows.Forms
{

[TODO]
public class BindingsCollection : BaseCollection
{

        [TODO]
        public override int Count
        {
                get 
                {
                        return base.Count;
                }
                
        }

        [TODO]
        public Binding this[ int index ]
        {
                get
                {
                        return null;
                }
        }

        public event CollectionChangeEventHandler CollectionChanged;

        [TODO]
        protected override ArrayList List
        {
                get 
                {
                        return null;
                }
        }

        [TODO]
        protected internal void Add( Binding b )
        {
        }

        [TODO]
        protected internal void Clear()
        {
        }

        [TODO]
        protected virtual void OnCollectionChanged( CollectionChangeEventArgs 
ev )
        {
        }

        [TODO]
        protected internal void Remove( Binding b )
        {
        }

        [TODO]
        protected internal void RemoveAt( int index )
        {
        }

        [TODO]
        protected internal bool ShouldSerializeMyAll()
        {
                return false;
        }
        
}; // class BindingsCollection
        
}; // namespace System.Windows.Forms

--- NEW FILE ---
/*
 * CurrencyManager.cs - Implementation of the
 *                      "System.Windows.Forms.CurrencyManager" class.
 *
 * Copyright (C) 2003 Free Software Foundation
 *
 * Contributions from Cecilio Pardo <address@hidden>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
using System.ComponentModel;
using System.Collections;


namespace System.Windows.Forms
{

[TODO]
public class CurrencyManager: BindingManagerBase
{

        [TODO]
        public override int Count
        {
                get
                {
                        return 0;
                }
        }

        [TODO]
        public override Object Current
        {
                get
                {
                        return null;
                }
        }

        [TODO]
        public IList List
        {
                get 
                {
                        return null;
                }
        }

        [TODO]
        public override int Position
        {
                get 
                {
                        return 0;
                }
                
                set
                {
                                
                }
        }

        [TODO]
        public override void AddNew()
        {
        }

        [TODO]
        public override void CancelCurrentEdit()
        {
        }

        [TODO]
        public override void EndCurrentEdit()
        {
        }
        
        [TODO]  
        public override PropertyDescriptorCollection GetItemProperties()
        {
                return null;
        }
        [TODO]  

        public void Refresh()
        {
        }

        [TODO]  
        public override void RemoveAt( int index )
        {
   
        }

        [TODO]
        public override void ResumeBinding()
        {
        }

        [TODO]
        public override void SuspendBinding()
        {
        }
        
        public event ItemChangedEventHandler ItemChanged;
        public event EventHandler MetaDataChanged;

        [TODO]
        protected void CheckEmpty()
        {
        }
        
        [TODO]
        protected internal override String GetListName( ArrayList listAccessors 
)
        {
                return "";
        }
        
        [TODO]
        protected internal override void OnCurrentChanged( EventArgs ev )
        {
        }
        
        [TODO]  
        protected virtual void OnItemChanged( ItemChangedEventArgs ev )
        {
        }

        [TODO]  
        protected override void UpdateIsBinding()
        {
        }
}; // class CurrencyManager
        
}; // namespace System.Windows.Forms

--- NEW FILE ---
/*
 * ListControl.cs - Implementation of the
 *                      "System.Windows.Forms.ListControl" class.
 *
 * Copyright (C) 2003 Free Software Foundation
 *
 * Contributions from Cecilio Pardo <address@hidden>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

using System;
using System.Reflection;

namespace System.Windows.Forms
{

[TODO]
public abstract class ListControl : Control
{
        Object data_source = null;
        String display_member = "";
        String value_member = "";

        [TODO]
        public Object DataSource
        {
                get
                {
                        return data_source;
                }
                set
                {
                        data_source = value;
                }
        }

        [TODO]
        public String DisplayMember
        {
                get
                {
                        return display_member;
                }
                set
                {
                        display_member = value;
                }
        }

        public abstract int SelectedIndex { get; set; }  

        [TODO]
        public Object SelectedValue
        {
                get
                {
                        return null;
                }
                
                set 
                {
                }
        }

        [TODO]
        public String ValueMember
        {
                get
                {
                        return value_member;
                }
                set
                {
                        value_member = value;
                }
        }

        public String GetItemText( Object i )
        {
                if ( i == null )
                {
                        return null;
                }
                
                if ( display_member == null || display_member == "" )
                {
                        return i.ToString();
                }
                
                PropertyInfo pi;
                try 
                {
                        pi = i.GetType().GetProperty( display_member );
                }
                catch ( AmbiguousMatchException ) 
                {
                        return null;
                }
                
                if ( pi == null )
                {
                        return null;
                }
                
                Object v = pi.GetValue( i, null );
                
                if ( v == null )
                {
                        return null;
                }
                
                return v.ToString();
        }

        public event EventHandler DataSourceChanged;
        public event EventHandler DisplayMemberChanged;
        public event EventHandler SelectedValueChanged;
        public event EventHandler ValueMemberChanged;


        [TODO]
        protected ListControl()
        {
        }
        
        [TODO]
        protected CurrencyManager DataManager
        {
                get
                        {
                                return null;
                        }
        }

        [TODO]
        protected override bool IsInputKey( Keys k )
        {
                return false;
        }

        [TODO]
        protected virtual void OnDataSourceChanged( EventArgs ev )
        {
        }

        [TODO]
        protected virtual void OnDisplayMemberChanged( EventArgs ev )
        {
        }

        [TODO]
        protected virtual void OnSelectedIndexChanged( EventArgs ev )
        {
        }

        [TODO]
        protected virtual void OnSelectedValueChanged( EventArgs ev )
        {
        }

        [TODO]
        protected virtual void OnValueMemberChanged( EventArgs ev )
        {
        }
        
        protected abstract void RefreshItem( int index );
        
}; // class ListControl
        
}; // namespace System.Windows.Forms

Index: Screen.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System.Windows.Forms/Screen.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Screen.cs   13 Jun 2003 12:30:31 -0000      1.1
--- Screen.cs   2 Jul 2003 19:55:15 -0000       1.2
***************
*** 148,151 ****
--- 148,168 ----
                                return FromRectangle(rect).WorkingArea;
                        }
+       
+       public static Rectangle GetBounds(Control ctl)
+                       {
+                               return GetBounds(ctl.Bounds);   
+                       }
+ 
+       [TODO]
+       public static Rectangle GetBounds(Point pt)
+                       {
+                               return new Rectangle(pt.X, pt.Y,0,0);
+                       }
+ 
+       [TODO]
+       public static Rectangle GetBounds(Rectangle rect)
+                       {
+                               return rect;
+                       }
  
        // Convert this object into a string.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]