Fixed naming violation
This commit is contained in:
parent
eb7ef0821f
commit
0e218f3da5
|
@ -10,19 +10,19 @@
|
||||||
<TabControl x:Name="tabControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
<TabControl x:Name="tabControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<TabItem Header="Debug">
|
<TabItem Header="Debug">
|
||||||
<Grid Background="#FFE5E5E5" Width="Auto" Height="Auto">
|
<Grid Background="#FFE5E5E5" Width="Auto" Height="Auto">
|
||||||
<Button x:Name="saveButton" Content="Save Random" Margin="0,10,37,0" Click="saveButton_Click" FontSize="20" HorizontalAlignment="Right" Width="239" Height="38" VerticalAlignment="Top"/>
|
<Button x:Name="saveButton" Content="Save Random" Margin="0,10,37,0" Click="SaveRandomTransactionButton_Click" FontSize="20" HorizontalAlignment="Right" Width="239" Height="38" VerticalAlignment="Top"/>
|
||||||
<Button x:Name="readButton" Content="PrintToConsole" Margin="0,53,37,0" Click="readButton_click" FontSize="20" Height="36" VerticalAlignment="Top" HorizontalAlignment="Right" Width="239"/>
|
<Button x:Name="readButton" Content="PrintToConsole" Margin="0,53,37,0" Click="PrintToConsoleButton_click" FontSize="20" Height="36" VerticalAlignment="Top" HorizontalAlignment="Right" Width="239"/>
|
||||||
<Button x:Name="saveButton_fromInput" Content="Save Data" Margin="0,0,37,10" VerticalAlignment="Bottom" Height="39" Click="saveButtonFromInput_Click" FontSize="20" HorizontalAlignment="Right" Width="239"/>
|
<Button x:Name="saveButton_fromInput" Content="Save Data" Margin="0,0,37,10" VerticalAlignment="Bottom" Height="39" Click="SaveTransactionButton_Click" FontSize="20" HorizontalAlignment="Right" Width="239"/>
|
||||||
<TextBox x:Name="inputCurrency" Margin="0,0,60,125" TextWrapping="Wrap" Text="BTC" Height="27" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="120" LostFocus="inputCurrency_LostFocus"/>
|
<TextBox x:Name="inputCurrency" Margin="0,0,60,125" TextWrapping="Wrap" Text="BTC" Height="27" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="120" LostFocus="InputCurrency_LostFocus"/>
|
||||||
<Label x:Name="label" Content="Currency" HorizontalAlignment="Right" Margin="0,0,185,125" Width="69" Height="27" VerticalAlignment="Bottom"/>
|
<Label x:Name="label" Content="Currency" HorizontalAlignment="Right" Margin="0,0,185,125" Width="69" Height="27" VerticalAlignment="Bottom"/>
|
||||||
<TextBox x:Name="inputAmount" Margin="0,0,60,94" TextWrapping="Wrap" Text="1,3141592" LostFocus="inputAmount_LostFocus" Height="27" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="120"/>
|
<TextBox x:Name="inputAmount" Margin="0,0,60,94" TextWrapping="Wrap" Text="1,3141592" LostFocus="InputAmount_LostFocus" Height="27" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="120"/>
|
||||||
<Label x:Name="label_Copy" Content="Amount" HorizontalAlignment="Right" Margin="0,0,185,94" Width="69" Height="27" VerticalAlignment="Bottom"/>
|
<Label x:Name="label_Copy" Content="Amount" HorizontalAlignment="Right" Margin="0,0,185,94" Width="69" Height="27" VerticalAlignment="Bottom"/>
|
||||||
<TextBox x:Name="inputType" Margin="0,0,60,62" TextWrapping="Wrap" Text="BUY" Height="27" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="120"/>
|
<TextBox x:Name="inputType" Margin="0,0,60,62" TextWrapping="Wrap" Text="BUY" Height="27" VerticalAlignment="Bottom" HorizontalAlignment="Right" Width="120"/>
|
||||||
<Label x:Name="label_Copy1" Content="Type" HorizontalAlignment="Right" Margin="0,0,185,62" Width="69" Height="27" VerticalAlignment="Bottom"/>
|
<Label x:Name="label_Copy1" Content="Type" HorizontalAlignment="Right" Margin="0,0,185,62" Width="69" Height="27" VerticalAlignment="Bottom"/>
|
||||||
<Label x:Name="currencyLablel" Content="Currency" HorizontalAlignment="Left" Margin="27,16,0,0" VerticalAlignment="Top" Height="32"/>
|
<Label x:Name="currencyLablel" Content="Currency" HorizontalAlignment="Left" Margin="27,16,0,0" VerticalAlignment="Top" Height="32"/>
|
||||||
<ListBox x:Name="transactionsFoundListBox" Margin="27,66,331,10"/>
|
<ListBox x:Name="transactionsFoundListBox" Margin="27,66,331,10"/>
|
||||||
<TextBox x:Name="currencyText" HorizontalAlignment="Left" Margin="89,21,0,0" Text="SOL" TextWrapping="Wrap" VerticalAlignment="Top" Width="75" Height="22" LostFocus="currencyText_LostFocus"/>
|
<TextBox x:Name="currencyText" HorizontalAlignment="Left" Margin="89,21,0,0" Text="SOL" TextWrapping="Wrap" VerticalAlignment="Top" Width="75" Height="22" LostFocus="CurrencyText_LostFocus"/>
|
||||||
<Button x:Name="searchButton" Content="Search" HorizontalAlignment="Left" Margin="169,20,0,0" VerticalAlignment="Top" Click="searchButton_Click" Height="25" Width="55"/>
|
<Button x:Name="searchButton" Content="Search" HorizontalAlignment="Left" Margin="169,20,0,0" VerticalAlignment="Top" Click="ShowTransactionsOfCurrencyButton_Click" Height="25" Width="55"/>
|
||||||
<DatePicker x:Name="insertTransactionDatePicker" HorizontalAlignment="Right" Margin="0,0,60,157" VerticalAlignment="Bottom" Width="120" FirstDayOfWeek="Monday" SelectedDateFormat="Short"/>
|
<DatePicker x:Name="insertTransactionDatePicker" HorizontalAlignment="Right" Margin="0,0,60,157" VerticalAlignment="Bottom" Width="120" FirstDayOfWeek="Monday" SelectedDateFormat="Short"/>
|
||||||
</Grid>
|
</Grid>
|
||||||
</TabItem>
|
</TabItem>
|
||||||
|
@ -31,10 +31,10 @@
|
||||||
</TabItem>
|
</TabItem>
|
||||||
<TabItem Header="Wallets">
|
<TabItem Header="Wallets">
|
||||||
<Grid Background="#FFE5E5E5">
|
<Grid Background="#FFE5E5E5">
|
||||||
<ListBox x:Name="listBox_Wallets" Margin="0,278,37,258" SelectionChanged="listBox_Wallets_SelectionChanged" HorizontalAlignment="Right" Width="239"/>
|
<ListBox x:Name="listBox_Wallets" Margin="0,278,37,258" SelectionChanged="ListBox_Wallets_SelectionChanged" HorizontalAlignment="Right" Width="239"/>
|
||||||
<Button x:Name="show_Wallets" Content="Show Wallets" HorizontalAlignment="Right" Margin="0,240,37,0" VerticalAlignment="Top" Click="show_Wallets_Click" Width="239" Height="28"/>
|
<Button x:Name="show_Wallets" Content="Show Wallets" HorizontalAlignment="Right" Margin="0,240,37,0" VerticalAlignment="Top" Click="Show_Wallets_Click" Width="239" Height="28"/>
|
||||||
<Button x:Name="saveRandomWalletButton" Content="Save Random Wallet" Margin="0,38,37,0" Click="saveRandomWalletButton_Click" FontSize="20" HorizontalAlignment="Right" Width="239" Height="38" VerticalAlignment="Top"/>
|
<Button x:Name="saveRandomWalletButton" Content="Save Random Wallet" Margin="0,38,37,0" Click="SaveRandomWalletButton_Click" FontSize="20" HorizontalAlignment="Right" Width="239" Height="38" VerticalAlignment="Top"/>
|
||||||
<Button x:Name="saveWalletButton" Content="Save Wallet" Margin="45,125,0,0" Click="saveWalletButton_Click" FontSize="20" Height="38" VerticalAlignment="Top" HorizontalAlignment="Left" Width="239"/>
|
<Button x:Name="saveWalletButton" Content="Save Wallet" Margin="45,125,0,0" Click="SaveWalletButton_Click" FontSize="20" Height="38" VerticalAlignment="Top" HorizontalAlignment="Left" Width="239"/>
|
||||||
<TextBox x:Name="inputWalletName" HorizontalAlignment="Left" Margin="135,269,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="149" Height="31"/>
|
<TextBox x:Name="inputWalletName" HorizontalAlignment="Left" Margin="135,269,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="149" Height="31"/>
|
||||||
<Label x:Name="label1" Content="Name" HorizontalAlignment="Left" Height="31" Margin="34,269,0,0" VerticalAlignment="Top" Width="96"/>
|
<Label x:Name="label1" Content="Name" HorizontalAlignment="Left" Height="31" Margin="34,269,0,0" VerticalAlignment="Top" Width="96"/>
|
||||||
<TextBox x:Name="inputWalletPlatform" HorizontalAlignment="Left" Margin="135,235,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="149" Height="31" RenderTransformOrigin="0.354,-0.643"/>
|
<TextBox x:Name="inputWalletPlatform" HorizontalAlignment="Left" Margin="135,235,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="149" Height="31" RenderTransformOrigin="0.354,-0.643"/>
|
||||||
|
|
|
@ -33,17 +33,16 @@ namespace CryptoCalc
|
||||||
walletDB.ExecuteQuery(genericW, genericW.CreateTable());
|
walletDB.ExecuteQuery(genericW, genericW.CreateTable());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveButton_Click(object sender, RoutedEventArgs e)
|
private void SaveRandomTransactionButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
transactionDB.SaveData(DummyTransaction());
|
transactionDB.SaveData(DummyTransaction());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveRandomWalletButton_Click(object sender, RoutedEventArgs e)
|
private void SaveRandomWalletButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
walletDB.SaveData(DummyWallet());
|
walletDB.SaveData(DummyWallet());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveButtonFromInput_Click(object sender, RoutedEventArgs e)
|
|
||||||
private void SaveTransactionButton_Click(object sender, RoutedEventArgs e)
|
private void SaveTransactionButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
transactionDB.SaveData
|
transactionDB.SaveData
|
||||||
|
@ -58,7 +57,7 @@ namespace CryptoCalc
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void saveWalletButton_Click(object sender, RoutedEventArgs e)
|
private void SaveWalletButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
walletDB.SaveData(
|
walletDB.SaveData(
|
||||||
new Wallet(
|
new Wallet(
|
||||||
|
@ -71,16 +70,16 @@ namespace CryptoCalc
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void readButton_click(object sender, RoutedEventArgs e)
|
private void PrintToConsoleButton_click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
string query = $"select * from {genericT.DBTableName}";
|
string query = $"select * from {genericT.DBTableName}";
|
||||||
IEnumerable<Transaction> transactions = transactionDB.ReturnQuery(genericT, query);
|
IEnumerable<Transaction> transactions = transactionDB.ReturnQuery(genericT, query);
|
||||||
foreach (Transaction t in transactions)
|
foreach (Transaction t in transactions)
|
||||||
{
|
{
|
||||||
Debug.WriteLine($"{DBClasses.GetLocalTimeFromUnixTime(t.UnixTime)} *** {t.Currency} - {t.Amount}");
|
Debug.WriteLine($"{DBClasses.GetLocalTimeFromUnixTime(t.UnixTime)} *** {t.Currency} - {Util.CombineDecimal(t.Amount, t.AmountDecimal)}");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
private void searchButton_Click(object sender, RoutedEventArgs e)
|
private void ShowTransactionsOfCurrencyButton_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
string query = $"SELECT * from {genericT.DBTableName} WHERE {nameof(genericT.Currency)}=\'{currencyText.Text}\'";
|
string query = $"SELECT * from {genericT.DBTableName} WHERE {nameof(genericT.Currency)}=\'{currencyText.Text}\'";
|
||||||
IEnumerable<Transaction> transactions = transactionDB.ReturnQuery(genericT, query);
|
IEnumerable<Transaction> transactions = transactionDB.ReturnQuery(genericT, query);
|
||||||
|
@ -91,7 +90,7 @@ namespace CryptoCalc
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void show_Wallets_Click(object sender, RoutedEventArgs e)
|
private void Show_Wallets_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
selectedWallet = null;
|
selectedWallet = null;
|
||||||
walletList.Clear();
|
walletList.Clear();
|
||||||
|
@ -135,24 +134,24 @@ namespace CryptoCalc
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void inputAmount_LostFocus(object sender, RoutedEventArgs e)
|
private void InputAmount_LostFocus(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
//inputAmount.Text = inputAmount.Text.Replace(".", ",");
|
//inputAmount.Text = inputAmount.Text.Replace(".", ",");
|
||||||
inputAmount.Text = inputAmount.Text.Replace(",", ".");
|
inputAmount.Text = inputAmount.Text.Replace(",", ".");
|
||||||
}
|
}
|
||||||
|
|
||||||
private void currencyText_LostFocus(object sender, RoutedEventArgs e)
|
private void CurrencyText_LostFocus(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
currencyText.Text = currencyText.Text.ToUpper();
|
currencyText.Text = currencyText.Text.ToUpper();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void inputCurrency_LostFocus(object sender, RoutedEventArgs e)
|
private void InputCurrency_LostFocus(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
inputCurrency.Text = inputCurrency.Text.ToUpper();
|
inputCurrency.Text = inputCurrency.Text.ToUpper();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void listBox_Wallets_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
private void ListBox_Wallets_SelectionChanged(object sender, System.Windows.Controls.SelectionChangedEventArgs e)
|
||||||
{
|
{
|
||||||
if (listBox_Wallets.Items.Count > 0)
|
if (listBox_Wallets.Items.Count > 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue