diff --git a/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/Enumerable.csproj b/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/Enumerable.csproj index fcc444794bd..1dd53bd273d 100644 --- a/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/Enumerable.csproj +++ b/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/Enumerable.csproj @@ -1,76 +1,8 @@ - - + + - Debug - AnyCPU - {A240B8F5-35D8-4E14-8993-0D3515B8B0E5} Exe - false - Enumerable - Enumerable - - - - - true - v4.6.2 - 3.5 - - publish\ - true - Disk - false - Foreground - 7 - Days - false - false - true - 0 - 1.0.0.%2a - false - false - true + netcoreapp2.1;net472 - - true - full - false - .\bin\Debug\ - DEBUG;TRACE - false - - - pdbonly - true - .\bin\Release\ - TRACE - false - - - - - False - C:\Windows\Microsoft.NET\Framework\v3.5.20123\System.Core.dll - - - - - - - - - - - - - False - .NET Framework 3.5 SP1 - true - - - - - - + \ No newline at end of file diff --git a/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs b/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs index a6345c8c7bd..06c2e294e48 100644 --- a/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs +++ b/snippets/csharp/VS_Snippets_CLR_System/system.Linq.Enumerable/CS/enumerable.cs @@ -31,8 +31,7 @@ static void AggregateEx1() // This code produces the following output: // - // dog lazy the over jumps fox brown quick the - + // dog lazy the over jumps fox brown quick the // } static void AggregateEx2() @@ -48,8 +47,7 @@ static void AggregateEx2() // This code produces the following output: // - // The number of even integers is: 6 - + // The number of even integers is: 6 // } static void AggregateEx3() @@ -71,8 +69,7 @@ static void AggregateEx3() // This code produces the following output: // - // The fruit with the longest name is PASSIONFRUIT. - + // The fruit with the longest name is PASSIONFRUIT. // } #endregion @@ -106,8 +103,7 @@ public static void AllEx() // This code produces the following output: // - // Not all pet names start with 'B'. - + // Not all pet names start with 'B'. // } @@ -176,8 +172,7 @@ public static void AnyEx1() // This code produces the following output: // - // The list is not empty. - + // The list is not empty. // } @@ -258,8 +253,7 @@ public static void AnyEx3() // This code produces the following output: // - // There are unvaccinated animals over age one. - + // There are unvaccinated animals over age one. // } #endregion @@ -308,7 +302,6 @@ static void AsEnumerableEx1() // query1 has been created. // // query2 has been created. - // #endregion @@ -324,8 +317,7 @@ static void AverageEx1() // This code produces the following output: // - // The average grade is 77.6. - + // The average grade is 77.6. // } @@ -340,8 +332,7 @@ static void AverageEx2() // This code produces the following output: // - // The average is 133282081426.333. - + // The average is 133282081426.333. // } @@ -356,8 +347,7 @@ static void AverageEx3() // This code produces the following output: // - // The average is 99948748093. - + // The average is 99948748093. // } @@ -372,8 +362,7 @@ static void AverageEx4() // This code produces the following output: // - // The average string length is 6.5. - + // The average string length is 6.5. // } #endregion @@ -456,7 +445,6 @@ public static void ConcatEx1() // Bounder // Snoopy // Fido - // public static void ConcatEx2() @@ -482,7 +470,6 @@ public static void ConcatEx2() // Bounder // Snoopy // Fido - // } } @@ -505,8 +492,7 @@ static void ContainsEx1() // This code produces the following output: // - // The array does contain 'mango'. - + // The array does contain 'mango'. // } #endregion @@ -533,8 +519,7 @@ static void CountEx1() // This code produces the following output: // - // There are 6 fruits in the collection. - + // There are 6 fruits in the collection. // } @@ -568,7 +553,6 @@ public static void CountEx2() // This code produces the following output: // // There are 2 unvaccinated animals. - // } #endregion @@ -603,7 +587,6 @@ public static void DefaultIfEmptyEx1() Boots Whiskers */ - // } @@ -622,7 +605,6 @@ static void DefaultIfEmptyEx1a() 0 */ - // } @@ -666,7 +648,6 @@ public static void DefaultIfEmptyEx2() Name: Default Pet */ - // } #endregion @@ -695,7 +676,6 @@ static void DistinctEx1() 55 17 */ - // } #endregion @@ -719,7 +699,6 @@ static void ElementAtEx1() The name chosen at random is 'Ito, Shu'. */ - // } #endregion @@ -746,7 +725,6 @@ static void ElementAtOrDefaultEx1() The name chosen at index 20 is ''. */ - // } #endregion @@ -794,7 +772,6 @@ static void EmptyEx2() Potra, Cristina Iallo, Lucio */ - // } #endregion @@ -820,7 +797,6 @@ static void ExceptEx1() 2.4 2.5 */ - // } #endregion @@ -841,7 +817,6 @@ static void FirstEx1() 9 */ - // } @@ -860,7 +835,6 @@ static void FirstEx2() 92 */ - // } #endregion @@ -878,7 +852,6 @@ static void FirstOrDefaultEx1() 0 */ - // } @@ -905,7 +878,6 @@ static void FirstOrDefaultEx2() The first long name is 'Andersen, Henriette Thaulow'. There is not a name longer than 30 characters. */ - // } @@ -932,7 +904,6 @@ static void FirstOrDefaultEx3() The value of the firstMonth1 variable is 1 The value of the firstMonth2 variable is 1 */ - // } #endregion @@ -985,7 +956,6 @@ public static void GroupByEx1() 1 Whiskers */ - // // Uses query expression syntax. @@ -1079,7 +1049,6 @@ public static void GroupByEx3() Maximum age: 1.5 */ } - // } @@ -1144,7 +1113,6 @@ public static void GroupByEx4() Maximum age: 1.5 */ } - // } #endregion @@ -1215,7 +1183,6 @@ public static void GroupJoinEx1() Weiss, Charlotte: Whiskers */ - // // Uses query syntax. @@ -1276,7 +1243,6 @@ static void IntersectEx1() 26 30 */ - // } #endregion @@ -1337,7 +1303,6 @@ public static void JoinEx1() Adams, Terry - Boots Weiss, Charlotte - Whiskers */ - // } #endregion @@ -1358,7 +1323,6 @@ static void LastEx1() 19 */ - // } @@ -1377,7 +1341,6 @@ static void LastEx2() 87 */ - // } #endregion @@ -1396,7 +1359,6 @@ static void LastOrDefaultEx1() */ - // } @@ -1421,7 +1383,6 @@ static void LastOrDefaultEx2() The last number that rounds to 50 is 50.2. The last number that rounds to 40 is . */ - // } @@ -1468,7 +1429,6 @@ public static void LongCountEx1() There are 6 fruits in the collection. */ - // } @@ -1499,7 +1459,6 @@ public static void LongCountEx2() There are 2 animals over age 3. */ - // } #endregion @@ -1519,7 +1478,6 @@ static void MaxEx1() The largest number is 4294967296. */ - // } @@ -1537,7 +1495,6 @@ static void MaxEx2() The largest number is 1.5E+104. */ - // } @@ -1593,7 +1550,6 @@ public static void MaxEx3() The 'maximum' animal is Barley. */ - // } @@ -1624,7 +1580,6 @@ public static void MaxEx4() The maximum pet age plus name length is 14. */ - // } @@ -1645,7 +1600,6 @@ static void MinEx1() The smallest number is -2E+103. */ - // } @@ -1663,7 +1617,6 @@ static void MinEx2() The lowest grade is 37. */ - // } @@ -1715,7 +1668,6 @@ public static void MinEx3() The 'minimum' animal is Whiskers. */ - // } @@ -1744,7 +1696,6 @@ public static void MinEx4() The youngest animal is age 1. */ - // } #endregion @@ -1792,7 +1743,6 @@ static void OfTypeEx1() // Mango // Orange // Banana - // } #endregion @@ -1828,7 +1778,6 @@ public static void OrderByEx1() Boots - 4 Barley - 8 */ - // } @@ -1989,7 +1938,6 @@ public static void OrderByDescendingEx1() 1.3 6.2 */ - // } #endregion @@ -2021,7 +1969,6 @@ static void RangeEx1() 81 100 */ - // } #endregion @@ -2057,7 +2004,6 @@ I like programming. I like programming. I like programming. */ - // } #endregion @@ -2081,7 +2027,6 @@ static void ReverseEx1() e l p p a */ - // } #endregion @@ -2111,7 +2056,6 @@ static void SelectEx1() 81 100 */ - // } @@ -2140,7 +2084,6 @@ static void SelectEx2() {index=4, str=pass} {index=5, str=grape} */ - // } #endregion @@ -2219,7 +2162,6 @@ Using Select(): Scratches Diesel */ - // } @@ -2266,7 +2208,6 @@ public static void SelectManyEx2() // 2Scratches // 2Diesel // 3Dusty - // } @@ -2317,7 +2258,6 @@ public static void SelectManyEx3() // {Owner=Higa, Pet=Sam} // {Owner=Ashkenazi, Pet=Sugar} // {Owner=Price, Pet=Scratches} - // } #endregion @@ -2353,7 +2293,6 @@ public static void SequenceEqualEx1() The lists are equal. */ - // } @@ -2387,7 +2326,6 @@ public static void SequenceEqualEx2() The lists are not equal. */ - // } #endregion @@ -2407,7 +2345,6 @@ static void SingleEx1() orange */ - // // @@ -2430,7 +2367,6 @@ static void SingleEx1() The collection does not contain exactly one element. */ - // } @@ -2452,7 +2388,6 @@ static void SingleEx2() passionfruit */ - // // @@ -2474,7 +2409,6 @@ static void SingleEx2() // // The collection does not contain exactly // one element whose length is greater than 15. - // } #endregion @@ -2494,7 +2428,6 @@ static void SingleOrDefaultEx1() orange */ - // // @@ -2510,7 +2443,6 @@ static void SingleOrDefaultEx1() No such string! */ - // } @@ -2529,7 +2461,6 @@ static void SingleOrDefaultEx2() passionfruit */ - // // @@ -2544,7 +2475,6 @@ static void SingleOrDefaultEx2() No such string! */ - // } @@ -2571,7 +2501,6 @@ static void SingleOrDefaultEx3() The value of the pageNumber1 variable is 1 The value of the pageNumber2 variable is 1 */ - // } #endregion @@ -2600,7 +2529,6 @@ static void SkipEx1() 59 56 */ - // } #endregion @@ -2630,7 +2558,6 @@ static void SkipWhileEx1() 59 56 */ - // } @@ -2655,7 +2582,6 @@ static void SkipWhileEx2() 1500 5500 */ - // } #endregion @@ -2689,7 +2615,6 @@ public static void SumEx1() The total weight of the packages is: 83.7 */ - // } @@ -2707,7 +2632,6 @@ static void SumEx2() The sum of the numbers is 635.13. */ - // } @@ -2725,7 +2649,6 @@ static void SumEx3() Total points earned: 311.39 */ - // } @@ -2753,7 +2676,6 @@ static void TakeEx1() 92 85 */ - // } #endregion @@ -2780,7 +2702,6 @@ static void TakeWhileEx1() banana mango */ - // } @@ -2808,7 +2729,6 @@ static void TakeWhileEx2() orange blueberry */ - // } #endregion @@ -2843,7 +2763,6 @@ static void ThenByEx1() raspberry passionfruit */ - // } #endregion @@ -2890,7 +2809,6 @@ public static void ThenByDescendingEx1() baNanA BAnana */ - // } #endregion @@ -2930,7 +2848,6 @@ Lucerne Publishing Wingtip Toys Adventure Works */ - // } #endregion @@ -2979,7 +2896,6 @@ public static void ToDictionaryEx1() Key 299456122: Wingtip Toys, 6 pounds Key 4665518773: Adventure Works, 33.8 pounds */ - // } #endregion @@ -3010,7 +2926,6 @@ static void ToListEx1() 5 10 */ - // } #endregion @@ -3076,7 +2991,6 @@ Lucerne Publishing 89112755 Wingtip Toys 299456122 Wide World Importers 4665518773 */ - // } #endregion @@ -3100,7 +3014,6 @@ static void UnionEx1() 5 3 9 7 8 6 4 1 0 */ - // Console.WriteLine(); @@ -3128,7 +3041,6 @@ static void WhereEx1() mango grape */ - // } @@ -3152,7 +3064,6 @@ static void WhereEx2() 15 40 */ - // } #endregion @@ -3174,7 +3085,6 @@ static void ZipEx() // 1 one // 2 two // 3 three - // } #endregion diff --git a/snippets/csharp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/CS/asyncudp.cs b/snippets/csharp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/CS/asyncudp.cs index c4cb022b77e..be2ba9629ad 100644 --- a/snippets/csharp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/CS/asyncudp.cs +++ b/snippets/csharp/VS_Snippets_Remoting/System.Net.Sockets.UdpClient1/CS/asyncudp.cs @@ -6,200 +6,179 @@ using System.Security.Permissions; using System.Threading; - -class MyUdpClient +class MyUdpClientF { - static int listenPort = 13000; - - public static void Main(String[] args) - { - // Parse arguments - String server = ""; - String message = "This is a test!";; - bool isServer = false; - int sendMethod = 1; // n called SendMessagen + static int s_listenPort = 13000; - if(args.Length == 0) - { - server = "localhost"; - isServer = false; - } - else if(args.Length == 1) - { - isServer = args[0]=="s" ? true : false; - } - else if(args.Length == 2) - { - isServer = args[0]=="s" ? true : false; - server = args[1]; - } - else if(args.Length == 3) - { - isServer = args[0]=="s" ? true : false; - server = args[1]; - message = args[2]; - } - else if(args.Length == 4) + public static void Main(String[] args) { - isServer = args[0]=="s" ? true : false; - server = args[1]; - message = args[2]; - sendMethod = Convert.ToInt32(args[3]); - } - else - { - Console.WriteLine("Usage: asyncudp [s|c] [host name] [message] [send method]"); - return; + // Parse arguments + string server; + string message = "This is a test!"; + bool isServer; + int sendMethodIndex = 1; // Which SendMessage* method to call (1/2/3) + + if (args.Length == 0) + { + server = "localhost"; + isServer = false; + } + else if (args.Length > 4) + { + Console.WriteLine("Usage: asyncudp [s|c] [host name] [message] [send method index]"); + return; + } + else + { + isServer = (args[0] == "s"); + server = (args.Length >= 2) ? args[1] : ""; + if (args.Length >= 3) + { + message = args[2]; + } + if (args.Length >= 4) + { + sendMethodIndex = Convert.ToInt32(args[3]); + } + } + + if (isServer) + { + ReceiveMessages(); + } + else + { + switch (sendMethodIndex) + { + case 1: + SendMessage1(server, message); + break; + case 2: + SendMessage2(server, message); + break; + case 3: + SendMessage3(server, message); + break; + } + } } - if (isServer) +// + public struct UdpState { - ReceiveMessages(); + public UdpClient u; + public IPEndPoint e; } - else + + public static bool messageReceived = false; + + public static void ReceiveCallback(IAsyncResult ar) { - switch (sendMethod) - { - case 1: - SendMessage1(server,message); - break; - case 2: - SendMessage2(server,message); - break; - case 3: UdpClient u = new UdpClient(); - - SendMessage3(server,message); - break; - } - } - } + UdpClient u = ((UdpState)(ar.AsyncState)).u; + IPEndPoint e = ((UdpState)(ar.AsyncState)).e; + byte[] receiveBytes = u.EndReceive(ar, ref e); + string receiveString = Encoding.ASCII.GetString(receiveBytes); - UdpClient u = new UdpClient(); + Console.WriteLine($"Received: {receiveString}"); + messageReceived = true; + } -// - public struct UdpState - { - public UdpClient u; - public IPEndPoint e; - } - - public static bool messageReceived = false; - - public static void ReceiveCallback(IAsyncResult ar) - { - UdpClient u = (UdpClient)((UdpState)(ar.AsyncState)).u; - IPEndPoint e = (IPEndPoint)((UdpState)(ar.AsyncState)).e; - - Byte[] receiveBytes = u.EndReceive(ar, ref e); - string receiveString = Encoding.ASCII.GetString(receiveBytes); - - Console.WriteLine("Received: {0}", receiveString); - messageReceived = true; - } - - public static void ReceiveMessages() - { - // Receive a message and write it to the console. - IPEndPoint e = new IPEndPoint(IPAddress.Any, listenPort); - UdpClient u = new UdpClient(e); - - UdpState s = new UdpState(); - s.e = e; - s.u = u; - - Console.WriteLine("listening for messages"); - u.BeginReceive(new AsyncCallback(ReceiveCallback), s); - - // Do some work while we wait for a message. For this example, - // we'll just sleep - while (!messageReceived) + public static void ReceiveMessages() { - Thread.Sleep(100); + // Receive a message and write it to the console. + IPEndPoint e = new IPEndPoint(IPAddress.Any, s_listenPort); + UdpClient u = new UdpClient(e); + + UdpState s = new UdpState(); + s.e = e; + s.u = u; + + Console.WriteLine("listening for messages"); + u.BeginReceive(new AsyncCallback(ReceiveCallback), s); + + // Do some work while we wait for a message. For this example, we'll just sleep + while (!messageReceived) + { + Thread.Sleep(100); + } } - } // // - public static bool messageSent = false; + public static bool messageSent = false; - public static void SendCallback(IAsyncResult ar) - { - UdpClient u = (UdpClient)ar.AsyncState; + public static void SendCallback(IAsyncResult ar) + { + UdpClient u = (UdpClient)ar.AsyncState; - Console.WriteLine("number of bytes sent: {0}", u.EndSend(ar)); - messageSent = true; - } + Console.WriteLine($"number of bytes sent: {u.EndSend(ar)}"); + messageSent = true; + } // // - static void SendMessage1(string server, string message) - { - // create the udp socket - UdpClient u = new UdpClient(); - - u.Connect(server, listenPort); - Byte [] sendBytes = Encoding.ASCII.GetBytes(message); - - // send the message - // the destination is defined by the call to .Connect() - u.BeginSend(sendBytes, sendBytes.Length, - new AsyncCallback(SendCallback), u); - - // Do some work while we wait for the send to complete. For - // this example, we'll just sleep - while (!messageSent) + static void SendMessage1(string server, string message) { - Thread.Sleep(100); + // create the udp socket + UdpClient u = new UdpClient(); + + u.Connect(server, s_listenPort); + byte[] sendBytes = Encoding.ASCII.GetBytes(message); + + // send the message + // the destination is defined by the call to .Connect() + u.BeginSend(sendBytes, sendBytes.Length, new AsyncCallback(SendCallback), u); + + // Do some work while we wait for the send to complete. For this example, we'll just sleep + while (!messageSent) + { + Thread.Sleep(100); + } } - } // // - static void SendMessage2(string server, string message) - { - // create the udp socket - UdpClient u = new UdpClient(); - Byte [] sendBytes = Encoding.ASCII.GetBytes(message); + static void SendMessage2(string server, string message) + { + // create the udp socket + UdpClient u = new UdpClient(); + byte[] sendBytes = Encoding.ASCII.GetBytes(message); - // resolve the server name - IPHostEntry heserver = Dns.GetHostEntry(server); + // resolve the server name + IPHostEntry heserver = Dns.GetHostEntry(server); - IPEndPoint e = new IPEndPoint(heserver.AddressList[0], listenPort); + IPEndPoint e = new IPEndPoint(heserver.AddressList[0], s_listenPort); - // send the message - // the destination is defined by the IPEndPoint - u.BeginSend(sendBytes, sendBytes.Length, e, - new AsyncCallback(SendCallback), u); + // send the message + // the destination is defined by the IPEndPoint + u.BeginSend(sendBytes, sendBytes.Length, e, new AsyncCallback(SendCallback), u); - // Do some work while we wait for the send to complete. For - // this example, we'll just sleep - while (!messageSent) - { - Thread.Sleep(100); + // Do some work while we wait for the send to complete. For this example, we'll just sleep + while (!messageSent) + { + Thread.Sleep(100); + } } - } // // - static void SendMessage3(string server, string message) - { - // create the udp socket - UdpClient u = new UdpClient(); + static void SendMessage3(string server, string message) + { + // create the udp socket + UdpClient u = new UdpClient(); - Byte [] sendBytes = Encoding.ASCII.GetBytes(message); + byte[] sendBytes = Encoding.ASCII.GetBytes(message); - // send the message - // the destination is defined by the server name and port - u.BeginSend(sendBytes, sendBytes.Length, server, listenPort, - new AsyncCallback(SendCallback), u); + // send the message + // the destination is defined by the server name and port + u.BeginSend(sendBytes, sendBytes.Length, server, s_listenPort, new AsyncCallback(SendCallback), u); - // Do some work while we wait for the send to complete. For - // this example, we'll just sleep - while (!messageSent) - { - Thread.Sleep(100); + // Do some work while we wait for the send to complete. For this example, we'll just sleep + while (!messageSent) + { + Thread.Sleep(100); + } } - } // -} \ No newline at end of file +} diff --git a/snippets/csharp/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/CS/EncapsulatedComparer.cs b/snippets/csharp/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/CS/EncapsulatedComparer.cs index e025c8bbbfd..eca36d8197d 100644 --- a/snippets/csharp/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/CS/EncapsulatedComparer.cs +++ b/snippets/csharp/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/CS/EncapsulatedComparer.cs @@ -71,7 +71,7 @@ static void Main(string[] args) // that have duplicates in the second array. IEnumerable duplicates = - store1.Intersect(store2, new ProductComparer()); + store1.Intersect(store2); foreach (var product in duplicates) Console.WriteLine(product.Name + " " + product.Code); @@ -89,7 +89,7 @@ apple 9 //excluding duplicates. IEnumerable union = - store1.Union(store2, new ProductComparer()); + store1.Union(store2); foreach (var product in union) Console.WriteLine(product.Name + " " + product.Code); @@ -151,7 +151,6 @@ lemon 12 orange 4 lemon 12 */ - // //SEQUENCEEQUAL @@ -173,42 +172,27 @@ lemon 12 Equal? True */ - // Console.ReadLine(); } // -public class ProductA -{ +public class ProductA: IEquatable +{ public string Name { get; set; } public int Code { get; set; } -} -public class ProductComparer : IEqualityComparer -{ - - public bool Equals(ProductA x, ProductA y) + public bool Equals(ProductA other) { - //Check whether the objects are the same object. - if (Object.ReferenceEquals(x, y)) return true; + if (other is null) + return false; - //Check whether the products' properties are equal. - return x != null && y != null && x.Code.Equals(y.Code) && x.Name.Equals(y.Name); + return this.Name == other.Name && this.Code == other.Code; } - public int GetHashCode(ProductA obj) - { - //Get hash code for the Name field if it is not null. - int hashProductName = obj.Name == null ? 0 : obj.Name.GetHashCode(); - - //Get hash code for the Code field. - int hashProductCode = obj.Code.GetHashCode(); - - //Calculate the hash code for the product. - return hashProductName ^ hashProductCode; - } + public override bool Equals(object obj) => Equals(obj as ProductA); + public override int GetHashCode() => (Name, Code).GetHashCode(); } // diff --git a/snippets/csharp/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/CS/EncapsulatedComparer.csproj b/snippets/csharp/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/CS/EncapsulatedComparer.csproj new file mode 100644 index 00000000000..1dd53bd273d --- /dev/null +++ b/snippets/csharp/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/CS/EncapsulatedComparer.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp2.1;net472 + + + \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb b/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb index 0fe34b7a075..87881ffe002 100644 --- a/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb +++ b/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vb @@ -28,7 +28,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' dog lazy the over jumps fox brown quick the - ' ' @@ -49,7 +48,6 @@ Namespace SequenceExamples ' This code produces the following output: ' 'The number of even integers is 6 - ' ' @@ -71,7 +69,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The fruit with the longest name is PASSIONFRUIT - ' #End Region @@ -102,7 +99,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' Not all pet names start with 'B'. - ' End Class @@ -170,7 +166,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The list is not empty. - ' End Sub @@ -245,7 +240,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' There are unvaccinated animals over age 1. - ' End Class @@ -301,7 +295,6 @@ Namespace SequenceExamples ' query1 has been created. ' ' query2 has been created. - ' #End Region @@ -320,7 +313,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The average grade is 77.6 - ' End Sub @@ -338,7 +330,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The average is 133282081426.333 - ' End Sub @@ -358,7 +349,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The average is 99948748093 - ' End Sub @@ -377,7 +367,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The average string length is 6.5 - ' End Sub @@ -473,7 +462,6 @@ Namespace SequenceExamples ' Bounder ' Snoopy ' Fido - ' Sub ConcatEx2() @@ -506,7 +494,6 @@ Namespace SequenceExamples ' Bounder ' Snoopy ' Fido - ' End Sub End Class @@ -533,7 +520,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The array does contain mango - ' End Sub #End Region @@ -556,7 +542,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' There are 6 fruits in the collection. - ' End Sub @@ -589,7 +574,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' There are 2 unvaccinated animals. - ' End Class @@ -625,7 +609,6 @@ Namespace SequenceExamples ' Barley ' Boots ' Whiskers - ' End Class @@ -646,7 +629,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' 0 - ' End Sub @@ -698,7 +680,6 @@ Namespace SequenceExamples ' Name: Whiskers ' ' Name: Default Pet - ' End Class @@ -729,7 +710,6 @@ Namespace SequenceExamples ' 46 ' 55 ' 17 - ' End Sub #End Region @@ -752,7 +732,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The name chosen at random is Ito, Shu - ' End Sub #End Region @@ -777,7 +756,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The name chosen at index 20 is [THERE IS NO NAME AT THIS INDEX] - ' End Sub #End Region @@ -831,7 +809,6 @@ Namespace SequenceExamples ' Hoeing, Helge ' Potra, Cristina ' Iallo, Lucio - ' End Sub #End Region @@ -862,7 +839,6 @@ Namespace SequenceExamples ' 2.3 ' 2.4 ' 2.5 - ' End Sub #End Region @@ -883,7 +859,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' 9 - ' End Sub @@ -902,7 +877,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' 92 - ' End Sub #End Region @@ -923,7 +897,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' 0 - ' End Sub @@ -954,7 +927,6 @@ Namespace SequenceExamples ' The first long name is Andersen, Henriette Thaulow ' ' There is not a name longer than 30 characters. - ' End Sub @@ -977,7 +949,6 @@ Namespace SequenceExamples ' ' The value of the firstMonth1 variable is 1 ' The value of the firstMonth2 variable is 1 - ' End Sub #End Region @@ -1030,7 +1001,6 @@ Namespace SequenceExamples ' Daisy ' 1 ' Whiskers - ' ' Uses query expression syntax. @@ -1136,7 +1106,6 @@ Namespace SequenceExamples ' Number of pets in this age group: 1 ' Minimum age: 1.5 ' Maximum age: 1.5 - ' End Class @@ -1199,7 +1168,6 @@ Namespace SequenceExamples ' Number of pets in this age group: 1 ' Minimum age: 1.5 ' Maximum age: 1.5 - ' End Class @@ -1267,7 +1235,6 @@ Namespace SequenceExamples ' Boots ' Weiss, Charlotte ' Whiskers - ' End Class @@ -1295,7 +1262,6 @@ Namespace SequenceExamples ' ' 26 ' 30 - ' End Sub #End Region @@ -1351,7 +1317,6 @@ Namespace SequenceExamples ' Adams, Terry - Barley ' Adams, Terry - Boots ' Weiss, Charlotte - Whiskers - ' End Class @@ -1374,7 +1339,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' 19 - ' End Sub @@ -1394,7 +1358,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' 87 - ' End Sub #End Region @@ -1417,7 +1380,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' - ' End Sub @@ -1449,7 +1411,6 @@ Namespace SequenceExamples ' ' The last number that rounds to 50 is 50.2 ' The last number that rounds to 40 is [DOES NOT EXIST] - ' End Sub @@ -1472,7 +1433,6 @@ Namespace SequenceExamples ' ' The value of the lastDay1 variable is 1 ' The value of the lastDay2 variable is 1 - ' End Sub #End Region @@ -1493,7 +1453,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' There are 6 fruits in the collection. - ' End Sub @@ -1524,7 +1483,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' There are 2 animals over age 3 - ' End Class @@ -1546,7 +1504,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The largest number is 4294967296 - ' End Sub @@ -1565,7 +1522,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The largest number is 1.5E+104 - ' End Sub @@ -1616,7 +1572,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The 'maximum' animal is Barley - ' End Class @@ -1649,7 +1604,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The maximum pet age plus name length is 14 - ' End Class @@ -1670,7 +1624,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The smallest number is -2E+103 - ' End Sub @@ -1685,7 +1638,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The lowest grade is 37 - ' End Sub @@ -1736,7 +1688,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The 'minimum' pet is Whiskers - ' End Class @@ -1767,7 +1718,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The youngest pet is age 1 - ' End Class @@ -1821,7 +1771,6 @@ Namespace SequenceExamples ' Mango ' Orange ' Banana - ' End Sub #End Region @@ -1857,7 +1806,6 @@ Namespace SequenceExamples ' Whiskers - 1 ' Boots - 4 ' Barley - 8 - ' ' @@ -2008,7 +1956,6 @@ Namespace SequenceExamples ' 6.3 ' 1.3 ' 6.2 - ' #End Region @@ -2040,7 +1987,6 @@ Namespace SequenceExamples ' 64 ' 81 ' 100 - ' End Sub #End Region @@ -2077,7 +2023,6 @@ Namespace SequenceExamples ' I like programming. ' I like programming. ' I like programming. - ' End Sub #End Region @@ -2105,8 +2050,7 @@ Namespace SequenceExamples ' This code produces the following output: ' - ' E L P P a - + ' E L P P a ' End Sub #End Region @@ -2139,7 +2083,6 @@ Namespace SequenceExamples ' 64 ' 81 ' 100 - ' End Sub @@ -2173,7 +2116,6 @@ Namespace SequenceExamples ' { index = 3, Str = ora } ' { index = 4, Str = pass } ' { index = 5, Str = grape } - ' End Sub #End Region @@ -2241,7 +2183,6 @@ Namespace SequenceExamples ' Sugar ' Scratches ' Diesel - ' End Class @@ -2330,7 +2271,6 @@ Namespace SequenceExamples ' Owner=Higa, Pet=Sam ' Owner=Ashkenazi, Pet=Sugar ' Owner=Price, Pet=Scratches - ' End Class @@ -2366,7 +2306,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The lists are equal. - ' End Class @@ -2396,7 +2335,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The lists are not equal. - ' End Sub End Class @@ -2436,7 +2374,6 @@ Namespace SequenceExamples ' ' First query: orange ' Second query: The collection does not contain exactly one element. - ' End Sub @@ -2472,7 +2409,6 @@ Namespace SequenceExamples ' ' First query: passionfruit ' Second query: There is not EXACTLY ONE element whose length is > 15. - ' End Sub #End Region @@ -2508,7 +2444,6 @@ Namespace SequenceExamples ' ' First array: orange ' Second array: No single item found - ' End Sub @@ -2540,7 +2475,6 @@ Namespace SequenceExamples ' ' First array: passionfruit ' Second array: No single item found - ' End Sub @@ -2563,7 +2497,6 @@ Namespace SequenceExamples ' The value of the pageNumber1 variable is 1 ' The value of the pageNumber2 variable is 1 - ' End Sub #End Region @@ -2595,7 +2528,6 @@ Namespace SequenceExamples ' 70 ' 59 ' 56 - ' End Sub #End Region @@ -2626,7 +2558,6 @@ Namespace SequenceExamples ' 70 ' 59 ' 56 - ' End Sub @@ -2654,7 +2585,6 @@ Namespace SequenceExamples ' 4000 ' 1500 ' 5500 - ' End Sub #End Region @@ -2687,7 +2617,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The total weight of the packages is: 83.7 - ' End Class @@ -2706,7 +2635,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' The sum of the numbers is 635.13 - ' End Sub @@ -2725,7 +2653,6 @@ Namespace SequenceExamples ' This code produces the following output: ' ' Total points earned: 311.39 - ' End Sub #End Region @@ -2757,7 +2684,6 @@ Namespace SequenceExamples ' 98 ' 92 ' 85 - ' End Sub #End Region @@ -2787,7 +2713,6 @@ Namespace SequenceExamples ' apple ' banana ' mango - ' End Sub @@ -2820,7 +2745,6 @@ Namespace SequenceExamples ' mango ' orange ' blueberry - ' End Sub #End Region @@ -2857,7 +2781,6 @@ Namespace SequenceExamples ' blueberry ' raspberry ' passionfruit - ' End Sub #End Region @@ -2905,7 +2828,6 @@ Namespace SequenceExamples ' ORANGE ' baNanA ' BAnana - ' #End Region @@ -2946,7 +2868,6 @@ Namespace SequenceExamples ' Lucerne Publishing ' Wingtip Toys ' Adventure Works - ' End Class @@ -2996,7 +2917,6 @@ Namespace SequenceExamples ' Key 89112755: Lucerne Publishing, 18.7 pounds ' Key 299456122: Wingtip Toys, 6 pounds ' Key 4665518773: Adventure Works, 33.8 pounds - ' End Class @@ -3034,7 +2954,6 @@ Namespace SequenceExamples ' 9 ' 5 ' 10 - ' End Sub #End Region @@ -3109,7 +3028,6 @@ Namespace SequenceExamples ' Packages from Company names that start with 'C': ' Coho Vineyard 89453312 ' Contoso Pharmaceuticals 670053128 - ' #End Region @@ -3141,7 +3059,6 @@ Namespace SequenceExamples ' 4 ' 1 ' 0 - ' End Sub #End Region @@ -3171,7 +3088,6 @@ Namespace SequenceExamples ' apple ' mango ' grape - ' End Sub @@ -3198,7 +3114,6 @@ Namespace SequenceExamples ' 20 ' 15 ' 40 - ' End Sub #End Region diff --git a/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vbproj b/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vbproj new file mode 100644 index 00000000000..97166b41bb1 --- /dev/null +++ b/snippets/visualbasic/VS_Snippets_CLR_System/system.Linq.Enumerable/VB/Enumerable.vbproj @@ -0,0 +1,9 @@ + + + + Exe + VB + netcoreapp2.1;net472 + + + \ No newline at end of file diff --git a/snippets/visualbasic/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/VB/EncapsulatedComparer.vb b/snippets/visualbasic/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/VB/EncapsulatedComparer.vb index 0e773e60add..3655e598174 100644 --- a/snippets/visualbasic/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/VB/EncapsulatedComparer.vb +++ b/snippets/visualbasic/VS_Snippets_VBCSharp/CsLINQEncapsulatedComparer/VB/EncapsulatedComparer.vb @@ -35,12 +35,25 @@ Public Class Product Return hashProductName Xor hashProductCode End Function End Class - ' Module Module1 Sub Main() + + ' This snippet is different than #2 by using ProductA (not Product). + ' Some samples here need to use ProductA in conjunction with + ' ProductComparer, which implements IEqualityComparer (not IEquatable). + ' + Dim store1() As ProductA = + {New Product With {.Name = "apple", .Code = 9}, + New Product With {.Name = "orange", .Code = 4}} + + Dim store2() As ProductA = + {New Product With {.Name = "apple", .Code = 9}, + New Product With {.Name = "lemon", .Code = 12}} + ' + ' Dim store1() As Product = {New Product With {.Name = "apple", .Code = 9}, @@ -137,15 +150,14 @@ Module Module1 ' This code produces the following output: ' + ' apple 9 ' orange 4 ' lemon 12 - ' ' SEQUENCEEQUAL ' - Dim storeA() As Product = {New Product With {.Name = "apple", .Code = 9}, New Product With {.Name = "orange", .Code = 4}} @@ -165,6 +177,28 @@ Module Module1 Console.ReadLine() - End Sub End Module + +' +Public Class ProductA + Inherits IEquatable(Of ProductA) + + Public Property Name As String + Public Property Code As Integer + + Public Function Equals(ByVal other As ProductA) As Boolean + If other Is Nothing Then Return False + Return Me.Name = other.Name AndAlso Me.Code = other.Code + End Function + + Public Overrides Function Equals(ByVal obj As Object) As Boolean + Return Equals(TryCast(obj, ProductA)) + End Function + + Public Overrides Function GetHashCode() As Integer + Return (Name, Code).GetHashCode() + End Function + +End Class +' \ No newline at end of file diff --git a/windowsforms/MSIX-WindowsForms/CoreWinFormsApp1/CoreWinFormsApp1.csproj b/windowsforms/MSIX-WindowsForms/CoreWinFormsApp1/CoreWinFormsApp1.csproj new file mode 100644 index 00000000000..feff1879a0a --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/CoreWinFormsApp1/CoreWinFormsApp1.csproj @@ -0,0 +1,30 @@ + + + + WinExe + netcoreapp3.0 + win-x86 + true + AnyCPU;x86 + + + + + + + + + + + + + + + + + <_PublishItem Include="@(ResolvedFileToPublish->'%(FullPath)')" TargetPath="%(ResolvedFileToPublish.RelativePath)" OutputGroup="__GetPublishItems" /> + <_PublishItem Include="$(ProjectDepsFilePath)" TargetPath="$(ProjectDepsFileName)" /> + <_PublishItem Include="$(ProjectRuntimeConfigFilePath)" TargetPath="$(ProjectRuntimeConfigFileName)" /> + + + diff --git a/windowsforms/MSIX-WindowsForms/CoreWinFormsApp1/Program.cs b/windowsforms/MSIX-WindowsForms/CoreWinFormsApp1/Program.cs new file mode 100644 index 00000000000..d241aedd74d --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/CoreWinFormsApp1/Program.cs @@ -0,0 +1,18 @@ +using System; +using System.Windows.Forms; + +namespace CoreWinFormsApp1 +{ + class Program + { + [STAThread] + static void Main() + + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new WindowsFormsApp1.Form1()); + + } + } +} diff --git a/windowsforms/MSIX-WindowsForms/MSIX-WindowsForms.sln b/windowsforms/MSIX-WindowsForms/MSIX-WindowsForms.sln new file mode 100644 index 00000000000..e989dc53563 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/MSIX-WindowsForms.sln @@ -0,0 +1,60 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2041 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WindowsFormsApp1", "WindowsFormsApp1\WindowsFormsApp1.csproj", "{F9E02CDA-E0B5-4E43-82EF-64EF405CB213}" +EndProject +Project("{C7167F0D-BC9F-4E6E-AFE1-012C56B48DB5}") = "WindowsFormsApp1.Package", "WindowsFormsApp1.Package\WindowsFormsApp1.Package.wapproj", "{FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "CoreWinFormsApp1", "CoreWinFormsApp1\CoreWinFormsApp1.csproj", "{BF70C62C-99B5-47C5-B527-A4AD1338723E}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{C3AFF30C-502F-4A5B-BF49-785A9F4C4089}" + ProjectSection(SolutionItems) = preProject + README.md = README.md + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Debug|x86 = Debug|x86 + Release|x64 = Release|x64 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Debug|x64.ActiveCfg = Debug|Any CPU + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Debug|x64.Build.0 = Debug|Any CPU + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Debug|x86.ActiveCfg = Debug|x86 + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Debug|x86.Build.0 = Debug|x86 + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Release|x64.ActiveCfg = Release|Any CPU + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Release|x64.Build.0 = Release|Any CPU + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Release|x86.ActiveCfg = Release|x86 + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213}.Release|x86.Build.0 = Release|x86 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x64.ActiveCfg = Debug|x64 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x64.Build.0 = Debug|x64 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x64.Deploy.0 = Debug|x64 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x86.ActiveCfg = Debug|x86 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x86.Build.0 = Debug|x86 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Debug|x86.Deploy.0 = Debug|x86 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x64.ActiveCfg = Release|x64 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x64.Build.0 = Release|x64 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x64.Deploy.0 = Release|x64 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x86.ActiveCfg = Release|x86 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x86.Build.0 = Release|x86 + {FA0D80AB-4FC9-40D6-AA5F-E50044ED2C5C}.Release|x86.Deploy.0 = Release|x86 + {BF70C62C-99B5-47C5-B527-A4AD1338723E}.Debug|x64.ActiveCfg = Debug|Any CPU + {BF70C62C-99B5-47C5-B527-A4AD1338723E}.Debug|x64.Build.0 = Debug|Any CPU + {BF70C62C-99B5-47C5-B527-A4AD1338723E}.Debug|x86.ActiveCfg = Debug|x86 + {BF70C62C-99B5-47C5-B527-A4AD1338723E}.Debug|x86.Build.0 = Debug|x86 + {BF70C62C-99B5-47C5-B527-A4AD1338723E}.Release|x64.ActiveCfg = Release|Any CPU + {BF70C62C-99B5-47C5-B527-A4AD1338723E}.Release|x64.Build.0 = Release|Any CPU + {BF70C62C-99B5-47C5-B527-A4AD1338723E}.Release|x86.ActiveCfg = Release|x86 + {BF70C62C-99B5-47C5-B527-A4AD1338723E}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {E34C6E40-45E2-459E-AF10-FE4E6D3319D3} + EndGlobalSection +EndGlobal diff --git a/windowsforms/MSIX-WindowsForms/README.md b/windowsforms/MSIX-WindowsForms/README.md new file mode 100644 index 00000000000..9cf5934ee24 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/README.md @@ -0,0 +1,51 @@ +# MSIX Windows Forms Core Application + +This sample shows how to use the Windows Packaging Project to package a WinForms application running on .NET Core 3.0. + +## Pre-requisites + +To use the Windows Packaging Project (wapproj) you need to install the Universal Windows workload in Visual Studio. + +To produce `MSIX` packages, you must have the **Windows 10 October 2018 SDK** (aka 10.0.17763): otherwise, the generated package will have the `APPX` extension. + +To install MSIX packages you need the **Windows 10 October 2018 Update** + +## Customize the Packaging Project + +Currently, the packaging project does not support .NET Core applications. As a workaround, we updated the project files to call the `publish` target to produce a self-contained app, and to fix the manifest entry point. + +In the .NET Core csproj file add: + +```xml + + + <_PublishItem Include="@(ResolvedFileToPublish->'%(FullPath)')" TargetPath="%(ResolvedFileToPublish.RelativePath)" OutputGroup="__GetPublishItems" /> + <_PublishItem Include="$(ProjectDepsFilePath)" TargetPath="$(ProjectDepsFileName)" /> + <_PublishItem Include="$(ProjectRuntimeConfigFilePath)" TargetPath="$(ProjectRuntimeConfigFileName)" /> + + +``` + +In the .wapproj file modify the `ProjectReference` element: +```xml + + + +``` + +And add the targets: +```xml + + @(PackageOutputGroups);__GetPublishItems + + + + + + CoreWinFormsApp1\CoreWinFormsApp1.exe + + + + + +``` diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/.gitignore b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/.gitignore new file mode 100644 index 00000000000..c3507223e29 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/.gitignore @@ -0,0 +1 @@ +BundleArtifacts/ \ No newline at end of file diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-100.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-100.png new file mode 100644 index 00000000000..6446eef93b5 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-100.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-125.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-125.png new file mode 100644 index 00000000000..d935cb2cae4 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-125.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-150.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-150.png new file mode 100644 index 00000000000..efbe3659727 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-150.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-200.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-200.png new file mode 100644 index 00000000000..719340f41af Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-200.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-400.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-400.png new file mode 100644 index 00000000000..03b41f0f447 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LargeTile.scale-400.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LockScreenLogo.scale-200.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LockScreenLogo.scale-200.png new file mode 100644 index 00000000000..735f57adb5d Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/LockScreenLogo.scale-200.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-100.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-100.png new file mode 100644 index 00000000000..41c35035df2 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-100.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-125.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-125.png new file mode 100644 index 00000000000..1c7a6911738 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-125.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-150.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-150.png new file mode 100644 index 00000000000..aab7dc77f0e Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-150.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-200.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-200.png new file mode 100644 index 00000000000..c7cb874f8fb Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-200.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-400.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-400.png new file mode 100644 index 00000000000..1965da7b5e3 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SmallTile.scale-400.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-100.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-100.png new file mode 100644 index 00000000000..52887d54cb9 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-100.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-125.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-125.png new file mode 100644 index 00000000000..104999b0629 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-125.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-150.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-150.png new file mode 100644 index 00000000000..0df2601290c Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-150.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-200.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-200.png new file mode 100644 index 00000000000..ff9e56a9106 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-200.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-400.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-400.png new file mode 100644 index 00000000000..8aab291a1ed Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/SplashScreen.scale-400.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-100.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-100.png new file mode 100644 index 00000000000..ff5a068e5d7 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-100.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-125.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-125.png new file mode 100644 index 00000000000..3879518bc82 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-125.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-150.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-150.png new file mode 100644 index 00000000000..1d38a5b7735 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-150.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-200.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-200.png new file mode 100644 index 00000000000..74f55b94e82 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-200.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-400.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-400.png new file mode 100644 index 00000000000..c3c256bde44 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square150x150Logo.scale-400.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-16.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-16.png new file mode 100644 index 00000000000..a33a5941fc2 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-16.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-256.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-256.png new file mode 100644 index 00000000000..e00b9a5420e Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-256.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-32.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-32.png new file mode 100644 index 00000000000..b336e582dc8 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-32.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-48.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-48.png new file mode 100644 index 00000000000..092ac2f7c61 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.altform-unplated_targetsize-48.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-100.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-100.png new file mode 100644 index 00000000000..a17756f27b0 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-100.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-125.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-125.png new file mode 100644 index 00000000000..fd9f2fcd16d Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-125.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-150.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-150.png new file mode 100644 index 00000000000..c731f917585 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-150.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-200.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-200.png new file mode 100644 index 00000000000..3893b88e8c5 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-200.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-400.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-400.png new file mode 100644 index 00000000000..3a0a5f1d0d3 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.scale-400.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-16.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-16.png new file mode 100644 index 00000000000..c104be9f067 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-16.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-24.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-24.png new file mode 100644 index 00000000000..c28c9475522 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-24.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png new file mode 100644 index 00000000000..deee7b1be1d Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-24_altform-unplated.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-256.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-256.png new file mode 100644 index 00000000000..006673a9aea Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-256.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-32.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-32.png new file mode 100644 index 00000000000..f1de0bb0d62 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-32.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-48.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-48.png new file mode 100644 index 00000000000..86ca7e9df35 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Square44x44Logo.targetsize-48.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.backup.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.backup.png new file mode 100644 index 00000000000..7385b56c0e4 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.backup.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-100.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-100.png new file mode 100644 index 00000000000..95f612e96b9 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-100.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-125.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-125.png new file mode 100644 index 00000000000..eedbac9ea49 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-125.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-150.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-150.png new file mode 100644 index 00000000000..a55ad6d33f2 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-150.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-200.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-200.png new file mode 100644 index 00000000000..7e912f8eb7d Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-200.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-400.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-400.png new file mode 100644 index 00000000000..a446cc6cd42 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/StoreLogo.scale-400.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-100.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-100.png new file mode 100644 index 00000000000..0e58da381f1 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-100.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-125.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-125.png new file mode 100644 index 00000000000..1ebb1f1fd78 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-125.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-150.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-150.png new file mode 100644 index 00000000000..5c737f3a40f Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-150.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-200.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-200.png new file mode 100644 index 00000000000..cb1681b04e8 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-200.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-400.png b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-400.png new file mode 100644 index 00000000000..ff9e56a9106 Binary files /dev/null and b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Images/Wide310x150Logo.scale-400.png differ diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Package.appxmanifest b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Package.appxmanifest new file mode 100644 index 00000000000..5e0d67b1898 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/Package.appxmanifest @@ -0,0 +1,29 @@ + + + + + WindowsFormsApp1 MSIX Sample + rmpablos + Images\StoreLogo.png + + + + + + + + + + + + + + + + + + + + + + diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/WindowsFormsApp1.Package.wapproj b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/WindowsFormsApp1.Package.wapproj new file mode 100644 index 00000000000..3bf313a1283 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1.Package/WindowsFormsApp1.Package.wapproj @@ -0,0 +1,92 @@ + + + + 15.0 + + + + Debug + x86 + + + Release + x86 + + + Debug + x64 + + + Release + x64 + + + Debug + AnyCPU + + + Release + AnyCPU + + + + $(MSBuildExtensionsPath)\Microsoft\DesktopBridge\ + + + + fa0d80ab-4fc9-40d6-aa5f-e50044ed2c5c + 10.0.17763.0 + 10.0.17763.0 + en-US + WindowsFormsApp1.Package_TemporaryKey.pfx + false + false + ..\CoreWinFormsApp1\CoreWinFormsApp1.csproj + + + Never + + + Never + + + Never + + + Never + + + Never + + + Never + + + + Designer + + + + + + + + + + + + @(PackageOutputGroups);__GetPublishItems + + + + + CoreWinFormsApp1\CoreWinFormsApp1.exe + + + + + + + CoreClr + + diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/App.config b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/App.config new file mode 100644 index 00000000000..56efbc7b5f1 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.Designer.cs b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.Designer.cs new file mode 100644 index 00000000000..0fb8353869b --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.Designer.cs @@ -0,0 +1,86 @@ +namespace WindowsFormsApp1 +{ + partial class Form1 + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.label1 = new System.Windows.Forms.Label(); + this.label2 = new System.Windows.Forms.Label(); + this.label3 = new System.Windows.Forms.Label(); + this.SuspendLayout(); + // + // label1 + // + this.label1.AutoSize = true; + this.label1.Location = new System.Drawing.Point(30, 31); + this.label1.Name = "label1"; + this.label1.Size = new System.Drawing.Size(35, 13); + this.label1.TabIndex = 0; + this.label1.Text = "label1"; + // + // label2 + // + this.label2.AutoSize = true; + this.label2.Location = new System.Drawing.Point(30, 64); + this.label2.Name = "label2"; + this.label2.Size = new System.Drawing.Size(35, 13); + this.label2.TabIndex = 1; + this.label2.Text = "label2"; + // + // label3 + // + this.label3.AutoSize = true; + this.label3.Location = new System.Drawing.Point(30, 98); + this.label3.Name = "label3"; + this.label3.Size = new System.Drawing.Size(35, 13); + this.label3.TabIndex = 2; + this.label3.Text = "label3"; + // + // Form1 + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(800, 450); + this.Controls.Add(this.label3); + this.Controls.Add(this.label2); + this.Controls.Add(this.label1); + this.Name = "Form1"; + this.Text = "Form1"; + this.Load += new System.EventHandler(this.Form1_Load); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + + private System.Windows.Forms.Label label1; + private System.Windows.Forms.Label label2; + private System.Windows.Forms.Label label3; + } +} + diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.cs b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.cs new file mode 100644 index 00000000000..5b5bc0046c0 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace WindowsFormsApp1 +{ + public partial class Form1 : Form + { + public Form1() + { + InitializeComponent(); + } + + private void Form1_Load(object sender, EventArgs e) + { + label1.Text = RuntimeInformation.FrameworkDescription; + label2.Text = System.AppDomain.CurrentDomain.BaseDirectory; + label3.Text = typeof(string).Assembly.Location; + } + } +} diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.resx b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.resx new file mode 100644 index 00000000000..1af7de150c9 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Form1.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Program.cs b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Program.cs new file mode 100644 index 00000000000..1b6e15e8b34 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace WindowsFormsApp1 +{ + public class Program + { + [STAThread] + static void Main() + + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new WindowsFormsApp1.Form1()); + + } + } +} diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/AssemblyInfo.cs b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..01ce6fc0b2d --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WindowsFormsApp1")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WindowsFormsApp1")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("f9e02cda-e0b5-4e43-82ef-64ef405cb213")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Resources.Designer.cs b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Resources.Designer.cs new file mode 100644 index 00000000000..b21d543f524 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WindowsFormsApp1.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WindowsFormsApp1.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Resources.resx b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Resources.resx new file mode 100644 index 00000000000..af7dbebbace --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Settings.Designer.cs b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Settings.Designer.cs new file mode 100644 index 00000000000..438df21381a --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WindowsFormsApp1.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Settings.settings b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Settings.settings new file mode 100644 index 00000000000..39645652af6 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/WindowsFormsApp1.csproj b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/WindowsFormsApp1.csproj new file mode 100644 index 00000000000..23c08ba5711 --- /dev/null +++ b/windowsforms/MSIX-WindowsForms/WindowsFormsApp1/WindowsFormsApp1.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {F9E02CDA-E0B5-4E43-82EF-64EF405CB213} + WinExe + WindowsFormsApp1 + WindowsFormsApp1 + v4.7.2 + 512 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + true + bin\x86\Debug\ + DEBUG;TRACE + full + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + bin\x86\Release\ + TRACE + true + pdbonly + x86 + prompt + MinimumRecommendedRules.ruleset + true + + + + + + + + + + + + + + + + + Form + + + Form1.cs + + + + + Form1.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + \ No newline at end of file diff --git a/wpf/WPF-WinRT/README.md b/wpf/WPF-WinRT/README.md new file mode 100644 index 00000000000..68b1384c3b1 --- /dev/null +++ b/wpf/WPF-WinRT/README.md @@ -0,0 +1,19 @@ +# WPF-WinRT + +This sample shows how to consume the Windows 10 API from .NET Core and .Net Framework projects. + +## Pre-requisites +To access Win10 APIs you need to have the Windows SDK installed. You can add it from the Visual Studio setup or download from [here](https://developer.microsoft.com/en-us/windows/downloads/windows-10-sdk) + +## Configure the reference in your project + +You can reference the winmd by using the `Add Reference` dialog or adding the following to your `.csproj` file: + +```xml + + + $(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd + False + + +``` diff --git a/wpf/WPF-WinRT/WPF-WinRT-Core/WPF-WinRT-Core.csproj b/wpf/WPF-WinRT/WPF-WinRT-Core/WPF-WinRT-Core.csproj new file mode 100644 index 00000000000..99d7308bc27 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-Core/WPF-WinRT-Core.csproj @@ -0,0 +1,31 @@ + + + + WinExe + netcoreapp3.0 + Company.ConsoleApplication1 + + + + + + + + + + + + + + + + + + + + $(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd + False + + + + \ No newline at end of file diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.config b/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.config new file mode 100644 index 00000000000..56efbc7b5f1 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.xaml b/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.xaml new file mode 100644 index 00000000000..83b72ede812 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.xaml @@ -0,0 +1,9 @@ + + + + + diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.xaml.cs b/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.xaml.cs new file mode 100644 index 00000000000..6a0a3936bf5 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/App.xaml.cs @@ -0,0 +1,17 @@ +using System; +using System.Collections.Generic; +using System.Configuration; +using System.Data; +using System.Linq; +using System.Threading.Tasks; +using System.Windows; + +namespace WPF_WinRT_NetFx +{ + /// + /// Interaction logic for App.xaml + /// + public partial class App : Application + { + } +} diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/MainWindow.xaml b/wpf/WPF-WinRT/WPF-WinRT-NetFx/MainWindow.xaml new file mode 100644 index 00000000000..8f0c64f7449 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/MainWindow.xaml @@ -0,0 +1,12 @@ + + + + diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/MainWindow.xaml.cs b/wpf/WPF-WinRT/WPF-WinRT-NetFx/MainWindow.xaml.cs new file mode 100644 index 00000000000..432ae715534 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/MainWindow.xaml.cs @@ -0,0 +1,34 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Navigation; +using System.Windows.Shapes; + +namespace WPF_WinRT_NetFx +{ + /// + /// Interaction logic for MainWindow.xaml + /// + public partial class MainWindow : Window + { + public MainWindow() + { + InitializeComponent(); + } + + private void Window_Loaded(object sender, RoutedEventArgs e) + { + label1.Content = new Windows.Devices.Input.TouchCapabilities().TouchPresent == 1 ? + "Touch Present" : "Touch not present"; + } + } +} diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/AssemblyInfo.cs b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/AssemblyInfo.cs new file mode 100644 index 00000000000..666693725ed --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/AssemblyInfo.cs @@ -0,0 +1,55 @@ +using System.Reflection; +using System.Resources; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("WPF-WinRT-NetFx")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("WPF-WinRT-NetFx")] +[assembly: AssemblyCopyright("Copyright © 2018")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +//In order to begin building localizable applications, set +//CultureYouAreCodingWith in your .csproj file +//inside a . For example, if you are using US english +//in your source files, set the to en-US. Then uncomment +//the NeutralResourceLanguage attribute below. Update the "en-US" in +//the line below to match the UICulture setting in the project file. + +//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)] + + +[assembly: ThemeInfo( + ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located + //(used if a resource is not found in the page, + // or application resource dictionaries) + ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located + //(used if a resource is not found in the page, + // app, or any theme specific resource dictionaries) +)] + + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Resources.Designer.cs b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Resources.Designer.cs new file mode 100644 index 00000000000..0c51869d102 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WPF_WinRT_NetFx.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WPF_WinRT_NetFx.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Resources.resx b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Resources.resx new file mode 100644 index 00000000000..af7dbebbace --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Settings.Designer.cs b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Settings.Designer.cs new file mode 100644 index 00000000000..abb652aece5 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace WPF_WinRT_NetFx.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Settings.settings b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Settings.settings new file mode 100644 index 00000000000..033d7a5e9e2 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/wpf/WPF-WinRT/WPF-WinRT-NetFx/WPF-WinRT-NetFx.csproj b/wpf/WPF-WinRT/WPF-WinRT-NetFx/WPF-WinRT-NetFx.csproj new file mode 100644 index 00000000000..71d8ff2d233 --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT-NetFx/WPF-WinRT-NetFx.csproj @@ -0,0 +1,103 @@ + + + + + Debug + AnyCPU + {63B3E06D-B97F-4CF9-957E-87139EB9319B} + WinExe + WPF_WinRT_NetFx + WPF-WinRT-NetFx + v4.7.2 + 512 + {60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} + 4 + true + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + 4.0 + + + $(MSBuildProgramFiles32)\Windows Kits\10\UnionMetadata\10.0.16299.0\Windows.winmd + False + + + + + + + + MSBuild:Compile + Designer + + + MSBuild:Compile + Designer + + + App.xaml + Code + + + MainWindow.xaml + Code + + + + + Code + + + True + True + Resources.resx + + + True + Settings.settings + True + + + ResXFileCodeGenerator + Resources.Designer.cs + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + + + + diff --git a/wpf/WPF-WinRT/WPF-WinRT.sln b/wpf/WPF-WinRT/WPF-WinRT.sln new file mode 100644 index 00000000000..dcb211b8a8d --- /dev/null +++ b/wpf/WPF-WinRT/WPF-WinRT.sln @@ -0,0 +1,36 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28010.2041 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WPF-WinRT-NetFx", "WPF-WinRT-NetFx\WPF-WinRT-NetFx.csproj", "{63B3E06D-B97F-4CF9-957E-87139EB9319B}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WPF-WinRT-Core", "WPF-WinRT-Core\WPF-WinRT-Core.csproj", "{F4EC2E20-5FFC-415F-B526-C82B2C6A2987}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{75431A46-7FAE-4B4E-A5B6-478EA70F0EC0}" + ProjectSection(SolutionItems) = preProject + README.md = README.md + EndProjectSection +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {63B3E06D-B97F-4CF9-957E-87139EB9319B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {63B3E06D-B97F-4CF9-957E-87139EB9319B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {63B3E06D-B97F-4CF9-957E-87139EB9319B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {63B3E06D-B97F-4CF9-957E-87139EB9319B}.Release|Any CPU.Build.0 = Release|Any CPU + {F4EC2E20-5FFC-415F-B526-C82B2C6A2987}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F4EC2E20-5FFC-415F-B526-C82B2C6A2987}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F4EC2E20-5FFC-415F-B526-C82B2C6A2987}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F4EC2E20-5FFC-415F-B526-C82B2C6A2987}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {83C579A4-14AB-48DA-AF25-911EFBBAC6BF} + EndGlobalSection +EndGlobal