yoooooooooo

yoooooooooo

--- Attendance-Scanning/Attendance-Scanning/Main.Designer.cs
+++ Attendance-Scanning/Attendance-Scanning/Main.Designer.cs
@@ -109,7 +109,7 @@
             this.panel1.Location = new System.Drawing.Point(0, 0);
             this.panel1.Margin = new System.Windows.Forms.Padding(2);
             this.panel1.Name = "panel1";
-            this.panel1.Size = new System.Drawing.Size(785, 140);
+            this.panel1.Size = new System.Drawing.Size(1178, 194);
             this.panel1.TabIndex = 0;
             //
             // TeacherManagementPanel
@@ -122,44 +122,42 @@
             this.TeacherManagementPanel.Controls.Add(this.TeacherManagementLabel);
             this.TeacherManagementPanel.Dock = System.Windows.Forms.DockStyle.Right;
             this.TeacherManagementPanel.Location = new System.Drawing.Point(253, 25);
-            this.TeacherManagementPanel.Margin = new System.Windows.Forms.Padding(2);
+            this.TeacherManagementPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.TeacherManagementPanel.Name = "TeacherManagementPanel";
-            this.TeacherManagementPanel.Size = new System.Drawing.Size(532, 115);
+            this.TeacherManagementPanel.Size = new System.Drawing.Size(798, 163);
             this.TeacherManagementPanel.TabIndex = 3;
             //
             // textBox2
             //
             this.textBox2.Location = new System.Drawing.Point(59, 70);
-            this.textBox2.Margin = new System.Windows.Forms.Padding(2);
+            this.textBox2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.textBox2.Name = "textBox2";
-            this.textBox2.Size = new System.Drawing.Size(58, 20);
+            this.textBox2.Size = new System.Drawing.Size(85, 28);
             this.textBox2.TabIndex = 5;
             //
             // textBox1
             //
             this.textBox1.Location = new System.Drawing.Point(47, 28);
-            this.textBox1.Margin = new System.Windows.Forms.Padding(2);
+            this.textBox1.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.textBox1.Name = "textBox1";
-            this.textBox1.Size = new System.Drawing.Size(68, 20);
+            this.textBox1.Size = new System.Drawing.Size(100, 28);
             this.textBox1.TabIndex = 4;
             //
             // MinuteLabel
             //
             this.MinuteLabel.AutoSize = true;
-            this.MinuteLabel.Location = new System.Drawing.Point(11, 75);
-            this.MinuteLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.MinuteLabel.Location = new System.Drawing.Point(16, 104);
             this.MinuteLabel.Name = "MinuteLabel";
-            this.MinuteLabel.Size = new System.Drawing.Size(45, 13);
+            this.MinuteLabel.Size = new System.Drawing.Size(80, 18);
             this.MinuteLabel.TabIndex = 3;
             this.MinuteLabel.Text = "Minute: ";
             //
             // HourLabel
             //
             this.HourLabel.AutoSize = true;
-            this.HourLabel.Location = new System.Drawing.Point(11, 32);
-            this.HourLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.HourLabel.Location = new System.Drawing.Point(16, 44);
             this.HourLabel.Name = "HourLabel";
-            this.HourLabel.Size = new System.Drawing.Size(36, 13);
+            this.HourLabel.Size = new System.Drawing.Size(62, 18);
             this.HourLabel.TabIndex = 2;
             this.HourLabel.Text = "Hour: ";
             //
@@ -167,8 +165,8 @@
             //
             this.tableLayoutPanel2.ColumnCount = 3;
             this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
-            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 119F));
-            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 115F));
+            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 178F));
+            this.tableLayoutPanel2.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 172F));
             this.tableLayoutPanel2.Controls.Add(this.sendEmail_Button, 2, 0);
             this.tableLayoutPanel2.Controls.Add(this.Button_SetUncheck, 2, 1);
             this.tableLayoutPanel2.Controls.Add(this.Button_SpecialDayEdition, 2, 2);
@@ -179,23 +177,23 @@
             this.tableLayoutPanel2.Controls.Add(this.button_CallPasswordEditor, 1, 2);
             this.tableLayoutPanel2.Dock = System.Windows.Forms.DockStyle.Right;
             this.tableLayoutPanel2.Location = new System.Drawing.Point(159, 0);
-            this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2);
+            this.tableLayoutPanel2.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.tableLayoutPanel2.Name = "tableLayoutPanel2";
             this.tableLayoutPanel2.RowCount = 3;
             this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 40.69767F));
             this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 59.30233F));
-            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 39F));
-            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 14F));
-            this.tableLayoutPanel2.Size = new System.Drawing.Size(373, 115);
+            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 54F));
+            this.tableLayoutPanel2.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 19F));
+            this.tableLayoutPanel2.Size = new System.Drawing.Size(560, 163);
             this.tableLayoutPanel2.TabIndex = 1;
             //
             // sendEmail_Button
             //
             this.sendEmail_Button.Dock = System.Windows.Forms.DockStyle.Fill;
             this.sendEmail_Button.Location = new System.Drawing.Point(260, 2);
-            this.sendEmail_Button.Margin = new System.Windows.Forms.Padding(2);
+            this.sendEmail_Button.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.sendEmail_Button.Name = "sendEmail_Button";
-            this.sendEmail_Button.Size = new System.Drawing.Size(111, 26);
+            this.sendEmail_Button.Size = new System.Drawing.Size(166, 38);
             this.sendEmail_Button.TabIndex = 3;
             this.sendEmail_Button.Text = "Send Email";
             this.sendEmail_Button.UseVisualStyleBackColor = true;
@@ -205,9 +203,9 @@
             //
             this.Button_SetUncheck.Dock = System.Windows.Forms.DockStyle.Fill;
             this.Button_SetUncheck.Location = new System.Drawing.Point(260, 32);
-            this.Button_SetUncheck.Margin = new System.Windows.Forms.Padding(2);
+            this.Button_SetUncheck.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Button_SetUncheck.Name = "Button_SetUncheck";
-            this.Button_SetUncheck.Size = new System.Drawing.Size(111, 41);
+            this.Button_SetUncheck.Size = new System.Drawing.Size(166, 58);
             this.Button_SetUncheck.TabIndex = 0;
             this.Button_SetUncheck.Text = "Set All as Unchecked";
             this.Button_SetUncheck.UseVisualStyleBackColor = true;
@@ -217,9 +215,9 @@
             //
             this.Button_SpecialDayEdition.Dock = System.Windows.Forms.DockStyle.Fill;
             this.Button_SpecialDayEdition.Location = new System.Drawing.Point(260, 77);
-            this.Button_SpecialDayEdition.Margin = new System.Windows.Forms.Padding(2);
+            this.Button_SpecialDayEdition.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Button_SpecialDayEdition.Name = "Button_SpecialDayEdition";
-            this.Button_SpecialDayEdition.Size = new System.Drawing.Size(111, 36);
+            this.Button_SpecialDayEdition.Size = new System.Drawing.Size(166, 49);
             this.Button_SpecialDayEdition.TabIndex = 4;
             this.Button_SpecialDayEdition.Text = "Edit Special Days";
             this.Button_SpecialDayEdition.UseVisualStyleBackColor = true;
@@ -228,9 +226,9 @@
             //
             this.Button_EditEmailFormat.Dock = System.Windows.Forms.DockStyle.Fill;
             this.Button_EditEmailFormat.Location = new System.Drawing.Point(141, 2);
-            this.Button_EditEmailFormat.Margin = new System.Windows.Forms.Padding(2);
+            this.Button_EditEmailFormat.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Button_EditEmailFormat.Name = "Button_EditEmailFormat";
-            this.Button_EditEmailFormat.Size = new System.Drawing.Size(115, 26);
+            this.Button_EditEmailFormat.Size = new System.Drawing.Size(172, 38);
             this.Button_EditEmailFormat.TabIndex = 5;
             this.Button_EditEmailFormat.Text = "Edit Email Format";
             this.Button_EditEmailFormat.UseVisualStyleBackColor = true;
@@ -240,9 +238,9 @@
             //
             this.Button_EditEmailAccount.Dock = System.Windows.Forms.DockStyle.Fill;
             this.Button_EditEmailAccount.Location = new System.Drawing.Point(2, 2);
-            this.Button_EditEmailAccount.Margin = new System.Windows.Forms.Padding(2);
+            this.Button_EditEmailAccount.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Button_EditEmailAccount.Name = "Button_EditEmailAccount";
-            this.Button_EditEmailAccount.Size = new System.Drawing.Size(135, 26);
+            this.Button_EditEmailAccount.Size = new System.Drawing.Size(204, 38);
             this.Button_EditEmailAccount.TabIndex = 6;
             this.Button_EditEmailAccount.Text = "Edit Email Account";
             this.Button_EditEmailAccount.UseVisualStyleBackColor = true;
@@ -252,9 +250,9 @@
             //
             this.Button_SetTime.Dock = System.Windows.Forms.DockStyle.Fill;
             this.Button_SetTime.Location = new System.Drawing.Point(2, 32);
-            this.Button_SetTime.Margin = new System.Windows.Forms.Padding(2);
+            this.Button_SetTime.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Button_SetTime.Name = "Button_SetTime";
-            this.Button_SetTime.Size = new System.Drawing.Size(135, 41);
+            this.Button_SetTime.Size = new System.Drawing.Size(204, 58);
             this.Button_SetTime.TabIndex = 2;
             this.Button_SetTime.Text = "Set this as late time";
             this.Button_SetTime.UseVisualStyleBackColor = true;
@@ -264,9 +262,9 @@
             //
             this.Button_SetAbsent.Dock = System.Windows.Forms.DockStyle.Fill;
             this.Button_SetAbsent.Location = new System.Drawing.Point(141, 32);
-            this.Button_SetAbsent.Margin = new System.Windows.Forms.Padding(2);
+            this.Button_SetAbsent.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Button_SetAbsent.Name = "Button_SetAbsent";
-            this.Button_SetAbsent.Size = new System.Drawing.Size(115, 41);
+            this.Button_SetAbsent.Size = new System.Drawing.Size(172, 58);
             this.Button_SetAbsent.TabIndex = 1;
             this.Button_SetAbsent.Text = "Set All unchecked as Absent";
             this.Button_SetAbsent.UseVisualStyleBackColor = true;
@@ -276,9 +274,9 @@
             //
             this.button_CallPasswordEditor.Dock = System.Windows.Forms.DockStyle.Fill;
             this.button_CallPasswordEditor.Location = new System.Drawing.Point(141, 77);
-            this.button_CallPasswordEditor.Margin = new System.Windows.Forms.Padding(2);
+            this.button_CallPasswordEditor.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.button_CallPasswordEditor.Name = "button_CallPasswordEditor";
-            this.button_CallPasswordEditor.Size = new System.Drawing.Size(115, 36);
+            this.button_CallPasswordEditor.Size = new System.Drawing.Size(172, 49);
             this.button_CallPasswordEditor.TabIndex = 7;
             this.button_CallPasswordEditor.Text = "Edit Management Password";
             this.button_CallPasswordEditor.UseVisualStyleBackColor = true;
@@ -287,10 +285,9 @@
             // TeacherManagementLabel
             //
             this.TeacherManagementLabel.AutoSize = true;
-            this.TeacherManagementLabel.Location = new System.Drawing.Point(3, 3);
-            this.TeacherManagementLabel.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.TeacherManagementLabel.Location = new System.Drawing.Point(4, 4);
             this.TeacherManagementLabel.Name = "TeacherManagementLabel";
