Exemplo n.º 1
0
        private void MoveDown(object sender, EventArgs e)
        {
            if (CurrentItem == null)
            {
                return;
            }

            if (!ReadyToMoveDown)
            {
                return;
            }

            if (DeadLine.Intersect(CurrentItem.BottomBorder.ToAbsolute(CurrentItem.Position)).Any())
            {
                UpdateLimits();
                if (ItemStacked != null)
                {
                    ItemStacked(this, new EventArgs());
                }
            }
            else
            {
                Clear(CurrentItem);
                CurrentItem.Position = new Point(CurrentItem.Position.X,
                                                 CurrentItem.Position.Y + 1);
                Draw(CurrentItem);
            }
        }
Exemplo n.º 2
0
    IEnumerator CheckOnVisible()
    {
        yield return(new WaitForSeconds(Time.deltaTime * 2));

        if (InvisibleCollider.IsOut && !DeadLine.IsDeadLine && !isVisiblePlayer)
        {
            DeadLine.IsDeadLine = true;
            DeadLine.DeathAfterDeadLine();
        }
    }
Exemplo n.º 3
0
        public void UpdateLimits()
        {
            DeadLine.AddRange(CurrentItem.TopBorder.ToAbsolute(CurrentItem.Position).Select(x => new Point(x.X, x.Y - 1)));
            DeadLine = DeadLine.Except(CurrentItem.BottomBorder.ToAbsolute(CurrentItem.Position)).ToList();

            LeftBorder.AddRange(CurrentItem.RightBorder.ToAbsolute(CurrentItem.Position).Select(x => new Point(x.X + 1, x.Y)));
            LeftBorder = LeftBorder.Where(x => x.X < NetSize.Width).Distinct().ToList();

            RightBorder.AddRange(CurrentItem.LeftBorder.ToAbsolute(CurrentItem.Position).Select(x => new Point(x.X - 1, x.Y)));
            RightBorder = RightBorder.Where(x => x.X >= 0).Distinct().ToList();
        }
Exemplo n.º 4
0
    /// <summary>
    /// 将玩家添加到其它脚本引用上
    /// </summary>
    void AttachToOthers()
    {
        _cinemachineVirtualCamera = FindObjectOfType <CinemachineVirtualCamera>();
        if (_cinemachineVirtualCamera != null)
        {
            _cinemachineVirtualCamera.Follow = transform;
        }

        DeadLine deadLine = FindObjectOfType <DeadLine>();

        if (deadLine != null)
        {
            deadLine.PlayerController = this;
        }
    }
Exemplo n.º 5
0
        public Dates()
        {
            // this.Evaluations = new List<Evaluation>();

            this.StartDateWork    = ZeroDefaultDate(DateTime.Now);
            this.EndDateWork      = new DateTime(1900, 1, 1);
            this.DayBirth         = ZeroDefaultDate(DateTime.Now);
            this.DeadLine         = ZeroDefaultDate(DateTime.Now).AddDays(1).AddHours(9);
            this.DateDone         = new DateTime(1900, 1, 1);
            this.DateOfPaid       = new DateTime(1900, 1, 1);
            this.DateOfAuthorPaid = new DateTime(1900, 1, 1);
            this.AuthorDeadLine   = DeadLine.AddMinutes(-30);
            this.DateOfReception  = DateTime.Now;

            this.OrderLine = new ObservableCollection <OrderLine>();
        }
