예제 #1
0
        public HostsFileControl()
        {
            _logWriter       = DependencyManager.LogWriter;
            _hostsFileEditor = DependencyManager.HostsFileEditor;

            _logWriter.LogInfo("Hosts File initializing.");
            _model = new HostsFileModel();
        }
예제 #2
0
 public HostsFileControl()
 {
     _hostsEditor = new HostsEditor();
     _model       = new HostsFileModel();
     GetHostSettings();
     DataContext = _model;
     InitializeComponent();
 }
예제 #3
0
 public HostsFileControl()
 {
     _hostsFileHelper = new HostsFileHelper();
     _model           = new HostsFileModel();
     _logger          = new Wu10Logger();
     if (!DesignerProperties.GetIsInDesignMode(this))
     {
         SetRuntimeOptions();
     }
 }
예제 #4
0
 public HostsFileControl()
 {
     Wu10Logger.LogInfo("Hosts File initializing.");
     _hostsFileHelper = new HostsFileHelper();
     _model           = new HostsFileModel();
     if (!DesignerProperties.GetIsInDesignMode(this))
     {
         SetRuntimeOptions();
     }
     Wu10Logger.LogInfo("Hosts File initialized.");
 }
예제 #5
0
        public HostsFileControl()
        {
            _logWriter       = DependencyManager.Resolve <ILogWriter>();
            _hostsFileEditor = DependencyManager.Resolve <IHostsFileEditor>();

            _logWriter.LogInfo("Hosts File initializing.");
            _model = new HostsFileModel();
            if (!DesignerProperties.GetIsInDesignMode(this))
            {
                SetRuntimeOptions();
            }
            _logWriter.LogInfo("Hosts File initialized.");
        }
        /// <summary>
        /// Reloads the hosts file.
        /// </summary>
        private void ReloadHostsFile()
        {
            HostsFileModel model = new HostsFileModel();

            _hostsFileTextBox.Text = model.FileContents;
        }