-            this.TeacherManagementLabel.Size = new System.Drawing.Size(112, 13);
+            this.TeacherManagementLabel.Size = new System.Drawing.Size(170, 18);
             this.TeacherManagementLabel.TabIndex = 0;
             this.TeacherManagementLabel.Text = "Teacher Management";
             //
@@ -309,8 +306,9 @@
             this.PersonalData});
             this.toolStrip1.Location = new System.Drawing.Point(0, 0);
             this.toolStrip1.Name = "toolStrip1";
+            this.toolStrip1.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
             this.toolStrip1.RenderMode = System.Windows.Forms.ToolStripRenderMode.Professional;
-            this.toolStrip1.Size = new System.Drawing.Size(785, 25);
+            this.toolStrip1.Size = new System.Drawing.Size(1178, 31);
             this.toolStrip1.TabIndex = 2;
             this.toolStrip1.Text = "toolStrip1";
             //
@@ -320,25 +318,25 @@
             this.B_LoadFile.Image = ((System.Drawing.Image)(resources.GetObject("B_LoadFile.Image")));
             this.B_LoadFile.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.B_LoadFile.Name = "B_LoadFile";
-            this.B_LoadFile.Size = new System.Drawing.Size(108, 22);
+            this.B_LoadFile.Size = new System.Drawing.Size(175, 28);
             this.B_LoadFile.Text = "Load Student Data";
             this.B_LoadFile.Click += new System.EventHandler(this.LoadFileButtonClicked);
             //
             // toolStripSeparator1
             //
             this.toolStripSeparator1.Name = "toolStripSeparator1";
-            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 25);
+            this.toolStripSeparator1.Size = new System.Drawing.Size(6, 31);
             //
             // Label_Current_File
             //
             this.Label_Current_File.Name = "Label_Current_File";
-            this.Label_Current_File.Size = new System.Drawing.Size(74, 22);
+            this.Label_Current_File.Size = new System.Drawing.Size(119, 28);
             this.Label_Current_File.Text = "Current File: ";
             //
             // toolStripSeparator5
             //
             this.toolStripSeparator5.Name = "toolStripSeparator5";
-            this.toolStripSeparator5.Size = new System.Drawing.Size(6, 25);
+            this.toolStripSeparator5.Size = new System.Drawing.Size(6, 31);
             //
             // Button_TeacherManagement
             //
@@ -346,14 +344,14 @@
             this.Button_TeacherManagement.Image = ((System.Drawing.Image)(resources.GetObject("Button_TeacherManagement.Image")));
             this.Button_TeacherManagement.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.Button_TeacherManagement.Name = "Button_TeacherManagement";
-            this.Button_TeacherManagement.Size = new System.Drawing.Size(126, 22);
+            this.Button_TeacherManagement.Size = new System.Drawing.Size(202, 28);
             this.Button_TeacherManagement.Text = "Teacher Management";
             this.Button_TeacherManagement.Click += new System.EventHandler(this.Button_TeacherManagement_Click);
             //
             // toolStripSeparator6
             //
             this.toolStripSeparator6.Name = "toolStripSeparator6";
-            this.toolStripSeparator6.Size = new System.Drawing.Size(6, 25);
+            this.toolStripSeparator6.Size = new System.Drawing.Size(6, 31);
             //
             // TimeEditing
             //
@@ -365,35 +363,30 @@
             this.TimeEditing.Image = ((System.Drawing.Image)(resources.GetObject("TimeEditing.Image")));
             this.TimeEditing.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.TimeEditing.Name = "TimeEditing";
-            this.TimeEditing.Size = new System.Drawing.Size(87, 22);
+            this.TimeEditing.Size = new System.Drawing.Size(137, 28);
             this.TimeEditing.Text = "Time Editing";
             this.TimeEditing.Visible = false;
             //
             // editSpecialDaysToolStripMenuItem
             //
             this.editSpecialDaysToolStripMenuItem.Name = "editSpecialDaysToolStripMenuItem";
-            this.editSpecialDaysToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
+            this.editSpecialDaysToolStripMenuItem.Size = new System.Drawing.Size(240, 30);
             this.editSpecialDaysToolStripMenuItem.Text = "Edit Special Days";
             this.editSpecialDaysToolStripMenuItem.ToolTipText = "For some reasons(Like PA days), we do not need any record of late time";
             //
             // editLateTimeToolStripMenuItem
             //
             this.editLateTimeToolStripMenuItem.Name = "editLateTimeToolStripMenuItem";
-            this.editLateTimeToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
+            this.editLateTimeToolStripMenuItem.Size = new System.Drawing.Size(240, 30);
             this.editLateTimeToolStripMenuItem.Text = "Edit Late Time";
             this.editLateTimeToolStripMenuItem.ToolTipText = "Change the amount of time for late of a student";
             //
             // editTimeLimitToolStripMenuItem
             //
-            this.editTimeLimitToolStripMenuItem.Name = "editTimeLimitToolStripMenuItem";
-            this.editTimeLimitToolStripMenuItem.Size = new System.Drawing.Size(162, 22);
-            this.editTimeLimitToolStripMenuItem.Text = "Edit Time Limit";
-            this.editTimeLimitToolStripMenuItem.ToolTipText = "Change the amount of time  to determine a student is absent or not";
-            //
             // toolStripSeparator7
             //
             this.toolStripSeparator7.Name = "toolStripSeparator7";
-            this.toolStripSeparator7.Size = new System.Drawing.Size(6, 25);
+            this.toolStripSeparator7.Size = new System.Drawing.Size(6, 31);
             //
             // PersonalData
             //
@@ -404,21 +397,21 @@
             this.PersonalData.Image = ((System.Drawing.Image)(resources.GetObject("PersonalData.Image")));
             this.PersonalData.ImageTransparentColor = System.Drawing.Color.Magenta;
             this.PersonalData.Name = "PersonalData";
-            this.PersonalData.Size = new System.Drawing.Size(132, 22);
+            this.PersonalData.Size = new System.Drawing.Size(213, 28);
             this.PersonalData.Text = "Personal Data Option";
             this.PersonalData.Visible = false;
             //
             // editManagementPasswordToolStripMenuItem
             //
             this.editManagementPasswordToolStripMenuItem.Name = "editManagementPasswordToolStripMenuItem";
-            this.editManagementPasswordToolStripMenuItem.Size = new System.Drawing.Size(221, 22);
+            this.editManagementPasswordToolStripMenuItem.Size = new System.Drawing.Size(334, 30);
             this.editManagementPasswordToolStripMenuItem.Text = "Edit Management Password";
             this.editManagementPasswordToolStripMenuItem.ToolTipText = "Change the password for entering Teacher Management Panel";
             //
             // editEmailAccountToolStripMenuItem
             //
             this.editEmailAccountToolStripMenuItem.Name = "editEmailAccountToolStripMenuItem";
-            this.editEmailAccountToolStripMenuItem.Size = new System.Drawing.Size(221, 22);
+            this.editEmailAccountToolStripMenuItem.Size = new System.Drawing.Size(334, 30);
             this.editEmailAccountToolStripMenuItem.Text = "Edit Email Account";
             this.editEmailAccountToolStripMenuItem.ToolTipText = "Login to your email account";
             //
@@ -432,40 +425,40 @@
             this.BarCodeInputLabel.Controls.Add(this.Label_StudentIndex, 0, 0);
             this.BarCodeInputLabel.Controls.Add(this.CheckButton, 0, 2);
             this.BarCodeInputLabel.Location = new System.Drawing.Point(8, 28);
-            this.BarCodeInputLabel.Margin = new System.Windows.Forms.Padding(2);
+            this.BarCodeInputLabel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.BarCodeInputLabel.Name = "BarCodeInputLabel";
             this.BarCodeInputLabel.RowCount = 3;
             this.BarCodeInputLabel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 46.37681F));
             this.BarCodeInputLabel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 53.62319F));
-            this.BarCodeInputLabel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 43F));
-            this.BarCodeInputLabel.Size = new System.Drawing.Size(143, 110);
+            this.BarCodeInputLabel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 60F));
+            this.BarCodeInputLabel.Size = new System.Drawing.Size(214, 152);
             this.BarCodeInputLabel.TabIndex = 1;
             //
             // Box_StudentIndex
             //
             this.Box_StudentIndex.Location = new System.Drawing.Point(2, 33);
-            this.Box_StudentIndex.Margin = new System.Windows.Forms.Padding(2);
+            this.Box_StudentIndex.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Box_StudentIndex.Name = "Box_StudentIndex";
-            this.Box_StudentIndex.Size = new System.Drawing.Size(139, 20);
+            this.Box_StudentIndex.Size = new System.Drawing.Size(206, 28);
             this.Box_StudentIndex.TabIndex = 0;
+            this.Box_StudentIndex.TextChanged += new System.EventHandler(this.Box_StudentIndex_TextChanged);
             //
             // Label_StudentIndex
             //
             this.Label_StudentIndex.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)));
             this.Label_StudentIndex.AutoSize = true;
-            this.Label_StudentIndex.Location = new System.Drawing.Point(32, 0);
-            this.Label_StudentIndex.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.Label_StudentIndex.Location = new System.Drawing.Point(35, 0);
             this.Label_StudentIndex.Name = "Label_StudentIndex";
-            this.Label_StudentIndex.Size = new System.Drawing.Size(79, 31);
+            this.Label_StudentIndex.Size = new System.Drawing.Size(143, 42);
             this.Label_StudentIndex.TabIndex = 1;
             this.Label_StudentIndex.Text = "Student Index: ";
             //
             // CheckButton
             //
             this.CheckButton.Location = new System.Drawing.Point(2, 68);
-            this.CheckButton.Margin = new System.Windows.Forms.Padding(2);
+            this.CheckButton.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CheckButton.Name = "CheckButton";
-            this.CheckButton.Size = new System.Drawing.Size(139, 35);
+            this.CheckButton.Size = new System.Drawing.Size(208, 48);
             this.CheckButton.TabIndex = 2;
             this.CheckButton.Text = "Check This Index";
             this.CheckButton.UseVisualStyleBackColor = true;
@@ -487,9 +480,9 @@
             this.StudentListPanel.Controls.Add(this.CheckedPanel);
             this.StudentListPanel.Dock = System.Windows.Forms.DockStyle.Right;
             this.StudentListPanel.Location = new System.Drawing.Point(105, 140);
-            this.StudentListPanel.Margin = new System.Windows.Forms.Padding(2);
+            this.StudentListPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.StudentListPanel.Name = "StudentListPanel";
-            this.StudentListPanel.Size = new System.Drawing.Size(680, 395);
+            this.StudentListPanel.Size = new System.Drawing.Size(1020, 547);
             this.StudentListPanel.TabIndex = 1;
             //
             // UncheckPanel
@@ -500,9 +493,9 @@
             this.UncheckPanel.Controls.Add(this.ListView_Uncheck);
             this.UncheckPanel.Dock = System.Windows.Forms.DockStyle.Fill;
             this.UncheckPanel.Location = new System.Drawing.Point(0, 0);
-            this.UncheckPanel.Margin = new System.Windows.Forms.Padding(2);
+            this.UncheckPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.UncheckPanel.Name = "UncheckPanel";
-            this.UncheckPanel.Size = new System.Drawing.Size(307, 395);
+            this.UncheckPanel.Size = new System.Drawing.Size(460, 547);
             this.UncheckPanel.TabIndex = 3;
             //
             // UncheckToolStrip
@@ -517,20 +510,21 @@
             this.toolStripSeparator3});
             this.UncheckToolStrip.Location = new System.Drawing.Point(0, 0);
             this.UncheckToolStrip.Name = "UncheckToolStrip";
