private void Init(Model model) {
			this.DataContext = model;
			this.model = model;

			OnCompleted += new Action(() => {
				//free resources
			});

			var applyCmd = new DelegateCommand(
				() => {
					try {
						if (!model.dhcp) {
							model.useNtpFromDhcp = false;
							model.useDnsFromDhcp = false;
							model.useHostFromDhcp = false;
						}
						GetProtocolData();
						Success(new Result.Apply(model));
					} catch (Exception err) {
						Success(new Result.ValidationFailed(model, new Exception("some fields contains invalid values", err)));
					}

				},
				() => true
			);
			ApplyCommand = applyCmd;

			var cancelCmd = new DelegateCommand(
				() => {
					model.RevertChanges();
					FillProtocolsData(model);
				},
				() => true
			);
			CancelCommand = cancelCmd;

			InitializeComponent();

			Localization();
			BindData(model);
		}
		private void Init(Model model) {
			OnCompleted += () => {
				disposables.Dispose();
			};
			this.DataContext = model;
			this.model = model;

			var applyCommand = new DelegateCommand(
				() =>Success(new Result.Apply(model)),
				() => true
			);
			ApplyCommand = applyCommand;

			//var closeCommand = new DelegateCommand(
			//    () => Success(new Result.Close()),
			//    () => true
			//);
			//CloseCommand = closeCommand;

			CancelCommand = new DelegateCommand(
				() => model.RevertChanges(),
				() => true
			);

			InitializeComponent();

			BindModel(model);
		}