예제 #1
0
	public void InitListView(TodoListModel listModel){
		this.listModel = listModel;

		listName.text = listModel.listName;
		itemsAmount.text = "(" + listModel.items.Count + ")";

	}
예제 #2
0
파일: TodoView.cs 프로젝트: satishinext/php
	public TodoListView CreateListView(TodoListModel todoListModel){
		TodoListView listView = Instantiate (oneListViewPrefab).GetComponent<TodoListView> ();
		listView.InitListView (todoListModel);
		listView.transform.SetParent (allListsContentHolder);
		listView.transform.localScale = Vector3.one;
		listsView.Add (listView);
		return listView;
	}
예제 #3
0
	public void CreateNewList(TodoListModel newList){
		if (lists.Any (x => x.listName == newList.listName))
			return;
		newList.SaveTodoList ();
		lists.Add (newList);
		listsId.Add (newList.listId);
		SaveAllListsIds ();
	}
예제 #4
0
	public void SetCurrentList(TodoListView listView){
		//Debug.Log ();
		allListsModel.SetCurrentList (listView.listModel.listName);
		currentTodoListModel = allListsModel.GetCurrentList ();
		todoView.SetCurrentListTitle (listView.listModel.listName);
		todoView.ClearItems ();
		FillItems ();
		todoView.HideAllListView ();
	}
예제 #5
0
	public void CreateNewList(string listName){
		if (lists.Any (x => x.listName == listName))
			return;
		TodoListModel newList = new TodoListModel (GetListId(),listName);
		newList.SaveTodoList ();
		lists.Add (newList);
		listsId.Add (newList.listId);
		SaveAllListsIds ();
	}
예제 #6
0
	public void ShowEditListView(TodoListModel listModel){
		editList = listModel;

		if (editList != null) {
			inputName.text = listModel.listName;
			shareWithFriends.isOn = listModel.shareWithAllFrineds;
		} else {
			inputName.text = "";
			shareWithFriends.isOn = false;
			editList = new TodoListModel();
		}
		gameObject.SetActive (true);
	}
예제 #7
0
	public void Start(){
		allListsModel.LoadAllLists ();
		currentTodoListModel = allListsModel.GetCurrentList ();
		todoView.SetCurrentListTitle (currentTodoListModel.listName);
		FillItems ();
	}
예제 #8
0
파일: TodoView.cs 프로젝트: satishinext/php
	public List<TodoItemView> FillItems(TodoListModel currentTodoListModel){
		foreach (var item in currentTodoListModel.items) {
			CreateOrUpdateItemView(item);
		}
		return itemsView;
	}
예제 #9
0
	public void OnCancle(){
		gameObject.SetActive (false);
		editList = null;
	}
예제 #10
0
	public void DestroyList(TodoListModel list){
		listsId.Remove (list.listId);
		SaveAllListsIds ();
		lists.Remove (list);
		PlayerPrefs.DeleteKey (list.listId.ToString());
	}
예제 #11
0
	public void EditCurrentList(TodoListModel list){
		list.SaveTodoList ();
	}