-            this.UncheckToolStrip.Size = new System.Drawing.Size(307, 29);
+            this.UncheckToolStrip.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
+            this.UncheckToolStrip.Size = new System.Drawing.Size(460, 40);
             this.UncheckToolStrip.TabIndex = 3;
             this.UncheckToolStrip.Text = "toolStrip2";
             //
             // toolStripLabel1
             //
             this.toolStripLabel1.Name = "toolStripLabel1";
-            this.toolStripLabel1.Size = new System.Drawing.Size(115, 26);
+            this.toolStripLabel1.Size = new System.Drawing.Size(186, 37);
             this.toolStripLabel1.Text = "Unchecked Students";
             //
             // toolStripSeparator3
             //
             this.toolStripSeparator3.Name = "toolStripSeparator3";
-            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 29);
+            this.toolStripSeparator3.Size = new System.Drawing.Size(6, 40);
             //
             // ListView_Uncheck
             //
@@ -542,10 +536,10 @@
             this.ListView_Uncheck.FullRowSelect = true;
             this.ListView_Uncheck.GridLines = true;
             this.ListView_Uncheck.Location = new System.Drawing.Point(0, -44);
-            this.ListView_Uncheck.Margin = new System.Windows.Forms.Padding(2);
+            this.ListView_Uncheck.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.ListView_Uncheck.MultiSelect = false;
             this.ListView_Uncheck.Name = "ListView_Uncheck";
-            this.ListView_Uncheck.Size = new System.Drawing.Size(307, 439);
+            this.ListView_Uncheck.Size = new System.Drawing.Size(460, 606);
             this.ListView_Uncheck.TabIndex = 1;
             this.ListView_Uncheck.UseCompatibleStateImageBehavior = false;
             this.ListView_Uncheck.View = System.Windows.Forms.View.Details;
@@ -571,9 +565,9 @@
             this.CheckedPanel.Controls.Add(this.CheckedListView);
             this.CheckedPanel.Dock = System.Windows.Forms.DockStyle.Right;
             this.CheckedPanel.Location = new System.Drawing.Point(307, 0);
-            this.CheckedPanel.Margin = new System.Windows.Forms.Padding(2);
+            this.CheckedPanel.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CheckedPanel.Name = "CheckedPanel";
-            this.CheckedPanel.Size = new System.Drawing.Size(373, 395);
+            this.CheckedPanel.Size = new System.Drawing.Size(560, 547);
             this.CheckedPanel.TabIndex = 2;
             //
             // CheckToolStrip
@@ -588,20 +582,21 @@
             this.toolStripSeparator4});
             this.CheckToolStrip.Location = new System.Drawing.Point(0, 0);
             this.CheckToolStrip.Name = "CheckToolStrip";
-            this.CheckToolStrip.Size = new System.Drawing.Size(373, 29);
+            this.CheckToolStrip.Padding = new System.Windows.Forms.Padding(0, 0, 2, 0);
+            this.CheckToolStrip.Size = new System.Drawing.Size(560, 40);
             this.CheckToolStrip.TabIndex = 3;
             this.CheckToolStrip.Text = "toolStrip3";
             //
             // CStudentLabel
             //
             this.CStudentLabel.Name = "CStudentLabel";
-            this.CStudentLabel.Size = new System.Drawing.Size(102, 26);
+            this.CStudentLabel.Size = new System.Drawing.Size(165, 37);
             this.CStudentLabel.Text = "Checked Students";
             //
             // toolStripSeparator4
             //
             this.toolStripSeparator4.Name = "toolStripSeparator4";
-            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 29);
+            this.toolStripSeparator4.Size = new System.Drawing.Size(6, 40);
             //
             // CheckedListView
             //
@@ -614,10 +609,10 @@
             this.CheckedListView.FullRowSelect = true;
             this.CheckedListView.GridLines = true;
             this.CheckedListView.Location = new System.Drawing.Point(0, -44);
-            this.CheckedListView.Margin = new System.Windows.Forms.Padding(2);
+            this.CheckedListView.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.CheckedListView.MultiSelect = false;
             this.CheckedListView.Name = "CheckedListView";
-            this.CheckedListView.Size = new System.Drawing.Size(373, 439);
+            this.CheckedListView.Size = new System.Drawing.Size(560, 606);
             this.CheckedListView.TabIndex = 2;
             this.CheckedListView.UseCompatibleStateImageBehavior = false;
             this.CheckedListView.View = System.Windows.Forms.View.Details;
@@ -645,24 +640,23 @@
             // Course_Index
             //
             this.Course_Index.AutoSize = true;
-            this.Course_Index.Location = new System.Drawing.Point(12, 142);
-            this.Course_Index.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
+            this.Course_Index.Location = new System.Drawing.Point(18, 197);
             this.Course_Index.Name = "Course_Index";
-            this.Course_Index.Size = new System.Drawing.Size(75, 13);
+            this.Course_Index.Size = new System.Drawing.Size(134, 18);
             this.Course_Index.TabIndex = 2;
             this.Course_Index.Text = "Course Index: ";
             //
             // Main
             //
-            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Stretch;
-            this.ClientSize = new System.Drawing.Size(785, 535);
+            this.ClientSize = new System.Drawing.Size(1178, 741);
             this.Controls.Add(this.Course_Index);
             this.Controls.Add(this.StudentListPanel);
             this.Controls.Add(this.panel1);
             this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog;
-            this.Margin = new System.Windows.Forms.Padding(2);
+            this.Margin = new System.Windows.Forms.Padding(2, 2, 2, 2);
             this.Name = "Main";
             this.Text = "Student Attendance Manager";
             this.panel1.ResumeLayout(false);


If the land is updated, we need to redo the settings for avatar invulnerability. This should fix up damage not working when being changed in a region without a restart/relog. Also fix regeneration of health over time if you were not colliding with something (e.g. flying).

--- Aurora/Modules/Avatar/AuroraCombatModule/CombatModule.cs
+++ Aurora/Modules/Avatar/AuroraCombatModule/CombatModule.cs
@@ -27,7 +27,8 @@

 using System;
 using System.Collections.Generic;
-using Nini.Config;
+using Nini.Config;
+using OpenSim.Framework;
 using OpenSim.Region.Physics.Manager;
 using OpenSim.Region.Framework.Interfaces;
 using OpenSim.Region.Framework.Scenes;
@@ -54,7 +55,8 @@
         private List<UUID> CombatAllowedAgents = new List<UUID>();
         public List<UUID> PrimCombatServers = new List<UUID>();
         public bool ForceRequireCombatPermission = true;
-        public bool DisallowTeleportingForCombatants = true;
+        public bool DisallowTeleportingForCombatants = true;
+        public Scene m_scene;

         public void Initialise(IConfigSource source)
         {
@@ -75,12 +77,14 @@
         public void AddRegion(Scene scene)
         {
             if (m_enabled)
-            {
+            {
+                m_scene = scene;
                 scene.RegisterModuleInterface<ICombatModule>(this);
                 scene.EventManager.OnNewPresence += NewPresence;
                 scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
-                scene.Permissions.OnAllowedOutgoingLocalTeleport += AllowedTeleports;
-                scene.Permissions.OnAllowedOutgoingRemoteTeleport += AllowedTeleports;
+                scene.Permissions.OnAllowedOutgoingLocalTeleport += AllowedTeleports;
+                scene.Permissions.OnAllowedOutgoingRemoteTeleport += AllowedTeleports;
+                scene.EventManager.OnLandObjectAdded += OnLandObjectAdded;
             }
         }

@@ -90,8 +94,9 @@
             {
                 scene.EventManager.OnNewPresence -= NewPresence;
                 scene.EventManager.OnAvatarEnteringNewParcel -= AvatarEnteringParcel;
-                scene.Permissions.OnAllowedOutgoingLocalTeleport -= AllowedTeleports;
-                scene.Permissions.OnAllowedOutgoingRemoteTeleport -= AllowedTeleports;
+                scene.Permissions.OnAllowedOutgoingLocalTeleport -= AllowedTeleports;
+                scene.Permissions.OnAllowedOutgoingRemoteTeleport -= AllowedTeleports;
+                scene.EventManager.OnLandObjectAdded -= OnLandObjectAdded;
             }
         }

@@ -252,7 +257,13 @@
                 m_Team = "No Team";

                 SP.OnAddPhysics += new ScenePresence.AddPhysics(SP_OnAddPhysics);
-                SP.OnRemovePhysics += new ScenePresence.RemovePhysics(SP_OnRemovePhysics);
+                SP.OnRemovePhysics += new ScenePresence.RemovePhysics(SP_OnRemovePhysics);
+
+                System.Timers.Timer t = new System.Timers.Timer ();
+                //Use this to fix the avatars health
+                t.Interval = 1000; // 1 sec
+                t.Enabled = true;
+                t.Elapsed += new System.Timers.ElapsedEventHandler (fixAvatarHealth_Elapsed);
             }

             public void SP_OnRemovePhysics()
@@ -358,11 +369,7 @@
                             killerObj = localid;
                     }
                     //m_log.Debug("[AVATAR]: Collision with localid: " + localid.ToString() + " at depth: " + coldata[localid].ToString());
-                }
-
-                //Regenerate health (this is approx 1 sec)
-                if ((int)(Health + 0.0625) <= m_combatModule.MaximumHealth)
-                    Health += 0.0625f;
+                }

                 if (starthealth != Health)
                 {
@@ -476,6 +483,13 @@
                             transferModule.TeleportHome(m_SP.UUID, m_SP.ControllingClient);
                     }
                 }
+            }
+
+            void fixAvatarHealth_Elapsed (object sender, System.Timers.ElapsedEventArgs e)
+            {
+                //Regenerate health a bit every second
+                if ((int)(Health + 0.0625) <= m_combatModule.MaximumHealth)
+                    Health += 0.0625f;
             }

             void t_Elapsed(object sender, System.Timers.ElapsedEventArgs e)
@@ -775,20 +789,31 @@
             public void SetStat(string StatName, float statValue)
             {
             }
