Example #1
0
 public void indicateShowMenu(TaskView src)
 {
     for (int i = 0; i < this.taskViewList.Count; i++)
     {
         TaskView view = this.taskViewList[i];
         if (view != src)
         {
             view.hideMenuContent();
         }
     }
 }
Example #2
0
 public async Task Cancel()
 {
     if (TaskView.TaskId > 0)
     {
         await Load(TaskView.TaskId);
     }
     else
     {
         TaskView = new TaskView();
     }
 }
Example #3
0
        private void SortTasksOriginal(object?parameter)
        {
            var currentSelection = TaskView.CurrentItem;

            mainViewModel.ResetTasksOrder(TasksOrdering.AsTallied);

            if (currentSelection != null)
            {
                TaskView.MoveCurrentTo(currentSelection);
            }
        }
Example #4
0
        public ActionResult Details(int id)
        {
            TaskView task = mapper.Map <TaskBLL, TaskView>(taskService.GetTask(id));
            IEnumerable <TaskView> subtasks = mapper.Map <IEnumerable <TaskBLL>, IEnumerable <TaskView> >(subtaskService.GetSubtasksOfTask(id));
            DetailsTaskView        tasks    = new DetailsTaskView
            {
                MainTask = task,
                Subtasks = subtasks
            };

            return(PartialView("Details", tasks));
        }
Example #5
0
        /// <summary>
        /// メイン画面にタスクビューを表示
        /// </summary>
        /// <param name="task"></param>
        private void addTaskView(TaskItem task)
        {
            TaskView view = new TaskView(task);

            view.completeButton_Click += complete;
            view.editButton_Click     += edit;
            view.deleteButton_Click   += delete;
            //ビューのコントロールを追加
            this.taskListPanel.Controls.Add(view);
            //リストに追加
            TaskViewManager.getInstance().addTaskView(view);
        }
Example #6
0
    public void onTaskCreated(Task task)
    {
        GameObject go = Instantiate(taskPrefab);

        go.name                    = "task" + numTasks;
        go.transform.parent        = stage;
        go.transform.localPosition = new Vector3(-2.7f, .6f - 1.35f * numTasks, 0);
        TaskView view = go.GetComponent <TaskView>();

        view.setTask(task);
        numTasks++;
    }
Example #7
0
        private void TaskView_MouseDown(object sender, MouseButtonEventArgs e)
        {
            HitTestResult r = VisualTreeHelper.HitTest(this, e.GetPosition(this));

            if (r.VisualHit.GetType() != typeof(ListBoxItem))
            {
                TaskView.UnselectAll();
            }

            ChangeTask.Visibility = Visibility.Hidden;
            DeleteTask.Visibility = Visibility.Hidden;
        }
Example #8
0
        //完了
        private void complete(object sender)
        {
            TaskView    taskView = (TaskView)sender;
            TaskManager manager  = TaskManager.getInstance();

            //たすくIDを元にタスク完了処理
            manager.completeTaskById(taskView.getTaskItemId());
            //タスクリスト保存
            manager.saveTaskList();
            //テーブル更新
            refreshTaskTable();
        }
        public IActionResult update(int id, [FromBody] TaskView updatedTask)
        {
            //to update any attribute in task by id
            var task = _taskRepository.getTaskById(id);

            if (task == null)
            {
                return(NotFound());
            }
            _mapper.Map(updatedTask, task);

            return(Ok(_mapper.Map <TaskView>(task)));
        }
Example #10
0
        async public Task GetTasks(IGetTaskCallback callback, TaskView taskView)
        {
            this.callback    = callback;
            getTaskDbHandler = GetTaskDbHandler.GetInstance;
            await getTaskDbHandler.GetTasks(this, taskView);

            IGetTaskNetworkHandlerContract getTaskNetworkHandler = new GetTaskNetworkHandler();
            await getTaskNetworkHandler.GetTasksAsync(this);

            this.callback    = callback;
            getTaskDbHandler = GetTaskDbHandler.GetInstance;
            await getTaskDbHandler.GetTasks(this, taskView);
        }