Exemplo n.º 6
0
 public static string Format(DeadLine ddl)
 {
     var remain = ddl.DueDate.Subtract(DateTime.Now);
     if (remain.TotalMilliseconds <= 0)
         return $"{ddl.DueDate:yyyyMMdd} === ALREADY DUE === {ddl.Name}/d/{ddl.Title}";
     if (remain.TotalDays >= 5)
         return $"{ddl.DueDate:yyyyMMdd} {remain.Days,13} days  {ddl.Name}/d/{ddl.Title}";
     if (remain.TotalDays >= 2)
         return $"{ddl.DueDate:yyyyMMdd} + {remain.Days,11} days  {ddl.Name}/d/{ddl.Title}";
     if (remain.TotalHours >= 24)
         return $"{ddl.DueDate:yyyyMMdd} +++ {(int)remain.TotalHours,9} hours {ddl.Name}/d/{ddl.Title}";
     if (remain.TotalHours >= 2)
         return $"{ddl.DueDate:yyyyMMdd} ++++ {(int)remain.TotalHours,8} hours {ddl.Name}/d/{ddl.Title}";
     if (remain.TotalMinutes >= 2)
         return $"{ddl.DueDate:yyyyMMdd} +++++++ {(int)remain.TotalMinutes,5} mins  {ddl.Name}/d/{ddl.Title}";
     return $"{ddl.DueDate:yyyyMMdd} ++++++++ {(int)remain.TotalSeconds,4} secs  {ddl.Name}/d/{ddl.Title}";
 }
Exemplo n.º 7
0
        public string ToQueryString()
        {
            string returnString = "(";

            returnString += "'" + ParentId.ToString() + "', ";                                  // 1
            returnString += "'" + Title + "', ";                                                // 2
            returnString += "'" + ShortDescription + "', ";                                     // 3
            returnString += "'" + DetailedDescription + "', ";                                  // 4
            returnString += "'" + ParentProject.ToString() + "', ";                             // 5
            returnString += "'" + DateCreated.ToShortDateString() + "', ";                      // 6
            returnString += "'" + CreatedBy.ToString() + "', ";                                 // 7
            returnString += "'" + DateCompleted.ToShortDateString() + "', ";                    // 8
            returnString += "'" + CompletedBy.ToString() + "', ";                               // 9
            returnString += "'" + DeadLine.ToShortDateString() + "', ";                         //10
            returnString += "'" + Status + "'";                                                 //11

            return(returnString += ")");
        }         // End of ToQueryString()
Exemplo n.º 8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            DataTable dts = dbClass.GetCommunication_Log();
            DataView  dv2 = new DataView(dts);

            Repeater1.DataSource = dv2;
            Repeater1.DataBind();

            DataTable data = dbClass.GetTask_tbl(Request.QueryString["ProjectID"]);

            string   Task_Description;
            DateTime Task_AssignDate;
            DateTime DeadLine;
            string   Tid;



            foreach (DataRow row2 in dts.Rows)
            {
                CommunicationLog.Text = CommunicationLog.Text + " (" + Session["User_Type"] + ")" + "<br>";
                CommunicationLog.Text = CommunicationLog.Text + row2["UpdateDate"].ToString() + "<br>" + row2["Updatee"].ToString() + "<br>" + "<hr>";
                DataTable dt2 = dbClass.GetAttachments(row2["Comm_id"].ToString());

                foreach (DataRow row3 in dt2.Rows)
                {
                    CommunicationLog.Text = CommunicationLog.Text + "<a href=Attachments\\" + row3["Attachment"].ToString() + ">" + row3["Attachment"].ToString() + "</a><br>";
                }
                CommunicationLog.Text = CommunicationLog.Text + "<a class='btn btn-primary pull-right' href='AddMoreAttach.aspx'>Add More Attachments</a>" + "<br>";
            }


            foreach (DataRow row in data.Rows)
            {
                Tid = row["tID"].ToString();
                Task_Description = row["Task_Detail"].ToString();
                Task_AssignDate  = DateTime.Parse(row["T_Assign_Date"].ToString());
                DeadLine         = DateTime.Parse(row["DeadLine"].ToString());

                TxtDescription.Text += Task_Description;
                txtAssignDates.Text  = Task_AssignDate.ToShortDateString();
                txtDeadLine.Text     = DeadLine.ToShortDateString();
            }
        }
