نظرات مطالب
ویدیوهای آموزشی MVVM
دو مورد دیگر:
Advanced Topics for Building Large-Scale Applications with Microsoft Silverlight
http://microsoftpdc.com/Sessions/CL22

Developing Testable Silverlight Applications
http://microsoftpdc.com/Sessions/CL32
اشتراک‌ها
الگوریتم جدید سایت Stackoverflow برای نمایش پاسخ‌های جدید

As we’ve been moving forward on the Outdated Answers project, one of the things that’s been clear is that on questions with multiple answers, we need a way to surface newer answers that may be more current, while reducing the visibility of older answers that may no longer be correct or relevant 

الگوریتم جدید سایت Stackoverflow برای نمایش پاسخ‌های جدید
اشتراک‌ها
با سی شارپ 8 از دست NullReferenceExceptions ها خلاص شوید

A .NET guideline specifies that an application should never throw a NullReferenceException. However, many applications and libraries do. The NullReferenceException is the most common exception happening. That’s why C# 8 tries to get rid of it. With C# 8, reference types are not null be default. This is a big change, and a great feature. However, what about all the legacy code? Can old libraries be used with C# 8 applications, and can C# 7 applications make use of C# 8 libraries?

This article demonstrates how C# 8 allows mixing old and new assemblies. 

با سی شارپ 8 از دست NullReferenceExceptions ها خلاص شوید
اشتراک‌ها
تجربیاتی مفید در رابطه با طراحی و مدیریت رویدادهای دوره ای

Manage events entities is pretty easy. You define few informations like a subject, a content, and maybe the most important, dates (a start and a end date of course).
You’re ready to create calendar or timeline features. Baooom! Now you need to be able to create recurrent event ! And everything is going to break.
I’ve work on this kind of feature, and here are my small advices 

تجربیاتی مفید در رابطه با طراحی و مدیریت رویدادهای دوره ای
اشتراک‌ها
اجرای اپلیکیشن های ASP.NET Core بر روی Windows Subsystem for Linux

Windows 10 has something called Windows Subsystem for Linux and this something enables us to run Linux applications on Windows 10 using Linux without need for Hyper-V or other virtual machines. When building multi-platform applications like my open-source TemperatureStation solution then having Linux right there for testing comes very handy. This blog post shows how to get Linux running on Windows, how to install .NET Core and how to run web applications on Linux. 

