25 public static string fName =
"FurnitureInventoryPanel";
52 furnitureSetList.ItemWidgetFactory = (Func<object, Widget>)Delegate.Combine(
56 m_furnitureSetList.SelectionChanged += delegate {
62 m_furnitureSetList.SelectedIndex = 0;
80 m_creativeInventoryWidget.PageLabel.Text =
m_pagesCount > 0
81 ? $
"{ComponentFurnitureInventory.PageIndex + 1}/{m_pagesCount}"
84 if (
Input.Scroll.HasValue
96 List<Tuple<string, Action>> list = [
119 t => ((Tuple<string, Action>)t).Item1,
120 delegate(
object t) { ((Tuple<string, Action>)t).Item2(); }
126 List<Tuple<string, Action>> list2 = [
162 t => ((Tuple<string, Action>)t).Item1,
163 delegate(
object t) { ((Tuple<string, Action>)t).Item2(); }
212 List<InventorySlotWidget> list2 =
new(from w in m_inventoryGrid.Children select w as
InventorySlotWidget into w where w !=
null select w);
214 for (
int j = 0; j < list2.Count; j++) {
215 if (num < list.Count) {
219 list2[j].AssignInventorySlot(
null, 0);
223 m_pagesCount = (list.Count + list2.Count - 1) / list2.Count;
268 furnitureSet.Name = s;
304 string text = (string)s;
308 List<FurnitureDesign> list2 = [];
310 foreach (List<FurnitureDesign> item
in list) {
312 if (furnitureDesign == item[0]) {
313 list2.Add(furnitureDesign);
315 else if (furnitureDesign ==
null) {
322 if (list2.Count > 0) {
345 catch (Exception ex) {
366#
if ANDROID || BROWSER
373 if (button == MessageDialogButton.Button1) {
374 Task.Run(async () => {
376 await Storage.ShareFile(FurniturePacksManager.GetFileName($
"{displayName}.scfpack"));
378 catch (Exception e) {
379 Dispatcher.Dispatch(() => DialogsManager.ShowDialog(
381 new MessageDialog(LanguageControl.Error, e.Message, LanguageControl.Ok, null, null)
400 catch (Exception ex) {
FurnitureSet FurnitureSet
ContainerWidget GuiWidget
static object Get(Type type, string name)
static void ShowDialog(ContainerWidget parentWidget, Dialog dialog)
static int GetDesignIndex(int data)
FurnitureSet FurnitureSet
static List< List< FurnitureDesign > > ListChains(IEnumerable< FurnitureDesign > designs)
SubsystemFurnitureBlockBehavior SubsystemFurnitureBlockBehavior
SubsystemTerrain SubsystemTerrain
void DeleteFurnitureSet()
FurnitureInventoryPanel(CreativeInventoryWidget creativeInventoryWidget)
ComponentFurnitureInventory ComponentFurnitureInventory
void ImportFurnitureSet(SubsystemTerrain subsystemTerrain)
void RenameFurnitureSet()
void MoveFurnitureSet(int move)
void ExportFurnitureSet()
void AssignInventorySlots()
ComponentPlayer m_componentPlayer
CreativeInventoryWidget m_creativeInventoryWidget
ButtonWidget m_moreButton
ListPanelWidget m_furnitureSetList
GridPanelWidget m_inventoryGrid
override void UpdateCeases()
bool m_ignoreSelectionChanged
static ReadOnlyList< string > FurniturePackNames
static string GetDisplayName(string name)
static string CreateFurniturePack(string name, ICollection< FurnitureDesign > designs)
static List< FurnitureDesign > LoadFurniturePack(SubsystemTerrain subsystemTerrain, string name)
static void UpdateFurniturePacksList()
static string Get(string className, int key)
获取在当前语言类名键对应的字符串
static int ExtractContents(int value)
static int ExtractData(int value)