Esempio n. 1
0
        internal void RemoveEmptyParagraphs()
        {
            var startParagraph = StartText.GetParent <Paragraph>();

            if (startParagraph?.Parent != null &&
                !startParagraph.HasText() &&
                CanDeleteParagraph(startParagraph))
            {
                startParagraph.Remove();
            }

            var endParagraph = EndText.GetParent <Paragraph>();

            if (endParagraph?.Parent != null &&
                !endParagraph.HasText() &&
                CanDeleteParagraph(endParagraph))
            {
                endParagraph.Remove();
            }

            var tb = this as TextBlock;

            if (tb?.FirstInsertionPointParagraph.Parent != null)
            {
                tb.FirstInsertionPointParagraph.Remove();
            }
        }
Esempio n. 2
0
        private void ClearState()
        {
            DisposeAudioComponents();
            if (_doAudioOperations != null)
            {
                _doAudioOperations.Clear();
            }
            if (_sessCreatedFlag)
            {
                _isCanvasCleared = WaveFormDisplay.ClearCanvas();
            }

            _waveDisplay.ChannelPosition = 0.0d;
            _isPlaying        = false;
            _sessCreatedFlag  = false;
            trialName.Content = "";

            PlayEnabled(false);
            _settingsObject.SessionCreatedFlag = false;
            LoopBtn.Content = (Image)FindResource("NoLoop");
            _microTimer.Stop();
            _sessionIndex = 0;
            _loopFalg     = false;
            WaveFormDisplay.RepeatRegionHeight = 0;
            WaveFormDisplay.RepeatRegionWidth  = 0;
            _current = -1;
            _next    = -1;
            StartText.Clear();
            StopText.Clear();
        }
Esempio n. 3
0
        private void ClearState()
        {
            DisposeAudioComponents();
            if (_doAudioOperations != null)
            {
                _doAudioOperations.Clear();
            }
            _waveDisplay.ChannelPosition       = 0.0d;
            WaveFormDisplay.RepeatRegionHeight = 0;
            WaveFormDisplay.RepeatRegionWidth  = 0;
            SelectEnd   = 0.0f;
            SelectBegin = 0.0f;
            _waveDisplay.SelectionBegin = TimeSpan.Zero;
            _waveDisplay.SelectionEnd   = TimeSpan.Zero;
            _isCanvasCleared            = WaveFormDisplay.ClearCanvas();
            LoopBtn.Content             = FindResource("NoLoop");
            PlayEnabled(false);
            HighlightPlayingAudio(-1);
            _settingsObject.SessionCreatedFlag = false;
            trialName.Content = "";
            _microTimer.Stop();

            _clickedButton   = 0;
            _loopFalg        = false;
            _sessionIndex    = 0;
            _isPlaying       = false;
            _sessCreatedFlag = false;
            StartText.Clear();
            StopText.Clear();
        }
Esempio n. 4
0
    // Display starting text
    public void DisplayStartText(StartText st)
    {
        SetButtonsEnable(ScenarioMode.Story);
        int    getIndex  = st.index == 1 ? 0 : 1;
        string fixedText = st.text.Replace("[message]", responses[getIndex]);

        text.GetComponent <Text>().color = playerColors[playerIndex];
        text.GetComponent <typer>().StartRoutines(fixedText);
    }
Esempio n. 5
0
 // Start is called before the first frame update
 void Start()
 {
     startText = GameObject.Find("StartText").GetComponent <StartText>();
     seSounds  = GameObject.FindGameObjectWithTag("SEMng").GetComponents <AudioSource>();
     // Textコンポーネント取得
     timeText = GetComponent <Text>();
     // 残り時間を設定
     currentTime = gameTime;
     onceFlag    = true;
 }
 public void Construct(ObstaclesController obstaclesController, LocationSettings locationSettings, FinalPopup finalPopup,
                       StartText startText, ICreationManager creationManager)
 {
     _obstaclesController = obstaclesController;
     _finalPopup          = finalPopup;
     _startText           = startText;
     _creationManager     = creationManager;
     _jumpForce           = locationSettings.JumpForce;
     _firstTap            = true;
 }
    void Start()
    {
        startText = GameObject.Find("StartText").GetComponent <StartText>();
        gameObject.SetActive(true);
        seSounds = GameObject.FindGameObjectWithTag("SEMng").GetComponents <AudioSource>();
        table    = GameObject.Find("Table").GetComponent <Table>();
        timerMng = GameObject.FindGameObjectWithTag("TimerText").GetComponent <TimerMng>();

        backFlag  = false;
        waitCnt   = 0;
        vibration = 0.5f;
    }