-        }
-
-        private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
-        {
+        }
+
+        void OnLandObjectAdded (LandData newParcel)
+        {
+            //If a new land object is added or updated, we need to redo the check for the avatars invulnerability
+            m_scene.ForEachScenePresence (delegate (ScenePresence sp)
+            {
+                AvatarEnteringParcel (sp, 0, sp.Scene.RegionInfo.RegionID);
+            });
+        }
+
+        private void AvatarEnteringParcel (ScenePresence avatar, int localLandID, UUID regionID)
+        {
+            ILandObject obj = null;
+            IParcelManagementModule parcelManagement = avatar.Scene.RequestModuleInterface<IParcelManagementModule> ();
+            if (parcelManagement != null)
+            {
+                obj = parcelManagement.GetLandObject (avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
+            }
+            if (obj == null)
+                return;
+
             try
             {
-                ILandObject obj = null;
-                IParcelManagementModule parcelManagement = avatar.Scene.RequestModuleInterface<IParcelManagementModule>();
-                if (parcelManagement != null)
-                {
-                    obj = parcelManagement.GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
-                }
-                if(obj == null)
-                    return;
+
                 if ((obj.LandData.Flags & (uint)ParcelFlags.AllowDamage) != 0)
                 {
                     ICombatPresence CP = avatar.RequestModuleInterface<ICombatPresence>();


Made it so you cannot press through ui.

Made it so you cannot press through ui.

--- Babel/Assets/Characters/Player/Scripts/PlayerMovement.cs
+++ Babel/Assets/Characters/Player/Scripts/PlayerMovement.cs
@@ -23,8 +23,9 @@
         // Update is called once per frame
         void Update () {
             if (!Input.GetMouseButtonDown(0)) return;
+            var ts = Input.touches;

-            if (EventSystem.current.IsPointerOverGameObject()) return;
+            if (ts.Length > 1 || EventSystem.current.IsPointerOverGameObject(ts[0].fingerId)) return;
             // Find all object in ray, and sort them by distance to object.
             var ray = Camera.main.ScreenPointToRay(Input.mousePosition);
             RaycastHit[] hits = Physics.RaycastAll(ray, 100);


Check if there are any Clients on the list page

--- BankingManagementClient.Host.Web/Views/Home/Index.cshtml
+++ BankingManagementClient.Host.Web/Views/Home/Index.cshtml
@@ -4,34 +4,37 @@
     ViewBag.Title = "Index";
 }

-
Index

+
Clients

-

-    @Html.ActionLink("Create New", "Create")
-

-

-

-
-            @Html.DisplayNameFor(model => model.ElementAt(0)
-                                               .ClientId)
-
-
-            @Html.DisplayNameFor(model => model.ElementAt(0)
-                                               .ClientName)
-
-
-

+@if (Model.Any())
+{
+

+

+
+                @Html.DisplayNameFor(model => model.ElementAt(0)
+                    .ClientId)
+
+
+                @Html.DisplayNameFor(model => model.ElementAt(0)
+                    .ClientName)
+
+
+

-    @foreach (var clientProjection in Model)
-    {
-

-
-                @Html.ActionLink(clientProjection.ClientId.ToString(), "Details", new { id = clientProjection.ClientId })
-
-
-                @Html.DisplayFor(modelItem => clientProjection.ClientName)
-
-

-    }
-
-
+        @foreach (var clientProjection in Model)
+        {
+

+
+                    @Html.ActionLink(clientProjection.ClientId.ToString(), "Details", new {id = clientProjection.ClientId})
+
+
+                    @Html.DisplayFor(modelItem => clientProjection.ClientName)
+
+

+        }
+

+}
+else
+{
+
No clients found.

+}


AddGuidColumn for SqlServer.

AddGuidColumn for SqlServer.

--- Bonobo.Git.Server/Data/Update/SqlServer/AddGuidColumn.cs
+++ Bonobo.Git.Server/Data/Update/SqlServer/AddGuidColumn.cs
@@ -1,21 +1,423 @@
-namespace Bonobo.Git.Server.Data.Update.SqlServer
+using Bonobo.Git.Server.Security;
+using System.DirectoryServices.AccountManagement;
+using System.Web.Mvc;
+using System.Collections.Generic;
+using System;
+using System.Data.Entity;
+using System.Data.SqlClient;
+
+namespace Bonobo.Git.Server.Data.Update.SqlServer
 {
-    public class AddGuidColumn : IUpdateScript
+    public class AddGuidColumn
     {
-        public string Command
-        {
-            get
-            {
-                return "ALTER TABLE Repository ADD COLUMN [Group] VARCHAR(255) DEFAULT(NULL)";
-            }
-        }
-
-        public string Precondition
-        {
-            get
-            {
-                return "SELECT Count([Group]) = -1 FROM Repository";
-            }
+        readonly IAuthenticationProvider AuthProvider;
+        readonly Database _db;
+
+        public AddGuidColumn(BonoboGitServerContext context)
+        {
+            AuthProvider = DependencyResolver.Current.GetService<IAuthenticationProvider>();
+
+            _db = context.Database;
+
+            if (UpgradeHasAlreadyBeenRun())
+            {
+                return;
+            }
+
+            using (var trans = context.Database.BeginTransaction())
+            {
+                try
+                {
+                    RenameTables();
+                    CreateTables();
+                    CopyData();
+                    AddRelations();
+                    DropRenamedTables();
+                    trans.Commit();
+                }
+                catch (Exception)
+                {
+                    trans.Rollback();
+                    throw;
+                }
+            }
+        }
+
+        private bool UpgradeHasAlreadyBeenRun()
+        {
+            try
+            {
+                var result = _db.SqlQuery<string>(@"
+                            IF EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'User' AND  COLUMN_NAME = 'Id')
+                                SELECT 1
+                            ELSE
+                                SELECT 0
+                ");
+                return int.Parse(result.SingleAsync().GetAwaiter().GetResult()) == 1;
+            }
+            catch (SqlException)
+            {
+                // the column does not exist!
+                return false;
+            }
+        }
+
+        void RenameTables()
+        {
+            _db.ExecuteSqlCommand(@"
+                ALTER TABLE User RENAME TO oUser;
+                ALTER TABLE Repository RENAME TO oRepo;
+                ALTER TABLE Team RENAME TO oTeam;
+                ALTER TABLE Role RENAME TO oRole;
+                ALTER TABLE UserRepository_Administrator RENAME TO ura;
+                ALTER TABLE UserRepository_Permission RENAME TO urp;
+                ALTER TABLE UserTeam_Member RENAME TO utm;
+                ALTER TABLE UserRole_InRole RENAME TO urir;
+                ALTER TABLE TeamRepository_Permission RENAME TO trp;
+            ");
+        }
+
+        void DropRenamedTables()
+        {
+            _db.ExecuteSqlCommand(@"
+                DROP TABLE oUser;
+                DROP TABLE oRepo;
+                DROP TABLE oTeam;
+                DROP TABLE oRole;
+                DROP TABLE ura;
+                DROP TABLE urp;
+                DROP TABLE utm;
+                DROP TABLE urir;
+                DROP TABLE trp;
+            ");
+        }
+
+        void CreateTables()
+        {
+            _db.ExecuteSqlCommand(@"
+                CREATE TABLE User (
+                    Id       Char(36)      PRIMARY KEY
+                                           NOT NULL,
+                    Name     VARCHAR (255) NOT NULL,
+                    Surname  VARCHAR (255) NOT NULL,
+                    Username VARCHAR (255) NOT NULL
+                                           UNIQUE,
+                    Password VARCHAR (255) NOT NULL,
+                    PasswordSalt VARCHAR (255) NOT NULL,
+                    Email    VARCHAR (255) NOT NULL
+                );
+
+                CREATE TABLE Team (
+                    Id       Char(36)      PRIMARY KEY
+                                           NOT NULL,
+                    Name        VARCHAR (255) NOT NULL
+                                              UNIQUE,
+                    Description VARCHAR (255)
+                );
+
+                CREATE TABLE Repository (
+                    Id       Char(36)      PRIMARY KEY
+                                           NOT NULL,
+                    Name          VARCHAR (255) NOT NULL
+                                                UNIQUE,
+                    Description   VARCHAR (255),
+                    Anonymous     BIT           NOT NULL,
+                    AuditPushUser BIT           NOT NULL
+                                                DEFAULT ('0'),
+                    [Group]       VARCHAR (255) DEFAULT (NULL),
+                    Logo          BLOB          DEFAULT (NULL)
+                );
+
+                CREATE TABLE [Role] (
+                    [Id] Char(36) PRIMARY KEY,
+                    [Name] VarChar(255) Not Null UNIQUE,
+                    [Description] VarChar(255) Null
+                );
+
+                CREATE TABLE UserRepository_Administrator (
+                    User_Id       CHAR(36) NOT NULL,
+                    Repository_Id CHAR(36) NOT NULL,
+                    CONSTRAINT UNQ_UserRepository_Administrator_1 UNIQUE (
+                        User_Id,
+                        Repository_Id
+                    ),
+                    FOREIGN KEY (
+                        User_Id
+                    )
+                    REFERENCES User (Id),
+                    FOREIGN KEY (
+                        Repository_Id
+                    )
+                    REFERENCES Repository (Id)
+                );
+
+                CREATE TABLE UserRepository_Permission (
+                    User_Id       CHAR(36) NOT NULL,
+                    Repository_Id CHAR(36) NOT NULL,
+                    CONSTRAINT UNQ_UserRepository_Permission_1 UNIQUE (
+                        User_Id,
+                        Repository_Id
+                    ),
+                    FOREIGN KEY (
+                        User_Id
+                    )
+                    REFERENCES User (Id),
+                    FOREIGN KEY (
+                        Repository_Id
+                    )
+                    REFERENCES Repository (Id)
+                );
+
+                CREATE TABLE UserTeam_Member (
+                    User_Id CHAR(36) NOT NULL,
+                    Team_Id CHAR(36) NOT NULL,
+                    CONSTRAINT UNQ_UserTeam_Member_1 UNIQUE (
+                        User_Id,
+                        Team_Id
+                    ),
+                    FOREIGN KEY (
+                        User_Id
+                    )
+                    REFERENCES User (Id),
+                    FOREIGN KEY (
+                        Team_Id
+                    )
+                    REFERENCES Team (Id)
+                );
+
+                CREATE TABLE UserRole_InRole (
+                    User_Id   CHAR(36) NOT NULL,
+                    Role_Id   CHAR(36) NOT NULL,
+                    CONSTRAINT UNQ_UserRole_InRole_1 UNIQUE (
+                        User_Id,
+                        Role_Id
+                    ),
+                    FOREIGN KEY (
+                        User_Id
+                    )
+                    REFERENCES User (Id),
+                    FOREIGN KEY (
+                        Role_Id
+                    )
+                    REFERENCES Role (Id)
+                );
+
+                CREATE TABLE TeamRepository_Permission (
+                    Team_Id       CHAR(36)      NOT NULL,
+                    Repository_Id CHAR(36) NOT NULL,
+                    CONSTRAINT UNQ_TeamRepository_Permission_1 UNIQUE (
+                        Team_Id,
+                        Repository_Id
+                    ),
+                    FOREIGN KEY (
+                        Team_Id
+                    )
+                    REFERENCES Team (Id),
+                    FOREIGN KEY (
+                        Repository_Id
+                    )
+                    REFERENCES Repository (Id)
+                );
+
+            ");
+        }
+
+        class OldUser
+        {
+            public string Name { get; set; }
+            public string Surname { get; set; }
+            public string Username { get; set; }
+            public string Password { get; set; }
+            public string Email { get; set; }
+        }
+
+        class NameDesc
+        {
+            public string Name { get; set; }
+            public string Description { get; set; }
+        }
+
+        class OldRepo
+        {
+            public string Name { get; set; }
+            public string Description { get; set; }
+            public bool Anonymous { get; set; }
+            public bool AuditPushUser { get; set; }
+            public string Group { get; set; }
+            public byte[] Logo { get; set; }
+        }
+
+        private void CopyData()
+        {
+            CopyUsers();
+            CopyTeams();
+            CopyRoles();
+            CopyRepositories();
+        }
+
+        private void CopyUsers()
+        {
+            var users = _db.SqlQuery<OldUser>("Select * from oUser;");
+            Dictionary<string, PrincipalContext> domains = new Dictionary<string, PrincipalContext>();
+            foreach (var entry in users)
+            {
+                Guid guid = Guid.NewGuid();
+                if (AuthProvider is WindowsAuthenticationProvider)
+                {
+                    var domain = entry.Username.GetDomain(); // not sure what to do if domain is not found...
+                    PrincipalContext dc;
+                    ;
+                    if (!domains.TryGetValue(domain, out dc))
+                    {
+                        dc = new PrincipalContext(ContextType.Domain, domain);
+                        domains[domain] = dc;
+                    }
+                    var user = UserPrincipal.FindByIdentity(dc, entry.Username);
+                    // if the user no longer exists
+                    // it means he cannot login anymore so it is safe to assign
+                    // any new guid to him
+                    if (user != null)
+                    {
+                        guid = user.Guid.Value;
+                        if (string.IsNullOrEmpty(entry.Email) || entry.Email.Equals("None", StringComparison.OrdinalIgnoreCase))
+                        {
+                            entry.Email = user.EmailAddress;
+                        }
+                        if (string.IsNullOrEmpty(entry.Surname) ||
+                            entry.Surname.Equals("None", StringComparison.OrdinalIgnoreCase))
+                        {
+                            entry.Surname = user.Surname;
+                        }
+                        if (string.IsNullOrEmpty(entry.Name) ||
+                            entry.Name.Equals(entry.Username, StringComparison.OrdinalIgnoreCase))
+                        {
+                            entry.Name = user.GivenName;
+                        }
+                    }
+                }
+                else
+                {
+                    // just make sure the admin user has the same guid everywhere. This should make it
+                    // easier to identify this user
+                    if (entry.Name == "admin")
+                    {
+                        guid = new Guid("3eb9995e-99e3-425a-b978-1409bdd61fb6");
+                    }
+                }
+                // Existing users will have had passwords which were salted with their username, so we need to replicate that into the Salt column
+                var salt = entry.Username;
+                _db.ExecuteSqlCommand("INSERT INTO User VALUES ({0}, {1}, {2}, {3}, {4}, {5}, {6})",
+                    guid.ToString(), entry.Name, entry.Surname, entry.Username, entry.Password, salt, entry.Email);
+            }
+        }
+
+        private void CopyTeams()
+        {
+            var teams = _db.SqlQuery<NameDesc>("Select * from oTeam");
+            foreach (var team in teams)
+            {
+                _db.ExecuteSqlCommand("INSERT INTO Team VALUES ({0}, {1}, {2})",
+                    Guid.NewGuid(), team.Name, team.Description);
+            }
+        }
+
+        private void CopyRoles()
+        {
+            var roles = _db.SqlQuery<NameDesc>("Select * from oRole");
+            foreach (var role in roles)
+            {
+                _db.ExecuteSqlCommand("INSERT INTO Role VALUES ({0}, {1}, {2})",
+                    // Administrator is a default role and should have the same Guid on all systems to make debugging easier
+                    role.Name.Equals("Administrator") ? new Guid("a3139d2b-5a59-427f-bb2d-af251dce00e4") : Guid.NewGuid(),
+                    role.Name, role.Description);
+            }
+        }
+
+        private void CopyRepositories()
+        {
+            var repos = _db.SqlQuery<OldRepo>("SELECT * FROM oRepo");
+            foreach (var repo in repos)
+            {
+                _db.ExecuteSqlCommand("INSERT INTO Repository VALUES ({0}, {1}, {2}, {3}, {4}, {5}, {6})",
+                    Guid.NewGuid(), repo.Name, repo.Description, repo.Anonymous, repo.AuditPushUser, repo.Group, repo.Logo);
+            }
+        }
+
+        private void AddRelations()
+        {
+            // ALTER TABLE UserRepository_Administrator RENAME TO ura;
+            _db.ExecuteSqlCommand(@"
+                INSERT INTO UserRepository_Administrator (
+                                                             User_Id,
+                                                             Repository_Id
+                                                         )
+                                                         SELECT User.Id,
+                                                                Repository.Id
+                                                           FROM ura
+                                                                JOIN
+                                                                User
+                                                                JOIN
+                                                                Repository
+                                                          WHERE ura.User_Username = User.Username
+                                                          AND ura.Repository_Name = Repository.Name;
+
+                INSERT INTO UserRepository_Permission (
+                                                          User_Id,
+                                                          Repository_Id
+                                                      )
+                                                      SELECT User.Id,
+                                                             Repository.Id
+                                                        FROM urp
+                                                             JOIN
+                                                             User
+                                                             Join
+                                                             Repository
+                                                       WHERE urp.User_Username = User.Username
+                                                       AND urp.Repository_Name = Repository.Name;
+
+                INSERT INTO UserTeam_Member (
+                                                User_Id,
+                                                Team_Id
+                                            )
+                                            SELECT User.Id,
+                                                   Team.Id
+                                              FROM utm
+                                                   JOIN
+                                                   User
+                                                   JOIN
+                                                   Team
+                                             WHERE utm.User_Username = User.Username AND
+                                                   utm.Team_Name = Team.Name;
+
+                INSERT INTO UserRole_InRole (
+                                                User_Id,
+                                                Role_Id
+                                            )
+                                            SELECT User.Id,
+                                                   Role.Id
+                                              FROM urir
+                                                   JOIN
+                                                   User
+                                                   JOIN
+                                                   Role
+                                             WHERE urir.User_Username = User.Username
+                                             AND urir.Role_Name = Role.Name;
+
+                INSERT INTO TeamRepository_Permission (
+                                                          Team_Id,
+                                                          Repository_Id
+                                                      )
+                                                      SELECT Team.Id,
+                                                             Repository.Id
+                                                        FROM trp
+                                                             JOIN
+                                                             Team
+                                                             JOIN
+                                                             Repository
+                                                       WHERE trp.Team_Name = Team.Name
+                                                       AND trp.Repository_Name = Repository.Name;
+
+            ");
         }
     }
 }


Parameter "readOnly" added in Translate method.

--- Core/LocalizationManager.cs
+++ Core/LocalizationManager.cs
@@ -30,7 +30,7 @@

 		private LocalizationManager() { }

-		public string Translate(string scope, string text)
+		public string Translate(string scope, string text, bool readOnly = false)
 		{
 			if (string.IsNullOrEmpty(scope))
 				throw new ArgumentNullException("Scope cannot be null.");
@@ -48,6 +48,9 @@
 			// get object from cache...
 			var obj = GetLocalizedObject(CultureInfo.CurrentCulture, hash);

+			if (readOnly && obj == null)
+				return null;
+
 			// if null save object to db for all cultures
 			if (obj == null)
 			{
@@ -55,14 +58,12 @@
 					cultures.Add(DefaultCulture.Value);

 				foreach (var culture in cultures)
-				{
 					lock (_lock)
 					{
 						var stored = GetLocalizedObject(culture, hash);
 						if (stored == null)
 							Save(Create(hash, culture.LCID, scope, text));
 					}
-				}
 			}
 			else
 				return obj.IsDisabled() ? null : obj.Translation;


[extract] update filenames

[extract] update filenames

--- DataTool/SaveLogic/Combo.cs
+++ DataTool/SaveLogic/Combo.cs
@@ -461,9 +461,9 @@
             WriteFile(materialInfo.ShaderSource, shaderDirectory);
             foreach (var (instance, code, byteCode) in materialInfo.Shaders) {
                 var instancePath = Path.Combine(shaderDirectory, $"{instance:X12}");
-                WriteFile(instance, instancePath, "instance.088");
-                WriteFile(code, instancePath, "code.087");
-                WriteFile(byteCode, Path.Combine(instancePath, "code.fxc"));
+                WriteFile(instance, instancePath);
+                WriteFile(code, instancePath);
+                WriteFile(byteCode, Path.Combine(instancePath, Path.ChangeExtension(teResourceGUID.AsString(code), "fxc")));
             }
         }


usunięty duplikat using system.linq

usunięty duplikat using system.linq

--- Dietphone/Models/Product.cs
+++ Dietphone/Models/Product.cs
@@ -3,7 +3,6 @@
 using System.Linq;
 using System.Text;
 using System.ComponentModel;
-using System.Linq;

 namespace Dietphone.Models
 {


fixed a bug where expanding a dragablz item would not work when the dragablz container ws of type 'branch'

--- Dragablz/Dockablz/Layout.cs
+++ Dragablz/Dockablz/Layout.cs
@@ -510,8 +510,12 @@
         {
             var dragablzItem = executedRoutedEventArgs.Parameter as DragablzItem;
             if (dragablzItem == null) return;
-
-            var exemplarTab = this.LogicalTreeDepthFirstTraversal().OfType<TabablzControl>()
+
+            var branch = this.LogicalTreeDepthFirstTraversal().OfType<Branch>();
+
+            var exemplarTab = branch.Any()
+                ? branch.First().FirstItem as TabablzControl
+                : this.LogicalTreeDepthFirstTraversal().OfType<TabablzControl>()
                 .FirstOrDefault(t => t.InterTabController != null && t.InterTabController.Partition == Partition);

             if (exemplarTab == null) return;


Applied patch from radix to provide proper URL to images in Timeline RSS
feed. Closes #539. Many thanks for the patch.

git-svn-id: 0d96b0c1a6983ccc08b3732614f4d6bfcf9cbb42@769 af82e41b-90c4-0310-8c96-b1721e28e2e2

--- templates/timeline_rss.cs
+++ templates/timeline_rss.cs
@@ -25,7 +25,7 @@
       <image>
         <title><?cs var:$project.name?></title>
         <url><?cs if !$header_logo.src_abs ?><?cs var:$base_url ?><?cs /if ?><?cs var $header_logo.src ?></url>
-        <link><?cs var:$base_url ?></link>
+        <link><?cs var:$base_url ?><?cs var:$trac.href.timeline ?></link>
       </image>
       <?cs each:item = $timeline.items ?>
         <?cs if:item.type == #1 ?><!-- Changeset -->


Any exceptions loading the injected assembly are now thrown (closes #5)

--- EasyHook/InjectionLoader.cs
+++ EasyHook/InjectionLoader.cs
@@ -350,6 +350,7 @@
         private static Type FindEntryPoint(string userAssemblyStrongName, string userAssemblyFileName)
         {
             Assembly userAssembly = null;
+            StringBuilder errors = new StringBuilder();

             // First try to find the assembly using a strong name (if provided)
             if (!String.IsNullOrEmpty(userAssemblyStrongName))
@@ -362,6 +363,7 @@
                 catch (Exception e)
                 {
                     Config.PrintComment("FAIL: Assembly.Load({0}) - {1}", userAssemblyStrongName, e.ToString());
+                    errors.AppendFormat("Failed to load assembly using strong name {0} - {1}\r\n", userAssemblyStrongName, e.ToString());
                 }
             }

@@ -375,15 +377,16 @@
                 }
                 catch (Exception e)
                 {
-                    Config.PrintComment("FAIL: Assembly.LoadFrom({0}) - {1}", userAssemblyFileName,
-                                        e.ToString());
-                }
-            }
-
+                    Config.PrintComment("FAIL: Assembly.LoadFrom({0}) - {1}", userAssemblyFileName, e.ToString());
+                    errors.AppendFormat("Failed to load assembly from file {0} - {1}", userAssemblyFileName, e.ToString());
+                }
+            }
+
+            // If both attempts fail, raise an exception with the failed attempts.
             if (userAssembly == null)
             {
                 Config.PrintError("Could not load assembly {0}, {1}", userAssemblyFileName, userAssemblyStrongName);
-                throw new FileNotFoundException("The given user library could not be found.");
+                throw new Exception(errors.ToString());
             }

             // Find the first EasyHook.IEntryPoint
@@ -393,7 +396,7 @@
                 if (exportedTypes[i].GetInterface("EasyHook.IEntryPoint") != null)
                     return exportedTypes[i];
             }
-            throw new EntryPointNotFoundException("The given user library does not export a proper type implementing the 'EasyHook.IEntryPoint' interface.");
+            throw new EntryPointNotFoundException("The given library does not include a public class implementing the 'EasyHook.IEntryPoint' interface.");
         }

         /// <summary>


Fix Directory.CreateDirectory permissions mask on Unix

The mkdir utility uses 777 & umask as the permissions for new directory.  Directory.CreateDirectory should do the same, but it's currently using 700.  This fixes it to match.

--- src/System.IO.FileSystem/src/System/IO/UnixFileSystem.cs
+++ src/System.IO.FileSystem/src/System/IO/UnixFileSystem.cs
@@ -160,7 +160,9 @@
                     throw new PathTooLongException(SR.IO_PathTooLong);
                 }

-                result = Interop.Sys.MkDir(name, (int)Interop.Sys.Permissions.S_IRWXU);
+                // The mkdir command uses 0777 by default (it'll be AND'd with the process umask internally).
+                // We do the same.
+                result = Interop.Sys.MkDir(name, (int)Interop.Sys.Permissions.Mask);
                 if (result < 0 && firstError.Error == 0)
                 {
                     Interop.ErrorInfo errorInfo = Interop.Sys.GetLastErrorInfo();


Fixes a query that would cause the new petapoco changes to have issues since it was asking for the wrong type

--- src/UmbracoExamine/DataServices/UmbracoContentService.cs
+++ src/UmbracoExamine/DataServices/UmbracoContentService.cs
@@ -123,8 +123,8 @@
 	    {
             try
             {
-                var result = _applicationContext.DatabaseContext.Database.Fetch<PropertyAliasDto>("select distinct alias from cmsPropertyType order by alias");
-                return result.Select(r => r.Alias).ToList();
+                var result = _applicationContext.DatabaseContext.Database.Fetch<string>("select distinct alias from cmsPropertyType order by alias");
+                return result;
             }
             catch (Exception ex)
             {


Simplify

Simplify

--- src/Workspaces/Remote/ServiceHub/Host/RemoteWorkspace.cs
+++ src/Workspaces/Remote/ServiceHub/Host/RemoteWorkspace.cs
@@ -346,8 +346,6 @@
             {
                 var oldSolution = this.CurrentSolution;

-                var isUpdate = oldSolution.Id == newSolution.Id && oldSolution.FilePath == newSolution.FilePath;
-
                 // if this wasn't from the primary branch, then we have nothing to do.  Just return the solution back for
                 // the caller.
                 //
@@ -360,7 +358,8 @@
                 // if either solution id or file path changed, then we consider it as new solution. Otherwise,
                 // update the current solution in place.

-                if (!isUpdate)
+                var addingSolution = oldSolution.Id != newSolution.Id || oldSolution.FilePath != newSolution.FilePath;
+                if (addingSolution)
                 {
                     // We're not doing an update, we're moving to a new solution entirely.  Clear out the old one.
                     this.ClearSolutionData();
@@ -369,7 +368,7 @@
                 newSolution = SetCurrentSolution(newSolution);
                 SetOptions(newSolution.Options);
                 _ = this.RaiseWorkspaceChangedEventAsync(
-                    isUpdate ? WorkspaceChangeKind.SolutionChanged : WorkspaceChangeKind.SolutionAdded, oldSolution, newSolution);
+                    addingSolution ? WorkspaceChangeKind.SolutionAdded : WorkspaceChangeKind.SolutionChanged, oldSolution, newSolution);

                 return (newSolution, updated: true);
             }


OrderedProperty and OrderByType made optional parameter.

--- src/XOMNI.SDK.Public/Models/Catalog/ItemSearchRequest.cs
+++ src/XOMNI.SDK.Public/Models/Catalog/ItemSearchRequest.cs
@@ -10,8 +10,8 @@
     {
         public int skip { get; set; }
         public int take { get; set; }
-        public OrderedProperty OrderedPropertyName { get; set; }
-        public OrderByType OrderBy { get; set; }
+        public OrderedProperty? OrderedPropertyName { get; set; }
+        public OrderByType? OrderBy { get; set; }
         public string TagQuery { get; set; }
         protected virtual bool IncludeStaticNavigation { get; set; }
         protected virtual bool IncludeDynamicNavigation { get; set; }


fixup

fixup

--- Wox.Core/Resource/Theme.cs
+++ Wox.Core/Resource/Theme.cs
@@ -15,7 +15,6 @@
     public class Theme : Resource
     {
         private static List<string> themeDirectories = new List<string>();
-        private static Version supportedAccentsVersion = new Version(6, 2);
         public Settings Settings { get; set; }

         public Theme()
@@ -60,7 +59,7 @@

             // Exception of FindResource can't be cathed if global exception handle is set
             var isBlur = Application.Current.TryFindResource("ThemeBlurEnabled");
-            if (isBlur is bool && Environment.OSVersion.Version >= supportedAccentsVersion)
+            if (isBlur is bool && Environment.OSVersion.Version >= new Version(6, 2))
             {
                 SetBlurForWindow(Application.Current.MainWindow, (bool)isBlur);
             }


XXX: sloppy fix to add assertLog in YarnSpinnerConsole

--- YarnSpinnerConsole/Main.cs
+++ YarnSpinnerConsole/Main.cs
@@ -81,7 +81,7 @@
 			var defaultVariables = new Dictionary<string,float> ();

 			foreach (var arg in args) {
-
+
 				// Handle 'start' parameter
 				if (arg.IndexOf("-s=") != -1) {
 					var startArray = arg.Split (new char[]{ '=' });
@@ -207,15 +207,17 @@
 				return (int)parameters[0].AsNumber % 2 == 0;
 			});

-			// Register the "assert" function, which stops execution if its parameter evaluates to false
-			dialogue.library.RegisterFunction ("assert", 1, delegate(Value[] parameters) {
+			var assert = delegate(Value[] parameters) {
 				if (parameters[0].AsBool == false) {

 					// TODO: Include file, node and line number
 					dialogue.LogErrorMessage("ASSERTION FAILED");
 					Environment.Exit(1);
 				}
-			});
+			};
+			// Register the "assert" function, which stops execution if its parameter evaluates to false
+			dialogue.library.RegisterFunction ("assert", 1, assert);
+			dialogue.library.RegisterFunction ("assertLog", 2, assert);

 			// Register a function to let test scripts register how many
@@ -267,7 +269,7 @@
 			}

 			// Only run the program when we're not emitting debug output of some kind
-			var runProgram =
+			var runProgram =
 				showTokens == false &&
 				showParseTree == false &&
 				compileToBytecodeOnly == false;
@@ -331,7 +333,7 @@

 				if (expectedNextLine != null && expectedNextLine != lineText.text) {
 					// TODO: Output diagnostic info here
-					Console.WriteLine(string.Format("Unexpected line.\nExpected: {0}\nReceived: {1}",
+					Console.WriteLine(string.Format("Unexpected line.\nExpected: {0}\nReceived: {1}",
 						expectedNextLine, lineText.text));
 					Environment.Exit (1);
 				}
@@ -395,7 +397,7 @@

 						if (selection > optionsGroup.options.Count) {
 							Console.WriteLine ("Invalid option.");
-						} else {
+						} else {
 							optionChooser(selection);
 							break;
 						}
@@ -409,7 +411,7 @@

 				if (expectedNextCommand != null && expectedNextCommand != command) {
 					// TODO: Output diagnostic info here
-					Console.WriteLine(string.Format("Unexpected command.\nExpected: {0}\nReceived: {1}",
+					Console.WriteLine(string.Format("Unexpected command.\nExpected: {0}\nReceived: {1}",
 						expectedNextCommand, command));
 					Environment.Exit (1);
 				}
@@ -435,7 +437,7 @@
 			}

 			public virtual void SetNumber (string variableName, float number)
-			{
+			{
 				variableStore.SetNumber(variableName, number);
 			}


Added some meaning to the evaluator tests

--- src/dotless.Test/Unit/utils/CsCodeDomFixture.cs
+++ src/dotless.Test/Unit/utils/CsCodeDomFixture.cs
@@ -32,8 +32,16 @@

         [Test]
         public void CanEvaluateNumbers()
-        {
-            Console.WriteLine(CsEval.Eval("new Number(10)/4;"));
+        {
+            float result = (float)CsEval.Eval("10f/4;");
+            Assert.AreEqual(2.5f, result);
+        }
+
+        [Test]
+        public void CanEvaluateBraces()
+        {
+            float result = (float) CsEval.Eval("(2f + 3) * 2");
+            Assert.AreEqual(10, result);
         }
     }
 }


Named

Named

--- Framework.Core/System/Linq/Expressions/Interpreter/ThrowInstruction.cs
+++ Framework.Core/System/Linq/Expressions/Interpreter/ThrowInstruction.cs
@@ -1,16 +1,15 @@
 #if LESSTHAN_NET35

 #pragma warning disable CA2201 // Do not raise reserved exception types
-#pragma warning disable CC0021 // Use nameof

 namespace System.Linq.Expressions.Interpreter
 {
     internal sealed class ThrowInstruction : Instruction
     {
-        internal static readonly ThrowInstruction Rethrow = new(true, true);
-        internal static readonly ThrowInstruction Throw = new(true, false);
-        internal static readonly ThrowInstruction VoidRethrow = new(false, true);
-        internal static readonly ThrowInstruction VoidThrow = new(false, false);
+        internal static readonly ThrowInstruction Rethrow = new(hasResult: true, isRethrow: true);
+        internal static readonly ThrowInstruction Throw = new(hasResult: true, isRethrow: false);
+        internal static readonly ThrowInstruction VoidRethrow = new(hasResult: false, isRethrow: true);
+        internal static readonly ThrowInstruction VoidThrow = new(hasResult: false, isRethrow: false);
         private readonly bool _hasResult, _rethrow;

         private ThrowInstruction(bool hasResult, bool isRethrow)


Only set stream properties on connection success

- Prevents null reference errors in the caught exception case
- Issue MatterHackers/MCCentral#5269
TcpipSerialPort throws when accessing null stream

--- MatterControlLib/PrinterCommunication/Drivers/TCPIP/TcpipSerialPort.cs
+++ MatterControlLib/PrinterCommunication/Drivers/TCPIP/TcpipSerialPort.cs
@@ -156,7 +156,13 @@
 				// Attempt to connect Message to just the console
 				this.LogInfo("Attempting to connect to: " + ipEndPoint.Address + " on port " + ipEndPoint.Port);
 				socket.Connect(ipEndPoint);
-				stream = new NetworkStream(socket);
+
+				stream = new NetworkStream(socket)
+				{
+					WriteTimeout = tempWriteTimeout,
+					ReadTimeout = tempReadTimeout
+				};
+
 				this.LogInfo("Connected to: " + ipEndPoint.Address + " on port " + ipEndPoint.Port);
 				if (this.BaudRate != 0)
 				{
@@ -172,12 +178,6 @@
 				ApplicationController.Instance.LogError("Exception:" + e.Message);
 			}

-			//These were set before and are now set in the stream
-			// if (stream != null)
-			{
-				stream.WriteTimeout = tempWriteTimeout;
-				stream.ReadTimeout = tempReadTimeout;
-			}
 		}

 		private void LogInfo(string message)


* Remove a hack I put into OGP so that I could test OGP over SSL with the SeedCap response not being SSL

--- OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
+++ OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs
@@ -408,7 +408,7 @@
             if (httpSSL)
             {
                 rezHttpProtocol = "https://";
-
+                regionCapsHttpProtocol = "https://";
                 urlport = httpsslport.ToString();

                 if (httpsCN.Length > 0)
@@ -416,8 +416,6 @@
             }

-            // Be warned that the two following lines assume http not
-            // https since region caps are not implemented in https currently

             // DEPRECIATED
             responseMap["seed_capability"] = LLSD.FromString(regionCapsHttpProtocol + httpaddr + ":" + reg.HttpPort + "/CAPS/" + userCap.CapsObjectPath + "0000/");


Added SOP.MediaUrl and Shape.Media to the deserialization

--- OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -361,6 +361,7 @@
             m_SOPXmlProcessors.Add("Flags", ProcessFlags);
             m_SOPXmlProcessors.Add("CollisionSound", ProcessCollisionSound);
             m_SOPXmlProcessors.Add("CollisionSoundVolume", ProcessCollisionSoundVolume);
+            m_SOPXmlProcessors.Add("MediaUrl", ProcessMediaUrl);
             #endregion

             #region TaskInventoryXmlProcessors initialization
@@ -436,6 +437,7 @@
             m_ShapeXmlProcessors.Add("FlexiEntry", ProcessShpFlexiEntry);
             m_ShapeXmlProcessors.Add("LightEntry", ProcessShpLightEntry);
             m_ShapeXmlProcessors.Add("SculptEntry", ProcessShpSculptEntry);
+            m_ShapeXmlProcessors.Add("Media", ProcessShpMedia);
             #endregion
         }

@@ -703,6 +705,11 @@
         {
             obj.CollisionSoundVolume = reader.ReadElementContentAsFloat("CollisionSoundVolume", String.Empty);
         }
+
+        private static void ProcessMediaUrl(SceneObjectPart obj, XmlTextReader reader)
+        {
+            obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty);
+        }
         #endregion

         #region TaskInventoryXmlProcessors
@@ -1062,6 +1069,13 @@
         {
             shp.SculptEntry = reader.ReadElementContentAsBoolean("SculptEntry", String.Empty);
         }
+
+        private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlTextReader reader)
+        {
+            string value = reader.ReadElementContentAsString("Media", String.Empty);
+            shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
+        }
+

         #endregion

@@ -1305,210 +1319,6 @@
             return true;
         }

-        public static SceneObjectPart Xml2ToSOPPull(XmlTextReader reader)
-        {
-            SceneObjectPart obj = new SceneObjectPart();
-
-            reader.ReadStartElement("SceneObjectPart");
-
-            if (reader.Name == "AllowedDrop")
-                obj.AllowedDrop = reader.ReadElementContentAsBoolean("AllowedDrop", String.Empty);
-            else
-                obj.AllowedDrop = true;
-
-            obj.CreatorID = ReadUUID(reader, "CreatorID");
-            obj.FolderID = ReadUUID(reader, "FolderID");
-            obj.InventorySerial = (uint)reader.ReadElementContentAsInt("InventorySerial", String.Empty);
-
-            #region Task Inventory
-
-            obj.TaskInventory = new TaskInventoryDictionary();
-            //List<PrimObject.InventoryBlock.ItemBlock> invItems = new List<PrimObject.InventoryBlock.ItemBlock>();
-
-            reader.ReadStartElement("TaskInventory", String.Empty);
-            while (reader.Name == "TaskInventoryItem")
-            {
-                TaskInventoryItem item = new TaskInventoryItem();
-                reader.ReadStartElement("TaskInventoryItem", String.Empty);
-
-                item.AssetID = ReadUUID(reader, "AssetID");
-                item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty);
-                item.CreationDate = (uint)reader.ReadElementContentAsInt("CreationDate", String.Empty);
-                item.CreatorID = ReadUUID(reader, "CreatorID");
-                item.Description = reader.ReadElementContentAsString("Description", String.Empty);
-                item.EveryonePermissions = (uint)reader.ReadElementContentAsInt("EveryonePermissions", String.Empty);
-                item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty);
-                item.GroupID = ReadUUID(reader, "GroupID");
-                item.GroupPermissions = (uint)reader.ReadElementContentAsInt("GroupPermissions", String.Empty);
-                item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty);
-                item.ItemID = ReadUUID(reader, "ItemID");
-                UUID oldItemID = ReadUUID(reader, "OldItemID"); // TODO: Is this useful?
-                item.LastOwnerID = ReadUUID(reader, "LastOwnerID");
-                item.Name = reader.ReadElementContentAsString("Name", String.Empty);
-                item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty);
-                item.OwnerID = ReadUUID(reader, "OwnerID");
-                item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty);
-                UUID parentID = ReadUUID(reader, "ParentID");
-                UUID parentPartID = ReadUUID(reader, "ParentPartID");
-                item.PermsGranter = ReadUUID(reader, "PermsGranter");
-                item.PermsMask = reader.ReadElementContentAsInt("PermsMask", String.Empty);
-                item.Type = reader.ReadElementContentAsInt("Type", String.Empty);
-
-                reader.ReadEndElement();
-                obj.TaskInventory.Add(item.ItemID, item);
-            }
-            if (reader.NodeType == XmlNodeType.EndElement)
-                reader.ReadEndElement();
-
-            #endregion Task Inventory
-
-            obj.Flags = (PrimFlags)reader.ReadElementContentAsInt("ObjectFlags", String.Empty);
-
-            obj.UUID = ReadUUID(reader, "UUID");
-            obj.LocalId = (uint)reader.ReadElementContentAsLong("LocalId", String.Empty);
-            obj.Name = reader.ReadElementString("Name");
-            obj.Material = (byte)reader.ReadElementContentAsInt("Material", String.Empty);
-
-            if (reader.Name == "PassTouches")
-                obj.PassTouches = reader.ReadElementContentAsBoolean("PassTouches", String.Empty);
-            else
-                obj.PassTouches = false;
-
-            obj.RegionHandle = (ulong)reader.ReadElementContentAsLong("RegionHandle", String.Empty);
-            obj.ScriptAccessPin = reader.ReadElementContentAsInt("ScriptAccessPin", String.Empty);
-
-            if (reader.Name == "PlaySoundSlavePrims")
-                reader.ReadInnerXml();
-            if (reader.Name == "LoopSoundSlavePrims")
-                reader.ReadInnerXml();
-
-            Vector3 groupPosition = ReadVector(reader, "GroupPosition");
-            Vector3 offsetPosition = ReadVector(reader, "OffsetPosition");
-            obj.RotationOffset = ReadQuaternion(reader, "RotationOffset");
-            obj.Velocity = ReadVector(reader, "Velocity");
-            if (reader.Name == "RotationalVelocity")
-                ReadVector(reader, "RotationalVelocity");
-            obj.AngularVelocity = ReadVector(reader, "AngularVelocity");
-            obj.Acceleration = ReadVector(reader, "Acceleration");
-            obj.Description = reader.ReadElementString("Description");
-            reader.ReadStartElement("Color");
-            if (reader.Name == "R")
-            {
-                obj.Color = Color.FromArgb((int)reader.ReadElementContentAsFloat("A", String.Empty),
-                        (int)reader.ReadElementContentAsFloat("R", String.Empty),
-                        (int)reader.ReadElementContentAsFloat("G", String.Empty),
-                        (int)reader.ReadElementContentAsFloat("B", String.Empty));
-                reader.ReadEndElement();
-            }
-            obj.Text = reader.ReadElementString("Text", String.Empty);
-            obj.SitName = reader.ReadElementString("SitName", String.Empty);
-            obj.TouchName = reader.ReadElementString("TouchName", String.Empty);
-
-            obj.LinkNum = reader.ReadElementContentAsInt("LinkNum", String.Empty);
-            obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty);
-
-            reader.ReadStartElement("Shape");
-            obj.Shape.ProfileCurve = (byte)reader.ReadElementContentAsInt("ProfileCurve", String.Empty);
-
-            byte[] teData = Convert.FromBase64String(reader.ReadElementString("TextureEntry"));
-            obj.Shape.Textures = new Primitive.TextureEntry(teData, 0, teData.Length);
-
-            reader.ReadInnerXml(); // ExtraParams
-
-            obj.Shape.PathBegin = (ushort)reader.ReadElementContentAsInt("PathBegin", String.Empty);
-            obj.Shape.PathCurve = (byte)reader.ReadElementContentAsInt("PathCurve", String.Empty);
-            obj.Shape.PathEnd = (ushort)reader.ReadElementContentAsInt("PathEnd", String.Empty);
-            obj.Shape.PathRadiusOffset = (sbyte)reader.ReadElementContentAsInt("PathRadiusOffset", String.Empty);
-            obj.Shape.PathRevolutions = (byte)reader.ReadElementContentAsInt("PathRevolutions", String.Empty);
-            obj.Shape.PathScaleX = (byte)reader.ReadElementContentAsInt("PathScaleX", String.Empty);
-            obj.Shape.PathScaleY = (byte)reader.ReadElementContentAsInt("PathScaleY", String.Empty);
-            obj.Shape.PathShearX = (byte)reader.ReadElementContentAsInt("PathShearX", String.Empty);
-            obj.Shape.PathShearY = (byte)reader.ReadElementContentAsInt("PathShearY", String.Empty);
-            obj.Shape.PathSkew = (sbyte)reader.ReadElementContentAsInt("PathSkew", String.Empty);
-            obj.Shape.PathTaperX = (sbyte)reader.ReadElementContentAsInt("PathTaperX", String.Empty);
-            obj.Shape.PathTaperY = (sbyte)reader.ReadElementContentAsInt("PathTaperY", String.Empty);
-            obj.Shape.PathTwist = (sbyte)reader.ReadElementContentAsInt("PathTwist", String.Empty);
-            obj.Shape.PathTwistBegin = (sbyte)reader.ReadElementContentAsInt("PathTwistBegin", String.Empty);
-            obj.Shape.PCode = (byte)reader.ReadElementContentAsInt("PCode", String.Empty);
-            obj.Shape.ProfileBegin = (ushort)reader.ReadElementContentAsInt("ProfileBegin", String.Empty);
-            obj.Shape.ProfileEnd = (ushort)reader.ReadElementContentAsInt("ProfileEnd", String.Empty);
-            obj.Shape.ProfileHollow = (ushort)reader.ReadElementContentAsInt("ProfileHollow", String.Empty);
-            obj.Scale = ReadVector(reader, "Scale");
-            obj.Shape.State = (byte)reader.ReadElementContentAsInt("State", String.Empty);
-
-            obj.Shape.ProfileCurve = (byte)reader.ReadElementContentAsInt("ProfileCurve", String.Empty);
-            obj.Shape.ProfileShape = (ProfileShape)reader.ReadElementContentAsInt("ProfileShape", String.Empty);
-            obj.Shape.HollowShape = (HollowShape)reader.ReadElementContentAsInt("HollowShape", String.Empty);
-
-            UUID sculptTexture = ReadUUID(reader, "SculptTexture");
-            SculptType sculptType = (SculptType)reader.ReadElementContentAsInt("SculptType", String.Empty);
-            if (sculptTexture != UUID.Zero)
-            {
-                obj.Shape.SculptTexture = sculptTexture;
-                obj.Shape.SculptType = (byte)sculptType;
-            }
-
-            reader.ReadInnerXml(); // SculptData
-
-            obj.Shape.FlexiSoftness = reader.ReadElementContentAsInt("FlexiSoftness", String.Empty);
-            obj.Shape.FlexiTension = reader.ReadElementContentAsFloat("FlexiTension", String.Empty);
-            obj.Shape.FlexiDrag = reader.ReadElementContentAsFloat("FlexiDrag", String.Empty);
-            obj.Shape.FlexiGravity = reader.ReadElementContentAsFloat("FlexiGravity", String.Empty);
-            obj.Shape.FlexiWind = reader.ReadElementContentAsFloat("FlexiWind", String.Empty);
-            obj.Shape.FlexiForceX = reader.ReadElementContentAsFloat("FlexiForceX", String.Empty);
-            obj.Shape.FlexiForceY = reader.ReadElementContentAsFloat("FlexiForceY", String.Empty);
-            obj.Shape.FlexiForceZ = reader.ReadElementContentAsFloat("FlexiForceZ", String.Empty);
-
-            obj.Shape.LightColorR = reader.ReadElementContentAsFloat("LightColorR", String.Empty);
-            obj.Shape.LightColorG = reader.ReadElementContentAsFloat("LightColorG", String.Empty);
-            obj.Shape.LightColorB = reader.ReadElementContentAsFloat("LightColorB", String.Empty);
-            obj.Shape.LightColorA = reader.ReadElementContentAsFloat("LightColorA", String.Empty);
-            obj.Shape.LightRadius = reader.ReadElementContentAsFloat("LightRadius", String.Empty);
-            obj.Shape.LightCutoff = reader.ReadElementContentAsFloat("LightCutoff", String.Empty);
-            obj.Shape.LightFalloff = reader.ReadElementContentAsFloat("LightFalloff", String.Empty);
-            obj.Shape.LightIntensity = reader.ReadElementContentAsFloat("LightIntensity", String.Empty);
-
-            bool hasFlexi = reader.ReadElementContentAsBoolean("FlexiEntry", String.Empty);
-            bool hasLight = reader.ReadElementContentAsBoolean("LightEntry", String.Empty);
-            reader.ReadInnerXml(); // SculptEntry
-
-            reader.ReadEndElement();
-
-            obj.Scale = ReadVector(reader, "Scale"); // Yes, again
-            obj.UpdateFlag =  (byte)reader.ReadElementContentAsInt("UpdateFlag", String.Empty); // UpdateFlag
-
-            obj.SitTargetOrientation = ReadQuaternion(reader, "SitTargetOrientation");
-            obj.SitTargetPosition = ReadVector(reader, "SitTargetPosition");
-            obj.SitTargetPositionLL = ReadVector(reader, "SitTargetPositionLL");
-            obj.SitTargetOrientationLL = ReadQuaternion(reader, "SitTargetOrientationLL");
-            obj.ParentID = (uint)reader.ReadElementContentAsLong("ParentID", String.Empty);
-            obj.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty);
-            int category = reader.ReadElementContentAsInt("Category", String.Empty);
-            obj.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty);
-            obj.ObjectSaleType = (byte)reader.ReadElementContentAsInt("ObjectSaleType", String.Empty);
-            int ownershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty);
-            obj.GroupID = ReadUUID(reader, "GroupID");
-            obj.OwnerID = ReadUUID(reader, "OwnerID");
-            obj.LastOwnerID = ReadUUID(reader, "LastOwnerID");
-            obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty);
-            obj.OwnerMask = (uint)reader.ReadElementContentAsInt("OwnerMask", String.Empty);
-            obj.GroupMask = (uint)reader.ReadElementContentAsInt("GroupMask", String.Empty);
-            obj.EveryoneMask = (uint)reader.ReadElementContentAsInt("EveryoneMask", String.Empty);
-            obj.NextOwnerMask = (uint)reader.ReadElementContentAsInt("NextOwnerMask", String.Empty);
-
-            obj.Flags = (PrimFlags)reader.ReadElementContentAsInt("Flags", String.Empty);
-
-            obj.CollisionSound = ReadUUID(reader, "CollisionSound");
-            obj.CollisionSoundVolume = reader.ReadElementContentAsFloat("CollisionSoundVolume", String.Empty);
-
-            reader.ReadEndElement();
-
-            obj.GroupPosition = groupPosition;
-            obj.OffsetPosition = offsetPosition;
-
-            return obj;
-        }
-
         public static SceneObjectPart Xml2ToSOP(XmlTextReader reader)
         {
             SceneObjectPart obj = new SceneObjectPart();


Ensure hacked TSM_HiddenFieldName querystring param does not result in arbitrary script. QuoteString() ensures the string cannot be broken out of, nor can there be a <script> element introduced.

--- Server/AjaxControlToolkit/ToolkitScriptManager/ToolkitScriptManager.cs
+++ Server/AjaxControlToolkit/ToolkitScriptManager/ToolkitScriptManager.cs
@@ -169,11 +169,11 @@
                         string.Format(CultureInfo.InvariantCulture,
                             "(function() {{" +
                                 "var fn = function() {{" +
-                                    "$get('{0}').value = '';" +
+                                    "$get(\"{0}\").value = '';" +
                                     "Sys.Application.remove_init(fn);" +
                                 "}};" +
                                 "Sys.Application.add_init(fn);" +
-                            "}})();", hiddenFieldName.Replace("'", "\\'"))
+                            "}})();", QuoteString(hiddenFieldName), "")
                         , true);
                 }
             }
