Added tabs to main window
This commit is contained in:
parent
4b6581fbd7
commit
bf3651300e
|
@ -5,22 +5,37 @@
|
|||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:CryptoCalc"
|
||||
mc:Ignorable="d"
|
||||
Title="MainWindow" Height="784" Width="800">
|
||||
<Grid>
|
||||
<Button x:Name="saveButton" Content="Save Random" HorizontalAlignment="Left" Margin="518,0,0,672" VerticalAlignment="Bottom" Height="30" Width="239" Click="saveButton_Click" FontSize="20"/>
|
||||
<Button x:Name="readButton" Content="PrintToConsole" HorizontalAlignment="Left" Margin="518,0,0,616" VerticalAlignment="Bottom" Height="40" Width="239" Click="readButton_click" FontSize="20"/>
|
||||
<Button x:Name="saveButton_fromInput" Content="Save Data" HorizontalAlignment="Left" Margin="518,0,0,24" VerticalAlignment="Bottom" Height="30" Width="239" Click="saveButtonFromInput_Click" FontSize="20"/>
|
||||
<Label x:Name="currencyLablel" Content="Currency" HorizontalAlignment="Left" Margin="27,16,0,0" VerticalAlignment="Top" Height="32"/>
|
||||
<ListBox x:Name="transactionsFoundListBox" Margin="27,66,337,24">
|
||||
</ListBox>
|
||||
<TextBox x:Name="currencyText" HorizontalAlignment="Left" Margin="89,21,0,0" Text="ETH" TextWrapping="Wrap" VerticalAlignment="Top" Width="75" Height="22"/>
|
||||
<Button x:Name="searchButton" Content="Search" HorizontalAlignment="Left" Margin="210,20,0,0" VerticalAlignment="Top" Click="searchButton_Click" Height="25"/>
|
||||
<TextBox x:Name="inputCurrency" HorizontalAlignment="Left" Margin="578,550,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Height="27" Text="BTC"/>
|
||||
<Label x:Name="label" Content="Currency" HorizontalAlignment="Left" Margin="504,550,0,0" VerticalAlignment="Top" Height="27" Width="69"/>
|
||||
<TextBox x:Name="inputAmount" HorizontalAlignment="Left" Margin="578,581,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Height="27" Text="1" LostFocus="inputAmount_LostFocus"/>
|
||||
<Label x:Name="label_Copy" Content="Amount" HorizontalAlignment="Left" Margin="504,581,0,0" VerticalAlignment="Top" Height="27" Width="69"/>
|
||||
<TextBox x:Name="inputType" HorizontalAlignment="Left" Margin="578,613,0,0" TextWrapping="Wrap" VerticalAlignment="Top" Width="120" Height="27" Text="DEPOSIT"/>
|
||||
<Label x:Name="label_Copy1" Content="Type" HorizontalAlignment="Left" Margin="504,613,0,0" VerticalAlignment="Top" Height="27" Width="69"/>
|
||||
|
||||
Title="MainWindow" Height="1000" Width="800">
|
||||
<Grid Margin="0,0,0,0">
|
||||
<TabControl x:Name="tabControl" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||
<TabItem Header="Debug">
|
||||
<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="saveWalletButton" Content="Save Random Wallet" Margin="0,120,37,0" Click="saveWalletButton_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="saveButton_fromInput" Content="Save Data" Margin="0,0,37,10" VerticalAlignment="Bottom" Height="39" Click="saveButtonFromInput_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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<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"/>
|
||||
<Button x:Name="searchButton" Content="Search" HorizontalAlignment="Left" Margin="169,20,0,0" VerticalAlignment="Top" Click="searchButton_Click" Height="25" Width="55"/>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="Overview">
|
||||
<Grid Background="#FFE5E5E5"/>
|
||||
</TabItem>
|
||||
<TabItem Header="Wallets">
|
||||
<Grid Background="#FFE5E5E5"/>
|
||||
</TabItem>
|
||||
<TabItem Header="Transactions">
|
||||
<Grid Background="#FFE5E5E5">
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabControl>
|
||||
</Grid>
|
||||
</Window>
|
||||
|
|
|
@ -18,8 +18,13 @@ namespace CryptoCalc
|
|||
|
||||
private void saveButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Transaction rd = DummyTransaction();
|
||||
DBInteraction.SaveData(ref rd);
|
||||
Transaction dummy = DummyTransaction();
|
||||
DBInteraction.SaveData(ref dummy);
|
||||
}
|
||||
private void saveWalletButton_Click(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Wallet dummy = DummyWallet();
|
||||
DBInteraction.SaveData(ref dummy);
|
||||
}
|
||||
|
||||
private void saveButtonFromInput_Click(object sender, RoutedEventArgs e)
|
||||
|
@ -58,9 +63,27 @@ namespace CryptoCalc
|
|||
return t;
|
||||
}
|
||||
|
||||
private Wallet DummyWallet()
|
||||
{
|
||||
Wallet w = new();
|
||||
w.SaveDateTime();
|
||||
w.CreationYear = 2017;
|
||||
w.CreationMonth = 08;
|
||||
w.CreationDay = 20;
|
||||
w.Platform = "Ledger";
|
||||
w.Name = "TestWalled";
|
||||
w.Currency = "SOL";
|
||||
w.Balance = Convert.ToSingle(30 * rand.NextDouble());
|
||||
w.DefaultWallet = 0;
|
||||
w.Note = "Test";
|
||||
return w;
|
||||
}
|
||||
|
||||
|
||||
private void inputAmount_LostFocus(object sender, RoutedEventArgs e)
|
||||
{
|
||||
inputAmount.Text = inputAmount.Text.Replace(".", ",");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue