コード例 #1
0
            public Canv(Int32 id, DictionaryString str)
            {
                this.id  = id;
                main_stp = new StackPanel();
                StackPanel horisontal_stp = new StackPanel();

                horisontal_stp.Orientation = Orientation.Horizontal;

                enLabel              = new TextBlock();
                enLabel.Text         = str.En;
                enLabel.FontSize     = 30;
                enLabel.Width        = 260;
                enLabel.Margin       = new Thickness(0, 0, 10, 0);
                enLabel.TextWrapping = TextWrapping.Wrap;

                ruLabel              = new TextBlock();
                ruLabel.Text         = str.Ru;
                ruLabel.FontSize     = 30;
                ruLabel.Width        = 260;
                ruLabel.TextWrapping = TextWrapping.Wrap;

                horisontal_stp.Children.Add(enLabel);
                horisontal_stp.Children.Add(ruLabel);

                butt          = new Button();
                butt.Content  = "Уже изучил";
                butt.Margin   = new Thickness(0, 20, 0, 20);
                butt.Width    = 150;
                butt.FontSize = 28;
                butt.Click   += Button_Click;

                main_stp.Children.Add(horisontal_stp);
                main_stp.Children.Add(butt);
            }
コード例 #2
0
            public Canv(Int32 id, DictionaryString str)
            {
                this.id = id;
                canvas  = new Canvas();

                enLabel = new Label();
                enLabel.SetValue(ContentProperty, str.En);
                enLabel.FontSize = 30;

                ruLabel          = new Label();
                ruLabel.FontSize = 30;
                ruLabel.SetValue(ContentProperty, str.Ru);

                butt          = new Button();
                butt.Content  = "Уже изучил";
                butt.Margin   = new Thickness(0, 10, 0, 0);
                butt.Padding  = new Thickness(5);
                butt.FontSize = 20;
                butt.Click   += Button_Click;

                canvas.Children.Add(enLabel);
                canvas.Children.Add(ruLabel);
                canvas.Children.Add(butt);
                canvas.Height = 50;
                Canvas.SetLeft(ruLabel, 170);
                Canvas.SetLeft(butt, 380);
            }
コード例 #3
0
        private void CreateString(DictionaryString str)
        {
            ListViewItem lvi  = new ListViewItem();
            Canv         canv = new Canv(id, str);

            listView.Items.Add(canv.main_stp);
            listCanvas.Add(canv);
        }
コード例 #4
0
        private void CreateString(DictionaryString str)
        {
            ListViewItem lvi  = new ListViewItem();
            Canv         canv = new Canv(id, str);

            canv.butt.Click += Button1_Click;

            listView.Items.Add(canv.canvas);
            listCanvas.Add(canv);
        }
コード例 #5
0
        private String[] SplitOffer(DictionaryString offer)
        {
            String[] enWords = offer.En.Split(' ');

            return(enWords);
        }