@@ -359,11 +359,13 @@
                     outputWriter.WriteLine(string.Format(CultureInfo.InvariantCulture,
                         "(function() {{" +
                             "var fn = function() {{" +
-                                "$get('{0}').value += '{1}';" +
+                                "$get(\"{0}\").value += '{1}';" +
                                 "Sys.Application.remove_load(fn);" +
                             "}};" +
                             "Sys.Application.add_load(fn);" +
-                        "}})();", hiddenFieldName.Replace("'", "\\'"), SerializeScriptEntries(scriptEntries, true)));
+                        "}})();",
+                            QuoteString(hiddenFieldName),
+                            SerializeScriptEntries(scriptEntries, true)));
                 }

                 output = true;


C#: Temporarily extract modified pointers as unmodified during CIL extraction

--- csharp/extractor/Semmle.Extraction.CIL/Entities/PointerType.cs
+++ csharp/extractor/Semmle.Extraction.CIL/Entities/PointerType.cs
@@ -11,6 +11,14 @@
         public PointerType(Context cx, Type pointee) : base(cx)
         {
             this.pointee = pointee;
+
+            if (pointee is ModifiedType mt)
+            {
+                cx.Extractor.Logger.Log(
+                    Util.Logging.Severity.Info,
+                    $"Pointer to modified type {pointee.GetQualifiedName()} is changed to {mt.Unmodified.GetQualifiedName()}");
+                this.pointee = mt.Unmodified;
+            }
         }

         public override bool Equals(object? obj)


