Esempio n. 1
0
        public void InitialVotingViewModel(IVotingViewModel votingViewModel)
        {
            if (votingViewModel == null)
            {
                return;
            }

            votingViewModel.ExternalObjectTitle     = CurrentOffer.Title;
            votingViewModel.ExternalObjectId        = (int)CurrentOffer.ID;
            votingViewModel.ExternalObjectAliasCode = CurrentOffer.OfficialCode;


            FlowDocument flDocument = new FlowDocument();

            flDocument.FontFamily = new FontFamily("B Nazanin");
            var par1 = new Paragraph(new Run("شماره : " + CurrentOffer.OfficialCode + "             " + CurrentOffer.OwnerOrgan.CorrelateOrgUnit.Title));

            // par1.FontFamily = new FontFamily("B Nazanin");
            par1.FontSize   = 30;
            par1.Foreground = Brushes.DarkGreen;
            flDocument.Blocks.Add(par1);

            var par2 = new Paragraph(new Run(CurrentOffer.Title));

            par2.FontSize   = 27;
            par2.Foreground = Brushes.Black;
            flDocument.Blocks.Add(par2);


            // var textRange = new TextRange(flDocument.ContentStart, flDocument.ContentEnd);

            votingViewModel.VotingSubject = XamlWriter.Save(flDocument);
        }
Esempio n. 2
0
 public void InitialVotingViewModel(IVotingViewModel votingViewModel)
 {
     throw new NotImplementedException();
 }