Exemplo n.º 1
0
        public Screenie(Settings settings)
        {
            _settings = settings;
            InitWindowsHookLib();

            printAreaKeys.AddKey(Keys.A);
        }
Exemplo n.º 2
0
 public static void SaveSettings(Settings settings)
 {
     using (FileStream fileStream  = File.Open(@"Settings.xml", FileMode.Create)) {
         DataContractSerializer dataContractSerializer = new DataContractSerializer(typeof(Settings));
         dataContractSerializer.WriteObject(fileStream, settings);
     }
 }
Exemplo n.º 3
0
 private static Settings DefaultSettings()
 {
     Settings settings = new Settings();
     settings.SavePath = "./";
     settings.FileFormat = new ImageFormat(System.Drawing.Imaging.ImageFormat.Jpeg);
     settings.FtpEnabled = true;
     settings.FtpAddress = @"ftp://ftp.google.se/";
     settings.Username = "******";
     settings.Password = "******";
     return settings;
 }
Exemplo n.º 4
0
 private void ScreenieForm_Load(object sender, EventArgs e)
 {
     //abc.Visible = true;
     // if xml file exists load it
     try
     {
         _settings = Settings.LoadSettings();
         SetGuiSettings();
     }
     catch (Exception er)
     {
         Console.WriteLine(er.Message);
         Console.WriteLine(er.InnerException.Message);
         Console.WriteLine(er.InnerException.InnerException.Message);
     }
     Screenie settings = new Screenie(_settings);
 }