Ejemplo n.º 1
0
 /// <summary>
 /// 連結タイプの更新
 /// </summary>
 private void UpdateConnect(CheckFlag isNotEntryFlag)
 {
     leftTopCell.UpdateConnect(isNotEntryFlag);
     rightTopCell.UpdateConnect(isNotEntryFlag);
     leftBottomCell.UpdateConnect(isNotEntryFlag);
     rightBottomCell.UpdateConnect(isNotEntryFlag);
 }
Ejemplo n.º 2
0
            public void UpdateConnect(CheckFlag wallFlag)
            {
                if ((wallFlag & EnclosedMask) == EnclosedMask)
                {
                    this.ConnectType = ConnectType.Enclosed;
                }
                else if ((wallFlag & VerticalMask) == VerticalMask)
                {
                    this.ConnectType = ConnectType.Vertical;
                }
                else if ((wallFlag & HorizontalMask) == HorizontalMask)
                {
                    this.ConnectType = ConnectType.Horizontal;
                }
                else if ((wallFlag & EncloseMask) == EncloseMask)
                {
                    this.ConnectType = ConnectType.Enclose;
                }
                else if ((wallFlag & IsolationMask) == 0)
                {
                    this.ConnectType = ConnectType.Isolation;
                }
                else
                {
                    Debug.LogError($"不明な連結タイプです.{this.ToString()}{wallFlag}");
                }

                this.spriteRenderer.sprite = sprites[this.ConnectType];
            }
Ejemplo n.º 3
0
        /// <summary>
        /// 連結タイプの更新
        /// </summary>
        public void UpdateConnect(bool[] isNotEntryFlags)
        {
            CheckFlag isNotEntryFlag = 0;

            for (int i = 0; i < isNotEntryFlags.Length; i++)
            {
                if (isNotEntryFlags[i])
                {
                    isNotEntryFlag |= (CheckFlag)(1 << i);
                }
            }

            UpdateConnect(isNotEntryFlag);
        }
Ejemplo n.º 4
0
        //// Update is called once per frame
        //void Update()
        //{
        //}

        /// <summary>
        /// 連結タイプの更新
        /// </summary>
        public void UpdateConnect
            (bool leftup, bool up, bool rightup, bool left, bool self, bool right, bool leftdown, bool down, bool rightdown)
        {
            CheckFlag isNotEntryFlag = 0;

            isNotEntryFlag = leftup     ? (isNotEntryFlag | CheckFlag.LeftUp)    : isNotEntryFlag;
            isNotEntryFlag = up         ? (isNotEntryFlag | CheckFlag.Up)        : isNotEntryFlag;
            isNotEntryFlag = rightup    ? (isNotEntryFlag | CheckFlag.RightUp)   : isNotEntryFlag;
            isNotEntryFlag = left       ? (isNotEntryFlag | CheckFlag.Left)      : isNotEntryFlag;
            isNotEntryFlag = self       ? (isNotEntryFlag | CheckFlag.Self)      : isNotEntryFlag;
            isNotEntryFlag = right      ? (isNotEntryFlag | CheckFlag.Right)     : isNotEntryFlag;
            isNotEntryFlag = leftdown   ? (isNotEntryFlag | CheckFlag.LeftDown)  : isNotEntryFlag;
            isNotEntryFlag = down       ? (isNotEntryFlag | CheckFlag.Down)      : isNotEntryFlag;
            isNotEntryFlag = rightdown  ? (isNotEntryFlag | CheckFlag.RightDown) : isNotEntryFlag;

            UpdateConnect(isNotEntryFlag);
        }
Ejemplo n.º 5
0
        private void MakeReport(ReportType type)
        {
            DateTime day  = ScheduleView.SelectedSlot.Start;
            DateTime from = day.GetFirstDayOfWeek();
            DateTime to   = day.GetLastDayOfWeek();

            CheckFlag  selectedFlag       = (CheckFlag)CheckStatusComboBox.SelectedItem;
            Department selectedDepartment = (DepartmentComboBox.SelectedItem as Department);
            Bank       selectedBank       = (BankComboBox.SelectedItem as Bank);

            ReportParameter param = new ReportParameter()
            {
                Type           = type,
                CheckFlag      = selectedFlag,
                DepartmentId   = selectedDepartment.Id,
                BankId         = (int)selectedBank.Id,
                DepartmentName = selectedDepartment.Name,
                BankName       = selectedBank.BankName,
                Day            = day,
                From           = from,
                To             = to
            };

            FileNameMaker maker    = new FileNameMaker(param);
            string        fileName = maker.GetFileName();

            SaveFileDialog saveFileDialog = new SaveFileDialog();

            saveFileDialog.Filter   = "Excel Documents (*.xlsx)|*.xlsx";
            saveFileDialog.FileName = fileName;
            if (saveFileDialog.ShowDialog() == true)
            {
                try{
                    ExportReport(param, saveFileDialog.FileName);
                    MessageBox.Show("Report Generated!");
                }
                catch (Exception ex) {
                    MessageBox.Show(ex.Message, "Error Exporting Report");
                }
            }
        }
Ejemplo n.º 6
0
        private List <Check> ApplyCheckFlagQuery()
        {
            List <Check> preQuery = _allChecks;

            CheckFlag status = (CheckFlag)CheckStatusComboBox.SelectedItem;

            if (status == CheckFlag.Funded)
            {
                preQuery = _allChecks.Where(c => c.IsFunded && !c.IsSettled).ToList();
            }
            if (status == CheckFlag.NotFunded)
            {
                preQuery = _allChecks.Where(c => !c.IsFunded && !c.IsSettled).ToList();
            }
            if (status == CheckFlag.Settled)
            {
                preQuery = _allChecks.Where(c => c.IsSettled).ToList();
            }

            return(preQuery);
        }
Ejemplo n.º 7
0
 /// <summary>
 /// チェック状態をリセットします。
 /// </summary>
 public void Reset()
 {
     checkFlag = CheckFlag.NotCheck;
 }