Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create WinForms app: uploads file to blob storage.
- Loading branch information
Pinary Development LLC
committed
Jan 16, 2020
1 parent
8bed94e
commit e024992
Showing
13 changed files
with
432 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
torahis.life |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
.vs/ | ||
bin/ | ||
obj/ | ||
|
||
*.user | ||
local.settings.json | ||
App.config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace Data | ||
{ | ||
public class AuthorMetadata | ||
{ | ||
public string Title { get; set; } | ||
public string FirstName { get; set; } | ||
public string LastName { get; set; } | ||
public ShiurMetadata[] Shiurim { get; set; } | ||
public string Fullname => $"{Title} {FirstName} {LastName}"; | ||
|
||
public AuthorMetadata(string title, string firstName, string lastName) | ||
{ | ||
Title = title; | ||
FirstName = firstName; | ||
LastName = lastName; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
|
||
<PropertyGroup> | ||
<TargetFramework>netstandard2.0</TargetFramework> | ||
</PropertyGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace Data | ||
{ | ||
public class MasechtaMetadata | ||
{ | ||
public string Seder { get; set; } | ||
public string Title { get; set; } | ||
public int DafimInMasechta { get; set; } | ||
|
||
public MasechtaMetadata(string seder, string title, int dafimInMasechta) | ||
{ | ||
Seder = seder; | ||
Title = title; | ||
DafimInMasechta = dafimInMasechta; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System; | ||
|
||
namespace Data | ||
{ | ||
public class ShiurMetadata | ||
{ | ||
public string Title { get; set; } | ||
public string Subtitle { get; set; } | ||
|
||
public ShiurMetadata(string[] groups, string title, string subtitle, string version) | ||
{ | ||
if (groups == null || groups.Length < 1) throw new ArgumentNullException(); | ||
|
||
Groups = groups; | ||
Title = title; | ||
Subtitle = subtitle; | ||
Version = version; | ||
} | ||
|
||
public string[] Groups { get; set; } | ||
public string Version { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
using System.Linq; | ||
|
||
namespace Data | ||
{ | ||
public static class StaticData | ||
{ | ||
public const string ShiurimContainerName = "shiurim"; | ||
public const string UploadedFileRootContainerPath = "src"; | ||
|
||
public static readonly MasechtaMetadata[] Masechtos = new[] | ||
{ | ||
new MasechtaMetadata("Zeraim", "Berachos", 63), | ||
new MasechtaMetadata("Zeraim", "Peah", 0), | ||
new MasechtaMetadata("Zeraim", "Demai", 0), | ||
new MasechtaMetadata("Zeraim", "Kilayim", 0), | ||
new MasechtaMetadata("Zeraim", "Sheviis", 0), | ||
new MasechtaMetadata("Zeraim", "Terumos", 0), | ||
new MasechtaMetadata("Zeraim", "Maaseros", 0), | ||
new MasechtaMetadata("Zeraim", "Maaser Sheni", 0), | ||
new MasechtaMetadata("Zeraim", "Challah", 0), | ||
new MasechtaMetadata("Zeraim", "Orlah", 0), | ||
new MasechtaMetadata("Zeraim", "Bikkurim", 0), | ||
|
||
new MasechtaMetadata("Moed", "Shabbos", 156), | ||
new MasechtaMetadata("Moed", "Eruvin", 103), | ||
new MasechtaMetadata("Moed", "Pesachim", 120), | ||
new MasechtaMetadata("Moed", "Shekalim", 20), | ||
new MasechtaMetadata("Moed", "Yomah", 87), | ||
new MasechtaMetadata("Moed", "Sukkah", 55), | ||
new MasechtaMetadata("Moed", "Beitzah", 39), | ||
new MasechtaMetadata("Moed", "Rosh Hashanah", 34), | ||
new MasechtaMetadata("Moed", "Taanis", 30), | ||
new MasechtaMetadata("Moed", "Megilah", 31), | ||
new MasechtaMetadata("Moed", "Moed Katan", 28), | ||
new MasechtaMetadata("Moed", "Chagigah", 26), | ||
|
||
new MasechtaMetadata("Nashim", "Yevamos", 121), | ||
new MasechtaMetadata("Nashim", "Kesuvos", 111), | ||
new MasechtaMetadata("Nashim", "Nedarim", 90), | ||
new MasechtaMetadata("Nashim", "Nazir", 65), | ||
new MasechtaMetadata("Nashim", "Sotah", 48), | ||
new MasechtaMetadata("Nashim", "Gittin", 89), | ||
new MasechtaMetadata("Nashim", "Kiddushin", 81), | ||
|
||
new MasechtaMetadata("Nezikin", "Bavah Kamah", 118), | ||
new MasechtaMetadata("Nezikin", "Bavah Meztiah", 118), | ||
new MasechtaMetadata("Nezikin", "Bavah Basrah", 175), | ||
new MasechtaMetadata("Nezikin", "Sanhedrin", 112), | ||
new MasechtaMetadata("Nezikin", "Makkos", 23), | ||
new MasechtaMetadata("Nezikin", "Shevuos", 48), | ||
new MasechtaMetadata("Nezikin", "Edios", 8), | ||
new MasechtaMetadata("Nezikin", "Avodah Zarah", 75), | ||
new MasechtaMetadata("Nezikin", "Avos", 0), | ||
new MasechtaMetadata("Nezikin", "Horios", 13), | ||
|
||
new MasechtaMetadata("Kedoshim", "Zevachim", 119), | ||
new MasechtaMetadata("Kedoshim", "Menachos", 109), | ||
new MasechtaMetadata("Kedoshim", "Chullin", 141), | ||
new MasechtaMetadata("Kedoshim", "Bechoros", 60), | ||
new MasechtaMetadata("Kedoshim", "Arachin", 33), | ||
new MasechtaMetadata("Kedoshim", "Temurah", 33), | ||
new MasechtaMetadata("Kedoshim", "Kerisos", 27), | ||
new MasechtaMetadata("Kedoshim", "Meilah", 21), | ||
new MasechtaMetadata("Kedoshim", "Tamid", 0), | ||
new MasechtaMetadata("Kedoshim", "Middos", 0), | ||
new MasechtaMetadata("Kedoshim", "Kinim", 0), | ||
|
||
new MasechtaMetadata("Tehoros", "Kailim", 0), | ||
new MasechtaMetadata("Tehoros", "Ohalos", 0), | ||
new MasechtaMetadata("Tehoros", "Negaim", 0), | ||
new MasechtaMetadata("Tehoros", "Parah", 0), | ||
new MasechtaMetadata("Tehoros", "Tehoros", 0), | ||
new MasechtaMetadata("Tehoros", "Mikvaos", 0), | ||
new MasechtaMetadata("Tehoros", "Niddah", 72), | ||
new MasechtaMetadata("Tehoros", "Machshirin", 0), | ||
new MasechtaMetadata("Tehoros", "Zavim", 0), | ||
new MasechtaMetadata("Tehoros", "Tevul Yom", 0), | ||
new MasechtaMetadata("Tehoros", "Yadim", 0), | ||
new MasechtaMetadata("Tehoros", "Uktzim", 0) | ||
}; | ||
|
||
public static MasechtaMetadata[] Gemaras => Masechtos.Where(m => m.DafimInMasechta > 0).ToArray(); | ||
|
||
public static AuthorMetadata[] Authors = new[] | ||
{ | ||
new AuthorMetadata("Rabbi", "Yosef", "Bromberg") | ||
{ | ||
Shiurim = Gemaras.SelectMany(g => Enumerable.Range(2, g.DafimInMasechta) | ||
.SelectMany(d => new[] | ||
{ | ||
new ShiurMetadata(new[] { "Daf Yomi", g.Title }, d.ToString(), null, "with Rashi"), | ||
new ShiurMetadata(new[] { "Daf Yomi", g.Title }, d.ToString(), null, "without Rashi") | ||
}) | ||
) | ||
.ToArray() | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop"> | ||
|
||
<PropertyGroup> | ||
<OutputType>WinExe</OutputType> | ||
<TargetFramework>netcoreapp3.1</TargetFramework> | ||
<UseWindowsForms>true</UseWindowsForms> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="WindowsAzure.Storage" Version="9.3.3" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\Data\Data.csproj" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace FileUploader | ||
{ | ||
static class Program | ||
{ | ||
/// <summary> | ||
/// The main entry point for the application. | ||
/// </summary> | ||
[STAThread] | ||
static void Main() | ||
{ | ||
Application.SetHighDpiMode(HighDpiMode.SystemAware); | ||
Application.EnableVisualStyles(); | ||
Application.SetCompatibleTextRenderingDefault(false); | ||
Application.Run(new UploaderForm()); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.