private void LoginFree_Click(object sender, RoutedEventArgs e) { StreamingRoom streamingRoom = new StreamingRoom(); streamingRoom.SetOnlyMe(true); Hide(); streamingRoom.Show(); }
public void Restore_Tick(object sender, EventArgs e) { LogInContainer.IsEnabled = true; ProgressCircle.IsIndeterminate = false; StreamingRoom streamingRoom = new StreamingRoom(); MqttConnection.client.MqttMsgPublishReceived -= client_MqttMsgPublishReceived; Restore.Stop(); Hide(); streamingRoom.Show(); streamingRoom.ChatroomTxt.Text = NameGroup; streamingRoom.NickNameTxt.Text = MqttConnection.NickName; if (OnlyMe) { if (CreatorGroup == "") { streamingRoom.MessageAllertCardBox("Only you are online!", PackIconKind.User, "#FFFFFF", "#2E7D32"); } else { streamingRoom.MessageAllertCardBox("You joined the group: " + NameGroup + '\n' + "Created by: " + CreatorGroup + IsAdminTxt() + '\n' + "Only you are online", PackIconKind.UserGroup, "#212121", "#FFFFFF"); if (UrlStream != "") { streamingRoom.ChangeStreamingUrl(UrlStream, false); } } } else { int useronline = 0; string usersList = ""; for (int i = 0; i < 49; i++) { if (UserOnlineYet[i] != null) { usersList = usersList + UserOnlineYet[i] + ", "; streamingRoom.addUserOnline(UserOnlineYet[i]); streamingRoom.addVectOnlineUser(UserOnlineYet[i]); useronline++; } else { usersList = usersList.Substring(0, usersList.Length - 2); break; } } if (useronline > 1) { if (CreatorGroup == "") { streamingRoom.MessageAllertCardBox(usersList + " are online!", PackIconKind.UserGroup, "#FFFFFF", "#2E7D32"); } else { streamingRoom.MessageAllertCardBox("You joined the group: " + NameGroup + '\n' + "Created by: " + CreatorGroup + IsAdminTxt() + '\n' + "Online users: " + usersList, PackIconKind.UserGroup, "#212121", "#FFFFFF"); if (UrlStream != "") { streamingRoom.ChangeStreamingUrl(UrlStream, false); } } } else { if (CreatorGroup == "") { streamingRoom.MessageAllertCardBox(usersList + " is online!", PackIconKind.User, "#FFFFFF", "#2E7D32"); } else { streamingRoom.MessageAllertCardBox("You joined the group: " + NameGroup + '\n' + "Created by: " + CreatorGroup + IsAdminTxt() + '\n' + "Online user: "******"#212121", "#FFFFFF"); if (UrlStream != "") { streamingRoom.ChangeStreamingUrl(UrlStream, false); } } } } }