/// <summary> /// /// </summary> public ItemSub() { //默认小图标+横排显示 this.Expanded = true; this.MultiColumn = true; this.ViewMode = ItemViewMode.SmallIcon; //实例化 this.SubItems = new List <ItemSubInfo>(); }
public void TransferEditorPrefsState(bool load) { if (load) { this.m_ItemViewMode = (ItemViewMode)EditorPrefs.GetInt(this.m_Prefix + "ViewMode", (int)this.m_ItemViewMode); this.m_PreviewHeight = EditorPrefs.GetFloat(this.m_Prefix + "ItemHeight", this.m_PreviewHeight); this.m_ScrollPosition.y = EditorPrefs.GetFloat(this.m_Prefix + "Scroll", this.m_ScrollPosition.y); this.m_CurrrentLibrary = EditorPrefs.GetString(this.m_Prefix + "CurrentLib", this.m_CurrrentLibrary); } else { EditorPrefs.SetInt(this.m_Prefix + "ViewMode", (int)this.m_ItemViewMode); EditorPrefs.SetFloat(this.m_Prefix + "ItemHeight", this.m_PreviewHeight); EditorPrefs.SetFloat(this.m_Prefix + "Scroll", this.m_ScrollPosition.y); EditorPrefs.SetString(this.m_Prefix + "CurrentLib", this.m_CurrrentLibrary); } }
public void TransferEditorPrefsState(bool load) { if (load) { this.m_ItemViewMode = (ItemViewMode) EditorPrefs.GetInt(this.m_Prefix + "ViewMode", (int) this.m_ItemViewMode); this.m_PreviewHeight = EditorPrefs.GetFloat(this.m_Prefix + "ItemHeight", this.m_PreviewHeight); this.m_ScrollPosition.y = EditorPrefs.GetFloat(this.m_Prefix + "Scroll", this.m_ScrollPosition.y); this.m_CurrrentLibrary = EditorPrefs.GetString(this.m_Prefix + "CurrentLib", this.m_CurrrentLibrary); } else { EditorPrefs.SetInt(this.m_Prefix + "ViewMode", (int) this.m_ItemViewMode); EditorPrefs.SetFloat(this.m_Prefix + "ItemHeight", this.m_PreviewHeight); EditorPrefs.SetFloat(this.m_Prefix + "Scroll", this.m_ScrollPosition.y); EditorPrefs.SetString(this.m_Prefix + "CurrentLib", this.m_CurrrentLibrary); } }
private void buttonAllIngredients_SelectionGained(object sender, EventArgs e) { ViewContextMenu.IsOpen = false; SetRadioChecked(sender); ViewMode = ItemViewMode.Ingredients; }