private void ClearLists() { BoolList.Clear(); IntList.Clear(); FloatList.Clear(); Float2List.Clear(); Float3List.Clear(); Float4List.Clear(); }
private void ClearFields() { IntArrayProp = new int[2]; ComplexProp = new ComplexClass1(); CheckBox = false; Lines = new string[0]; StringProp = ""; CompList.Clear(); CompList.Add(new ComplexClass2(4, 5)); CompList.Add(null); CompList.Add(new ComplexClass2(6, 7)); BoolList.Clear(); BoolList.Add(true); BoolList.Add(false); BoolList.Add(true); SetDebugDisplays(); }
void RestoreStates(ActionBase action, BoolList boolList, Dictionary <string, BoolList> boolLists) { if (boolLists.ContainsKey(action.Id)) { BoolList enabledBoolList = boolLists[action.Id]; if (enabledBoolList.GetKeys().FirstOrDefault() != null) { boolList.Clear(); foreach (var key in enabledBoolList.GetKeys()) { boolList.SetItemValue(key, enabledBoolList[key]); } } } }
void SyncStates(string id, BoolList boolList, Dictionary <string, BoolList> boolLists) { if (boolLists.ContainsKey(id)) { var list = boolLists[id]; boolList.BeginUpdate(); if (list.GetKeys().FirstOrDefault() != null) { boolList.Clear(); foreach (var key in list.GetKeys()) { boolList.SetItemValue(key, list[key]); } } boolList.EndUpdate(); } }
public void Load(ZipData zip) { var code = new BoolList(); var info = new InfoSource(); this.path = zip.path; for (int i = 0; i < zip.data.Length; i++) { code.Add(zip.data[i]); if (zip.Codes.ContainsKey(code)) { // 一部分複合する.瞬時符号って最高 info.AddRange(zip.Codes[code]); code.Clear(); } } this.byteArray = new byte[zip.byteNumber]; var temp = info.ToByteArray(); for (int i = 0; i < this.byteArray.Length; i++) { byteArray[i] = temp[i]; } /* * for(int i = 0 ; i < byteArray.Length ; i++ ) * { * byte b = 0x00; * for(int j = 0 ; j < 8 ; j++ ){ * b <<= 1; * b |= info[ i * 8 + j ] ? (byte)0x01 : (byte)0x00; * } * byteArray[i] = b; * }*/ }
void SyncState(ActionBase actionBase, BoolList sender, Func <ActionBase, BoolList> func, Dictionary <GridView, Dictionary <string, BoolList> > childBoolLists) { if (View == null || !IsMasterDetail) { return; } var gridControl = (View.Editor.Control as GridControl); if (gridControl == null) { return; } var xpandXafGridView = gridControl.MainView as XpandXafGridView; if (xpandXafGridView == null) { return; } Frame masterFrame = xpandXafGridView.MasterFrame; if (masterFrame != null) { BoolList boolList = GetBoolList(masterFrame, actionBase, func); if (sender.GetKeys().FirstOrDefault() != null) { var activeChildBool = new BoolList(); var focusedView = (GridView)GridListEditor.Grid.FocusedView; var childBoolList = GetChildBoolList(childBoolLists, focusedView); childBoolList[actionBase.Id] = activeChildBool; boolList.Clear(); foreach (var key in sender.GetKeys()) { boolList.SetItemValue(key, sender[key]); activeChildBool.SetItemValue(key, sender[key]); } } } }