اجرای اپلیکیشن های ASP.NET Core بر روی Windows Subsystem for Linux
پاسخ به بازخورد‌های پروژه‌ها
ارسال مستقیم به پرینتر
سلام.. این کد برای من انجام نمیشه و تنظیمات چاپگر رو نشون نمیده.
باید حتما آکروبات ریدر نصب باشه تا نشون بده؟ یا کدهام مشکل داره؟
PdfReport pdfrpt = new PdfReport();
                pdfrpt.DocumentPreferences(doc =>
                {
                    doc.RunDirection(PdfRunDirection.RightToLeft);
                    doc.Orientation(PageOrientation.Landscape);
                    doc.PageSize(PdfPageSize.A4);
                    doc.DocumentMetadata(new DocumentMetadata { Author = "Hovze", Application = "PdfRpt", Keywords = "Report", Subject = "Test Rpt", Title = "Report" });

                    doc.PrintingPreferences(new PrintingPreferences
                    {
                        ShowPrintDialogAutomatically = true
                    });
                })
                .DefaultFonts(fonts =>
                {
                    fonts.Path(fontPath + "\\BNAZANIN.ttf", fontPath + "\\BNAZNNBD.ttf");
                    fonts.Size(13);
                })
                .PagesFooter(footer =>
                {
                    footer.DefaultFooter(PersianDate.ToPersianDateTime(DateTime.Now, "/", false, false));
                })
                .PagesHeader(header =>
                {
              
                     header.CustomHeader(new CustomHeader { Name=Studentdt.Rows[0][1].ToString(),Family= Studentdt.Rows[0][2].ToString(),parvande= Studentdt.Rows[0][3].ToString(),tavalod= Studentdt.Rows[0][5].ToString(),shsh= Studentdt.Rows[0][6].ToString(),sodor= Studentdt.Rows[0][7].ToString(),codeMelli= Studentdt.Rows[0][8].ToString(),codeTahsili= Studentdt.Rows[0][0].ToString(),taahol=Studentdt.Rows[0][22].ToString(), PdfRptFont = header.PdfFont ,_imagePath=imgPath,_imageStud=stdImage});
                    
                        
                     })
                .MainTableTemplate(template =>
                {
                    template.BasicTemplate(BasicTemplate.SilverTemplate);
                })
                .MainTablePreferences(table =>
                {
                    table.ColumnsWidthsType(TableColumnWidthType.Relative);
                    table.NumberOfDataRowsPerPage(0);
                    table.GroupsPreferences(new GroupsPreferences
                    {
                        GroupType = GroupType.HideGroupingColumns,
                        RepeatHeaderRowPerGroup = true,
                        ShowOneGroupPerPage = true,
                        SpacingBeforeAllGroupsSummary = 5f
                    });
                })
                .MainTableDataSource(dataSource =>
                {
                    dataSource.DataTable(dt);
                })
                .MainTableSummarySettings(summarySettings =>
                {
                    summarySettings.PreviousPageSummarySettings("نقل از صفحه قبل");
                })
                .MainTableColumns(columns =>
                {
                 
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("سال");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Center);
                        column.IsVisible(true);
                        column.Order(0);
                        column.Width(2);
                        column.HeaderCell("سال تحصیلی");
                       
                    });
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("نیم سال");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(1);
                        column.Width(1);
                        column.HeaderCell("نیم سال");
                       
                    });
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("پایه");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(2);
                        column.Width(1);
                        column.HeaderCell("پایه");
                    });
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("درس");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(3);
                        column.Width(1);
                        column.HeaderCell("درس");
                    });
                    for (int i = 6; i < countScore + 6; i++)
                    {
                            columns.AddColumn(column =>
                        {
                            column.PropertyName(dt.Columns[i].ToString());
                            column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                            column.IsVisible(true);
                            column.Order(i - 2);
                            column.Width(1);
                            column.HeaderCell(dtTitle.Rows[0][i - 5].ToString());
                            column.CalculatedField(
                          list =>
                          {
                              nimsal = list.GetValueOf("نیم سال").ToString();
                              if (nimsal == "دوم")
                              {
                                  if (k == 13 + countScore)
                                      k = 13;
                                  //return list[i+8].
                                  k++;
                                  

                                  return list[k].PropertyValue.ToString();
                              }
                              else
                              {
                                  if (m == 5 + countScore)
                                      m = 5;
                                  m++;
                                  return list[m].PropertyValue.ToString(); ;
                              }
                          });

                        });
                      
                    }
                   
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("FinalScore1");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(countScore + 4);
                        column.Width(1);
                        column.HeaderCell("نمره نهایی نیم سال 1");
                    });
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("t_term1");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(countScore+5);
                        column.Width(1);
                        column.HeaderCell("نمره تجدیدی نیم سال 1");
                    });
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("t_term11");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(countScore + 6);
                        column.Width(1);
                        column.HeaderCell("نمره استادیاری ترم 1");
                    });
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("FinalScore2");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(countScore + 7);
                        column.Width(1);
                        column.HeaderCell("نمره نهایی نیم سال 2");
                    });

                    columns.AddColumn(column =>
                    {
                        column.PropertyName("t_term2");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(countScore + 8);
                        column.Width(1);
                        column.HeaderCell("نمره تجدیدی نیم سال 2");
                    });
                    
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("t_term22");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(countScore + 9);
                        column.Width(1);
                        column.HeaderCell("نمره استادیاری نیم سال 2");
                    });
                   
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("tabestan");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(countScore + 10);
                        column.Width(1);
                        column.HeaderCell("نمره تابستان");
                    });
                   
                    columns.AddColumn(column =>
                    {
                        column.PropertyName("Ghabol");
                        column.CellsHorizontalAlignment(PdfRpt.Core.Contracts.HorizontalAlignment.Left);
                        column.IsVisible(true);
                        column.Order(countScore + 11);
                        column.Width(1);
                        column.HeaderCell("قبول");
                    });
                });
               

                return  pdfrpt.MainTableEvents(events =>
                   {
                       events.DataSourceIsEmpty(message: "داده ای برای نمایش وجو د ندارد");
                       events.MainTableAdded(args =>
                       {
                           var taxTable = new PdfPTable(1);  // Create a clone of the MainTable's structure
                           taxTable.RunDirection = 3;
                           //taxTable.SetWidths(new float[] { 3, 3, 3 });
                           taxTable.WidthPercentage = 100f;
                           taxTable.SpacingBefore = 10f;

                           taxTable.AddSimpleRow(
                               (data, cellProperties) =>
                               {
                                   data.Value = "مهر و امضای مدیر";
                                   cellProperties.ShowBorder = false;
                                   cellProperties.HorizontalAlignment = HorizontalAlignment.Left;
                                   cellProperties.PdfFont = args.PdfFont;
                               });
                           args.PdfDoc.Add(taxTable);
                       });
                   })
                .Export(export =>
                {
                })
                .Generate(data => data.AsPdfFile(fo.Name/*string.Format("{0}\\RptCalculatedFieldsSample-{1}.pdf", Application.StartupPath, Guid.NewGuid().ToString("N")))*/));
               
            }

اشتراک‌ها
مقایسه React و Blazor

Web application development has evolved with the rise of new technologies and frameworks. Two of the most popular technologies for building interactive web applications are Blazor and React. In this article, we will compare Blazor and React and highlight their differences with examples.

 
مقایسه React  و Blazor
اشتراک‌ها
مقایسه اپلیکیشن های Native اندروید و آی او اس با React Native، Ionic و Native ُScript

NativeScript یک فریمورک متن باز برای ساخت برنامه‌های نیتیو موبایل با جاوا اسکریپت است.

Ionic فریمورک مبتنی بر Angular، به صورت متن باز برای توسعه نرم افزار تلفن همراه بکار می‌رود که باعث می‌شود برنامه‌های نیتیو و پیشرفته وب با تکنولوژی‌های بالا ساخته شود.

React Native یک فریمورک جاوا اسکریپت برای ساخت برنامه‌های تلفن همراه نیتیو است که از فریمورک React استفاده می‌کند.

انتخاب یکی از این 3 گزینه در دنیای صنعت رو به رشد امروز دشوار است. 

مقایسه اپلیکیشن های Native اندروید و آی او اس با React Native، Ionic و Native ُScript
نظرات مطالب
روش یکی کردن پروژه‌های React و ASP.NET Core
با فرض نصب ماژول URL-rewrite، مسیریابی فایل‌های ایستای React را به صورت زیر هم می‌توان در فایل web.config برنامه‌ی وب تنظیم کرد تا درخواست مسیرهای سمت کلاینت آن‌ها به سمت سرور ارسال نشود:
<?xml version="1.0"?>
<configuration>
  <system.webServer>
     <rewrite>
         <rules>
            <rule name="React Routes" stopProcessing="true">
              <match url=".*" />
              <conditions logicalGrouping="MatchAll">
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
              </conditions>
              <action type="Rewrite" url="/index.html" />
            </rule>
         </rules>
     </rewrite>
  </system.webServer>
</configuration>