Ejemplo n.º 1
0
 public void ReadSettings()
 {
     if (File.Exists(this.filePath))
     {
         Serialization.Serialization <Class.Save> s = new Serialization.Serialization <Class.Save>();
         this.info = s.Read(this.filePath, Serialization.Serialization <Class.Save> .Typ.Normal);
         try
         {
             if (this.info.Background != string.Empty)
             {
                 this.currentRenderer.BackgroundImage = Image.FromFile(this.info.Background);
             }
             else
             {
                 this.currentRenderer.BackgroundImage = Image.FromFile(System.IO.Path.Combine(Application.StartupPath, "Images", "Image.jpg"));
             }
             this.currentRenderer.OnDraw();
         }
         catch
         { }
     }
     else
     {
         this.info = new Class.Save();
     }
     Class.Structure.test = this.info;
 }
Ejemplo n.º 2
0
        private void frmSettings_Load(object sender, EventArgs e)
        {
            if (File.Exists(this.filePath))
            {
                Serialization.Serialization <Class.Save> s = new Serialization.Serialization <Class.Save>();
                this.saveInstance = s.Read(this.filePath, Serialization.Serialization <Class.Save> .Typ.Normal) as Class.Save;
                if (string.IsNullOrWhiteSpace(saveInstance.Background))
                {
                    txtBackground.Text = "Standard";
                }
                else
                {
                    txtBackground.Text = saveInstance.Background;
                }

                this.refresh(false);
            }
            else
            {
                txtBackground.Text = "Standard";
            }
            if (saveInstance == null)
            {
                saveInstance = new Class.Save();
            }
        }
Ejemplo n.º 3
0
        private void frmSettings_Load(object sender, EventArgs e)
        {
            if (File.Exists(this.filePath))
            {
                Serialization.Serialization<Class.Save> s = new Serialization.Serialization<Class.Save>();
                this.saveInstance = s.Read(this.filePath, Serialization.Serialization<Class.Save>.Typ.Normal) as Class.Save;
                if (string.IsNullOrWhiteSpace(saveInstance.Background))
                    txtBackground.Text = "Standard";
                else
                    txtBackground.Text = saveInstance.Background;

                this.refresh(false);
            }
            else
                txtBackground.Text = "Standard";
            if (saveInstance == null)
                saveInstance = new Class.Save();
        }
Ejemplo n.º 4
0
 public void ReadSettings()
 {
     if (File.Exists(this.filePath))
     {
         Serialization.Serialization<Class.Save> s = new Serialization.Serialization<Class.Save>();
         this.info = s.Read(this.filePath, Serialization.Serialization<Class.Save>.Typ.Normal);
         try
         {
             if (this.info.Background != string.Empty)
                 this.currentRenderer.BackgroundImage = Image.FromFile(this.info.Background);
             else
                 this.currentRenderer.BackgroundImage = Image.FromFile(System.IO.Path.Combine(Application.StartupPath, "Images", "Image.jpg"));
             this.currentRenderer.OnDraw();
         }
         catch
         { }
     }
     else
         this.info = new Class.Save();
     Class.Structure.test = this.info;
 }