Esempio n. 1
0
        /// <summary>
        /// 位置設定
        /// 位置、サイズを設定します
        /// </summary>
        /// <param name="control">ActiveReportsコントロール</param>
        /// <param name="data">iniテーブルデータ</param>
        private void SetLocationData(ARControl control, string data)
        {
            if (data.Length == 0)
            {
                return;
            }

            string[] locnData = data.Split(',');
            float[]  pos      = new float[4];
            if (locnData.GetLength(0) < 4)
            {
                return;
            }
            for (int i = 0; i < 4; i++)
            {
                if (!float.TryParse(locnData[i], out pos[i]))
                {
                    return;
                }
                pos[i] = GrapeCity.ActiveReports.SectionReport.CmToInch(pos[i]);
            }

            if (control is Label)
            {
                Label lbl = (Label)control;
                lbl.Location = new PointF(pos[0], pos[1]);
                lbl.Size     = new SizeF(pos[2], pos[3]);
            }
            else if (control is TextBox)
            {
                TextBox tbx = (TextBox)control;
                tbx.Location = new PointF(pos[0], pos[1]);
                tbx.Size     = new SizeF(pos[2], pos[3]);
            }
        }
Esempio n. 2
0
        private void SetSubtoalCategoryItems(GroupFooter footer, int recordIndex)
        {
            var fields = Enum.GetValues(typeof(eTextBox));
            var items  = new ARControl[fields.Length];

            foreach (eTextBox field in fields)
            {
                var index  = (int)field;
                var item   = new TextBox();
                var source = GetSourceTextBox(field);
                item.Location     = new PointF(source.Left, source.Height * recordIndex);
                item.Size         = source.Size;
                item.Style        = source.Style;
                item.MultiLine    = source.MultiLine;
                item.OutputFormat = source.OutputFormat;
                item.Padding      = source.Padding;
                item.Name         = $"{footer.Name}{source.Name}{recordIndex}";
                items[index]      = item;
            }
            footer.Controls.AddRange(items);
            if (recordIndex == 0)
            {
                return;
            }
            var line = new Line {
                LineStyle = LineStyle.Dot
            };

            line.Location = new PointF(txtCategoryName.Left, txtCategoryName.Height * recordIndex);
            line.Width    = txtUncollectedAmountTotal.Width + txtUncollectedAmountTotal.Left - txtCategoryName.Left;
            footer.Controls.Add(line);
        }
Esempio n. 3
0
 private bool IsHeaderColumnControl(ARControl control)
 {
     if (control.Name.StartsWith("lineHead"))
     {
         return(true);
     }
     if (control == lblCustomer)
     {
         return(true);
     }
     if (control == lblLastMonthReamin)
     {
         return(true);
     }
     if (control == lblCurrentBilling)
     {
         return(true);
     }
     if (control == lblCurrentReceiptMatching)
     {
         return(true);
     }
     if (control == lblCurrentReceipt)
     {
         return(true);
     }
     if (control == lblCurrentMatching)
     {
         return(true);
     }
     if (control == lblCurrentRemain)
     {
         return(true);
     }
     if (control == lblMonthlyRemain0)
     {
         return(true);
     }
     if (control == lblMonthlyRemain1)
     {
         return(true);
     }
     if (control == lblMonthlyRemain2)
     {
         return(true);
     }
     if (control == lblMonthlyRemain3)
     {
         return(true);
     }
     return(false);
 }
Esempio n. 4
0
        public bool startRoom()
        {
            if (!isAnchored)
            {
                return(false);
            }

            ARControl.visualizeAR(showAR = false);
            roomNow = new GameObject("Room" + (rooms.Count + 1).ToString()).AddComponent <GeoData>();
            roomNow.setup(mainAnchor, markerPrefab);
            rooms.Push(roomNow);
            areaText.text = "";

            return(true);
        }
Esempio n. 5
0
 public void setFloor()
 {
     if (showAR)
     {
         mainAnchor = ARTouch.ARScreencast(true)?.transform.parent.GetComponent <Anchor>();
         if (mainAnchor != null)
         {
             ARTouch.main.floor = new Plane(mainAnchor.transform.up, mainAnchor.transform.position);
             isAnchored         = true;
             showAR             = false;
         }
     }
     else
     {
         showAR = true;
     }
     ARControl.visualizeAR(showAR);
 }
Esempio n. 6
0
 private void MoveUp(ARControl control)
 {
     control.Location = new System.Drawing.PointF(control.Location.X, control.Location.Y - 0.4f);
 }
Esempio n. 7
0
        /// <summary>
        /// フォント設定
        /// フォント、ポイント、水平表示位置、色を設定します
        /// </summary>
        /// <param name="control">ActiveReportsコントロール</param>
        /// <param name="data">iniテーブルデータ</param>
        private void SetFontData(ARControl control, string data)
        {
            if (data.Length == 0)
            {
                return;
            }

            float         fontSize;
            bool          alignSet = false;
            TextAlignment align    = TextAlignment.Left;

            string[] fontData = data.Split(',');
            if (fontData.GetLength(0) < 2)
            {
                return;
            }
            if (!float.TryParse(fontData[1], out fontSize))
            {
                return;
            }
            if (fontData[0].Length == 0 || fontSize < 1f)
            {
                return;
            }
            if (2 < fontData.GetLength(0))
            {
                alignSet = true;
                switch (fontData[3])
                {
                case "1":
                    align = TextAlignment.Left;
                    break;

                case "2":
                    align = TextAlignment.Right;
                    break;

                case "3":
                    align = TextAlignment.Center;
                    break;

                case "4":
                    align = TextAlignment.Justify;
                    break;

                default:
                    alignSet = false;
                    break;
                }
            }

            if (control is Label)
            {
                Label lbl = (Label)control;
                lbl.Font = new System.Drawing.Font(fontData[0], fontSize);
                if (alignSet)
                {
                    lbl.Alignment = align;
                }
                if (3 < fontData.GetLength(0))
                {
                    lbl.ForeColor = ColorTranslator.FromHtml(fontData[3]);
                }
            }
            else if (control is TextBox)
            {
                TextBox tbx = (TextBox)control;
                tbx.Font = new System.Drawing.Font(fontData[0], fontSize);
                if (alignSet)
                {
                    tbx.Alignment = align;
                }
                if (3 < fontData.GetLength(0))
                {
                    tbx.ForeColor = ColorTranslator.FromHtml(fontData[3]);
                }
            }
        }
