/// <summary> /// Applyes to current element style and properties of provided element /// </summary> /// <param name="ethalon">Ethalon element</param> public void ApplyStyle(BarcodeViewModel ethalon) { // update size this.Width = ethalon.Width; this.Height = ethalon.Height; this.SelectedBarcodeType = ethalon.SelectedBarcodeType; if (ethalon.SelectedBarcodeType == BarcodeTypes.qr) { this.QrVersion = ethalon.QrVersion; } }
/// <summary> /// Creates copy of current question /// </summary> /// <returns>Freshly created copy</returns> public override BaseQuestionViewModel CreateCopy() { BarcodeViewModel copy = new BarcodeViewModel(this.Name, new Rect(this.Left, this.Top, this.Width, this.Height), this.ParentTemplate); copy.SelectedBarcodeType = this.SelectedBarcodeType; if (this.SelectedBarcodeType == BarcodeTypes.qr) { copy.QrVersion = this.QrVersion; } return(copy); }