Normalized line endings in MessageProcessor.

--- ARGame/Assets/Scripts/Network/MessageProcessor.cs
+++ ARGame/Assets/Scripts/Network/MessageProcessor.cs
@@ -193,7 +193,7 @@
             }

             byte[] message = new byte[13];
-
+
             message[0] = (byte)UpdateType.UpdateLevel;
             WriteInt32(update.NextLevelIndex, message, 1);
             WriteSingle(update.Size.x, message, 5);


Refactoring.

Refactoring.

--- Applications/Rss/Reader/Models/Rss/RssOperator.cs
+++ Applications/Rss/Reader/Models/Rss/RssOperator.cs
@@ -57,13 +57,13 @@
             var info = io.Get(src);
             var dir  = io.Combine(info.DirectoryName, "Backup");
             var dest = io.Combine(dir, $"{DateTime.Now.ToString("yyyyMMdd")}{info.Extension}");
+
             if (io.Exists(dest)) return;
-
             io.Copy(src, dest, true);
+
             foreach (var f in io.GetFiles(dir).OrderByDescending(e => e).Skip(30))
             {
-                try { io.Delete(f); }
-                catch (Exception err) { LogOperator.Warn(typeof(RssOperator), $"{f} ({err.Message})"); }
+                LogOperator.Warn(typeof(RssOperator), () => io.Delete(f));
             }
         }


