Exemplo n.º 1
0
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            UserWelcome ad = new UserWelcome();

            ad.Show();
            this.Hide();
            this.Close();
        }
Exemplo n.º 2
0
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            UserWelcome use = new UserWelcome();

            use.Show();
            Application.Run();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            var c = new Container();

            c.Register <ISomeService, SomeService>();

            var cstring = ConfigurationManager.ConnectionStrings["HangfireDb"];

            BuildDataBase(BuildConnectionString(cstring.ConnectionString));
            GlobalConfiguration.Configuration
            .UseFilter(new Interceptor())
            .UseSqlServerStorage(cstring.ConnectionString, new Hangfire.SqlServer.SqlServerStorageOptions
            {
                QueuePollInterval = TimeSpan.FromMinutes(1)
            })
            .UseActivator(new SimpleInjectorJobActivator(c))
            .UseLog4NetLogProvider();

            //using (var server = new BackgroundJobServer())
            //{
            //    string jid = null;
            //    Console.WriteLine(jid = BackgroundJob.Enqueue<ISomeService>(s => s.DoSomething(new Hex().GetString(), DateTime.Now)));

            //    //jid = "__$__";
            //    //storage.GetConnection().SetRangeInHash(jid, Enumerate("something".ValuePair("another value")));
            //    //RecurringJob.AddOrUpdate(jid, () => s.DoSomething(new Hex().GetString(), DateTime.Now), Cron.Minutely());

            //    //storage.GetConnection().SetRangeInHash(jid, new KeyValuePair<string, string>[0]);

            //    Console.ReadKey();
            //}

            JsonConvert.DefaultSettings = () => new JsonSerializerSettings {
                TypeNameHandling = TypeNameHandling.Objects
            };
            var mailModel = new UserWelcome
            {
                Link        = "http://abc.xyz",
                From        = "*****@*****.**",
                LogoTextUrl = "stuff here",
                LogoUrl     = "http://ble.com",
                Subject     = "stuff",
                Target      = "*****@*****.**"
            };
            var json = JsonConvert.SerializeObject(mailModel);

            var obj  = JsonConvert.DeserializeObject(json);
            var xobj = JsonConvert.DeserializeObject <MailModel>(json);
        }