//--> checkIfIDExist private void checkIfIDExist(SerializedProperty selectedID) { string objectPath2 = "Assets/AP/Assets/Datas/ProjectManagerDatas.asset"; datasProjectManager _datasProjectManager = AssetDatabase.LoadAssetAtPath(objectPath2, typeof(UnityEngine.Object)) as datasProjectManager; string objectPath = "Assets/AP/Assets/Resources/" + _datasProjectManager.currentDatasProjectFolder + "/TextList/wItem.asset"; TextList _textList = AssetDatabase.LoadAssetAtPath(objectPath, typeof(UnityEngine.Object)) as TextList; if (_textList) { SerializedObject serializedObject2 = new UnityEditor.SerializedObject(_textList); if (selectedID.intValue < serializedObject2.FindProperty("diaryList").GetArrayElementAtIndex(0).FindPropertyRelative("_languageSlot").arraySize && selectedID.intValue >= 0) { SerializedProperty _Title = serializedObject2.FindProperty("diaryList").GetArrayElementAtIndex(0).FindPropertyRelative("_languageSlot").GetArrayElementAtIndex(selectedID.intValue).FindPropertyRelative("diaryTitle").GetArrayElementAtIndex(0); EditorGUILayout.BeginHorizontal(); EditorGUILayout.LabelField("Item :", GUILayout.Width(40)); EditorGUILayout.LabelField(_Title.stringValue.ToString()); EditorGUILayout.EndHorizontal(); } else { EditorGUILayout.HelpBox("This ID doesn't exist", MessageType.Warning); } } }
private void Button_Click_1(object sender, RoutedEventArgs e) { TextList.Add(new testclass() { HeaderText = "Item neu" }); }
public ChatboxHud(GameClient client) { _client = client; _chatWindow = _client.Engine.GuiLoader.Load("chatbox.xml", _client.Engine.Gui.Desktop); _textLines = _client.Engine.Gui.GetWidgetByName <TextList>("chatLines"); _inputBox = _client.Engine.Gui.GetWidgetByName <Textbox>("chatInput"); }
//-> Call after the inGameGlobalManger initialisation public void initData() { data = ingameGlobalManager.instance.currentInfo; if (PlayerPrefs.HasKey("currentLanguage")) { int value = PlayerPrefs.GetInt("currentLanguage"); ingameGlobalManager.instance.currentLanguage = value; txtCurrentLanguage.text = data.listOfLanguage[value]; } else { txtCurrentLanguage.text = data.listOfLanguage[ingameGlobalManager.instance.currentLanguage]; } if (PlayerPrefs.HasKey("subtitleState")) { bool subState = bool.Parse(PlayerPrefs.GetString("subtitleState")); ingameGlobalManager.instance.subtitlesState = subState; if (subtitleStateToggle) { subtitleStateToggle.isOn = subState; } } else { ingameGlobalManager.instance.subtitlesState = true; if (subtitleStateToggle) { subtitleStateToggle.isOn = true; } } }
private void CreateTextList() { // Now fill up the List var fields = Text.Split(new[] { '/' }, StringSplitOptions.RemoveEmptyEntries); foreach (var field in fields) { if (TextList.Count > 0 && !field.Contains(":")) { var text = TextList[TextList.Count - 1]; if (text.EndsWith(":")) { text += field; } else { text += " " + field; } TextList[TextList.Count - 1] = text; } else { TextList.Add(field); } } }
//--> Wait until the ingameGlbalManager finish his initialization IEnumerator Init() { yield return(new WaitUntil(ingameGlobalManager.instance.r_InitBool)); diary = ingameGlobalManager.instance.currentDiary; GenerateListOfDiaryEntry(currentPage); }
public static void Hide() { if (panel != null) { TextList.Destroy(panel); } }
public iTunesSettingsScreen() { _options = new TextList(); Add(_options); _url = new TextWindow(); Add(_url); _urlEntry = new TextEntry(); Add(_urlEntry); _password = new TextWindow(); Add(_password); _passwordEntry = new TextEntry(); Add(_passwordEntry); _urlEntry.Accept += new EventHandler(URLEntry_Accept); _urlEntry.Cancel += new EventHandler(URLEntry_Cancel); _passwordEntry.Accept += new EventHandler(PasswordEntry_Accept); _passwordEntry.Cancel += new EventHandler(PasswordEntry_Cancel); _options.Focus(); _options.ItemActivated += new ItemActivatedEventHandler(OnItemActivated); return; }
private void updateDataFolder() { string objectPath2 = "Assets/AP/Assets/Datas/ProjectManagerDatas.asset"; datasProjectManager _datasProjectManager = AssetDatabase.LoadAssetAtPath(objectPath2, typeof(UnityEngine.Object)) as datasProjectManager; string objectPath = "Assets/AP/Assets/Resources/" + _datasProjectManager.currentDatasProjectFolder + "/TextList/wTextnVoices.asset"; _textList = AssetDatabase.LoadAssetAtPath(objectPath, typeof(UnityEngine.Object)) as TextList; serializedObject2 = new UnityEditor.SerializedObject(_textList); helpBoxEditor = serializedObject2.FindProperty("helpBoxEditor"); diaryList = serializedObject2.FindProperty("diaryList"); currentLanguage = serializedObject2.FindProperty("currentLanguage"); languageSlot = diaryList.GetArrayElementAtIndex(currentLanguage.intValue).FindPropertyRelative("_languageSlot"); _listOfLanguage = serializedObject2.FindProperty("listOfLanguage"); showMoreOptions = serializedObject2.FindProperty("showMoreOptions"); fisrtTextDisplayedInEditor = serializedObject2.FindProperty("fisrtTextDisplayedInEditor"); howManyEntryDisplayed = serializedObject2.FindProperty("howManyEntryDisplayed"); selectedID = serializedObject2.FindProperty("selectedID"); editorType = serializedObject2.FindProperty("editorType"); showDefaultLanguage = serializedObject2.FindProperty("showDefaultLanguage"); updateListOfTitle(currentLanguage.intValue); }
public void readDataFromConsole() { string input = Console.ReadLine(); while (!string.IsNullOrEmpty(input)) { TextList.Add(input); input = Console.ReadLine(); } if (TextList != null) { foreach (string s in TextList) { Console.WriteLine(s); } for (int i = 0; i <= 5; i++) { DataList.Add(TextList[i]); } Console.WriteLine("Count : {0}", DataList.Count); Console.WriteLine("Count : {0}", TextList.Count); EnteredDateForAverageFootfallsPerHour = TextList[6]; EnteredDateForAverageDailyFootfallsInAWeek = TextList[7]; MonthAndYear = TextList[8]; IsDataRead = true; } }
public XMSettingsScreen() { _options = new TextList(); Add( _options ); _email = new TextWindow(); Add( _email ); _emailEntry = new TextEntry(); Add( _emailEntry ); _password = new TextWindow(); Add( _password ); _passwordEntry = new TextEntry(); Add( _passwordEntry ); _emailEntry.Accept += new EventHandler(EmailEntry_Accept); _emailEntry.Cancel += new EventHandler(EmailEntry_Cancel); _passwordEntry.Accept += new EventHandler(PasswordEntry_Accept); _passwordEntry.Cancel += new EventHandler(PasswordEntry_Cancel); _options.Focus(); _options.ItemActivated += new ItemActivatedEventHandler( OnItemActivated ); return; }
public void TestMultipleElements() { var elementOne = new Mock <IWebElement>(); elementOne.SetupGet(x => x.Text).Returns("apple"); var elementTwo = new Mock <IWebElement>(); elementTwo.SetupGet(x => x.Text).Returns("bee"); var elementThree = new Mock <IWebElement>(); elementThree.SetupGet(x => x.Text).Returns("cat"); WebDriver.Setup(x => x.FindElements(It.IsAny <By>())) .Returns(new List <IWebElement> { elementOne.Object, elementTwo.Object, elementThree.Object }.AsReadOnly()); var list = Actor.AsksFor(TextList.For(Locator)).ToList(); list.Count.Should().Be(3); list[0].Should().Be("apple"); list[1].Should().Be("bee"); list[2].Should().Be("cat"); }
private void renameCategoryName(string OldName, string NewName) { if (NewName == "") { NewName = null; } if (OldName == "未分类") //空名字需要专门处理 { while (db.TextLists.FirstOrDefault(c => c.CategoryName == null) != null) { TextList modelNew = db.TextLists.Where(a => a.CategoryName == null).FirstOrDefault(); modelNew.CategoryName = NewName; db.SaveChanges(); } } else { while (db.TextLists.FirstOrDefault(c => c.CategoryName == OldName) != null) { TextList modelNew = db.TextLists.Where(a => a.CategoryName == OldName).FirstOrDefault(); modelNew.CategoryName = NewName; db.SaveChanges(); } } }
private void Sort_Click(object sender, EventArgs e) { List <string> list = Alphabetize(); list.Sort(); TextList.Clear(); Publish(list); }
public static EnumContentModel GetContentModel(Element element) { if (element.tagName == "html") { return(EnumContentModel.root); } else if (element.tagName == "body") { return(EnumContentModel.body); } else if (ContentModel.MetaList.Contains(element.tagName)) { return(EnumContentModel.metadata); } else if (SectionList.Contains(element.tagName)) { return(EnumContentModel.section); } else if (element.tagName == "div" && (element.hasAttribute("class") || element.hasAttribute("id"))) { // when a div has a class or id, it upgraded to a section element. return(EnumContentModel.section); } else if (GroupingList.Contains(element.tagName)) { return(EnumContentModel.grouping); } else if (TextList.Contains(element.tagName)) { return(EnumContentModel.text); } else if (EmbeddedList.Contains(element.tagName)) { return(EnumContentModel.embedded); } else if (TableList.Contains(element.tagName)) { return(EnumContentModel.table); } else if (FormList.Contains(element.tagName)) { return(EnumContentModel.form); } else if (Interactive.Contains(element.tagName)) { return(EnumContentModel.interactive); } else if (Edit.Contains(element.tagName)) { return(EnumContentModel.edit); } else { return(EnumContentModel.unknown); } }
//--> Update feedback ID using unique ID private void updateFeedback(int i, int value) { GameObject obj = GameObject.Find("ingameGlobalManager"); TextList currentFeedback = Resources.Load(obj.GetComponent <ingameGlobalManager>().dataFolder.currentDatasProjectFolder + "/TextList/wFeedback") as TextList; if (currentFeedback) { feedbackIDList.GetArrayElementAtIndex(i).FindPropertyRelative("uniqueID").intValue = currentFeedback.diaryList[0]._languageSlot[value].uniqueItemID; } }
private static CustomBasicList <PaydayPlayerItem> GetPossiblePlayerList(PaydayGameContainer mainGame, PaydayVMData model) { CustomBasicList <PaydayPlayerItem> output = new CustomBasicList <PaydayPlayerItem>(); CustomBasicList <string> tempList = model.PopUpList !.TextList.Select(items => items.DisplayText).ToCustomBasicList(); tempList.ForEach(Name => { output.Add(mainGame.PlayerList.Single(Items => Items.NickName == Name)); }); return(output); }
void OnEnable() { instance = this; manipulateTextList = new EditorManipulateTextList(); _MakeTexture(); string objectPath2 = "Assets/AP/Assets/Datas/ProjectManagerDatas.asset"; datasProjectManager _datasProjectManager = AssetDatabase.LoadAssetAtPath(objectPath2, typeof(UnityEngine.Object)) as datasProjectManager; string objectPath = "Assets/AP/Assets/Resources/" + _datasProjectManager.currentDatasProjectFolder + "/TextList/wTextnVoices.asset"; _textList = AssetDatabase.LoadAssetAtPath(objectPath, typeof(UnityEngine.Object)) as TextList; if (_textList) { } else { b_inventoryAssetExist = false; } serializedObject2 = new UnityEditor.SerializedObject(_textList); helpBoxEditor = serializedObject2.FindProperty("helpBoxEditor"); diaryList = serializedObject2.FindProperty("diaryList"); currentLanguage = serializedObject2.FindProperty("currentLanguage"); languageSlot = diaryList.GetArrayElementAtIndex(currentLanguage.intValue).FindPropertyRelative("_languageSlot"); _listOfLanguage = serializedObject2.FindProperty("listOfLanguage"); showMoreOptions = serializedObject2.FindProperty("showMoreOptions"); fisrtTextDisplayedInEditor = serializedObject2.FindProperty("fisrtTextDisplayedInEditor"); howManyEntryDisplayed = serializedObject2.FindProperty("howManyEntryDisplayed"); selectedID = serializedObject2.FindProperty("selectedID"); b_EditSubtitle = serializedObject2.FindProperty("b_EditSubtitle"); currentAudioSubtitleEdit = serializedObject2.FindProperty("currentAudioSubtitleEdit"); editorType = serializedObject2.FindProperty("editorType"); showDefaultLanguage = serializedObject2.FindProperty("showDefaultLanguage"); multipleVoiceOver = serializedObject2.FindProperty("multipleVoiceOver"); b_ShowEye = serializedObject2.FindProperty("b_ShowEye"); updateListOfTitle(currentLanguage.intValue); subtitleSystem = new EditorSubtitleSystem(); string objectEye = "Assets/AP/Assets/Textures/Edit/Eye.png"; eye = AssetDatabase.LoadAssetAtPath(objectEye, typeof(UnityEngine.Object)) as Texture2D; }
private void getText() { this.Text = db.TextLists.Find(tid); if (Text == null) { IsSuccess = false; } else { IsSuccess = true; } }
bool loadDatas() { bool result = false; currentDiary = Resources.Load(dataFolder.currentDatasProjectFolder + "/TextList/wTextnVoices") as TextList; currentInventory = Resources.Load(dataFolder.currentDatasProjectFolder + "/TextList/wItem") as TextList; currentInfo = Resources.Load(dataFolder.currentDatasProjectFolder + "/TextList/wUI") as TextList; currentFeedback = Resources.Load(dataFolder.currentDatasProjectFolder + "/TextList/wFeedback") as TextList; result = true; return(result); }
//--> Wait until the ingameGlbalManager finish his initialization IEnumerator Init() { yield return(new WaitUntil(ingameGlobalManager.instance.r_InitBool)); inventory = ingameGlobalManager.instance.currentInventory; GenerateListOfinventoryEntry(currentPage); if (borderObjectSelected) { borderObjectSelected.gameObject.SetActive(false); } }
private void removeCategory(string name) { if (name == "未分类") { return; //TODO:若分类本来就为空导致无法删除的异常处理 } //删除分类即分类名置null while (db.TextLists.FirstOrDefault(c => c.CategoryName == name) != null) { TextList modelNew = db.TextLists.Where(a => a.CategoryName == name).FirstOrDefault(); modelNew.CategoryName = null; db.SaveChanges(); } }
public void TextListTest() { var textList = new TextList(); Assert.AreEqual(0, textList.Count); var i = textList.Add("Sample"); Assert.AreEqual(0, i); Assert.AreEqual(0, textList.IndexOf("Sample")); Assert.AreEqual(-1, textList.IndexOf("SAMPLE")); Assert.AreEqual(-1, textList.IndexOf("Junk")); Assert.AreEqual(1, textList.Count); }
//--> Display page for a selected entry public void showDiaryEntry(int value, TextList currentTextList) { //Debug.Log (currentTextList.name + " : " + value); _currentTextList = currentTextList; ingameGlobalManager.instance.canvasPlayerInfos.deactivateObjTitle(); ingameGlobalManager.instance.canvasPlayerInfos.deactivateObjPuzzleNotAvailable(); ingameGlobalManager.instance.canvasPlayerInfos.deactivateObjResetPuzzle(); ingameGlobalManager.instance.voiceOverManager.deactivateObSubtitle(); if (diaryReaderTxt) { currentEntryDisplayedOnScreen = value; int offset = 0; // diary case if (_currentTextList == ingameGlobalManager.instance.currentInventory) // inventory case { offset = 1; } if (currentTextList.diaryList [ingameGlobalManager.instance.currentLanguage]._languageSlot [value].diaryText.Count > 1 + offset) { nextPageReader.SetActive(true); } else { nextPageReader.SetActive(false); } lastPageReader.SetActive(false); //Debug.Log (currentTextList.diaryList [ingameGlobalManager.instance.currentLanguage]._languageSlot [value].diaryText.Count); if (currentTextList.diaryList [ingameGlobalManager.instance.currentLanguage]._languageSlot [value].diaryText.Count > 1 && // Inventory Case currentTextList == ingameGlobalManager.instance.currentInventory) { currentPageReader = 1; diaryReaderTxt.text = currentTextList.diaryList [ingameGlobalManager.instance.currentLanguage]._languageSlot [value].diaryText [currentPageReader]; } else if (currentTextList.diaryList [ingameGlobalManager.instance.currentLanguage]._languageSlot [value].diaryText.Count > 0 && // Diary Case currentTextList == ingameGlobalManager.instance.currentDiary) { currentPageReader = 0; diaryReaderTxt.text = currentTextList.diaryList [ingameGlobalManager.instance.currentLanguage]._languageSlot [value].diaryText [currentPageReader]; } else { diaryReaderTxt.text = "PAGE NUMBER = 0. You need to create at least one page for this entry."; Debug.Log("INFO : Item has no page"); } } }
/// <summary> /// Create a new <see cref="GenObjectList"/> list. /// </summary> /// <param name="data">The generator data containing the list.</param> /// <param name="parent">The generator object owning the list.</param> /// <param name="classId">The ID of objects in the list.</param> /// <param name="subClassDef">The definition of the subclass</param> public GenSubClass(GenDataBase data, GenObject parent, int classId, GenDataDefSubClass subClassDef) { Properties = new NameList { "Reference", "Relationship" }; Attributes = new TextList { "", "" }; Reference = ""; Definition = subClassDef; GenDataBase = data; Parent = parent; ClassId = classId; }
public void TestSingleElement() { var element = new Mock <IWebElement>(); element.SetupGet(x => x.Text).Returns("apple"); WebDriver.Setup(x => x.FindElements(It.IsAny <By>())).Returns(new List <IWebElement> { element.Object }.AsReadOnly()); var list = Actor.AsksFor(TextList.For(Locator)).ToList(); list.Count.Should().Be(1); list[0].Should().Be("apple"); }
/** [シングルトン]constructor */ private Render2D() { //ルート。 { this.root_gameobject = new UnityEngine.GameObject(); this.root_gameobject.name = "Render2D"; UnityEngine.GameObject.DontDestroyOnLoad(this.root_gameobject); this.root_transform = this.root_gameobject.GetComponent <UnityEngine.Transform>(); } //イベントシステム作成。入力フィールド用。 { if (Fee.Render2D.Config.CREATE_EVENTYSYSTEM == true) { this.eventsystem = Fee.Instantiate.Instantiate.CreateEventSystem("EventSystem", null); UnityEngine.GameObject.DontDestroyOnLoad(this.eventsystem); } } //スクリーン。 this.screen = new Screen(); //マテリアルリスト。 this.materiallist = new Material_List(); //スプライトリスト。 this.spritelist = new SpriteList(); //テキストリスト。 this.textlist = new TextList(); //入力フィールドリスト。 this.inputfieldlist = new InputFieldList(); //デフォルト。フォント。 this.default_font = UnityEngine.Resources.GetBuiltinResource <UnityEngine.Font>(Config.DEFAULT_FONT_NAME); //レイヤーリスト。 this.layerlist = new LayerList(this.root_gameobject.GetComponent <UnityEngine.Transform>()); //バーテックス計算タスク。 this.task_calcvertex = new Task_CalcVertex(this); //ソートリストタスク。 this.task_sortlist = new Task_SortList(this); //callback_on_change_screen_size this.callback_on_change_screen_size = null; }
private void remove(int tID) { int TextID = tID; TextList target = db.TextLists.Find(TextID); //删除文章所属的所有评论 while (db.CommitLists.Where(c => c.TextID == TextID).FirstOrDefault() != null) { db.CommitLists.Remove(db.CommitLists.Where(c => c.TextID == TextID).FirstOrDefault()); db.SaveChanges(); } //评论删除后再删除文章,以免后续异常 db.TextLists.Remove(target); db.SaveChanges(); }
void OnEnable() { //-> Load the needed TextList TextProperties myScript = (TextProperties)target; string objectPath = "Assets/AP/Assets/Datas/ProjectManagerDatas.asset"; datasProjectManager _ProjectManagerDatas = AssetDatabase.LoadAssetAtPath(objectPath, typeof(UnityEngine.Object)) as datasProjectManager; string s_dataType = "wTextnVoices.asset"; if (myScript.editorType == 1) { s_dataType = "wItem.asset"; } if (myScript.editorType == 2) { s_dataType = "wUI.asset"; } if (myScript.editorType == 3) { s_dataType = "wFeedback.asset"; } string objectPath2 = "Assets/AP/Assets/Resources/" + _ProjectManagerDatas.currentDatasProjectFolder + "/TextList/" + s_dataType; //Debug.Log (objectPath2); TextList tmpTextList = AssetDatabase.LoadAssetAtPath(objectPath2, typeof(UnityEngine.Object)) as TextList; myScript.textList = tmpTextList; //-> Setup the SerializedProperties. SeeInspector = serializedObject.FindProperty("SeeInspector"); managerID = serializedObject.FindProperty("managerID"); uniqueID = serializedObject.FindProperty("uniqueID"); _textList = serializedObject.FindProperty("textList"); language_AutoUpdate = serializedObject.FindProperty("language_AutoUpdate"); b_UIButtonShowTitle = serializedObject.FindProperty("b_UIButtonShowTitle"); b_UpdateID = serializedObject.FindProperty("b_UpdateID"); Find_UniqueId_In_The_TextList(); Tex_01 = MakeTex(2, 2, new Color(1, .8f, 0.2F, .4f)); }
public iTunesSearchScreen() { _options = new TextList(); Add(_options); _search = new TextWindow(); Add(_search); _searchEntry = new TextEntry(); Add(_searchEntry); _searchEntry.Accept += new EventHandler(SearchEntry_Accept); _searchEntry.Cancel += new EventHandler(SearchEntry_Cancel); _options.Focus(); _options.ItemActivated += new ItemActivatedEventHandler(OnItemActivated); return; }
public void LoadTextList(CustomBasicList <string> thisList) { int x; x = 1; foreach (var firstText in thisList) { ListViewPieceCP newText = new ListViewPieceCP(); newText.Index = x; newText.DisplayText = firstText; newText.IsEnabled = true; TextList.Add(newText); //try this way. x += 1; } if (TextList.Count == 0) { throw new BasicBlankException("Failed to load text list"); } }
public iTunesSearchScreen() { _options = new TextList(); Add( _options ); _search = new TextWindow(); Add( _search ); _searchEntry = new TextEntry(); Add( _searchEntry ); _searchEntry.Accept += new EventHandler(SearchEntry_Accept); _searchEntry.Cancel += new EventHandler(SearchEntry_Cancel); _options.Focus(); _options.ItemActivated += new ItemActivatedEventHandler( OnItemActivated ); return; }
public ComicsSubscriptionsScreen() { System.Reflection.Assembly a = System.Reflection.Assembly.GetExecutingAssembly(); System.IO.FileInfo fi = new System.IO.FileInfo( a.Location ); // Instructions if no comics are in the XML _instructions = new TextWindow(); Add( _instructions ); // Show comics from XML _availableComics = new TextList(); Add( _availableComics ); _availableComics.Focus(); _availableComics.ItemActivated += new ItemActivatedEventHandler( OnItemActivated ); // Initialize the sort by variable if it isn't set if (!SingletonConfig.Instance.IsSet( "Comics.SortBy" )) SingletonConfig.Instance.SetProperty( "Comics.SortBy", "Date" ); return; }