将配置修改到web.config
This commit is contained in:
parent
62b04fbe57
commit
9cd65104b0
|
|
@ -0,0 +1,10 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<configuration>
|
||||||
|
<appSettings>
|
||||||
|
<add key="SDKAppID" value="1400463444"/>
|
||||||
|
<add key="SDKAppKEY" value="6ee2586282eb8ab5bff3f917b44500c4ffd9bbd3d820258b1fa8cdd470cfd1ee"/>
|
||||||
|
<add key="LIVEAppID" value="1252883401"/>
|
||||||
|
<add key="LIVEBizid" value="126866"/>
|
||||||
|
<add key="RoomId" value =""/>
|
||||||
|
</appSettings>
|
||||||
|
</configuration>
|
||||||
|
|
@ -13,5 +13,6 @@ namespace JianGongYun
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@
|
||||||
</Compile>
|
</Compile>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<None Update="App.config">
|
||||||
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
|
</None>
|
||||||
<None Update="logo.ico">
|
<None Update="logo.ico">
|
||||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||||
</None>
|
</None>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
using AduSkin.Controls.Metro;
|
using AduSkin.Controls.Metro;
|
||||||
using AduSkin.Themes;
|
using AduSkin.Themes;
|
||||||
|
using JianGongYun.TRTC;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
|
@ -32,7 +33,15 @@ namespace JianGongYun
|
||||||
BorderBrush = Theme.CurrentColor.OpaqueSolidColorBrush;
|
BorderBrush = Theme.CurrentColor.OpaqueSolidColorBrush;
|
||||||
};
|
};
|
||||||
BorderBrush = new SolidColorBrush(color: Color.FromRgb(42, 43, 48));
|
BorderBrush = new SolidColorBrush(color: Color.FromRgb(42, 43, 48));
|
||||||
|
this.Hide();
|
||||||
|
//LiveClassroom.EnterTheClassroom(Window.GetWindow(this),
|
||||||
|
// new TRTC.Models.ClassroomEntity
|
||||||
|
// {
|
||||||
|
// ClassHead = "课程1",
|
||||||
|
// ClassSubHead = "章节1",
|
||||||
|
// TeacherId = "53245345",
|
||||||
|
// TeacherName = "王大锤"
|
||||||
|
// });
|
||||||
|
|
||||||
//TRTC集成测试
|
//TRTC集成测试
|
||||||
//ManageLiteAV.ITRTCCloud lTRTCCloud = ManageLiteAV.ITRTCCloud.getTRTCShareInstance();
|
//ManageLiteAV.ITRTCCloud lTRTCCloud = ManageLiteAV.ITRTCCloud.getTRTCShareInstance();
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ using System.Drawing;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
using AduSkin.Controls.Metro;
|
using AduSkin.Controls.Metro;
|
||||||
|
using System.Configuration;
|
||||||
|
|
||||||
namespace JianGongYun.TRTC
|
namespace JianGongYun.TRTC
|
||||||
{
|
{
|
||||||
|
|
@ -28,10 +29,15 @@ namespace JianGongYun.TRTC
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class LiveClassroom
|
public static class LiveClassroom
|
||||||
{
|
{
|
||||||
const uint SDKAppID = 1400463444;
|
//const uint SDKAppID = 1400463444;
|
||||||
const string SDKAppKEY = "6ee2586282eb8ab5bff3f917b44500c4ffd9bbd3d820258b1fa8cdd470cfd1ee";
|
//const string SDKAppKEY = "6ee2586282eb8ab5bff3f917b44500c4ffd9bbd3d820258b1fa8cdd470cfd1ee";
|
||||||
const uint LIVEAppID = 1252883401;
|
//const uint LIVEAppID = 1252883401;
|
||||||
const uint LIVEBizid = 126866;
|
//const uint LIVEBizid = 126866;
|
||||||
|
static uint SDKAppID { get { return uint.Parse(ConfigurationManager.AppSettings[nameof(SDKAppID)]); } }
|
||||||
|
static string SDKAppKEY { get { return ConfigurationManager.AppSettings[nameof(SDKAppKEY)]; } }
|
||||||
|
static uint LIVEAppID { get { return uint.Parse(ConfigurationManager.AppSettings[nameof(LIVEAppID)]); } }
|
||||||
|
static uint LIVEBizid { get { return uint.Parse(ConfigurationManager.AppSettings[nameof(LIVEBizid)]); } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// TRTC实例
|
/// TRTC实例
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,9 @@
|
||||||
using JianGongYun.TRTC;
|
using AduSkin.Controls;
|
||||||
|
using AduSkin.Controls.Metro;
|
||||||
|
using JianGongYun.TRTC;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Configuration;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using System.Windows.Controls;
|
using System.Windows.Controls;
|
||||||
|
|
@ -25,12 +28,23 @@ namespace JianGongYun.Views
|
||||||
|
|
||||||
private void LiveTest_Click(object sender, RoutedEventArgs e)
|
private void LiveTest_Click(object sender, RoutedEventArgs e)
|
||||||
{
|
{
|
||||||
|
var roomId = ConfigurationManager.AppSettings["RoomId"];
|
||||||
|
if (string.IsNullOrWhiteSpace(roomId))
|
||||||
|
{
|
||||||
|
NoticeManager.NotifiactionShow.AddNotifiaction(new NotifiactionModel()
|
||||||
|
{
|
||||||
|
Title = "提醒",
|
||||||
|
Content = $"未配置房间号",
|
||||||
|
NotifiactionType= EnumPromptType.Error
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
LiveClassroom.EnterTheClassroom(Window.GetWindow(this),
|
LiveClassroom.EnterTheClassroom(Window.GetWindow(this),
|
||||||
new TRTC.Models.ClassroomEntity
|
new TRTC.Models.ClassroomEntity
|
||||||
{
|
{
|
||||||
ClassHead = "课程1",
|
ClassHead = "课程1",
|
||||||
ClassSubHead = "章节1",
|
ClassSubHead = "章节1",
|
||||||
TeacherId = "53245345",
|
TeacherId = roomId,
|
||||||
TeacherName = "王大锤"
|
TeacherName = "王大锤"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue