static int _m_LastIndexOf(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Collections.Generic.List <string> gen_to_be_invoked = (System.Collections.Generic.List <string>)translator.FastGetCSObj(L, 1); int gen_param_count = LuaAPI.lua_gettop(L); if (gen_param_count == 2 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING)) { string _item = LuaAPI.lua_tostring(L, 2); int gen_ret = gen_to_be_invoked.LastIndexOf( _item); LuaAPI.xlua_pushinteger(L, gen_ret); return(1); } if (gen_param_count == 3 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { string _item = LuaAPI.lua_tostring(L, 2); int _index = LuaAPI.xlua_tointeger(L, 3); int gen_ret = gen_to_be_invoked.LastIndexOf( _item, _index); LuaAPI.xlua_pushinteger(L, gen_ret); return(1); } if (gen_param_count == 4 && (LuaAPI.lua_isnil(L, 2) || LuaAPI.lua_type(L, 2) == LuaTypes.LUA_TSTRING) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) { string _item = LuaAPI.lua_tostring(L, 2); int _index = LuaAPI.xlua_tointeger(L, 3); int _count = LuaAPI.xlua_tointeger(L, 4); int gen_ret = gen_to_be_invoked.LastIndexOf( _item, _index, _count); LuaAPI.xlua_pushinteger(L, gen_ret); return(1); } } catch (System.Exception gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to System.Collections.Generic.List<string>.LastIndexOf!")); }
static int _m_LastIndexOf(RealStatePtr L) { try { ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); System.Collections.Generic.List <int> __cl_gen_to_be_invoked = (System.Collections.Generic.List <int>)translator.FastGetCSObj(L, 1); int __gen_param_count = LuaAPI.lua_gettop(L); if (__gen_param_count == 2 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2)) { int item = LuaAPI.xlua_tointeger(L, 2); int __cl_gen_ret = __cl_gen_to_be_invoked.LastIndexOf(item); LuaAPI.xlua_pushinteger(L, __cl_gen_ret); return(1); } if (__gen_param_count == 3 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3)) { int item = LuaAPI.xlua_tointeger(L, 2); int index = LuaAPI.xlua_tointeger(L, 3); int __cl_gen_ret = __cl_gen_to_be_invoked.LastIndexOf(item, index); LuaAPI.xlua_pushinteger(L, __cl_gen_ret); return(1); } if (__gen_param_count == 4 && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 2) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 3) && LuaTypes.LUA_TNUMBER == LuaAPI.lua_type(L, 4)) { int item = LuaAPI.xlua_tointeger(L, 2); int index = LuaAPI.xlua_tointeger(L, 3); int count = LuaAPI.xlua_tointeger(L, 4); int __cl_gen_ret = __cl_gen_to_be_invoked.LastIndexOf(item, index, count); LuaAPI.xlua_pushinteger(L, __cl_gen_ret); return(1); } } catch (System.Exception __gen_e) { return(LuaAPI.luaL_error(L, "c# exception:" + __gen_e)); } return(LuaAPI.luaL_error(L, "invalid arguments to System.Collections.Generic.List<int>.LastIndexOf!")); }
static public int LastIndexOf(IntPtr l) { try { int argc = LuaDLL.lua_gettop(l); if (argc == 2) { System.Collections.Generic.List <WWWRequest> self = (System.Collections.Generic.List <WWWRequest>)checkSelf(l); WWWRequest a1; checkType(l, 2, out a1); var ret = self.LastIndexOf(a1); pushValue(l, true); pushValue(l, ret); return(2); } else if (argc == 3) { System.Collections.Generic.List <WWWRequest> self = (System.Collections.Generic.List <WWWRequest>)checkSelf(l); WWWRequest a1; checkType(l, 2, out a1); System.Int32 a2; checkType(l, 3, out a2); var ret = self.LastIndexOf(a1, a2); pushValue(l, true); pushValue(l, ret); return(2); } else if (argc == 4) { System.Collections.Generic.List <WWWRequest> self = (System.Collections.Generic.List <WWWRequest>)checkSelf(l); WWWRequest a1; checkType(l, 2, out a1); System.Int32 a2; checkType(l, 3, out a2); System.Int32 a3; checkType(l, 4, out a3); var ret = self.LastIndexOf(a1, a2, a3); pushValue(l, true); pushValue(l, ret); return(2); } pushValue(l, false); LuaDLL.lua_pushstring(l, "No matched override function LastIndexOf to call"); return(2); } catch (Exception e) { return(error(l, e)); } }
public int ReisenLastIndexOf(Reise r, int index, int count) { return(dieReisen.LastIndexOf(r, index, count)); }
private void tsbEditSelected_Click(object sender, System.EventArgs e) { if (this.dgvHouses.SelectedCells.get_Count() == 0) { System.Windows.Forms.MessageBox.Show("Выберите элементы для редактирования", "Ошибка", System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Hand); } HouseArea houseAreas = new HouseArea(); HistoryHouseAreasAddChangeForm form = new HistoryHouseAreasAddChangeForm(houseAreas, false); if (form.ShowDialog() == System.Windows.Forms.DialogResult.OK) { HouseArea houseArea = form.GetHouseArea(); System.Collections.Generic.List<int> list = new System.Collections.Generic.List<int>(); foreach (System.Windows.Forms.DataGridViewCell cell in this.dgvHouses.SelectedCells) { if (list.LastIndexOf(cell.get_RowIndex()) == -1) { if (houseArea.Total != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewTotalSquare").set_Value(houseArea.Total); } if (houseArea.Heating != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewHeating").set_Value(houseArea.Heating); } if (houseArea.Living != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewLiving").set_Value(houseArea.Living); } if (houseArea.Floor != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewFloor").set_Value(houseArea.Floor); } if (houseArea.TotalOi != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewTotalOi").set_Value(houseArea.TotalOi); } if (houseArea.LivingMkd != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewLivingMkd").set_Value(houseArea.LivingMkd); } if (houseArea.TotalMkd != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewTotalMKd").set_Value(houseArea.TotalMkd); } if (houseArea.NotLivingMkd != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewNotLivingMKd").set_Value(houseArea.NotLivingMkd); } if (houseArea.NotSubscribe != 0M) { this.dgvHouses.Rows.get_Item(cell.get_RowIndex()).Cells.get_Item("NewNotSubscribe").set_Value(houseArea.NotSubscribe); } list.Add(cell.get_RowIndex()); } } } this.btnSave.set_Enabled(this.ValidateSavingOptions()); }
public int LastIndexOf(T item) { return(list.LastIndexOf(item)); }