Ejemplo n.º 1
0
 public MeasurePdfData(string machineName, string faceR, string workid, DayOrNight _dayOrNight)
 {
     MachineName = machineName;
     FaceR       = faceR;
     Workid      = workid;
     dayOrNight  = _dayOrNight;
 }
Ejemplo n.º 2
0
 public Shift(DayOrNight shift)
 {
     ThisShift           = shift;
     PPShiftAssignments  = new BindingList <PPAssignment>();
     NsyShiftAssignments = new BindingList <NsyAssignment>();
     PCTShiftAssignments = new BindingList <PCTAssignment>();
 }
Ejemplo n.º 3
0
    private void FixedUpdate()
    {
        WeatherData.getIntance().currentTime += Time.deltaTime;  //更新时间
        if (WeatherData.getIntance().currentTime > TotalTime)
        {
            WeatherData.getIntance().currentTime = 0;
        }

        WeatherData.getIntance().Weather_leftTime -= Time.deltaTime;
        if (WeatherData.getIntance().Weather_leftTime < 0)   //开始下一个天气
        {
            WeatherData.getIntance().currentWeather   = getNextWeather();
            WeatherData.getIntance().Weather_duration = TotalTime * Random.Range(0.1f, 0.7f);
            WeatherData.getIntance().Weather_leftTime = WeatherData.getIntance().Weather_duration;

            if (onWeatherChange != null)
            {
                onWeatherChange();
            }
        }

        if (isMasker)
        {
            MaskerMaterial.SetFloat("_Alpha", SmoothLerp_distance()); // 更新Masker
        }
        Script_Blur.nightColor = SmoothLerp_BackgroundCamera();       //更新背景相机

        changeCameraThreshold();

        //昼夜情况
        if (WeatherData.getIntance().currentTime < DayTime)
        {
            if (currentState == DayOrNight.Night)
            {
                currentState = DayOrNight.Day;
                if (becomeDay != null)
                {
                    becomeDay();
                }
            }
        }
        else
        {
            if (currentState == DayOrNight.Day)
            {
                currentState = DayOrNight.Night;
                if (becomeNight != null)
                {
                    becomeNight();
                }
            }
        }
    }
Ejemplo n.º 4
0
    private void Start()
    {
        //WeatherData.getIntance().getFile();  //初始化

        Script_Blur  = GameObject.Find("BackGroundCamera").GetComponent <Blur>();
        Bloom_script = Screen1_render.instance.GetComponent <Bloom>();

        if (WeatherData.getIntance().currentTime < DayTime)
        {
            currentState = DayOrNight.Day;
        }
    }
Ejemplo n.º 5
0
 public void DayCheck()
 {
     dayOrNight = DayOrNight.Day;
     GameObject[] trunks = GameObject.FindGameObjectsWithTag("Trunk");
     foreach (var i in trunks)
     {
         i.GetComponent <Trunk>().DayCheck();
     }
     EnemyController[] ecList = FindObjectsOfType <EnemyController>();
     foreach (var i in ecList)
     {
         Destroy(i.gameObject);
     }
 }
Ejemplo n.º 6
0
 public void ResetALL()
 {
     PdfPath         = "";
     this.dayOrNight = DayOrNight.Day;
     MachineName     = "";
     FaceR           = "";
     Workid          = "";
     WId             = 0;
     DPV             = 0;
     DRMS            = 0;
     BRMS            = 0;
     Diff            = 0;
     MeasuDateTime   = DateTime.MinValue;
     RealDate        = DateTime.MinValue;
     MetricMaxVal    = 0;
 }
        //根据排班的内容返回可以排班的人员
        private User getAvailableUser(ShopGroups ShopGroup, DayOrNight dayOrNight, UserWorkDate WorkDate)
        {
            //取出都是哪些人能做这个班组。
            //目前只安排了第一个值班的人员,接下来要考虑的问题:
            //(1)不安排连班,如果该人员已经值该天的白班了,那么该人员不安排晚班了。
            //(2)不安排重复的值班类型的班组,也就是如果值一个白班班组了,那么就不能再排其他班组的白班。如果已经值一个晚班的班组,那么也不能排其他晚班的班组了。
            //(3)休班的问题怎么解决?

            PersonShopGroupRepository PersonShopGroupRepo      = new PersonShopGroupRepository();
            List <PersonShopGroup>    localListPersonShopGroup = PersonShopGroupRepo.GetAll()
                                                                 .Where(it => it._ShopGroups == ShopGroup)
                                                                 .OrderBy(it => it._User.UserStateID)
                                                                 .ToList();

            User userTemp = new User();
            //找该日期的值班类型有无该人,如果有,那么就不排,排下一个人。
            Boolean find = false;

            for (int i = 0; i <= localListPersonShopGroup.Count - 1; i++)
            {
                //找该日期的值班有无该人,如果有,那么就不排,排下一个人。
                if (this.checkRepeatDayOrNight(localListPersonShopGroup.ElementAt(i)._User, WorkDate) == false)
                {
                    //  if (this.checkAllToday(localListPersonShopGroup.ElementAt(i)._User, personShopGroupPBs.UserWorkDate) == false)
                    //  {
                    userTemp = localListPersonShopGroup.ElementAt(i)._User;
                    find     = true;
                    return(userTemp);
                    //  }
                }
            }
            if (find == false)//没有找到这样的,就用第一个
            {
                //localListPersonShopGroup.ElementAt(i)._User;
                userTemp = localListPersonShopGroup.FirstOrDefault()._User;
            }
            return(userTemp);
        }
