コード例 #1
0
            private void UpdateText()
            {
                IPropertyBlock block = propertyWheelMenu.quickActionMenu.Target;

                summaryBuilder.Clear();
                summaryBuilder.Add("Build Vision\n", wheelHeaderFormat);
                block.GetSummary(summaryBuilder, bodyFormatCenter, bodyValueFormatCenter);

                ITextBuilder notificationBuidler = notificationText.TextBoard;

                if (notification != null && notificationTimer.ElapsedMilliseconds < notificationTime)
                {
                    notificationBuidler.Clear();
                    notificationBuidler.Append("\n", bodyFormatCenter);
                    notificationBuidler.Append(notification, bodyValueFormatCenter);

                    if (contNotification)
                    {
                        notification     = null;
                        contNotification = false;
                    }
                }
                else if ((MenuState & QuickActionMenuState.PropertyDuplication) > 0)
                {
                    textBuf.Clear();
                    textBuf.Append("Copying ");
                    textBuf.Append(block.Duplicator.GetSelectedEntryCount());
                    textBuf.Append(" of ");
                    textBuf.Append(block.Duplicator.GetValidEntryCount());
                    notificationBuidler.SetText(textBuf, bodyValueFormatCenter);
                }
                else
                {
                    notification = null;
                    notificationBuidler.Clear();
                    var target = propertyWheelMenu.quickActionMenu.Target;

                    if (!target.IsFunctional)
                    {
                        notificationBuidler.SetText("[Incomplete]", blockIncFormat.WithAlignment(TextAlignment.Center));
                    }
                }

                summaryLabel.TextBoard.SetText(summaryBuilder);
            }