Beispiel #1
0
        private void frmMain_Load(object sender, EventArgs e)
        {
            #region Database Settings
            ApplicationHelper.DatabaseHelper.HelpMeConnectionString = string.Empty;
            HelpMeDatabaseConfiguration.Configurations.DatabaseSecurity dbSecurity = null;

            string FilePath = Application.StartupPath + System.IO.Path.DirectorySeparatorChar + "DBConfig.HelpMe";
            if (File.Exists(FilePath))
            {
                dbSecurity = new HelpMeDatabaseConfiguration.Configurations.DatabaseSecurity();
                ApplicationHelper.DatabaseHelper.HelpMeConnectionString = dbSecurity.DecryptFiletoString();
                ApplicationHelper.DatabaseHelper.HelpMeDatabaseProvider = dbSecurity.ProviderName;

                BeanHelper.DBHelper.ConnectionString = ApplicationHelper.DatabaseHelper.HelpMeConnectionString;
                BeanHelper.DBHelper.ProviderName     = ApplicationHelper.DatabaseHelper.HelpMeDatabaseProvider;
            }
            #endregion

            Android_ApplicationId = "AAAA1P9IXqo:APA91bESNkpeKW4y6PB0bbsUXOibHOPGyGEfEDZTblvu0LdkcDokcM-MZaPX5DtnTOGU8ogVh-dgkNYpjKA2jDhDy04U9rLHajBvJDL7oWoPqAIAz5_s4fTJoakxnSmtlXgx2_GXOzfB";
            Android_SenderId      = "914815999658";

            IOS_Port            = 2195;
            IOS_Hostname        = "gateway.push.apple.com";
            IOS_CertificatePath = Application.StartupPath + "\\IOSCertificate\\iphone_pro.p12";
            IOS_Password        = "******";

            //string TokenId = "fwBflGr6fBc:APA91bFNfRqq1MqCYjM3BNViRkPwLleqjjWjp9Cn3BQcBRhfEfzMcylPvWOWnKE83NM0cmPm9Ma8D9VrOBPTf6uwn988euyGYLm_Jr297WE7n-3XdrcR_-l50hCFXPIaMzpadVZG9Gy4";
            //SendAndroidNotification(TokenId, "HelpMe", "Hello HelpMe ! Message");
            //SendAndroidNotification(TokenId, "HelpMe", "Hello HelpMe ! Message");
            Scheduled_Execution();
        }
        void frmSettings_Load(object sender, System.EventArgs e)
        {
            #region Database Settings
            string FilePath = Application.StartupPath + System.IO.Path.DirectorySeparatorChar + "DBConfig.HelpMe";

            HelpMeDatabaseConfiguration.Configurations.DatabaseSecurity dbSecurity = null;
            if (File.Exists(FilePath))
            {
                dbSecurity = new HelpMeDatabaseConfiguration.Configurations.DatabaseSecurity();
                dbSecurity.DecryptFiletoString();

                txtServer.Text         = dbSecurity.ServerName;
                ddlAuthentication.Text = dbSecurity.Authentication + " " + "Authentication";
                txtUserId.Text         = dbSecurity.UserName;
                txtPassword.Text       = dbSecurity.Password;
                ddlDatabase_Enter(null, null);
                ddlDatabase.Text = dbSecurity.DatabaseName;
            }
            #endregion
        }