Example #11
0
        public async void BtnGetEvent(string id)
        {
            TsApiService t      = new TsApiService();
            TaskView     result = await t.GetItemDetailPage(id);

            //TopSeries = new ObservableCollection<TaskView>(result);
            LabTitle.Text               = result.Title;
            LabTime.Text                = result.Time;
            Labbuild.Text               = result.Build;
            Labaddress.Text             = result.Address;
            ItemsListView.HeightRequest = 36 * 2 * result.Contacts.Count;
            ItemsListView.ItemsSource   = result.Contacts;
        }
Example #12
0
        // PUT api/Report
        public IHttpActionResult Put([FromBody] TaskView model)
        {
            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }

            try { service.Update(model); }

            catch (Exception e) { BadRequest(e.Message); }

            return(Ok());
        }
Example #13
0
        /// <summary>
        /// Popup for task due alert
        /// </summary>
        /// <param name="node"></param>
        /// <param name="reminderType">should never be None. Acceptable values are First and Final.</param>
        public TaskReminderDialog(MapNode node, ReminderType reminderType)
        {
            InitializeComponent();

            TaskView tv = new TaskView(node, DateHelper.GetTimePartString(node.GetDueDate()), onTaskViewEvent, false);

            tv.Width   = 300;
            Text       = "Task Due " + (reminderType == ReminderType.First ? "in " + (node.GetDueDate() - DateTime.Now).Minutes + " mins" : "now");
            ClientSize = new Size(tv.Width, tv.Height);
            Controls.Add(tv);

            FormClosing += TaskReminderDialog_FormClosing;
        }
Example #14
0
            public void AddTask()
            {
                var list = Substitute.ForPartsOf <TaskList>();
                var view = new TaskView(list);

                view.TaskEntryField = "write example";

                view.ClickButton();

                // list substitute functions as test spy
                list.Received().Add("write example");
                Assert.That(view.DisplayedTasks, Is.EqualTo(new[] { "write example" }));
            }
        public ActionResult ProjectDetail()
        {
            int      idValue    = int.Parse(Request["ProjectID"]);
            Project  project    = ProjectSiteContract.Projects.SingleOrDefault(m => m.Id == idValue);
            TaskView taskDetail = new TaskView();

            ViewBag.ID                  = project.Id;
            ViewBag.ProjectPrice        = project.ProjectPrice;
            ViewBag.ProjectName         = project.ProjectName;
            ViewBag.ProjectLogo         = project.ProjectLogo;
            ViewBag.ProjectIntroduction = project.ProjectIntroduction;
            ViewBag.ShowUrl             = project.ShowUrl;
            return(View());
        }
Example #16
0
 static void Main(string[] args)
 {
     #region Mysql
     string ip       = CC.Utility.iniHelper.ReadValue(FilePath, "Mysql", "ip");
     string user     = CC.Utility.iniHelper.ReadValue(FilePath, "Mysql", "user");
     string psw      = CC.Utility.iniHelper.ReadValue(FilePath, "Mysql", "psw");
     string dataBase = CC.Utility.iniHelper.ReadValue(FilePath, "Mysql", "dataBase");
     MysqlFactory.Instance.DefaultConnStr = MysqlFactory.GetConnStr(ip, user, psw, dataBase);
     ORMHelper.DefaultDataFactory         = MysqlFactory.Instance;
     #endregion
     TaskView t = new TaskView();
     t.SetDlgTitle("Tmall_Skechers");
     t.AddTask(GetLiningTmallData.Instance);
     //t.AddTask(GetLiningResult.Instance);
     t.ShowDialog();
 }