Reordered methods

Reordered methods

--- AsyncCollections.Benchmark/AsyncQueueBenchmark.cs
+++ AsyncCollections.Benchmark/AsyncQueueBenchmark.cs
@@ -27,6 +27,11 @@
 			AddTask( "Nito.AsyncEx.AsyncCollection", () => new NitoAsyncCollectionAdapter<int>() );
 			AddTask( "System.Concurrent.BlockingCollection", () => new BlockingCollectionAdapter<int>() );
 			AddTask( "System.Threading.Tasks.Dataflow.BufferBlock", () => new TplDataflowAdapter<int>() );
+		}
+
+		public void Run()
+		{
+			_competition.Run();
 		}

 		private void AddTask( string name, Func<IAsyncCollection<int>> factoryMethod )
@@ -69,6 +74,15 @@
 			Task.WaitAll( consumerTasks );
 		}

+		private static void RunProducer( IAsyncCollection<int> queue )
+		{
+			for ( int i = 0; i < _itemsAddedPerThread; i++ )
+			{
+				int item = 42;
+				queue.Add( item );
+			}
+		}
+
 		private static async Task RunConsumerAsync( IAsyncCollection<int> queue, IntHolder itemsTakeHolder, CancellationTokenSource cancelSource )
 		{
 			try
@@ -89,23 +103,9 @@
 			}
 		}