Esempio n. 8
0
        public void DoComplete()
        {
            Control.ActiveTextAreaControl.TextArea.Focus();
            var ls   = Control.Document.GetLineSegment(Control.ActiveTextAreaControl.Caret.Line);
            var t    = suggestionListbox.Items[suggestionListbox.SelectedIndices[0]].Text;
            var tabs = TabSpacing;

            var needBraces = false; //CoreIntellisenseHandler.Instance.GetNeedBraces(Inside, t);

            if (!autoCompletePostEquals)
            {
                t += " = ";
            }
            else
            {
                StartText = StartText.TrimEnd(' ');
                if (t == "{ }")
                {
                    t          = "";
                    t         += " {\n" + tabs + "\t\n" + tabs + "}";
                    needBraces = true;
                }
                else
                {
                    t = " " + t;
                }
            }


            Control.Document.Replace(ls.Offset, ls.Length,
                                     StartText + t);

            if (!needBraces)
            {
                Control.ActiveTextAreaControl.Caret.Column = (StartText + t).Length;
            }
            else
            {
                Control.ActiveTextAreaControl.Caret.Line++;
                Control.ActiveTextAreaControl.Caret.Column = tabs.Length + 1;
            }

            ScriptWindow.UpdateDatabase();
        }
Esempio n. 9
0
        internal void RemoveEmptyParagraphs()
        {
            var startParagraph = StartText.GetParent <Paragraph>();

            if (startParagraph?.Parent != null &&
                !startParagraph.HasText() &&
                CanDeleteParagraph(startParagraph))
            {
                startParagraph.Remove();
            }

            var endParagraph = EndText.GetParent <Paragraph>();

            if (endParagraph?.Parent != null &&
                !endParagraph.HasText() &&
                CanDeleteParagraph(endParagraph))
            {
                endParagraph.Remove();
            }
        }
 /**
  * Clear button to remove entries from all text boxes
  * Also sets the date back to the default in the DateTimePicker
  * Repopulates the Proof of Purchase listbox with Yes/No values
  *
  * */
 private void Clear_Click(object sender, EventArgs e)
 {
     FirstName.Clear();
     Middleinitial.Clear();
     Lastname.Clear();
     AddLine1.Clear();
     AddLine2.Clear();
     City.Clear();
     State.Clear();
     Zip.Clear();
     Email.Clear();
     Phone.Clear();
     date.Value = DateTime.Today;
     Proof.Items.Clear();
     Proof.Items.Add("Yes");
     Proof.Items.Add("No");
     StartText.Clear();
     EndText.Clear();
     modifyFlag = false;                   //Reset flag if data is cleared and can no longer be used to add modified entry
 }
Esempio n. 11
0
 private void Awake()
 {
     S = this;
     this.gameObject.SetActive(true);
 }
Esempio n. 12
0
        public Fsm(long chatId, Message msg, TelegramBotClient bot, Context db)
        {
            User state;

            lock (Locker)
            {
                state = db.Users.FirstOrDefault(x => x.ChatId == chatId);
            }

            if (state == null)
            {
                User user = new User
                {
                    ChatId = chatId,
                    State  = StateChatEnum.StartMain
                };
                db.Users.Add(user);
                db.SaveChanges();
            }

            if (state != null)
            {
                IUpdateState updateState;

                switch (state.State)
                {
                case StateChatEnum.StartMain:
                    var uid = db.Users.FirstOrDefault(x => x.ChatId == chatId);
                    if (uid == null)
                    {
                        User user = new User
                        {
                            ChatId = chatId,
                            State  = StateChatEnum.StartText
                        };

                        db.Users.Add(user);
                        db.SaveChanges();
                    }

                    updateState = new StartMain();
                    break;

                case StateChatEnum.EndAddress:
                    updateState = new EndAddress();
                    break;

                case StateChatEnum.StartText:
                    updateState = new StartText();
                    break;

                case StateChatEnum.SendingTime:
                    updateState = new SendingTime();
                    break;

                case StateChatEnum.SendingNumberPhone:
                    updateState = new SendingNumberPhone();
                    break;

                case StateChatEnum.PaymentMethod:
                    updateState = new PaymentMethod();
                    break;

                case StateChatEnum.CarSearch:
                    updateState = new CarSearch();
                    break;

                //case StateChatEnum.CarSearch:
                //	updateState = new CarSearch();
                //	break;

                default:
                    throw new AggregateException();
                }

                updateState.UpdateAsync(msg, bot, chatId, db);
            }
        }
Esempio n. 13
0
 private void Awake()
 {
     Instance = this;
     Invoke("setFadeIn", delayIn);
 }