void ReleaseDesignerOutlets()
        {
            if (ButtonDelete != null)
            {
                ButtonDelete.Dispose();
                ButtonDelete = null;
            }

            if (DeleteButtonZoneForTouch != null)
            {
                DeleteButtonZoneForTouch.Dispose();
                DeleteButtonZoneForTouch = null;
            }

            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

            if (PictureView != null)
            {
                PictureView.Dispose();
                PictureView = null;
            }

            if (TitleNameLabel != null)
            {
                TitleNameLabel.Dispose();
                TitleNameLabel = null;
            }
        }
示例#2
0
        void ReleaseDesignerOutlets()
        {
            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

            if (RightConstraint != null)
            {
                RightConstraint.Dispose();
                RightConstraint = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (TopSeparator != null)
            {
                TopSeparator.Dispose();
                TopSeparator = null;
            }

            if (BottomSeparator != null)
            {
                BottomSeparator.Dispose();
                BottomSeparator = null;
            }
        }
示例#3
0
 private void button1_Click(object sender, EventArgs e)
 {
     // number++;
     //if (number >= 10) number = 0;
     //若未记单词满10个,则只复习未记忆的单词(调用UnRemNumber)
     if (UnRemDic.Count >= 11)
     {
         if (UnRemNumber >= UnRemDic.Count - 1)
         {
             UnRemNumber = 0;
         }
         string[] WordArray = Regex.Split(UnRemDic[UnRemNumber], "&&&&");
         WordLabel.Text   = WordArray[0];
         DetailLabel.Text = WordArray[1];
         UnRemNumber++;
     }
     else
     {
         //否则 随机获取下一个单词,并且将单词该未记忆单词放入UnRemDic
         UnRemDic.Add(WordLabel.Text + "&&&&" + DetailLabel.Text);
         string   str_words = File.ReadAllText("unremember.txt", Encoding.Default);
         string[] words     = Regex.Split(str_words, "\r\n");
         #region 随机单词
         Random r = new Random();
         number = r.Next(words.Length - 1);
         #endregion
         WordLabel.Text   = Regex.Split(words[number], " ")[0];
         DetailLabel.Text = words[number].Replace(WordLabel.Text, string.Empty);
         DetailLabel.Hide();
     }
 }
示例#4
0
        public void LayoutDetailLabel()
        {
            var c = this.Divider().ContentEdgeInsets;

            DetailLabel.SizeToFit();
            DetailLabel.SetX(c.Left);
            DetailLabel.SetY(this.Height() + DetailVerticalOffset);
            DetailLabel.SetWidth(this.Width() - c.Left - c.Right);
        }
示例#5
0
        void ReleaseDesignerOutlets()
        {
            if (TableView != null)
            {
                TableView.Dispose();
                TableView = null;
            }

            if (BackgroundImageView != null)
            {
                BackgroundImageView.Dispose();
                BackgroundImageView = null;
            }

            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

            if (ImageView != null)
            {
                ImageView.Dispose();
                ImageView = null;
            }

            if (LineView != null)
            {
                LineView.Dispose();
                LineView = null;
            }

            if (MoreButton != null)
            {
                MoreButton.Dispose();
                MoreButton = null;
            }

            if (PlayButton != null)
            {
                PlayButton.Dispose();
                PlayButton = null;
            }

            if (ShuffleButton != null)
            {
                ShuffleButton.Dispose();
                ShuffleButton = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (AttachmentContentView != null)
            {
                AttachmentContentView.Dispose();
                AttachmentContentView = null;
            }

            if (AutorLabel != null)
            {
                AutorLabel.Dispose();
                AutorLabel = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (HeightAttachmentConstraint != null)
            {
                HeightAttachmentConstraint.Dispose();
                HeightAttachmentConstraint = null;
            }

            if (SectionTextField != null)
            {
                SectionTextField.Dispose();
                SectionTextField = null;
            }

            if (TitleEventLabel != null)
            {
                TitleEventLabel.Dispose();
                TitleEventLabel = null;
            }

            if (TopAttachmentContentConstraint != null)
            {
                TopAttachmentContentConstraint.Dispose();
                TopAttachmentContentConstraint = null;
            }
        }
示例#7
0
        private void Form1_Load(object sender, EventArgs e)
        {
            this.KeyPreview = true;
            //1、读取未记忆单词
            string str_words = File.ReadAllText("unremember.txt", Encoding.Default);

            string[] words = Regex.Split(str_words, "\r\n");
            WordLabel.Text   = Regex.Split(words[number], " ")[0];
            DetailLabel.Text = words[number].Replace(WordLabel.Text, string.Empty);
            DetailLabel.Hide();
        }
示例#8
0
        void ReleaseDesignerOutlets()
        {
            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }
        }
示例#9
0
        void ReleaseDesignerOutlets()
        {
            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

            if (TitleLabel != null)
            {
                TitleLabel.Dispose();
                TitleLabel = null;
            }

            if (RightConstraint != null)
            {
                RightConstraint.Dispose();
                RightConstraint = null;
            }
        }
示例#10
0
        private void RememberButton_Click(object sender, EventArgs e)
        {
            string str_words = File.ReadAllText("unremember.txt", Encoding.Default);

            string[] words = Regex.Split(str_words, "\r\n");
            str_words = str_words.Replace(WordLabel.Text + DetailLabel.Text + "\r\n", string.Empty);
            File.AppendAllText("remember.txt", WordLabel.Text + DetailLabel.Text + "\r\n", Encoding.Default);
            File.WriteAllText("unremember.txt", str_words, Encoding.Default);
            string s         = File.ReadAllText("unremember.txt");
            int    LeftWords = (s.Length - s.Replace("\r\n", string.Empty).Length) / 4;

            LeftWordsLabel.Text = "剩余单词:" + LeftWords;
            str_words           = File.ReadAllText("unremember.txt", Encoding.Default);
            words = Regex.Split(str_words, "\r\n");
            #region 随机单词
            Random r = new Random();
            number = r.Next(words.Length - 1);
            #endregion
            WordLabel.Text   = Regex.Split(words[number], " ")[0];
            DetailLabel.Text = words[number].Replace(WordLabel.Text, string.Empty);
            DetailLabel.Hide();
        }
示例#11
0
 private void ShowAnswerButton_Click(object sender, EventArgs e)
 {
     DetailLabel.Show();
 }
示例#12
0
        void ReleaseDesignerOutlets()
        {
            if (AddObservationView != null)
            {
                AddObservationView.Dispose();
                AddObservationView = null;
            }

            if (AttachmentContentView != null)
            {
                AttachmentContentView.Dispose();
                AttachmentContentView = null;
            }

            if (CheckButton != null)
            {
                CheckButton.Dispose();
                CheckButton = null;
            }

            if (ConfidentialConteinerView != null)
            {
                ConfidentialConteinerView.Dispose();
                ConfidentialConteinerView = null;
            }

            if (ConstraintHeightObservationContentView != null)
            {
                ConstraintHeightObservationContentView.Dispose();
                ConstraintHeightObservationContentView = null;
            }

            if (CreateObservationButton != null)
            {
                CreateObservationButton.Dispose();
                CreateObservationButton = null;
            }

            if (DateLabel != null)
            {
                DateLabel.Dispose();
                DateLabel = null;
            }

            if (DetailLabel != null)
            {
                DetailLabel.Dispose();
                DetailLabel = null;
            }

            if (EditButton != null)
            {
                EditButton.Dispose();
                EditButton = null;
            }

            if (HeightAddObservationConstraint != null)
            {
                HeightAddObservationConstraint.Dispose();
                HeightAddObservationConstraint = null;
            }

            if (HeightAttachmentConstraint != null)
            {
                HeightAttachmentConstraint.Dispose();
                HeightAttachmentConstraint = null;
            }

            if (HeightConfidentialConteinerConstraint != null)
            {
                HeightConfidentialConteinerConstraint.Dispose();
                HeightConfidentialConteinerConstraint = null;
            }

            if (HeightSectionConteinerViewConstraint != null)
            {
                HeightSectionConteinerViewConstraint.Dispose();
                HeightSectionConteinerViewConstraint = null;
            }

            if (ObservationContentView != null)
            {
                ObservationContentView.Dispose();
                ObservationContentView = null;
            }

            if (ObservationTextView != null)
            {
                ObservationTextView.Dispose();
                ObservationTextView = null;
            }

            if (PlaceLabel != null)
            {
                PlaceLabel.Dispose();
                PlaceLabel = null;
            }

            if (SectionConteinerView != null)
            {
                SectionConteinerView.Dispose();
                SectionConteinerView = null;
            }

            if (SectionTextField != null)
            {
                SectionTextField.Dispose();
                SectionTextField = null;
            }

            if (StatusLabel != null)
            {
                StatusLabel.Dispose();
                StatusLabel = null;
            }

            if (TagLabel != null)
            {
                TagLabel.Dispose();
                TagLabel = null;
            }

            if (TitleEventLabel != null)
            {
                TitleEventLabel.Dispose();
                TitleEventLabel = null;
            }

            if (TopAttachmentContentConstraint != null)
            {
                TopAttachmentContentConstraint.Dispose();
                TopAttachmentContentConstraint = null;
            }

            if (TopConfidentialContainerConstraint != null)
            {
                TopConfidentialContainerConstraint.Dispose();
                TopConfidentialContainerConstraint = null;
            }

            if (TopSectionConteinerViewConstraint != null)
            {
                TopSectionConteinerViewConstraint.Dispose();
                TopSectionConteinerViewConstraint = null;
            }

            if (TypeLabel != null)
            {
                TypeLabel.Dispose();
                TypeLabel = null;
            }

            if (ViewTagConteiner != null)
            {
                ViewTagConteiner.Dispose();
                ViewTagConteiner = null;
            }
        }