Example #1
0
        public virtual void SetAnsuer()
        {
            string s_Ansuer   = MTControler.GetAdrees(_LstAnsuer, false);
            string s_Response = _objPatch.Adrees;

            _dtDate = DateTime.Now;
            MTStructTest strTest;

            strTest.Date = this.Date;
            strTest.Type = this.Type;

            if (s_Ansuer == s_Response)
            {
                WasCorrect         = true;
                strTest.WasCorrect = true;
                _objPatch.lstTest.Add(strTest);
                MTClassificator.UpdatePatch(_objPatch);
            }
            else
            {
                WasCorrect         = false;
                strTest.WasCorrect = false;
                _objPatch.lstTest.Add(strTest);
                MTClassificator.UpdateAllPositions();
            }
            MTParser.WritePatch(_objPatch);
            MTParser.WriteDataTest(_objPatch, this);
        }
Example #2
0
        public override void Action(MTMapUser ansuerUser)
        {
            _LstAnsuer = ansuerUser.SelectedPatchClone;
            _sFragment = ansuerUser.tbSearch.Text;
            string sText = MTControler.GetAdrees(ansuerUser.SelectedPatch, false);

            AnsuerToShow = (sText == "" ? _sAnsuer : sText);
            ListView    lvTest   = MTControler.DlgTest.lbTest;
            RichTextBox objRtbox = UtilsTools.GetChild(lvTest, lvTest.Items.IndexOf(this), "rtbText") as RichTextBox;

            objRtbox.Document.Blocks.Clear();
            objRtbox.Document.Blocks.Add(GetParagAsk());
            objRtbox.Document.Blocks.Add(GetSearchedText());
        }
Example #3
0
        public void SetLstAdress(List <MTMapModel> lstAdres)
        {
            if (_LstAdress != null)
            {
                foreach (MTMapModel objMap in _LstAdress)
                {
                    objMap.RemoveOccurrence(1);
                }
            }

            _LstAdress    = lstAdres;
            _sText        = MTControler.GetStringText(_LstAdress);
            _sAdrees      = MTControler.GetAdrees(_LstAdress, false);
            _sShortAdrees = MTControler.GetAdrees(_LstAdress, true);
            FirePropertyChanged("Text");
            FirePropertyChanged("Adrees");
            FirePropertyChanged("AdreesAbrevied");
            foreach (MTMapModel objMap in _LstAdress)
            {
                objMap.AddOccurrence(1);
            }
        }
Example #4
0
        public string GetAdrees()
        {
            string sText = "";

            if (lvMap.SelectedItems.Count > 0)
            {
                if ((lvMap.SelectedItems[0] as MTBookModel) != null)
                {
                    MTBookModel objBook = lvMap.SelectedItem as MTBookModel;
                    sText = MTControler.GetAdrees(objBook, false);
                }
                else if ((lvMap.SelectedItems[0] as MTChapterModel) != null)
                {
                    MTChapterModel objChapter = lvMap.SelectedItem as MTChapterModel;
                    sText = MTControler.GetAdrees(objChapter, false);
                }
                else if ((lvMap.SelectedItems[0] as MTVerseModel) != null)
                {
                    sText = MTControler.GetAdrees(SelectedPatch, false);
                }
            }
            return(sText);
        }