Exemplo n.º 1
0
 protected void Set(
     string fieldName,
     InstanceSetting setting)
 {
     if (fieldName == null)
     {
         throw new ArgumentNullException();
     }
     if (setting == null)
     {
         throw new ArgumentNullException();
     }
     this._instances[fieldName] = setting;
 }
Exemplo n.º 2
0
        public void Load()
        {
            try
            {
                XmlSerializer serializer = new XmlSerializer( typeof( InstanceSetting ) );
                TextReader textReader = new StreamReader( Directory.GetCurrentDirectory() + @"\..\Data\" + this.GetType() + "InstanceSetting.xml" );
                instanceSetting = ( InstanceSetting )serializer.Deserialize( textReader );
                textReader.Close();

                this.StartPosition = FormStartPosition.Manual;
                this.DesktopBounds = instanceSetting.DesktopBounds;

                this.WindowState = instanceSetting.WindowState;
                this.Visible = instanceSetting.Visible;
            }
            catch( Exception ex )
            {
                MessageBox.Show( this, ex.ToString() );
            }
        }
Exemplo n.º 3
0
 protected void Set(
     string fieldName,
     InstanceSetting setting)
 {
     if (fieldName == null) throw new ArgumentNullException();
     if (setting == null) throw new ArgumentNullException();
     this._instances[fieldName] = setting;
 }