Example #17
0
 public TaskView AddTask()
 {
     newTask = new TaskView();
     try
     {
         newTask.description = txtTask.Text;
         newTask.effort      = (double)upDown_task.Value;
         newTask.projectId   = newProject.Id;
         newTask             = services.AddNEW <TaskView>(newTask);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     return(newTask);
 }
Example #18
0
        private void TaskListLoadedForPopup(HraListLoadedEventArgs e)
        {
            RiskApps3.Model.PatientRecord.Patient p = SessionManager.Instance.GetActivePatient();
            if (p != null)
            {
                Task t = new Task(p, "Task", "Pending", SessionManager.Instance.ActiveUser.ToString(), DateTime.Now);
                HraModelChangedEventArgs args = new HraModelChangedEventArgs(null);
                args.Persist = true;
                p.Tasks.AddToList(t, args);

                TaskView tv = new TaskView(t);
                tv.ShowDialog();
                p.Tasks.ReleaseListeners(this);
                RefreshQueue();
            }
        }
Example #19
0
 static void Main(string[] args)
 {
     #region Mysql
     string ip       = CC.Utility.iniHelper.ReadValue(FilePath, "Mysql", "ip");
     string user     = CC.Utility.iniHelper.ReadValue(FilePath, "Mysql", "user");
     string psw      = CC.Utility.iniHelper.ReadValue(FilePath, "Mysql", "psw");
     string dataBase = CC.Utility.iniHelper.ReadValue(FilePath, "Mysql", "dataBase");
     MysqlFactory.Instance.DefaultConnStr = MysqlFactory.GetConnStr(ip, user, psw, dataBase);
     ORMHelper.DefaultDataFactory         = MysqlFactory.Instance;
     #endregion
     //GetData_CSV.GotResultCsv("Skechers_Tmall_20170328.xlsx", "20170328分析", "Skechers_Tmall_20170328");
     TaskView t = new TaskView();
     t.SetDlgTitle("Tmall_Skechers");
     //t.AddTask(Get_SkechersResult.Instance);
     t.AddTask(Tmall_Skechers_Task.Instance);
     t.ShowDialog();
 }
Example #20
0
        public async Task <TaskView> GetTaskViewByIdAsync(int id)
        {
            var response = await _client.GetAsync($"/api/TodoItems/{id}");

            if (response.IsSuccessStatusCode)
            {
                using var responseStream = await response.Content.ReadAsStreamAsync();

                TaskView converted = await JsonSerializer.DeserializeAsync <TaskView>(responseStream);

                return(converted);
            }
            else
            {
                return(new TaskView());
            }
        }
Example #21
0
        //--------------------------Govno ----------------------------------
        // POST api/Report
        public TaskView Post([FromBody] TaskView model)
        {
            TaskView i;

            if (!ModelState.IsValid)
            {
                return(null);
            }

            try
            {
                i = service.AddNEW(model);
                return(i);
            }

            catch (Exception e) { return(null); }
        }
Example #22
0
        public void ApprovedReport(TaskView _task)
        {
            ConfirmWindow confirmWindow   = new ConfirmWindow();
            int           selectedProject = GetClickedProjectId();

            if (confirmWindow.ShowDialog() == true)
            {
                try
                {
                    TaskView task = services.Get <TaskView>(_task.Id);

                    ReportView _report = services.Get <ReportView>(_task.report_id);
                    _report.status = TMS.Data.ReportStatus.Approved;
                    services.Update <ReportView>(_report);

                    ApproveView apprView = services.Get <ApproveView>(_task.approveId);
                    apprView.isApproved = true;
                    apprView.rootCase   = "Approved";
                    apprView.reportId   = _report.Id;
                    services.Update <ApproveView>(apprView);

                    if (chkOpen.IsChecked == true)
                    {
                        dgTasks.ItemsSource = GetTasksWithReports().Where(x => x.projectId == selectedProject && x.status == TMS.Data.ReportStatus.Open);
                    }
                    if (chkAproved.IsChecked == true)
                    {
                        dgTasks.ItemsSource = GetTasksWithReports().Where(x => x.projectId == selectedProject && x.status == TMS.Data.ReportStatus.Approved);
                    }
                    if (chkDecline.IsChecked == true)
                    {
                        dgTasks.ItemsSource = GetTasksWithReports().Where(x => x.projectId == selectedProject && x.status == TMS.Data.ReportStatus.Declined);
                    }

                    MessageBox.Show("The report has been successfully approved!");
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
            }
        }
Example #23
0
 //update task from taskview
 public Models.Task UpdateTask(TaskView taskView)
 {
     Models.Task task = db.Tasks.Find(taskView.Id);
     task.Title        = taskView.Title;
     task.Description  = taskView.Description;
     task.DueDate      = taskView.Date;
     task.CustomListId = task.CustomListId;
     if (taskView.Importance == null)
     {
         task.Importance = db.Importances.FirstOrDefault(p => p.Name == "normal");
     }
     else
     {
         task.Importance = db.Importances.FirstOrDefault(p => p.Name == taskView.Importance);
     }
     db.SaveChanges();
     return(task);
 }
Example #24
0
        public async Task <TaskView> PostTaskViewAsync(TaskView taskView)
        {
            var taskJson = new StringContent(JsonSerializer.Serialize(taskView), Encoding.UTF8, "application/json");

            using var httpResponse = await _client.PostAsync("/api/TodoItems/", taskJson);

            if (httpResponse.IsSuccessStatusCode)
            {
                using var responseStream = await httpResponse.Content.ReadAsStreamAsync();

                TaskView task = await JsonSerializer.DeserializeAsync <TaskView>(responseStream);

                return(task);
            }
            else
            {
                return(taskView);
            }
        }
Example #25
0
        public IActionResult Create([FromBody] TaskView taskTypeData)
        {
            if (!ModelState.IsValid)
            {
                return(SendInvalidModelResponse());
            }

            try
            {
                var result = _service.Create(taskTypeData);

                var locationUri = $"{Request.Host}/api/v1/odata/Tasks({result.Id})";

                return(Created(locationUri, _mapper.Map <TaskType, TaskView>(result)));
            }
            catch (Exception e)
            {
                return(SendErrorResponse(e));
            }
        }
Example #26
0
        public string CreateTask(CreateTaskView newTask)
        {
            string author = User.Identity.Name;

            if (newTask.TemplateId.HasValue)
            {
                try
                {
                    templateSubtasksService.AddSubtasksFromTemplate(newTask.ParentId.Value, newTask.TemplateId.Value, author);
                }
                catch (Exception e)
                {
                    return("Error. Task wasn't created" + e.Message);
                }
                return("Task was created");
            }

            var task = new TaskView
            {
                ParentId = newTask.ParentId,
                Name     = newTask.Name,
                Comment  = newTask.Comment
            };

            try
            {
                if (!newTask.ParentId.HasValue)
                {
                    taskService.CreateTask(mapper.Map <TaskView, TaskBLL>(task), author, newTask.Assignee);
                }
                else
                {
                    subtaskService.AddSubtask(mapper.Map <TaskView, TaskBLL>(task), task.ParentId.Value);
                }
            }
            catch (Exception e)
            {
                return("Task wasn't created. Error: " + e.Message);
            }
            return("Task was created");
        }
Example #27
0
        public void GetAllTasks_MockDbSetTasksAndContext_AndGetTask()
        {
            //assign
            MiniAutoFixture miniAutoFixture = new MiniAutoFixture();

            miniAutoFixture.Initialize();

            User user          = DbSetTools.CreateUser(11, miniAutoFixture);
            Task taskSpecified = DbSetTools.CreateTask(11, user, miniAutoFixture);

            List <Task> tasksCollection = DbSetTools.CreateTaskList(1, user, 10, miniAutoFixture)
                                          .Concat(new Task[] { taskSpecified })
                                          .ToList();


            IQueryable <Task> tasks = tasksCollection.AsQueryable();

            var mockDbSet = new Mock <DbSet <Task> >();

            mockDbSet.As <IQueryable <Task> >().Setup(m => m.Provider).Returns(tasks.Provider);
            mockDbSet.As <IQueryable <Task> >().Setup(m => m.Expression).Returns(tasks.Expression);
            mockDbSet.As <IQueryable <Task> >().Setup(m => m.ElementType).Returns(tasks.ElementType);
            mockDbSet.As <IQueryable <Task> >().Setup(m => m.GetEnumerator()).Returns(tasks.GetEnumerator());

            var mockContext = new Mock <OrganizerContext>();

            mockContext.Setup(c => c.Tasks).Returns(mockDbSet.Object);
            var            logger         = new Mock <ILogger <ViewRepository> >();
            ViewRepository viewRepository = new ViewRepository(mockContext.Object, logger.Object);


            // action
            TaskView taskView = viewRepository.GetTask(taskSpecified.Id);

            // assign
            Assert.Equal(taskSpecified.Id, taskView.Id);
            Assert.Equal(taskSpecified.Text, taskView.Text);
            Assert.Equal(taskSpecified.Date, taskView.Date);
            Assert.Equal(taskSpecified.Deleted, taskView.Deleted);
            Assert.Equal(taskSpecified.Done, taskView.Done);
        }
Example #28
0
        public void Post_MockModifyRepository_AndInsertTask()
        {
            //assign
            MiniAutoFixture miniAutoFixture = new MiniAutoFixture();

            miniAutoFixture.Initialize();

            int idUser           = miniAutoFixture.CreateInt();
            var viewRepository   = new Mock <IViewRepository>();
            var modifyRepository = new Mock <IModifyRepository>();
            var logger           = new Mock <ILogger <TaskController> >();

            TaskModify taskModify = DomainTools.CreateTaskModify(miniAutoFixture);
            TaskView   taskView   = new TaskView
            {
                Id      = miniAutoFixture.CreateInt(),
                Text    = taskModify.Text,
                Date    = taskModify.Date,
                Deleted = false,
                Done    = false
            };

            modifyRepository.Setup(a => a.InsertTask(It.IsAny <int>(), It.IsAny <TaskModify>())).Returns <int, TaskModify>((a, b) => taskView);

            TaskController taskController = new TaskController(viewRepository.Object, modifyRepository.Object, logger.Object);

            //action
            IActionResult actionResult = taskController.Post(idUser, taskModify);

            //assert
            var okResult   = Assert.IsType <OkObjectResult>(actionResult);
            var returnTask = Assert.IsType <TaskView>(okResult.Value);

            modifyRepository.Verify(a => a.InsertTask(It.Is <int>(val => val == idUser), It.Is <TaskModify>(val => val == taskModify)), Times.Once);
            Assert.NotNull(returnTask);
            Assert.Equal(taskView.Id, returnTask.Id);
            Assert.Equal(taskModify.Text, returnTask.Text);
            Assert.Equal(taskModify.Date, returnTask.Date);
            Assert.Equal(taskView.Deleted, returnTask.Deleted);
            Assert.Equal(taskView.Done, returnTask.Done);
        }
Example #29
0
        public void MapTaskToView_WhenSetTask_ReturnTaskView()
        {
            //assign
            MiniAutoFixture miniAutoFixture = new MiniAutoFixture();

            miniAutoFixture.Initialize();

            int id = miniAutoFixture.CreateInt();

            Task task = DbSetTools.CreateTask(id, null, miniAutoFixture);

            //action
            TaskView taskView = ExtensionMethods.MapTaskToView(task);

            //assert
            Assert.Equal(task.Id, taskView.Id);
            Assert.Equal(task.Date, taskView.Date);
            Assert.Equal(task.Text, taskView.Text);
            Assert.Equal(task.Done, taskView.Done);
            Assert.Equal(task.Deleted, taskView.Deleted);
        }
Example #30
0
        public void DeleteTask(TaskView _task)
        {
            int           selectedProject = GetClickedProjectId();
            ConfirmWindow confirmWindow   = new ConfirmWindow();

            if (confirmWindow.ShowDialog() == true)
            {
                try
                {
                    if (_task.Id != 0)
                    {
                        if (chkWithRep.IsChecked == true)
                        {
                            services.Delete <TaskView>(_task.Id);
                            MessageBox.Show("The task has been successfully deleted!");
                            dgTasks.ItemsSource  = GetTasksWithReports().Where(x => x.projectId == selectedProject);
                            chkWithRep.IsChecked = true;
                        }
                        if (chkWithRep.IsChecked == false)
                        {
                            services.Delete <TaskView>(_task.Id);
                            MessageBox.Show("The task has been successfully deleted!");
                            dgTasks.ItemsSource  = GetAllTasks().Where(x => x.projectId == selectedProject);
                            chkWithRep.IsChecked = false;
                        }
                    }
                    else
                    {
                        MessageBox.Show("Error");
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
            }
            else
            {
            }
        }
Example #31
0
 /// <remarks/>
 public System.IAsyncResult BeginTaskGetListAsDataSet(TaskView view, bool keepID, System.DateTime cutOffDate, bool cutOffDateSpecified, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("TaskGetListAsDataSet", new object[] {
                 view,
                 keepID,
                 cutOffDate,
                 cutOffDateSpecified}, callback, asyncState);
 }
Example #32
0
        protected override void OnCreate(Bundle bundle)
        {
			this.Window.AddFlags(WindowManagerFlags.Fullscreen);
            base.OnCreate(bundle);
            SetContentView(Resource.Layout.MainView);

			vm = this.ViewModel as MainViewModel;
			vm.PropertyChanged += Vm_PropertyChanged;
			loWallView = new WallView(this);
			currentIndexLO = 0;

			LinearLayout linearMainLayout = FindViewById<LinearLayout>(Resource.Id.left_drawer);

			/*scrollIndice = new ScrollView (this);
			scrollIndice.LayoutParameters = new ScrollView.LayoutParams (-1,400);
			linearContentIndice = new LinearLayout (this);
			linearContentIndice.LayoutParameters = new LinearLayout.LayoutParams (-1, 800);
			linearContentIndice.Orientation = Orientation.Vertical;
			linearContentIndice.SetBackgroundColor (Color.Red);

			scrollIndice.AddView (linearContentIndice); */


			var metrics = Resources.DisplayMetrics;
			widthInDp = ((int)metrics.WidthPixels);
			heightInDp = ((int)metrics.HeightPixels);
			Configuration.setWidthPixel (widthInDp);
			Configuration.setHeigthPixel (heightInDp);

			task = new TaskView (this);

			iniMenu ();

			mToolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
			SetSupportActionBar(mToolbar);
			mToolbar.SetNavigationIcon (Resource.Drawable.hamburger);

			mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
			mLeftDrawer = FindViewById<LinearLayout>(Resource.Id.left_drawer);
			mRightDrawer = FindViewById<LinearLayout>(Resource.Id.right_drawer);

			mLeftDrawer.Tag = 0;
			mRightDrawer.Tag = 1;

			frameLayout = FindViewById<FrameLayout> (Resource.Id.content_frame);

			main_ContentView = new RelativeLayout (this);
			main_ContentView.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);


			// main_ContentView.AddView (scrollIndice);
			//main_ContentView.AddView(linearContentIndice);

			LOContainerView LOContainer = new LOContainerView (this);

			//main_ContentView.AddView (LOContainer);
			//WallView wallview = new WallView(this);

			//wallview.OpenLO.Click += Lo_ImagenLO_Click;
			//lo.OpenTasks.Click += ListTasks_ItemClick;

			//wallview.OpenChat.Click += imBtn_Chat_Click;
			//wallview.OpenUnits.Click += imBtn_Units_Click;

			loWallView.OpenChat.Click += imBtn_Chat_Click;
			loWallView.OpenUnits.Click += imBtn_Units_Click;

			main_ContentView.AddView (loWallView);


			frameLayout.AddView (main_ContentView);


			RelativeLayout RL = FindViewById<RelativeLayout> (Resource.Id.main_view_relativeLayoutCL);

			Drawable dr = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("icons/nubeactivity.png"), 768, 1024, true));
			RL.SetBackgroundDrawable (dr);

			dr = null;

			//seting up chat view content


			title_view = FindViewById<TextView> (Resource.Id.chat_view_title);


			info1= FindViewById<TextView> (Resource.Id.chat_view_info1);
			info2 = FindViewById<TextView> (Resource.Id.chat_view_info2);
			title_list = FindViewById<TextView> (Resource.Id.chat_list_title);

			mListViewChat = FindViewById<ListView> (Resource.Id.chat_list_view);

			title_view.SetX (Configuration.getWidth(74));
			title_view.SetY (Configuration.getHeight (202));

			title_view.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			title_view.SetTypeface (null, TypefaceStyle.Bold);

			info1.SetX (Configuration.getWidth (76));
			info1.SetY (Configuration.getHeight (250));
			info1.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			info2.SetX (Configuration.getWidth (76));
			info2.SetY (Configuration.getHeight (285));
			info2.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");

			title_list.SetX (Configuration.getWidth (76));
			title_list.SetY (Configuration.getHeight (391));

			title_list.Typeface =  Typeface.CreateFromAsset(this.Assets, "fonts/HelveticaNeue.ttf");
			title_list.SetTypeface (null, TypefaceStyle.Bold);

			mListViewChat.SetX (0);
			mListViewChat.SetY (Configuration.getHeight (440));

			//end setting



			linearMainLayout.AddView (mainLayout);

            vm.PropertyChanged += new PropertyChangedEventHandler(logout_propertyChanged);

            RegisterWithGCM();

			mDrawerToggle = new MyActionBarDrawerToggle(
				this,							//Host Activity
				mDrawerLayout,					//DrawerLayout
				Resource.String.openDrawer,		//Opened Message
				Resource.String.closeDrawer		//Closed Message
			);

			mDrawerLayout.SetDrawerListener(mDrawerToggle);
			SupportActionBar.SetHomeButtonEnabled (true);
			SupportActionBar.SetDisplayShowTitleEnabled(false);

			mDrawerToggle.SyncState();

			if (bundle != null)
			{
				if (bundle.GetString("DrawerState") == "Opened")
				{
					SupportActionBar.SetTitle(Resource.String.openDrawer);
				}

				else
				{
					SupportActionBar.SetTitle(Resource.String.closeDrawer);
				}
			}
			else
			{
				SupportActionBar.SetTitle(Resource.String.closeDrawer);
			}
				
			initListCursos ();
			iniPeoples ();
			initListTasks ();

			//main_ContentView.AddView (scrollIndice);

        }
Example #33
0
 public System.Data.DataSet TaskGetListAsDataSet(TaskView view, bool keepID, System.DateTime cutOffDate, [System.Xml.Serialization.XmlIgnoreAttribute()] bool cutOffDateSpecified)
 {
     object[] results = this.Invoke("TaskGetListAsDataSet", new object[] {
                 view,
                 keepID,
                 cutOffDate,
                 cutOffDateSpecified});
     return ((System.Data.DataSet)(results[0]));
 }
Example #34
0
 /// <remarks/>
 public void TaskGetListAsDataSetAsync(TaskView view, bool keepID, System.DateTime cutOffDate, bool cutOffDateSpecified)
 {
     this.TaskGetListAsDataSetAsync(view, keepID, cutOffDate, cutOffDateSpecified, null);
 }
Example #35
0
 /// <remarks/>
 public void TaskGetListAsDataSetAsync(TaskView view, bool keepID, System.DateTime cutOffDate, bool cutOffDateSpecified, object userState)
 {
     if ((this.TaskGetListAsDataSetOperationCompleted == null)) {
         this.TaskGetListAsDataSetOperationCompleted = new System.Threading.SendOrPostCallback(this.OnTaskGetListAsDataSetOperationCompleted);
     }
     this.InvokeAsync("TaskGetListAsDataSet", new object[] {
                 view,
                 keepID,
                 cutOffDate,
                 cutOffDateSpecified}, this.TaskGetListAsDataSetOperationCompleted, userState);
 }
Example #36
0
		protected override void OnCreate(Bundle bundle)
		{
			this.Window.AddFlags(WindowManagerFlags.Fullscreen);
			base.OnCreate(bundle);
			SetContentView(Resource.Layout.MainView);
			player = new Android.Media.MediaPlayer();
			_currentCurso = 0;
			_lectorOpen = false;
			_mapOpen = false;
			_playerOn = false;
			_isHome = false;


			headersDR.Add (new BitmapDrawable (getBitmapFromAsset("images/header1.png")));
			headersDR.Add (new BitmapDrawable (getBitmapFromAsset("images/header2.png")));
			headersDR.Add (new BitmapDrawable (getBitmapFromAsset("images/header3.png")));
			headersDR.Add (new BitmapDrawable (getBitmapFromAsset("images/header4.png")));

			drBack = new BitmapDrawable (Bitmap.CreateScaledBitmap (getBitmapFromAsset ("images/fondocondiagonalm.png"), 640, 1136, true));

			vm = this.ViewModel as MainViewModel;

			lo = new WallView(this);
			frontView = new frontView (this);
			lector = new FrontContainerViewPager (this);
			//map = new MapView (this);


			frontView._listLinearItem [0].Click += delegate {showRutas ();};
			frontView._listLinearItem [1].Click += delegate {showServicios ();};
			frontView._listLinearItem [2].Click += delegate {showGuiaSilvestre ();};
			frontView._listLinearItem [3].Click += delegate {showCifras ();};


			LinearLayout linearMainLayout = FindViewById<LinearLayout>(Resource.Id.left_drawer);

			var metrics = Resources.DisplayMetrics;
			widthInDp = ((int)metrics.WidthPixels);
			heightInDp = ((int)metrics.HeightPixels);
			Configuration.setWidthPixel (widthInDp);
			Configuration.setHeigthPixel (heightInDp);

			pausePlayer = Bitmap.CreateScaledBitmap(getBitmapFromAsset("icons/pause.png"),Configuration.getWidth(60),Configuration.getWidth(60),true);

			task = new TaskView (this);


			initRutas ();
			initLinearInfo ();
			iniMenu ();

			mToolbar = FindViewById<SupportToolbar>(Resource.Id.toolbar);
			SetSupportActionBar(mToolbar);
			mToolbar.SetNavigationIcon (Resource.Drawable.transparent);

			mDrawerLayout = FindViewById<DrawerLayout>(Resource.Id.drawer_layout);
			mLeftDrawer = FindViewById<LinearLayout>(Resource.Id.left_drawer);
			//mRightDrawer = FindViewById<LinearLayout>(Resource.Id.right_drawer);

			mLeftDrawer.Tag = 0;
			//mRightDrawer.Tag = 1;

			frameLayout = FindViewById<FrameLayout> (Resource.Id.content_frame);

			main_ContentView = new RelativeLayout (this);
			main_ContentView.LayoutParameters = new RelativeLayout.LayoutParams (-1, -1);


			lo.header.SetBackgroundDrawable (headersDR[1]);
			main_ContentView.AddView (lo);
			lo.getWorkSpaceLayout.AddView (frontView);

			frameLayout.AddView (main_ContentView);


			//RL.SetBackgroundDrawable (dr);

			//seting up chat view content

			//title_view = FindViewById<TextView> (Resource.Id.chat_view_title);




			linearMainLayout.AddView (mainLayout);

			vm.PropertyChanged += new PropertyChangedEventHandler(logout_propertyChanged);

			RegisterWithGCM();

			mDrawerToggle = new MyActionBarDrawerToggle(
				this,							//Host Activity
				mDrawerLayout,					//DrawerLayout
				Resource.String.openDrawer,		//Opened Message
				Resource.String.closeDrawer		//Closed Message
			);

			mDrawerLayout.SetDrawerListener(mDrawerToggle);
			SupportActionBar.SetHomeButtonEnabled (true);
			SupportActionBar.SetDisplayShowTitleEnabled(false);

			mDrawerToggle.SyncState();

			if (bundle != null)
			{
				if (bundle.GetString("DrawerState") == "Opened")
				{
					SupportActionBar.SetTitle(Resource.String.openDrawer);
				}

				else
				{
					SupportActionBar.SetTitle(Resource.String.closeDrawer);
				}
			}
			else
			{
				SupportActionBar.SetTitle(Resource.String.closeDrawer);
			}


			initListCursos ();
			initListTaskTop ();
			initListTaskBotton ();

			viewPager = new ViewPager (this);

			viewPager.SetOnPageChangeListener (new MyPageChangeListenerPager (this, listFrontPager));


		}
            public void AddTask()
            {
                var list = Substitute.ForPartsOf<TaskList>();
                var view = new TaskView(list);
                view.TaskEntryField = "write example";

                view.ClickButton();

                // list substitute functions as test spy
                list.Received().Add("write example");
                Assert.That(view.DisplayedTasks, Is.EqualTo(new[] { "write example" }));
            }