public static void UnregisterFunction(Type t) { if (t.TryGetAttribute <AutoRegisterAttribute>()) { RegistrationHelper.Unregister(t); } }
private void OnCommandsRequested(SettingsPane sender, SettingsPaneCommandsRequestedEventArgs args) { if (Globals.LogonCore == null) { return; } Frame rootFrame = Window.Current.Content as Frame; if (Globals.LogonCore.State.IsRegistered && Globals.LogonCore.State.HasSecureStore) { args.Request.ApplicationCommands.Add( new SettingsCommand( "delreg", "Delete Registration", (handler) => { if (Globals.LogonCore != null) { if (SharedContext.Context.CanEditItems) { RegistrationHelper.DeleteRegistration(); } else { SharedContext.Context.OperationFinished += this.Context_OperationFinished; } } })); } }
public async void AcceptButton() { this.IsFormEnabled = false; this.NotifyOfPropertyChange(() => this.IsFormEnabled); var helper = new RegistrationHelper(); try { var validationResult = await helper.ExternalRegistration(this); if (validationResult.IsValid) { await this.TryCloseAsync(); Show.SuccesBox(validationResult.Message); } else { Show.ErrorBox(validationResult.Message); this.IsFormEnabled = true; this.NotifyOfPropertyChange(() => this.IsFormEnabled); } } catch (RegistrationException exception) { Show.ErrorBox(exception.Message); this.IsFormEnabled = true; this.NotifyOfPropertyChange(() => this.IsFormEnabled); } }
private void RegisterPlugins(IEnumerable <CrmPlugin> plugins) { foreach (var plugin in plugins) { plugin.Id = RegistrationHelper.RegisterPlugin(plugin); } }
private void UnregisterPlugins(IEnumerable <CrmPlugin> plugins) { foreach (var plugin in plugins) { RegistrationHelper.Unregister(plugin); } }
public void GivenTheSelectedOrderItems(Table table) { conferenceInfo = ScenarioContext.Current.Get <ConferenceInfo>(); registrationController = RegistrationHelper.GetRegistrationController(conferenceInfo.Slug); orderViewModel = RegistrationHelper.GetModel <OrderViewModel>(registrationController.StartRegistration().Result); Assert.NotNull(orderViewModel); registration = new RegisterToConference { ConferenceId = conferenceInfo.Id, OrderId = orderViewModel.OrderId }; foreach (var row in table.Rows) { var orderItemViewModel = orderViewModel.Items.FirstOrDefault(s => s.SeatType.Description == row["seat type"]); Assert.NotNull(orderItemViewModel); int qt; if (!row.ContainsKey("quantity") || !Int32.TryParse(row["quantity"], out qt)) { qt = orderItemViewModel.SeatType.Quantity; } registration.Seats.Add(new SeatQuantity(orderItemViewModel.SeatType.Id, qt)); } // Store for sharing between steps implementations ScenarioContext.Current.Set(registration); ScenarioContext.Current.Set(registrationController.ConferenceAlias); }
int Execute(RegisterCommandOptions options) { if (!options.AcceptTos) { ConsoleErrorOutput("Could not create a registration before you accept the terms of services at https://letsencrypt.org/repository/.\r\nPlease specify --accept-tos option to accept the terms of services."); return(11); } UseDefaultOptionsIfNeed(ref options); Console.Write("Initializing..."); var signer = new RS256Signer(); signer.Init(); var client = ClientHelper.CreateAcmeClient(signer, null); Console.WriteLine("Done."); Console.WriteLine("Requesting new registration for {0}...", options.ContactEmailAddress); var registration = RegistrationHelper.CreateNew(client, options.ContactEmailAddress); RegistrationHelper.SaveToFile(registration, options.OutputPathRegisteration); SignerHelper.SaveToFile(signer, options.OutputPathSigner); Console.WriteLine("Registration created for {0}.", options.ContactEmailAddress); Console.WriteLine("Registration profile saved at {0}.", options.OutputPathRegisteration); Console.WriteLine("Registration signer saved at {0}.", options.OutputPathSigner); return(0); }
protected override void Load(ContainerBuilder builder) { base.Load(builder); // Autofac & AdaptiveClient List <IEndPointConfiguration> endPoints = EndPointUtilities.LoadEndPoints(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "appsettings.json")).ToList(); IEndPointConfiguration backOffice = endPoints.FirstOrDefault(x => x.API_Name == API_Name.BackOffice && x.ProviderName == DataBaseProviderName.MySQL); IEndPointConfiguration frontOffice = endPoints.FirstOrDefault(x => x.API_Name == API_Name.StoreFront && x.ProviderName == DataBaseProviderName.MySQL); if (backOffice != null) { backOffice.ConnectionString = ConnectionstringUtility.BuildConnectionString(backOffice.ConnectionString); } if (frontOffice != null) { frontOffice.ConnectionString = ConnectionstringUtility.BuildConnectionString(frontOffice.ConnectionString); } builder.RegisterModule(new LeaderAnalytics.AdaptiveClient.EntityFrameworkCore.AutofacModule()); builder.RegisterInstance(endPoints).SingleInstance(); RegistrationHelper registrationHelper = new RegistrationHelper(builder); registrationHelper .RegisterEndPoints(endPoints) .RegisterModule(new Zamagon.Services.Common.AdaptiveClientModule()) .RegisterModule(new Zamagon.Services.BackOffice.AdaptiveClientModule()) .RegisterModule(new Zamagon.Services.StoreFront.AdaptiveClientModule()); }
public void AddElement(IEdmEntityContainerElement element) { EdmUtil.CheckArgumentNull <IEdmEntityContainerElement>(element, "element"); this.containerElements.Add(element); EdmContainerElementKind containerElementKind = element.ContainerElementKind; switch (containerElementKind) { case EdmContainerElementKind.None: { throw new InvalidOperationException(Strings.EdmEntityContainer_CannotUseElementWithTypeNone); } case EdmContainerElementKind.EntitySet: { RegistrationHelper.AddElement <IEdmEntitySet>((IEdmEntitySet)element, element.Name, this.entitySetDictionary, new Func <IEdmEntitySet, IEdmEntitySet, IEdmEntitySet>(RegistrationHelper.CreateAmbiguousEntitySetBinding)); return; } case EdmContainerElementKind.FunctionImport: { RegistrationHelper.AddFunction <IEdmFunctionImport>((IEdmFunctionImport)element, element.Name, this.functionImportDictionary); return; } } throw new InvalidOperationException(Strings.UnknownEnumVal_ContainerElementKind(element.ContainerElementKind)); }
/// <summary> /// /// </summary> /// <param name="savedState"></param> public override void Uninstall(System.Collections.IDictionary savedState) { try { #if DEBUG Debug.WriteLine("Begin component uninstall process..."); EventLog.WriteEntry(ToString(), "Begin component uninstall process...", EventLogEntryType.Information); #endif // Get the state created when the app was installed var appID = (string)savedState["AppID"]; var assembly = (string)savedState["Assembly"]; // Uninstall the application var regHelper = new RegistrationHelper(); regHelper.UninstallAssembly(assembly, appID); #if DEBUG Debug.WriteLine("Component removal successfull"); EventLog.WriteEntry(ToString(), "Component removal successfull", EventLogEntryType.Information); #endif } catch (Exception ex) { // Don't allow unhandled exceptions during uninstall #if DEBUG Debug.WriteLine(string.Format("Uninstall error: {0}", ex)); #endif EventLog.WriteEntry(ToString(), string.Format("Uninstall error: '{0}'", ex.Message), EventLogEntryType.Error); // If the installer catches the exception it will display // an error message. Show a friendly error message throw new ApplicationException("Uninstall error", ex); } }
private void btnRegister_Click(object sender, EventArgs e) { HCMISRegistrations.RegistrationsSoapClient soapClient = new HCMISRegistrations.RegistrationsSoapClient(); int?facilityID = null; if (txtFacilityID.Text != "") { facilityID = int.Parse(txtFacilityID.Text); } bool registered = false; int userType = RegistrationHelper.GetUserTypeID(cboUserType.Text); int registrationID = soapClient.RegisterNewUser(txtUserName.Text, userType, facilityID, txtAssemblyName.Text, Program.HCMISVersionString, txtAuthenticationCode.Text); registered = -1 != registrationID; if (registered) { //Save Authentication code to the registry int?userID = null; if (txtFacilityID.Text != "") { userID = int.Parse(txtFacilityID.Text); } RegistrationHelper.SaveAuthenticationInfoToRegistry(txtAuthenticationCode.Text, userType, userID, registrationID); XtraMessageBox.Show("Successfully Registered.", "Registration"); this.Close(); } else { XtraMessageBox.Show("Registration failed!", "Registration"); } }
public virtual IEnumerable <ValidationResult> Validate(ValidationContext validationContext) { foreach (var info in Profile) { var validation = RegistrationHelper.GetFieldValidatorDefinition(info.Key); if (validation != null) { if (validation.Required.HasValue && validation.Required.Value && string.IsNullOrEmpty(info.Value)) { var requiredErrorMessage = this.GetErrorMessageFromResource(validation.RequiredViolationMessage); yield return(new ValidationResult($"{requiredErrorMessage}", new List <string> { "Profile[" + info.Key + "]" })); } else if (info.Value.Length > 1) { if (info.Value.Length < (int)validation.MinLength || ((int)validation.MaxLength != 0 && info.Value.Length > (int)validation.MaxLength)) { var lengthErrorMessage = this.GetErrorMessageFromResource(validation.MaxLengthViolationMessage); yield return(new ValidationResult($"{lengthErrorMessage}", new List <string> { "Profile[" + info.Key + "]" })); } } } } }
public void Register(RegistrationHelper registrationHelper) { // --- BackOffice Services --- registrationHelper // MSSQL .RegisterService <MSSQL.EmployeesService, IEmployeesService>(EndPointType.DBMS, API_Name.BackOffice, DataBaseProviderName.MSSQL) .RegisterService <MSSQL.TimeCardsService, ITimeCardsService>(EndPointType.DBMS, API_Name.BackOffice, DataBaseProviderName.MSSQL) // MySQL .RegisterService <BackOffice.MySQL.EmployeesService, IEmployeesService>(EndPointType.DBMS, API_Name.BackOffice, DataBaseProviderName.MySQL) .RegisterService <BackOffice.MySQL.TimeCardsService, ITimeCardsService>(EndPointType.DBMS, API_Name.BackOffice, DataBaseProviderName.MySQL) // WebAPI .RegisterService <BackOffice.WebAPI.EmployeesService, IEmployeesService>(EndPointType.HTTP, API_Name.BackOffice, DataBaseProviderName.WebAPI) .RegisterService <BackOffice.WebAPI.TimeCardsService, ITimeCardsService>(EndPointType.HTTP, API_Name.BackOffice, DataBaseProviderName.WebAPI) // DbContexts .RegisterDbContext <Database.Db>(API_Name.BackOffice) // Migration Contexts .RegisterMigrationContext <Database.Db_MSSQL>(API_Name.BackOffice, DataBaseProviderName.MSSQL) .RegisterMigrationContext <Database.Db_MySQL>(API_Name.BackOffice, DataBaseProviderName.MySQL) // Database Initializers .RegisterDatabaseInitializer <BODatabaseInitializer>(API_Name.BackOffice, DataBaseProviderName.MSSQL) .RegisterDatabaseInitializer <BODatabaseInitializer>(API_Name.BackOffice, DataBaseProviderName.MySQL) // register same class for both providers. If we had stored procs, etc. that were different we could just create a new class. // Service Manifests .RegisterServiceManifest <BOServiceManifest, IBOServiceManifest>(EndPointType.DBMS, API_Name.BackOffice, DataBaseProviderName.MSSQL) .RegisterServiceManifest <BOServiceManifest, IBOServiceManifest>(EndPointType.DBMS, API_Name.BackOffice, DataBaseProviderName.MySQL) .RegisterServiceManifest <BOServiceManifest, IBOServiceManifest>(EndPointType.HTTP, API_Name.BackOffice, DataBaseProviderName.WebAPI); }
protected void rptr_ItemDataBound(object sender, RepeaterItemEventArgs e) { var registrationHelper = new RegistrationHelper(); if (!string.IsNullOrEmpty(this.CustomFields.DDValues1)) { var codes = Codes.GetAlByTypeID(int.Parse(this.CustomFields.DDValues1)); registrationHelper.BindCustomDDL(e, codes, "Custom1DD", "Custom1DDTXT"); } if (!string.IsNullOrEmpty(this.CustomFields.DDValues2)) { var codes = Codes.GetAlByTypeID(int.Parse(this.CustomFields.DDValues2)); registrationHelper.BindCustomDDL(e, codes, "Custom2DD", "Custom2DDTXT"); } if (!string.IsNullOrEmpty(this.CustomFields.DDValues3)) { var codes = Codes.GetAlByTypeID(int.Parse(this.CustomFields.DDValues3)); registrationHelper.BindCustomDDL(e, codes, "Custom3DD", "Custom3DDTXT"); } if (!string.IsNullOrEmpty(this.CustomFields.DDValues4)) { var codes = Codes.GetAlByTypeID(int.Parse(this.CustomFields.DDValues4)); registrationHelper.BindCustomDDL(e, codes, "Custom4DD", "Custom4DDTXT"); } if (!string.IsNullOrEmpty(this.CustomFields.DDValues5)) { var codes = Codes.GetAlByTypeID(int.Parse(this.CustomFields.DDValues5)); registrationHelper.BindCustomDDL(e, codes, "Custom5DD", "Custom5DDTXT"); } }
/// <summary> /// Registers or unregisters a DLL based on value in first parameter /// Inherited from State /// </summary> /// <param name="register">registers if true, unregisters if not.</param> /// <param name="action">Unused param</param> public override bool SetValue(Boolean register, object action) { if (register) { RegistrationHelper.RegisterComServer(fileName); } else { // When unregistering, we need to make sure we're using the same binary // to unregister as the one under the server path (InprocServer32 or LocalServer32) RegistryKey inProcServer = Registry.ClassesRoot.OpenSubKey("CLSID").OpenSubKey(clsid).OpenSubKey("InprocServer32"); RegistryKey localServer = Registry.ClassesRoot.OpenSubKey("CLSID").OpenSubKey(clsid).OpenSubKey("LocalServer32"); if (inProcServer != null) { fileName = (string)inProcServer.GetValue(null); } else { if (localServer != null) { fileName = (string)localServer.GetValue(null); } } RegistrationHelper.UnregisterComServer(fileName); } return(true); }
private void btnLoadAssembly_Click(object sender, EventArgs e) { if (!AssemblyPathControl.FileExists) { MessageBox.Show("Error: Unable to locate the specified file. Please ensure that it exists", "Plugin Registration", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } //Load the assembly CrmPluginAssembly assembly; try { assembly = RegistrationHelper.RetrievePluginsFromAssembly(AssemblyPathControl.FileName); } catch (Exception ex) { ErrorMessageForm.ShowErrorMessageBox(this, "Unable to load the specified Plugin Assembly", "Plugins", ex); return; } LoadAssembly(assembly, true); //Mark the assembly as having been loaded m_assemblyLoaded = true; chkUpdateAssembly.Checked = true; if (null != m_currentAssembly) { chkUpdateAssembly.Visible = true; } //Enable the controls EnableRegistrationControls(); }
/// <summary> /// Adds an entity container element to this entity container. /// </summary> /// <param name="element">The element to add.</param> public void AddElement(IEdmEntityContainerElement element) { EdmUtil.CheckArgumentNull(element, "element"); this.containerElements.Add(element); switch (element.ContainerElementKind) { case EdmContainerElementKind.EntitySet: RegistrationHelper.AddElement((IEdmEntitySet)element, element.Name, this.entitySetDictionary, RegistrationHelper.CreateAmbiguousEntitySetBinding); break; case EdmContainerElementKind.Singleton: RegistrationHelper.AddElement((IEdmSingleton)element, element.Name, this.singletonDictionary, RegistrationHelper.CreateAmbiguousSingletonBinding); break; case EdmContainerElementKind.ActionImport: case EdmContainerElementKind.FunctionImport: RegistrationHelper.AddOperationImport((IEdmOperationImport)element, element.Name, this.operationImportDictionary); break; case EdmContainerElementKind.None: throw new InvalidOperationException(Edm.Strings.EdmEntityContainer_CannotUseElementWithTypeNone); default: throw new InvalidOperationException(Edm.Strings.UnknownEnumVal_ContainerElementKind(element.ContainerElementKind)); } }
/// <summary> /// 校验是否登陆成功 /// </summary> /// <returns></returns> public bool CheckRegistered() { using (var db = new EFDbContext()) { var data = db.Catagorys.FirstOrDefault(x => x.Type == (int)EnumData.CatagoryType.Register); if (data == null) { var registerCode = MD5Helper.GenerateMD5(RegistrationHelper.getRNum()); db.Catagorys.Add(new Catagorys { Type = (int)EnumData.CatagoryType.Register, ItemText = registerCode, ItemValue = "0", Remark = "", CreatedTime = DateTime.Now }); db.SaveChanges(); return(false); } else { if (MD5Helper.GenerateMD5(data.ItemValue) != data.ItemText || RegistrationHelper.getRNumWithDate(data.CreatedTime) != data.ItemValue) { return(false); } else { return(true); } } } }
public void Register(RegistrationHelper registrationHelper) { // --- StoreFront Services --- registrationHelper // MSSQL .RegisterService <StoreFront.MSSQL.OrdersService, IOrdersService>(EndPointType.DBMS, API_Name.StoreFront, DataBaseProviderName.MSSQL) .RegisterService <StoreFront.MSSQL.ProductsService, IProductsService>(EndPointType.DBMS, API_Name.StoreFront, DataBaseProviderName.MSSQL) // MySQL .RegisterService <StoreFront.MySQL.OrdersService, IOrdersService>(EndPointType.DBMS, API_Name.StoreFront, DataBaseProviderName.MySQL) .RegisterService <StoreFront.MySQL.ProductsService, IProductsService>(EndPointType.DBMS, API_Name.StoreFront, DataBaseProviderName.MySQL) // WebAPI .RegisterService <StoreFront.WebAPI.OrdersService, IOrdersService>(EndPointType.HTTP, API_Name.StoreFront, DataBaseProviderName.WebAPI) .RegisterService <StoreFront.WebAPI.ProductsService, IProductsService>(EndPointType.HTTP, API_Name.StoreFront, DataBaseProviderName.WebAPI) // DbContexts .RegisterDbContext <Database.Db>(API_Name.StoreFront) // Migration Contexts .RegisterMigrationContext <Database.Db_MSSQL>(API_Name.StoreFront, DataBaseProviderName.MSSQL) .RegisterMigrationContext <Database.Db_MySQL>(API_Name.StoreFront, DataBaseProviderName.MySQL) // Database Initializers .RegisterDatabaseInitializer <SFDatabaseInitializer>(API_Name.StoreFront, DataBaseProviderName.MSSQL) .RegisterDatabaseInitializer <SFDatabaseInitializer>(API_Name.StoreFront, DataBaseProviderName.MySQL) // Service Manifests .RegisterServiceManifest <SFServiceManifest, ISFServiceManifest>(EndPointType.DBMS, API_Name.StoreFront, DataBaseProviderName.MSSQL) .RegisterServiceManifest <SFServiceManifest, ISFServiceManifest>(EndPointType.DBMS, API_Name.StoreFront, DataBaseProviderName.MySQL) .RegisterServiceManifest <SFServiceManifest, ISFServiceManifest>(EndPointType.HTTP, API_Name.StoreFront, DataBaseProviderName.WebAPI); }
/// <summary> /// Override Install method to allow custom actions during OWMail 2.0 setup. /// </summary> /// <param name="stateSaver">An IDictionary that contains the context information associated with the installation.</param> public override void Install(IDictionary stateSaver) { try { string AppID = null; string TypeLib = null; // Get the location of the current assembly string Assembly = GetType().Assembly.Location; // Install the application RegistrationHelper rh = new RegistrationHelper(); rh.InstallAssembly(Assembly, ref AppID, ref TypeLib, InstallationFlags.FindOrCreateTargetApplication); //RegistrationConfig configuration = new RegistrationConfig(); // Save the state - you will need this for the uninstall stateSaver.Add("AppID", AppID); stateSaver.Add("Assembly", Assembly); } catch (Exception ex) { StreamWriter sw = File.AppendText(@"c:\OWMailInstallerErrors.log"); sw.WriteLine("Uninstall Error: {0}", ex.Message); sw.Close(); } }
private void btnRegisterAssociation_Click(object sender, EventArgs e) { RegistrationHelper.RegisterFileAssociations( APP_ID, false, Windows7Taskbar.GetCurrentProcessAppId(), Assembly.GetExecutingAssembly().Location + " /doc:%1", ".rtf"); }
private void AppBarButtonUploadTraceClick(object sender, RoutedEventArgs e) { this.ExecuteAsyncActionSafe(async() => { string message = null; // TODO: Change 7 - Calling UploadTransactions try { await RegistrationHelper.UploadTransactions(); } catch (Exception ex) { var supportabilityException = ex as SAP.Supportability.ISupportabilityException; message = ex.Message + ((supportabilityException != null) ? ("(" + supportabilityException.UploadResult.ResponseStatusCode + ")") : ""); } if (message != null) { await new Windows.UI.Popups.MessageDialog( "ERROR: " + message).ShowAsync(); } else { await new Windows.UI.Popups.MessageDialog( "Successfully uploaded client logs").ShowAsync(); } }); }
public void ThenTheRegistrantAssignsTheseSeats(Table table) { using (var orderController = RegistrationHelper.GetOrderController(conferenceInfo.Slug)) { PricedOrder pricedOrder = null; var timeout = DateTime.Now.Add(Constants.UI.WaitTimeout); while ((pricedOrder == null || !pricedOrder.AssignmentsId.HasValue) && DateTime.Now < timeout) { pricedOrder = RegistrationHelper.GetModel <PricedOrder>(orderController.Display(draftOrder.OrderId)); } Assert.NotNull(pricedOrder); Assert.True(pricedOrder.AssignmentsId.HasValue); var orderSeats = RegistrationHelper.GetModel <OrderSeats>(orderController.AssignSeats(pricedOrder.AssignmentsId.Value)); foreach (var row in table.Rows) { var seat = orderSeats.Seats.FirstOrDefault(s => s.SeatName == row["seat type"]); Assert.NotNull(seat); seat.Attendee.FirstName = row["first name"]; seat.Attendee.LastName = row["last name"]; seat.Attendee.Email = row["email address"]; } orderController.AssignSeats(pricedOrder.AssignmentsId.Value, orderSeats.Seats.ToList()); } }
private static RegistrationHelper GetRegistrationHelper(bool bCreateAppDomain, out AppDomain domain) { RegistrationHelper reg = null; domain = null; if (!bCreateAppDomain) { reg = new RegistrationHelper(); } else { String dir = Path.GetDirectoryName(regConfig.AssemblyFile); AppDomainSetup domainOptions = new AppDomainSetup(); domainOptions.ApplicationBase = dir; domain = AppDomain.CreateDomain("RegSvcs", null, domainOptions); if (domain != null) { AssemblyName n = typeof(RegistrationHelper).Assembly.GetName(); ObjectHandle h = domain.CreateInstance(n.FullName, typeof(RegistrationHelper).FullName); if (h != null) { reg = (RegistrationHelper)h.Unwrap(); } } } return(reg); }
/// <summary> /// 校验是否当前使用是否有效(未过试用期或注册过) /// </summary> /// <returns></returns> public bool CheckEffective() { using (var db = new EFDbContext()) { var data = db.Catagorys.FirstOrDefault(x => x.Type == (int)EnumData.CatagoryType.Register); if (data == null) { var registerCode = MD5Helper.GenerateMD5(RegistrationHelper.getRNum()); db.Catagorys.Add(new Catagorys { Type = (int)EnumData.CatagoryType.Register, ItemText = registerCode, ItemValue = "0", Remark = "", CreatedTime = DateTime.Now }); db.SaveChanges(); return(false); } else { if (MD5Helper.GenerateMD5(data.ItemValue) == data.ItemText && RegistrationHelper.getRNumWithDate(data.CreatedTime) == data.ItemValue) { return(true); } var date = db.Catagorys.FirstOrDefault(x => x.Type == (int)EnumData.CatagoryType.StartEnd); if (date == null) { db.Catagorys.Add(new Catagorys { Type = (int)EnumData.CatagoryType.StartEnd, ItemText = DateTime.Now.ToString("yyyy-MM-dd"), ItemValue = DateTime.Now.ToString("yyyy-MM-dd"), Remark = "", CreatedTime = DateTime.Now }); db.SaveChanges(); return(false); } else { var startDate = DateTime.Now.AddMonths(-1); DateTime.TryParse(date.ItemValue, out startDate); TimeSpan sp = DateTime.Today.Subtract(startDate); if (sp.Days >= 7) { return(false); } else { return(true); } } } } }
void buttonRegister_Click(object sender, EventArgs e) { RegistrationHelper.ShowRegisterDialog(this); if (RegistrationHelper.IsRegistered) { buttonRegister.Visible = false; } }
private ApplicationManager() { driver = new FirefoxDriver(); baseURL = "http://localhost:8098"; //"http://localhost/mantisbt-1.2.17/login_page.php" Registration = new RegistrationHelper(this); }
private void MenuItemDeleteRegistrationClick(object sender, RoutedEventArgs e) { this.ShouldExitAppOnClose = false; // close the window ((NavigationWindow)(this.Parent)).Close(); RegistrationHelper.DeleteRegistration(); }
public void WhenTheRegistrantProceedToConfirmThePayment() { using (var paymentController = RegistrationHelper.GetPaymentController()) { paymentController.ThirdPartyProcessorPaymentAccepted( conferenceInfo.Slug, (Guid)routeValues["paymentId"], " "); } }
public RegisterForm() { InitializeComponent(); var computerCode = RegistrationHelper.getMNum(); this.ComTextBox.Text = computerCode; }