public void SetTextView() { TRegistry registry = new TRegistry(); mail.TextBoxSender.Text = registry.Sender; mail.TextBoxPassword.Text = registry.Password; mail.TextBoxPort.Text = registry.Port; mail.TextBoxSmtp.Text = registry.Smtp; mail.TextBoxRecipient.Text = registry.Recipient; }
public SMNatives(NativeData nativeData) { Globals = new TGlobals(nativeData); Application = new TApplication(nativeData); Control = new TControl(nativeData); ElWind = new TElWind(nativeData); SMMain = new TSMMain(nativeData); Database = new TDatabase(nativeData); Registry = new TRegistry(Database, nativeData); }
public static void Init <TRegistry, TDef, TBackend>() where TRegistry : Registry <TRegistry, TDef, TBackend>, new() where TDef : Registry <TRegistry, TDef, TBackend> .IRegistryDef where TBackend : struct, Registry <TRegistry, TDef, TBackend> .IRegistryBackend { MetaRegistry.CreateIfNeeded(); //MetaRegistry is given special treatment because registering it with itself would mean adding numerous checks within it to ensure it does not initialize itself. if (typeof(TRegistry) == typeof(MetaRegistry)) { return; } try { var cat = new TRegistry(); cat.regToken = MetaRegistry.Add(cat); } catch { } }
public bool SaveDataEmial() { TRegistry registry = new TRegistry(); bool falg = true; registry.Sender = mail.TextBoxSender.Text; registry.Password = mail.TextBoxPassword.Text; registry.Port = mail.TextBoxPort.Text; registry.Smtp = mail.TextBoxSmtp.Text; registry.Recipient = mail.TextBoxRecipient.Text; if (!registry.SaveRegistry()) { falg = false; MessageBox.Show("Nieprawidłowe dane. Upewni się że wprowadzone dane: andresów e-mail, hasło, smtp, port są prawidłowe ", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error); } return(falg); }
/// <summary> /// Import an existing HtmlConventionRegistry /// </summary> /// <typeparam name = "T"></typeparam> public void Import <TRegistry>() where TRegistry : HtmlConventionRegistry, new() { var registry = new TRegistry(); Library.Import(registry.Library); }