-		private static void RunProducer( IAsyncCollection<int> queue )
-		{
-			for ( int i = 0; i < _itemsAddedPerThread; i++ )
-			{
-				int item = 42;
-				queue.Add( item );
-			}
-		}
-
 		private class IntHolder
 		{
 			public int Value;
 		}
-
-		public void Run()
-		{
-			_competition.Run();
-		}
 	}
 }


made ignored fields configurable and added geo_distance as ignored field

--- SolrNet/Mapping/Validation/Rules/MappedPropertiesIsInSolrSchemaRule.cs
+++ SolrNet/Mapping/Validation/Rules/MappedPropertiesIsInSolrSchemaRule.cs
@@ -20,6 +20,7 @@
 using System.Collections.Generic;
 using System.Text.RegularExpressions;
 using SolrNet.Schema;
+using SolrNet.Utils;

 namespace SolrNet.Mapping.Validation.Rules {
     /// <summary>
@@ -27,6 +28,15 @@
     /// as either a SolrField or a DynamicField
     /// </summary>
     public class MappedPropertiesIsInSolrSchemaRule : IValidationRule {
+        /// <summary>
+        /// Field names to be ignored. These fields are never checked.
+        /// </summary>
+        public ICollection<string> IgnoredFieldNames { get; set; }
+
+        public MappedPropertiesIsInSolrSchemaRule() {
+            IgnoredFieldNames = new[] {"score", "geo_distance"};
+        }
+
         /// <summary>
         /// Validates that all properties in the mapping are present in the Solr schema
         /// as either a SolrField or a DynamicField
@@ -39,11 +49,12 @@
         /// </returns>
         public IEnumerable<ValidationResult> Validate(Type documentType, SolrSchema solrSchema, IReadOnlyMappingManager mappingManager) {
             foreach (var mappedField in mappingManager.GetFields(documentType)) {
-                if (mappedField.FieldName == "score")
+                var field = mappedField;
+                if (IgnoredFieldNames != null && Func.Any(IgnoredFieldNames, f => f == field.FieldName))
                     continue;
                 var fieldFoundInSolrSchema = false;
                 foreach (var solrField in solrSchema.SolrFields) {
-                    if (solrField.Name.Equals(mappedField.FieldName)) {
+                    if (solrField.Name.Equals(field.FieldName)) {
                         fieldFoundInSolrSchema = true;
                         break;
                     }
@@ -51,7 +62,7 @@

                 if (!fieldFoundInSolrSchema) {
                     foreach (var dynamicField in solrSchema.SolrDynamicFields) {
-                        if (IsGlobMatch(dynamicField.Name, mappedField.FieldName)) {
+                        if (IsGlobMatch(dynamicField.Name, field.FieldName)) {
                             fieldFoundInSolrSchema = true;
                             break;
                         }
@@ -61,7 +72,7 @@
                 if (!fieldFoundInSolrSchema)
                     // If field couldn't be matched to any of the solrfield, dynamicfields throw an exception.
                     yield return new ValidationError(String.Format("No matching SolrField or DynamicField '{0}' found in the Solr schema for document property '{1}' in type '{2}'.",
-                                                                          mappedField.FieldName, mappedField.Property.Name, documentType.FullName));
+                                                                          field.FieldName, field.Property.Name, documentType.FullName));
             }
         }