Skip to content

Commit

Permalink
Perfect settings and alignment for big screen
Browse files Browse the repository at this point in the history
  • Loading branch information
AccidentalCitizen committed May 5, 2024
1 parent a3eb78e commit 4995401
Show file tree
Hide file tree
Showing 8 changed files with 89 additions and 57 deletions.
7 changes: 7 additions & 0 deletions src/BasicTTS/BasicTTS.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DependentUpon>Resources.resx</DependentUpon>
<DesignTime>True</DesignTime>
</Compile>
<None Include="Properties\Settings.settings">
<Generator>SettingsSingleFileGenerator</Generator>
Expand All @@ -81,5 +82,11 @@
<ItemGroup>
<None Include="App.config" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\CartmanDefault.jpg" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\CartmanDefault1.jpg" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
32 changes: 13 additions & 19 deletions src/BasicTTS/Form1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 14 additions & 6 deletions src/BasicTTS/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ namespace BasicTTS
{
public partial class FormMain : Form
{
bool Play = true;
public FormMain()
{
InitializeComponent();
Expand All @@ -26,6 +27,9 @@ private void pictureBox_Click(object sender, EventArgs e)

private void FormMain_Load(object sender, EventArgs e)
{
//2711, 1647
this.Size = new System.Drawing.Size(811, 550);


}

Expand All @@ -34,14 +38,18 @@ private async void button1_Click(object sender, EventArgs e)
string textfilePath = @"C:\Users\Rajah\Documents\Test Data\TextScripts\input.txt";
//string text = File.ReadAllText(textfilePath);
var tasks = new List<Func<Task>>() {
()=> MoveHelpers.GenerateFacialExpressionsBasedOnText(this.pictureBox, this.pictBoxEyes)
};
()=> MoveHelpers.GenerateFacialExpressionsBasedOnText(this.pictureBox, this.pictBoxEyes)
};
if (Play)
{

var runningTasks = new List<Task>();

foreach(var taskFunc in tasks)
{
runningTasks.Add(taskFunc());
var runningTasks = new List<Task>();

foreach (var taskFunc in tasks)
{
runningTasks.Add(taskFunc());
}
}

//await Task.WhenAll(runningTasks);
Expand Down
3 changes: 2 additions & 1 deletion src/BasicTTS/MoveHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public static async Task GenerateFacialExpressionsBasedOnText( PictureBox pictur
// Iterate through each word
foreach (string word in words)
{
Console.WriteLine(word + " ");
// Iterate through each character in the word
foreach (char c in word)
{
Expand All @@ -37,7 +38,7 @@ public static async Task GenerateFacialExpressionsBasedOnText( PictureBox pictur
EyesBlink(pictureBoxApplicableEyes, c);
RandomlyMoveAngryEyes(pictureBoxApplicableEyes, c);
//character = c;

}
// Adjust the delay to simulate the speed of human speech for words
Thread.Sleep(6); // Adjust this delay to simulate human speaking speed for words
Expand Down
64 changes: 38 additions & 26 deletions src/BasicTTS/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 15 additions & 5 deletions src/BasicTTS/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Serialization.Formatters.Binary.BinaryFormatter
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
Expand All @@ -60,6 +60,7 @@
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
Expand All @@ -68,9 +69,10 @@
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" />
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
Expand All @@ -85,9 +87,10 @@
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
Expand All @@ -109,9 +112,16 @@
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="CartmanDefault" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CartmanDefault.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
<data name="CartmanDefault1" type="System.Resources.ResXFileRef, System.Windows.Forms">
<value>..\Resources\CartmanDefault1.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
</data>
</root>
Binary file added src/BasicTTS/Resources/CartmanDefault.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/BasicTTS/Resources/CartmanDefault1.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4995401

Please sign in to comment.