Exemplo n.º 9
0
        private void btnLoginIn_Click(object sender, EventArgs e)
        {
            try
            {
                //校验权限
                bool     IsRegister;
                DateTime DeadLine;
                string   RegisterInfoJson;
                ExecuteSQL.ReadRegister(out IsRegister, out ProductType, out RegisterInfoJson, out DeadLine);
                if ((ProductType != 1 && ProductType != 2) || !IsRegister)
                {
                    throw new Exception("该系统未注册,请与供应商联系!");
                }
                else if (DeadLine.Subtract(DateTime.Now).TotalHours <= 0)
                {
                    throw new Exception("该系统注册已过期,请与供应商联系!");
                }

                VerisyIsEmpty();

                string strLoginName = this.txtLoginName.Text.TrimEnd();
                string strPassword  = this.txtPassword.Text.TrimEnd();
                //Thread.Sleep(2000);
                //throw new Exception("无法连接服务器,请检查网络是否畅通!");
                bool bolPass = LoginInfo.VerifyLogin(strLoginName, strPassword);

                if (bolPass)
                {
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                LBCommonHelper.DealWithErrorMessage(ex);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            string data2 = dbClass.DeleteTask_tbl(Request.QueryString["TaskID"]);

            DataTable data = dbClass.GetTask_tbl(Request.QueryString["ProjectID"]);

            DataTable data3 = dbClass.GetProject_tbl(Request.QueryString["ProjectID"]);


            string   Task_ID;
            string   Project_ID;
            string   Member_ID;
            DateTime Task_AssignDate;
            DateTime DeadLine;
            string   Task_Description;
            string   Task_Priority;
            string   tID;


            string   Project_Title;
            DateTime EndDate;
            string   projectId;

            foreach (DataRow rows in data3.Rows)
            {
                Project_Title = rows["Project_Title"].ToString();
                EndDate       = DateTime.Parse(rows["EndDate"].ToString());
                projectId     = rows["Project_id"].ToString();
                Label1.Text   = Label1.Text + "<tr><td>" + Project_Title + "</td><td>" + EndDate.ToShortDateString() + "</td></tr>";
            }

            foreach (DataRow row in data.Rows)
            {
                Task_ID    = row["Task_id"].ToString();
                Project_ID = row["Project_id"].ToString();
                Member_ID  = row["Mem_id"].ToString();

                Task_AssignDate = DateTime.Parse(row["T_Assign_Date"].ToString());
                DeadLine        = DateTime.Parse(row["DeadLine"].ToString());

                Task_Description = row["Task_Detail"].ToString();
                Task_Priority    = row["T_Priority"].ToString();
                tID = row["tID"].ToString();


                // lblTask.Text = lblTask.Text + "<tr><td>" + Project_ID + "</td><td>" + Member_ID + "</td><td>" + Task_AssignDate.ToShortDateString() + "</td><td>" + DeadLine.ToShortDateString() + "</td><td>" + Task_Priority + "</td><td><div class='dropdown'>  <button class='btn btn-secondary dropdown-toggle' type='button' id='dropdownMenuButton' data-toggle='dropdown'>    View Description  <span class='caret'></span> </button>  <div class='dropdown-menu'>" + Task_Description + "</div></div></td><td><a href='ViewTasks.aspx?TaskID=" + tID + "'><span class='glyphicon glyphicon-trash text-danger'></span></a></td></tr>";


                lblTask.Text = lblTask.Text + "<tr><td>" + Project_ID + "</td><td>" + Member_ID + "</td><td>" + Task_AssignDate.ToShortDateString() + "</td><td>" + DeadLine.ToShortDateString() + "</td><td>" + Task_Priority + "</td><td> <a class='btn btn-large btn-info' href='ViewTaskDescription.aspx?ProjectID=" + Project_ID + "'>View Description</a></td><td><a href='ViewTasks.aspx?TaskID=" + tID + "'><span class='glyphicon glyphicon-trash text-danger'></span></a></td></tr>";
            }
        }
Exemplo n.º 11
0
 public override string ToString()
 {
     return($"{Title},{DeadLine.ToString("yyyy/M/dd ")},{Goal},{Balance}");
 }