1using System.Globalization;
26 public static string fName =
"ManageContentScreen";
54 m_contentList.ItemWidgetFactory = delegate(
object obj) {
57 switch (listItem.
Type) {
70 labelWidget2.Text += $
" | {listItem.CreationTime.ToLocalTime():dd MMM yyyy HH:mm}";
86 if (
string.IsNullOrEmpty(listItem.
Name)) {
87 return containerWidget;
89 labelWidget4.Text += $
" | {listItem.CreationTime.ToLocalTime():dd MMM yyyy HH:mm}";
90 return containerWidget;
92 catch (Exception ex) {
94 return containerWidget;
105 playerModelWidget.CharacterSkinTexture = texture2;
109 labelWidget6.Text += $
" | {listItem.CreationTime.ToLocalTime():dd MMM yyyy HH:mm}";
122 rectangleWidget.Subtexture = listItem.Texture ==
null
125 rectangleWidget.TextureLinearFilter =
true;
127 labelWidget2.Text = listItem.
Name;
129 labelWidget2.Text += $
" | {listItem.CreationTime.ToLocalTime():dd MMM yyyy HH:mm}";
138 return containerWidget;
140 m_contentList.ItemClicked += obj => {
151 listItem.IsClick =
false;
157 listItem.IsClick =
true;
162 public override void Enter(
object[] parameters) {
174 if (selectedItem !=
null) {
175 m_deleteButton.IsEnabled = !selectedItem.
IsBuiltIn;
176 m_uploadButton.IsEnabled = !selectedItem.
IsBuiltIn;
184 m_deleteButton.IsEnabled =
false;
185 m_uploadButton.IsEnabled =
false;
189 string smallMessage = selectedItem.UseCount <= 0
236 List<ExternalContentType> list = [
246 delegate(
object item) {
267 DialogsManager.HideAllDialogs();
268 if (btn == MessageDialogButton.Button1) {
269 ModsManager.Reboot();
272 ScreensManager.SwitchScreen(
"Content");
286 List<ListItem> list = [];
325 Name = furniturePackName,
361 if (
string.IsNullOrEmpty(o1.
Name)
362 && !
string.IsNullOrEmpty(o2.
Name)) {
365 return !
string.IsNullOrEmpty(o1.
Name) &&
string.IsNullOrEmpty(o2.
Name)
static bool IsBuiltIn(string name)
static DateTime GetCreationDate(string name)
static void UpdateBlocksTexturesList()
static ReadOnlyList< string > BlockTexturesNames
static string GetDisplayName(string name)
static ReadOnlyList< string > CharacterSkinsNames
static DateTime GetCreationDate(string name)
static bool IsBuiltIn(string name)
static string GetDisplayName(string name)
static void UpdateCharacterSkinsList()
static object Get(Type type, string name)
static void HideAllDialogs()
static void ShowDialog(ContainerWidget parentWidget, Dialog dialog)
static void ShowUploadUi(ExternalContentType type, string name)
static void DeleteExternalContent(ExternalContentType type, string name)
static string GetEntryTypeDescription(ExternalContentType type)
static List< List< FurnitureDesign > > ListChains(IEnumerable< FurnitureDesign > designs)
static DateTime GetCreationDate(string name)
static ReadOnlyList< string > FurniturePackNames
static string GetDisplayName(string name)
static List< FurnitureDesign > LoadFurniturePack(SubsystemTerrain subsystemTerrain, string name)
static void UpdateFurniturePacksList()
static string Get(string className, int key)
获取在当前语言类名键对应的字符串
static void SwitchScreen(string name, params object[] parameters)
static void UpdateWorldsList()
static ReadOnlyList< WorldInfo > WorldInfos
ButtonWidget m_changeFilterButton
ButtonWidget m_deleteButton
ListPanelWidget m_contentList
ExternalContentType m_filter
static string GetFilterDisplayName(ExternalContentType filter)
LabelWidget m_filterLabel
override void Enter(object[] parameters)
ButtonWidget m_uploadButton
CharacterSkinsCache m_characterSkinsCache
virtual void UpdateList()
BlocksTexturesCache m_blocksTexturesCache
static readonly Vector2 Zero
static readonly Vector2 One