Skip to content

Commit

Permalink
Merge pull request #12 from rbonini/feature/addnologinability
Browse files Browse the repository at this point in the history
Add ability to skip login
  • Loading branch information
rbonini authored Nov 11, 2020
2 parents 7a9603d + a02be8a commit 73ac3dc
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Login.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:RaiseHandApp"
mc:Ignorable="d"
Title="Login" Height="197.902" Width="571.746"
Title="Login" Height="184.705" Width="571.746"
Closing="Wnd_Closing">
<Grid Margin="0,0,0,5">
<Label x:Name="Username" Content="Username" HorizontalAlignment="Left" Margin="78,23,0,0" VerticalAlignment="Top" Width="78"/>
<TextBox x:Name="textBox_username" Height="25" Margin="180,23,85,0" TextWrapping="Wrap" VerticalAlignment="Top"/>
<Button x:Name="button_auth" Content="Login" HorizontalAlignment="Left" Height="36" Margin="397,83,0,0" VerticalAlignment="Top" Width="148" Click="button_auth_Click"/>
<Label x:Name="password" Content="Password" HorizontalAlignment="Left" Margin="78,53,0,0" VerticalAlignment="Top" Width="78"/>
<PasswordBox x:Name="textBox_Password" Height="25" Margin="180,53,85,0" VerticalAlignment="Top" />
<Label x:Name="feedback" Margin="0,124,0,0" Height="28" VerticalAlignment="Top"></Label>
<Label x:Name="feedback" Margin="10,132,0,0" HorizontalAlignment="Left" Width="544" Height="17" VerticalAlignment="Top"/>
<Button x:Name="but_nologin" Content="I Don't Have a Login" HorizontalAlignment="Left" Margin="214,91,0,0" VerticalAlignment="Top" Width="122" Background="{x:Null}" BorderBrush="{x:Null}" Foreground="#FF0224FD" Click="but_nologin_Click"/>
</Grid>
</Window>
7 changes: 7 additions & 0 deletions Login.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,5 +91,12 @@ void Wnd_Closing(object sender, CancelEventArgs e)
{
Application.Current.Shutdown();
}

private void but_nologin_Click(object sender, RoutedEventArgs e)
{
start_meeting_wnd.setNoLogin();
start_meeting_wnd.Show();
Hide();
}
}
}
19 changes: 18 additions & 1 deletion joinmeeting.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ namespace RaiseHandApp
/// </summary>
public partial class joinmeeting : Window
{
bool nologin = false;
uint userid;
string userName;
int count = 0;
Expand Down Expand Up @@ -53,6 +54,12 @@ public joinmeeting()
feedback.Content = "Settings Loaded";
}

public void setNoLogin()
{
nologin = true;
this.button_start_api.IsEnabled = false;
}

private void Control_RemoveClicked(object sender, ParticpantEventArgs e)
{
var item = this.settings.Participants.First(g => g.Name == e.Name);
Expand Down Expand Up @@ -92,7 +99,7 @@ public void onMeetingStatusChanged(MeetingStatus status, int iResult)

var name = user.GetUserNameW();

if (name == userName && raisescreen == null)
if (user.IsMySelf() && raisescreen == null)
{
userid = user.GetUserID();

Expand Down Expand Up @@ -255,6 +262,16 @@ private void RegisterCallBack()

private void button_join_api_Click(object sender, RoutedEventArgs e)
{

if (textBox_DisplayName.Text.Length == 0)
{
MessageBox.Show("Please fill in a display name",
"Error",
MessageBoxButton.OK,
MessageBoxImage.Warning);
return;
}

RegisterCallBack();
ZOOM_SDK_DOTNET_WRAP.JoinParam param = new ZOOM_SDK_DOTNET_WRAP.JoinParam();
param.userType = SDKUserType.SDK_UT_NORMALUSER;
Expand Down

0 comments on commit 73ac3dc

Please sign in to comment.