Ejemplo n.º 8
0
 //查询当天此人是否排过班
 public bool IsPBByUserID(DateTime dayTime, int userid, DayOrNight ban)
 {
     return(GetSession().Linq <PersonPB>()
            // .Where(p => p._user.ID == userid && p._DateTime == dayTime && p.DayOrNight == ban)
            .Any());
 }
Ejemplo n.º 9
0
        public void updateR2DateCell(DayOrNight dn, int colOffset)
        {
            Aspose.Cells.CellsFactory cellsFactory = new Aspose.Cells.CellsFactory();
            var DateStyle = cellsFactory.CreateStyle();

            DateStyle.HorizontalAlignment = Aspose.Cells.TextAlignmentType.Center;
            //DateStyle.Borders[BorderType.LeftBorder].LineStyle = CellBorderType.Dotted;
            //DateStyle.Borders[BorderType.RightBorder].LineStyle = CellBorderType.Dotted;
            //DateStyle.Borders[BorderType.TopBorder].LineStyle = CellBorderType.Thin;
            //DateStyle.Borders[BorderType.BottomBorder].LineStyle = CellBorderType.Dotted;

            //var TimeStyle = cellsFactory.CreateStyle();
            //TimeStyle.HorizontalAlignment = Aspose.Cells.TextAlignmentType.Center;
            //TimeStyle.Borders[BorderType.LeftBorder].LineStyle = CellBorderType.Dotted;
            //TimeStyle.Borders[BorderType.RightBorder].LineStyle = CellBorderType.Dotted;
            //TimeStyle.Borders[BorderType.TopBorder].LineStyle = CellBorderType.Thin;
            //TimeStyle.Borders[BorderType.BottomBorder].LineStyle = CellBorderType.Dotted;

            //string date1 = mfrm.infoMeasure.MeasuDateTime.ToString("yyyy年MM月dd日");
            DateTime date1 = mfrm.infoPdfMeasure.MeasuDateTime;
            string   time1 = mfrm.infoPdfMeasure.MeasuDateTime.ToShortTimeString();

            if (mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 1, colOffset].Type == Aspose.Cells.CellValueType.IsNull)
            {
                //var str1 = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 1, colOffset].StringValue;

                mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 1, colOffset].PutValue(date1);
                mfrm.workbook.Worksheets[0].Cells.Merge(mfrm.XData.R2.Row + 1, colOffset, 1, 2);

                //mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 1, colofs].SetStyle(DateStyle);
                var style = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 1, colOffset].GetStyle(true);

                style.Custom = "yyyy\"年\"m\"月\"d\"日\"";

                mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 1, colOffset].SetStyle(style);

                mfrm.XData.R2LastDate    = mfrm.infoPdfMeasure.RealDate;
                mfrm.XData.NoR2Date      = false;
                mfrm.XData.posR2LastDate = new RCPosition(mfrm.XData.R2.Row + 1, colOffset);
            }

            if (dn == DayOrNight.Day)
            {
                var str2 = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 2, colOffset].StringValue;
                if (str2 == null || str2 == "")
                {
                    mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 2, colOffset].PutValue(time1);
                }
                else if (DateTime.Parse(str2) > DateTime.Parse(time1))
                {
                    mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 2, colOffset].PutValue(time1);
                }

                //水平居中
                //mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 2, colofs].SetStyle(TimeStyle);
            }
            else if (dn == DayOrNight.Night)
            {
                //右下角, 因此+1

                var str2 = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 2, colOffset + 1].StringValue;
                //把最迟的晚班写进去
                if (str2 == null || str2 == "")
                {
                    mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 2, colOffset + 1].PutValue(time1);
                }
                else if (DateTime.Parse(str2) < DateTime.Parse(time1))
                {
                    mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 2, colOffset + 1].PutValue(time1);
                }

                //水平居中
                //mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R2.Row + 2, colofs + 1].SetStyle(TimeStyle);
            }
        }
