示例#1
0
 public EncryptableString()
 {
     using (var container = ContextScopeProvider.CreateChildContainer())
     {
         encryptor = container.Resolve <ITextEncryptor>();
     }
 }
示例#2
0
 public EncryptableString()
 {
     using (var container = ContextScopeProvider.CreateChildContainer())
     {
         encryptor = container.Resolve<ITextEncryptor>();
     }
 }
        /// <summary>
        /// Initializes a new instance of the <see cref="MainForm"/> class.
        /// </summary>
        /// <param name="colorParser">Color Parser.</param>
        /// <param name="textEncryptor">Text Encryptor.</param>
        /// <param name="notesRepository">Notes Repository.</param>
        public MainForm(IColorParser colorParser, ITextEncryptor textEncryptor, INotesRepository notesRepository)
        {
            this.InitializeComponent();

            // Services
            this.colorParser     = colorParser;
            this.textEncryptor   = textEncryptor;
            this.notesRepository = notesRepository;

            // Create fonts
            var fontFamily = this.mainView.Font.FontFamily;

            this.header1Font = new Font(fontFamily, 16.0f, FontStyle.Bold);
            this.header2Font = new Font(fontFamily, 14.0f, FontStyle.Bold);
            this.header3Font = new Font(fontFamily, 13.0f, FontStyle.Bold);
            this.listFont    = new Font(fontFamily, 12.0f, FontStyle.Bold);
            this.normalFont  = this.mainView.Font;

            // No password yet
            this.password = null;
        }
示例#4
0
 public EncryptableString()
 {
     encryptor = ContextScopeProvider.ApplicationContainer.Resolve <ITextEncryptor>();
 }
示例#5
0
 public EncryptableString()
 {
     encryptor = ContextScopeProvider.ApplicationContainer.Resolve<ITextEncryptor>();
 }