public PasswordDataAction SetPassDataItem(int dataIndex, int item) { PasswordDataAction a = new PasswordDataAction(queue, dataIndex); a.NewValue = item; return(a); }
internal void NotifyAction(Editroid.UndoRedo.EditroidAction a) { PasswordDataAction action = a as PasswordDataAction; if (action != null) { entryList.Items[action.DataIndex] = rom.PasswordData.GetDatum(action.DataIndex); } if (a is OverwritePasswordData) { for (int i = 0; i < entryList.Items.Count; i++) { RefreshEntry(i); ShowValueForSelectedItem(); } } ////if (a is SetItemTilePosition && ((SetItemTilePosition)a).UpdatesPassword) { //// int index = ((SetItemTilePosition)a).PasswordDataIndex; //// entryList.Items[index] = rom.PasswordData.GetDatum(index); ////} ////if (a is SetItemRowPosition) { //// ((SetItemRowPosition)a).ForEachPasswordEntry(delegate(int i) { //// RefreshEntry(i); //// }); ////} }
public PasswordDataAction SetPassDataMapLocation(int dataIndex, int mapX, int mapY) { PasswordDataAction a = new PasswordDataAction(queue, dataIndex); a.NewX = mapX; a.NewY = mapY; return(a); }
internal void NotifyActionOccurred(EditroidAction a) { PasswordDataAction action = a as PasswordDataAction; OverwritePasswordData ow = a as OverwritePasswordData; ////SetItemTilePosition t = a as SetItemTilePosition; ////SetItemRowPosition rowAction = a as SetItemRowPosition; if (action != null) { foreach (WindowlessControl c in Controls) { PasswordEntryControl pc = c as PasswordEntryControl; if (pc != null) { if (pc.Index == action.DataIndex) { pc.UpdateBounds(); } } } } else if (ow != null) { SuspendPaint(); foreach (WindowlessControl c in Controls) { PasswordEntryControl pc = c as PasswordEntryControl; if (pc != null) { pc.UpdateBounds(); } } ResumePaint(); ////} else if (t != null && t.UpdatesPassword) { //// ((PasswordEntryControl)Controls[t.PasswordDataIndex]).UpdateBounds(); ////} else if (rowAction != null) { //// rowAction.ForEachPasswordEntry(delegate(int index) { //// PasswordEntryControl c = Controls[index] as PasswordEntryControl; //// if (c != null) c.UpdateBounds(); //// }); } }