private bool SaveSetting() { StorageItem testItem = _storageItem.Clone() as StorageItem; _fieldControler.SaveSetting(testItem); _tagControler.SaveSetting(testItem.DPath); foreach (StorageItem item in _itemList) { if (item == _storageItem || item.GWDataDBField.Table == GWDataDBTable.None) { continue; } if (item.GWDataDBField.Table == testItem.GWDataDBField.Table && item.GWDataDBField.FieldName == testItem.GWDataDBField.FieldName) { MessageBox.Show(this, "Element (" + item.DPath.GetTagName() + ") has been mapped to this GC Gateway field (" + item.GWDataDBField.GetFullFieldName() + "). \r\n" + "Pease change another GC Gateway field.", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.comboBoxField.Focus(); return(false); } } _fieldControler.SaveSetting(_storageItem); _tagControler.SaveSetting(_storageItem.DPath); _storageItem.RedundancyFlag = this.checkBoxRedundancy.Checked; return(true); }
public void Clone() { uut.Value = TestUtils.GetByteArray(10, 0x42); StorageItem newSi = uut.Clone(); newSi.Value.Length.Should().Be(10); newSi.Value[0].Should().Be(0x42); for (int i = 1; i < 10; i++) { newSi.Value[i].Should().Be(0x20); } }
protected override void AddInternal(StorageKey key, StorageItem value) { innerCache.Add(key, value.Clone()); }
protected override void AddInternal(StorageKey key, StorageItem value) { trie.Put(key, value.Clone()); }