Esempio n. 8
0
 private bool IsMovableHeaderControl(ARControl control)
 {
     if (control.Name.StartsWith("lineHead"))
     {
         return(true);
     }
     if (control == lblCustomer)
     {
         return(true);
     }
     if (control == lblCustomerCollectInfo)
     {
         return(true);
     }
     if (control == lblClosingDay)
     {
         return(true);
     }
     if (control == lblTanto)
     {
         return(true);
     }
     if (control == lblBumon)
     {
         return(true);
     }
     if (control == lblKubun)
     {
         return(true);
     }
     if (control == lblUncollectedAmountLast)
     {
         return(true);
     }
     if (control == lblUncollectAmount0)
     {
         return(true);
     }
     if (control == lblUncollectAmount1)
     {
         return(true);
     }
     if (control == lblUncollectAmount2)
     {
         return(true);
     }
     if (control == lblUncollectAmount3)
     {
         return(true);
     }
     if (control == lblHeaderStaff)
     {
         return(true);
     }
     if (control == lblHeaderStaffCode)
     {
         return(true);
     }
     if (control == lblHeaderStaffName)
     {
         return(true);
     }
     if (control == lblKingakuK)
     {
         return(true);
     }
     return(false);
 }
    /// <summary>
    /// Инициализация.
    /// </summary>
    public void Init()
    {
        StartScreen = GameObject.Find("PnlStartScreen").GetComponent <StartScreenControl>();
        StartScreen.Init();
        StartScreen.Complete += StartScreen_OnComplete;

        Introduction = GameObject.Find("PnlIntroduction").GetComponent <IntroductionControl>();
        Introduction.Init(MainManager.Instance.Persons.Select(p => p.Person).ToList());
        Introduction.Complete   += Introduction_OnComplete;
        Introduction.MenuClick  += Control_OnMenuClick;
        Introduction.HelperShow += Control_OnHelperShow;

        Tasks = GameObject.Find("PnlTasks").GetComponent <TasksControl>();
        Tasks.Init();
        Tasks.Complete   += Tasks_OnComplete;
        Tasks.MenuClick  += Control_OnMenuClick;
        Tasks.HelperShow += Control_OnHelperShow;

        AR = GameObject.Find("PnlAR").GetComponent <ARControl>();
        AR.Init();
        AR.BackClick += AR_OnBackClick;
        AR.Complete  += AR_OnComplete;
        AR.MenuClick += Control_OnMenuClick;

        Test = GameObject.Find("PnlTest").GetComponent <TestControl>();
        Test.Init();
        Test.BackClick += Test_OnBackClick;
        Test.Complete  += Test_OnComplete;
        Test.MenuClick += Control_OnMenuClick;

        WrongAnswer = GameObject.Find("PnlWrongAnswer").GetComponent <WrongAnswerControl>();
        WrongAnswer.Init();
        WrongAnswer.Complete  += WrongAnswer_OnComplete;
        WrongAnswer.MenuClick += Control_OnMenuClick;

        RightAnswer = GameObject.Find("PnlRightAnswer").GetComponent <RightAnswerControl>();
        RightAnswer.Init();
        RightAnswer.Complete   += RightAnswer_OnComplete;
        RightAnswer.MenuClick  += Control_OnMenuClick;
        RightAnswer.HelperShow += Control_OnHelperShow;

        EndScreen = GameObject.Find("PnlEndScreen").GetComponent <EndScreenControl>();
        EndScreen.Init();
        EndScreen.Complete   += EndScreen_OnComplete;
        EndScreen.MenuClick  += Control_OnMenuClick;
        EndScreen.HelperShow += Control_OnHelperShow;
        EndScreen.ExitClick  += Control_OnExitClick;

        Menu = GameObject.Find("PnlMenu").GetComponent <MenuControl>();
        Menu.Init();
        Menu.BackClick    += Menu_OnBackClick;
        Menu.Complete     += Menu_OnComplete;
        Menu.HelperChange += Menu_OnHelperChange;
        Menu.ExitClick    += Control_OnExitClick;

        Helper = GameObject.Find("PnlHelper").GetComponent <HelperControl>();
        Helper.Init();

        QuitConfirm = GameObject.Find("PnlQuitConfirm").GetComponent <QuitConfirm>();
        QuitConfirm.Init();
        QuitConfirm.Hide();
        QuitConfirm.HelperShow += Control_OnHelperShow;
        QuitConfirm.Complete   += QuitConfirm_OnComplete;

        AllControls = new List <BaseUIControl>();
        AllControls.Add(StartScreen);
        AllControls.Add(Introduction);
        AllControls.Add(Tasks);
        AllControls.Add(AR);
        AllControls.Add(Test);
        AllControls.Add(WrongAnswer);
        AllControls.Add(RightAnswer);
        AllControls.Add(EndScreen);
        AllControls.Add(Menu);

        SetState(UIState.StartScreen);
    }