Ejemplo n.º 10
0
        public void updateR1DateCell(DayOrNight dn, int colofs)
        {
            Aspose.Cells.CellsFactory cellsFactory = new Aspose.Cells.CellsFactory();

            var Mystyle = cellsFactory.CreateStyle();

            Mystyle.HorizontalAlignment = Aspose.Cells.TextAlignmentType.Center;
            //var Mystyle = cellsFactory.CreateStyle();
            //Mystyle.Borders[BorderType.LeftBorder].LineStyle = CellBorderType.Dotted;
            //Mystyle.Borders[BorderType.RightBorder].LineStyle = CellBorderType.Dotted;
            //Mystyle.Borders[BorderType.TopBorder].LineStyle = CellBorderType.Thin;
            //Mystyle.Borders[BorderType.BottomBorder].LineStyle = CellBorderType.Dotted;

            //Mystyle.SetBorder(Aspose.Cells.BorderType.LeftBorder| Aspose.Cells.BorderType.RightBorder| Aspose.Cells.BorderType.TopBorder|Aspose.Cells.BorderType.BottomBorder, Aspose.Cells.CellBorderType.Dotted, System.Drawing.Color.Black);
            var DefStyle = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 1, colofs].GetStyle();
            var 虚线类型     = DefStyle.Borders.DiagonalStyle;

            //string date1 = mfrm.infoMeasure.MeasuDateTime.ToString("yyyy年MM月dd日");
            DateTime date1 = mfrm.infoPdfMeasure.MeasuDateTime;

            string time1 = mfrm.infoPdfMeasure.MeasuDateTime.ToShortTimeString();
            var    b1    = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 1, colofs].Type == Aspose.Cells.CellValueType.IsNull;

            if (b1)
            {
                mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 1, colofs].PutValue(date1);
                var style = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 1, colofs].GetStyle(true);

                style.Custom = "yyyy\"年\"m\"月\"d\"日\"";

                mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 1, colofs].SetStyle(style);

                //合并单元格
                mfrm.workbook.Worksheets[0].Cells.Merge(mfrm.XData.R1.Row + 1, colofs, 1, 2);

                //mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 1, colofs].SetStyle(Mystyle);
                mfrm.XData.R1LastDate    = mfrm.infoPdfMeasure.RealDate;
                mfrm.XData.posR1LastDate = new RCPosition(mfrm.XData.R1.Row + 1, colofs);
                mfrm.XData.NoR1Date      = false;
            }

            if (dn == DayOrNight.Day)
            {
                var str2 = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 2, colofs].StringValue;
                //把最早的早班写进去
                if (str2 == null || str2 == "")
                {
                    mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 2, colofs].PutValue(time1);
                }
                else if (DateTime.Parse(str2) > DateTime.Parse(time1))
                {
                    mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 2, colofs].PutValue(time1);
                }
                //mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 2, colofs].SetStyle(Mystyle);
            }
            else if (dn == DayOrNight.Night)
            {
                var str2 = mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 2, colofs + 1].StringValue;
                //把最迟的晚班写进去
                if (str2 == null || str2 == "")
                {
                    mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 2, colofs + 1].PutValue(time1);
                }
                else if (DateTime.Parse(str2) < DateTime.Parse(time1))
                {
                    mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 2, colofs + 1].PutValue(time1);
                }

                //mfrm.workbook.Worksheets[0].Cells[mfrm.XData.R1.Row + 2, colofs + 1].SetStyle(Mystyle);
            }
        }
Ejemplo n.º 11
0
 public void NightCheck()
 {
     dayOrNight = DayOrNight.Night;
     EnemyController.enemyCnt = 0;
     PL.SetWisps();
 }