Browse Source

Merge remote-tracking branch 'origin/zhangxueyang' into zyy

# Conflicts:
#	XHWK.WKTool/App.cs
tags/录制修改前
耀 4 years ago
parent
commit
c9bd7f37e4

+ 2
- 2
XHWK.Model/Properties/AssemblyInfo.cs View File

31
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
31
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
32
 //通过使用 "*",如下所示:
32
 //通过使用 "*",如下所示:
33
 // [assembly: AssemblyVersion("1.0.*")]
33
 // [assembly: AssemblyVersion("1.0.*")]
34
-[assembly: AssemblyVersion("1.0.9.0")]
35
-[assembly: AssemblyFileVersion("1.0.9.0")]
34
+[assembly: AssemblyVersion("1.1.1.0")]
35
+[assembly: AssemblyFileVersion("1.1.1.0")]

+ 5
- 5
XHWK.WKTool/App.config View File

20
     <!--记住密码-->
20
     <!--记住密码-->
21
     <add key="isRemind" value="" />
21
     <add key="isRemind" value="" />
22
     <!--API请求地址-->
22
     <!--API请求地址-->
23
-    <add key="APIRequestAddress" value="https://schoolapi.xhkjedu.com"/>
23
+    <add key="APIRequestAddress" value="http://schoolapi.xhkjedu.com"/>
24
     <!--文件平台请求地址-->
24
     <!--文件平台请求地址-->
25
-    <add key="FileRequestAddress" value="https://schoolfile.xhkjedu.com"/>
25
+    <add key="FileRequestAddress" value="http://schoolfile.xhkjedu.com"/>
26
     <!--展示文件服务器请求地址-->
26
     <!--展示文件服务器请求地址-->
27
-    <add key="SchoolfileRequestAddress" value="https://schoolfile.xhkjedu.com"/>
27
+    <add key="SchoolfileRequestAddress" value="http://schoolfile.xhkjedu.com"/>
28
     <!--认证请求地址-->
28
     <!--认证请求地址-->
29
     <add key="CertapiRequestAddress" value="http://certapi.xhkjedu.com"/>
29
     <add key="CertapiRequestAddress" value="http://certapi.xhkjedu.com"/>
30
     <!--摄像头位置 1.右上 2.左上 3.右下 4.左下-->
30
     <!--摄像头位置 1.右上 2.左上 3.右下 4.左下-->
32
     <!--上传每片大小 Mb-->
32
     <!--上传每片大小 Mb-->
33
     <add key="UploadSliceLen" value="1"/>
33
     <add key="UploadSliceLen" value="1"/>
34
     <!--版本号-->
34
     <!--版本号-->
35
-    <add key="VersionCode" value="10"/>
36
-    <add key="VersionName" value="1.0.9"/>
35
+    <add key="VersionCode" value="12"/>
36
+    <add key="VersionName" value="1.1.1"/>
37
   </appSettings>
37
   </appSettings>
38
 </configuration>
38
 </configuration>

+ 4
- 0
XHWK.WKTool/App.cs View File

40
         /// 认证接口地址
40
         /// 认证接口地址
41
         /// </summary>
41
         /// </summary>
42
         public static string certapiUrl = isDebug ? "http://certapitest.xhkjedu.com" : FileToolsCommon.GetConfigValue("CertapiRequestAddress");
42
         public static string certapiUrl = isDebug ? "http://certapitest.xhkjedu.com" : FileToolsCommon.GetConfigValue("CertapiRequestAddress");
43
+        /// <summary>
44
+        /// 数据存放目录
45
+        /// </summary>
46
+        public static string dataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\XHMicroLesson\\";
43
 
47
 
44
         /// <summary>
48
         /// <summary>
45
         /// 用户信息
49
         /// 用户信息

+ 16
- 0
XHWK.WKTool/DAL/DAL_Upload.cs View File

89
                     if (resultObj.code == 0 && resultObj.obj != null)
89
                     if (resultObj.code == 0 && resultObj.obj != null)
90
                     {
90
                     {
91
                         APP.ResourceAddTwo = resultObj.obj;
91
                         APP.ResourceAddTwo = resultObj.obj;
92
+                        foreach (Model_WKData Vdata in APP.WKDataList)
93
+                        {
94
+                            if (Vdata.VideoList == null)
95
+                            {
96
+                                continue;
97
+                            }
98
+
99
+                            foreach (Model_Video videoinfo in Vdata.VideoList)
100
+                            {
101
+                                if (videoinfo.FileGuid == FileCode)
102
+                                {
103
+                                    videoinfo.IsUpload = true;
104
+                                    break;
105
+                                }
106
+                            }
107
+                        }
92
                         return true;
108
                         return true;
93
                     }
109
                     }
94
                     else
110
                     else

+ 1
- 0
XHWK.WKTool/LoginWindow.xaml.cs View File

133
             }
133
             }
134
             else
134
             else
135
             {
135
             {
136
+                APP.IsLoginType = false;
136
                 APP.myloading.Hide();
137
                 APP.myloading.Hide();
137
                 MessageWindow.Show(APP.ServerMsg);
138
                 MessageWindow.Show(APP.ServerMsg);
138
             }
139
             }

+ 5
- 5
XHWK.WKTool/UploadWindow.xaml.cs View File

95
             if (code == 0)
95
             if (code == 0)
96
             {
96
             {
97
                 pageData.zhangjieList.Clear();
97
                 pageData.zhangjieList.Clear();
98
-                //pageData.zhangjieList.Add(new ComboBoxBean()
99
-                //{
100
-                //    Key = 999999,
101
-                //    Value = "全部"
102
-                //});
98
+                pageData.zhangjieList.Add(new ComboBoxBean()
99
+                {
100
+                    Key = 0,
101
+                    Value = "全部",
102
+                });
103
                 for (int i = 0; i < APP.DirectorList.Count; i++)
103
                 for (int i = 0; i < APP.DirectorList.Count; i++)
104
                 {
104
                 {
105
                     Model_DirectorList item = APP.DirectorList[i];
105
                     Model_DirectorList item = APP.DirectorList[i];

+ 51
- 28
XHWK.WKTool/XHMicroLessonSystemWindow.xaml View File

69
                                 Cursor="Hand"
69
                                 Cursor="Hand"
70
                         BorderThickness="0" Click="BtnModify_Click">
70
                         BorderThickness="0" Click="BtnModify_Click">
71
                             <Grid>
71
                             <Grid>
72
-                                <Image Source="./Images/fileDirectory3.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
73
-                                <Image Source="./Images/fileDirectory4.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
72
+                                <Image Source="./Images/fileDirectory3.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Visi}"/>
73
+                                <Image Source="./Images/fileDirectory4.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Coll}"/>
74
                             </Grid>
74
                             </Grid>
75
                         </Button>
75
                         </Button>
76
                     </StackPanel>
76
                     </StackPanel>
105
                                 Cursor="Hand"
105
                                 Cursor="Hand"
106
                         BorderThickness="0" Click="BtnPlay_Click">
106
                         BorderThickness="0" Click="BtnPlay_Click">
107
                             <Grid>
107
                             <Grid>
108
-                                <Image Source="./Images/fileDirectory1.png" Margin="10" Height="20" Visibility="{Binding vis}"/>
109
-                                <Image Source="./Images/fileDirectory2.png" Margin="10"  Height="20" Visibility="{Binding cos}"/>
108
+                                <Image Source="./Images/fileDirectory1.png" Margin="10" Height="20" Visibility="{Binding Visi}"/>
109
+                                <Image Source="./Images/fileDirectory2.png" Margin="10"  Height="20" Visibility="{Binding Coll}"/>
110
                             </Grid>
110
                             </Grid>
111
                         </Button>
111
                         </Button>
112
                         <Button x:Name="btnUpload" Background="Transparent"
112
                         <Button x:Name="btnUpload" Background="Transparent"
113
                                 Cursor="Hand"
113
                                 Cursor="Hand"
114
                         BorderThickness="0" Click="BtnUploads_Click">
114
                         BorderThickness="0" Click="BtnUploads_Click">
115
                             <Grid>
115
                             <Grid>
116
-                                <Image Source="./Images/fileDirectory7.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
117
-                                <Image Source="./Images/fileDirectory8.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
116
+                                <Image Source="./Images/fileDirectory7.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Visi}"/>
117
+                                <Image Source="./Images/fileDirectory8.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Coll}"/>
118
                             </Grid>
118
                             </Grid>
119
                         </Button>
119
                         </Button>
120
                         <Button x:Name="btnDelete" Background="Transparent"
120
                         <Button x:Name="btnDelete" Background="Transparent"
121
                                 Cursor="Hand"
121
                                 Cursor="Hand"
122
                         BorderThickness="0" Click="BtnDelete_Click">
122
                         BorderThickness="0" Click="BtnDelete_Click">
123
                             <Grid>
123
                             <Grid>
124
-                                <Image Source="./Images/fileDirectory5.png" Margin="6,6,6,6" Height="20" Visibility="{Binding vis}"/>
125
-                                <Image Source="./Images/fileDirectory6.png" Margin="6,6,6,6" Height="20" Visibility="{Binding cos}"/>
124
+                                <Image Source="./Images/fileDirectory5.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Visi}"/>
125
+                                <Image Source="./Images/fileDirectory6.png" Margin="6,6,6,6" Height="20" Visibility="{Binding Coll}"/>
126
                             </Grid>
126
                             </Grid>
127
                         </Button>
127
                         </Button>
128
                     </StackPanel>
128
                     </StackPanel>
139
         </RadialGradientBrush>
139
         </RadialGradientBrush>
140
     </Window.BorderBrush>
140
     </Window.BorderBrush>
141
 
141
 
142
-
143
-    <Grid x:Name="GridContent" Height="1030" Width="1276" >
144
-
142
+    <Viewbox>
143
+    <Grid x:Name="GridContent" Height="1030" Width="1276">
145
         <!--分3行-->
144
         <!--分3行-->
146
         <Grid.RowDefinitions>
145
         <Grid.RowDefinitions>
147
-            <RowDefinition Height="10*"/>
148
-            <RowDefinition Height="85*"/>
149
-            <RowDefinition Height="5*"/>
146
+            <RowDefinition Height="auto"/>
147
+            <RowDefinition Height="*"/>
148
+            <RowDefinition Height="auto"/>
150
         </Grid.RowDefinitions>
149
         </Grid.RowDefinitions>
151
         <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0" MinHeight="100px" MouseDown="Grid_MouseDown">
150
         <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0" MinHeight="100px" MouseDown="Grid_MouseDown">
152
             <Grid.RowDefinitions>
151
             <Grid.RowDefinitions>
371
                 <RowDefinition Height="70"/>
370
                 <RowDefinition Height="70"/>
372
                 <RowDefinition Height="70"/>
371
                 <RowDefinition Height="70"/>
373
                 <RowDefinition Height="70"/>
372
                 <RowDefinition Height="70"/>
373
+                <RowDefinition Height="70"/>
374
+                <RowDefinition Height="70"/>
375
+                <RowDefinition Height="70"/>
374
                 <RowDefinition Height="*"/>
376
                 <RowDefinition Height="*"/>
375
             </Grid.RowDefinitions>
377
             </Grid.RowDefinitions>
376
             <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
378
             <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
395
                 <RadioButton x:Name="rbnY" Cursor="Hand" Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
397
                 <RadioButton x:Name="rbnY" Cursor="Hand" Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
396
                 <RadioButton x:Name="rbnN" Cursor="Hand" Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
398
                 <RadioButton x:Name="rbnN" Cursor="Hand" Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
397
             </StackPanel>
399
             </StackPanel>
398
-            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,0,0,0">
399
-                <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Width="80"  Foreground="#2D8CF0" Padding="2,26,10,0"/>
400
-                <!--输入框-->
401
-                <Border Background="#CDD6E0" Width="525" Height="43" CornerRadius="3">
402
-                    <Label x:Name="txbStoragePath" Background="#FFFFFF" Content="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="523" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
400
+
401
+
402
+            <!--接口地址-->
403
+            <StackPanel Grid.Row="3" Orientation="Horizontal" Margin="30,0,0,0">
404
+                <TextBlock Text="接口地址" FontSize="16" Foreground="#2D8CF0" Width="80" Padding="0,25,0,0" Margin="10,0,0,0"/>
405
+                <TextBlock Text="http://" FontSize="16" Padding="0,25,5,0"/>
406
+                <TextBox x:Name="txbInterfaceAddress" FontSize="16" Width="467" Height="41"  VerticalContentAlignment="Center" Padding="5,0,0,0"/>
407
+            </StackPanel>
408
+            <!--上传地址-->
409
+            <StackPanel Grid.Row="4" Orientation="Horizontal" Margin="30,20,0,0">
410
+                <TextBlock Text="上传地址" FontSize="16" Foreground="#2D8CF0" Width="80" Padding="0,10,0,0" Margin="10,5,0,0"/>
411
+                <TextBlock Text="http://" FontSize="16" Padding="0,15,5,0"/>
412
+                <TextBox x:Name="txbImageUploadAddress" FontSize="16" Width="467" Height="41"  VerticalContentAlignment="Center" Padding="5,0,0,0"/>
413
+            </StackPanel>
414
+            <!--下载地址-->
415
+            <StackPanel Grid.Row="5" Orientation="Horizontal" Margin="30,20,0,0">
416
+                <TextBlock Text="下载地址" FontSize="16" Foreground="#2D8CF0" Width="80" Padding="0,15,0,0" Margin="10,0,0,0"/>
417
+                <TextBlock Text="http://" FontSize="16" Padding="0,15,5,0"/>
418
+                <TextBox x:Name="txbPictureShowsAddress" FontSize="16" Width="467" Height="41"  VerticalContentAlignment="Center" Padding="5,0,0,0"/>
419
+            </StackPanel>
420
+
421
+
422
+            <StackPanel Grid.Row="6" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,20,0,0">
423
+                <TextBlock x:Name="txbFilePath" Text="文件路径" FontSize="16" Width="80"  Foreground="#2D8CF0" Padding="10,18,10,0" />
424
+                <Border Background="#CDD6E0" Width="522" Height="43" CornerRadius="3" Margin="10,0,0,0">
425
+                    <Label x:Name="txbStoragePath" Background="#FFFFFF" Content="D:\" FontSize="16" Foreground="#333333" Padding="10,12,2,2" Width="520" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
403
                 </Border>
426
                 </Border>
404
                 <!--浏览按钮-->
427
                 <!--浏览按钮-->
405
                 <Button Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
428
                 <Button Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
419
                     </Button.Template>
442
                     </Button.Template>
420
                 </Button>
443
                 </Button>
421
             </StackPanel>
444
             </StackPanel>
422
-            <StackPanel Grid.Row="4" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
445
+            <StackPanel Grid.Row="7" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
423
                 <TextBlock Text="    版本号" FontSize="16" Width="80" Foreground="#2D8CF0"/>
446
                 <TextBlock Text="    版本号" FontSize="16" Width="80" Foreground="#2D8CF0"/>
424
                 <TextBlock x:Name="txbv" Text="V0.0.0" FontSize="16" Foreground="#333333" Padding="10,0,0,0"/>
447
                 <TextBlock x:Name="txbv" Text="V0.0.0" FontSize="16" Foreground="#333333" Padding="10,0,0,0"/>
425
             </StackPanel>
448
             </StackPanel>
426
-            <StackPanel Grid.Row="5" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
449
+            <StackPanel Grid.Row="8" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
427
                 <TextBlock Text="版权所有" FontSize="16" Width="80" Foreground="#2D8CF0"/>
450
                 <TextBlock Text="版权所有" FontSize="16" Width="80" Foreground="#2D8CF0"/>
428
                 <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
451
                 <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
429
             </StackPanel>
452
             </StackPanel>
430
             <!--第四行 开始按钮-->
453
             <!--第四行 开始按钮-->
431
-            <Button Cursor="Hand" Grid.Row="6" x:Name="btnSave" Content="保存" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="115" Height="45" Margin="10,0,10,0" Click="BtnSave_Click">
454
+            <Button Cursor="Hand" Grid.Row="9" x:Name="btnSave" Content="保存" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="115" Height="45" Margin="10,0,10,0" Click="BtnSave_Click">
432
                 <Button.Template>
455
                 <Button.Template>
433
                     <ControlTemplate TargetType="{x:Type Button}">
456
                     <ControlTemplate TargetType="{x:Type Button}">
434
                         <Border
457
                         <Border
553
                 <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
576
                 <Button Cursor="Hand" x:Name="btnWhite" Background="#FFFFFF" Width="20" Height="20" Click="BtnWhite_Click" Margin="0,2,0,0" Visibility="Collapsed"/>
554
 
577
 
555
 
578
 
556
-                <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,-15,0,0" Click="BtnRed_Click">
579
+                <Button Cursor="Hand" x:Name="btnRed" Background="#FF0000" Width="20" Height="20" Margin="5,2,0,0" Click="BtnRed_Click">
557
                     <Image x:Name="imgRed" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Visible"/>
580
                     <Image x:Name="imgRed" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Visible"/>
558
                 </Button>
581
                 </Button>
559
-                <Button Cursor="Hand" x:Name="btnGray" Background="#333333" Width="20" Height="20" Margin="5,-15,0,0" Click="BtnGray_Click">
582
+                <Button Cursor="Hand" x:Name="btnGray" Background="#333333" Width="20" Height="20" Margin="5,2,0,0" Click="BtnGray_Click">
560
                     <Image x:Name="imgGray" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
583
                     <Image x:Name="imgGray" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
561
                 </Button>
584
                 </Button>
562
-                <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,-15,0,0" Click="BtnCyanBlue_Click">
585
+                <Button Cursor="Hand" x:Name="btnCyanBlue" Background="#63D600" Width="20" Height="20" Margin="5,2,0,0" Click="BtnCyanBlue_Click">
563
                     <Image x:Name="imgCyanBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
586
                     <Image x:Name="imgCyanBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
564
                 </Button>
587
                 </Button>
565
-                <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,-15,0,0" Click="BtnYellow_Click">
588
+                <Button Cursor="Hand" x:Name="btnYellow" Background="#FFBC00" Width="20" Height="20" Margin="5,2,0,0" Click="BtnYellow_Click">
566
                     <Image x:Name="imgYellow" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
589
                     <Image x:Name="imgYellow" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
567
                 </Button>
590
                 </Button>
568
-                <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,-15,0,0" Click="BtnBlue_Click">
591
+                <Button Cursor="Hand" x:Name="btnBlue" Background="#00B4FC" Width="20" Height="20" Margin="5,2,0,0" Click="BtnBlue_Click">
569
                     <Image x:Name="imgBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
592
                     <Image x:Name="imgBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
570
                 </Button>
593
                 </Button>
571
                 <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,5,0,0"/>
594
                 <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,5,0,0"/>
585
         </Grid>
608
         </Grid>
586
 
609
 
587
     </Grid>
610
     </Grid>
588
-
611
+    </Viewbox>
589
 </Window>
612
 </Window>

+ 118
- 5
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs View File

13
 using System.Drawing.Imaging;
13
 using System.Drawing.Imaging;
14
 using System.IO;
14
 using System.IO;
15
 using System.Linq;
15
 using System.Linq;
16
+using System.Text;
16
 using System.Threading;
17
 using System.Threading;
17
 using System.Windows;
18
 using System.Windows;
18
 using System.Windows.Controls;
19
 using System.Windows.Controls;
120
             GridContent.Height = Height;
121
             GridContent.Height = Height;
121
 
122
 
122
 
123
 
123
-
124
+            #region 读取本地配置
125
+            if (File.Exists(APP.dataPath + "interfaceAddress.txt")) //若不为空
126
+            {
127
+                APP.apiUrl = System.IO.File.ReadAllText(APP.dataPath + "interfaceAddress.txt", Encoding.Default);
128
+            }
129
+            if (File.Exists(APP.dataPath + "imageUploadAddress.txt")) //若不为空
130
+            {
131
+                APP.uploadUrl = System.IO.File.ReadAllText(APP.dataPath + "imageUploadAddress.txt", Encoding.Default);
132
+            }
133
+            if (File.Exists(APP.dataPath + "pictureShowsAddress.txt")) //若不为空
134
+            {
135
+                APP.showImageUrl = System.IO.File.ReadAllText(APP.dataPath + "pictureShowsAddress.txt", Encoding.Default);
136
+            } 
137
+            #endregion
124
 
138
 
125
             //GridMain.Height= PrimaryScreen.ScaleScreenSize().Height - 40;
139
             //GridMain.Height= PrimaryScreen.ScaleScreenSize().Height - 40;
126
 
140
 
452
                 //ImgRecord.Visibility = Visibility.Collapsed;//设置时不可录制
466
                 //ImgRecord.Visibility = Visibility.Collapsed;//设置时不可录制
453
                 //ImgRecordTwo.Visibility = Visibility.Visible;//设置时不可录制
467
                 //ImgRecordTwo.Visibility = Visibility.Visible;//设置时不可录制
454
                 //BtnRecord.IsEnabled = false;//设置时不可录制
468
                 //BtnRecord.IsEnabled = false;//设置时不可录制
469
+
470
+
471
+
472
+                #region 读取用户配置
473
+                //接口地址
474
+                if (!File.Exists(APP.dataPath + "interfaceAddress.txt")) //若为空
475
+                {
476
+                    txbInterfaceAddress.Text = APP.apiUrl.Replace("http://", "").Trim();
477
+                }
478
+                else
479
+                {
480
+                    txbInterfaceAddress.Text = System.IO.File.ReadAllText(APP.dataPath + "interfaceAddress.txt", Encoding.Default).Replace("http://", "").Trim();
481
+                }
482
+                //上传地址
483
+                if (!File.Exists(APP.dataPath + "imageUploadAddress.txt")) //若为空
484
+                {
485
+                    txbImageUploadAddress.Text = APP.uploadUrl.Replace("http://", "").Replace("/", "").Trim();
486
+                }
487
+                else
488
+                {
489
+                    txbImageUploadAddress.Text = System.IO.File.ReadAllText(APP.dataPath + "imageUploadAddress.txt", Encoding.Default).Replace("http://", "").Replace("/", "").Trim();
490
+                }
491
+                //下载地址
492
+                if (!File.Exists(APP.dataPath + "pictureShowsAddress.txt")) //若为空
493
+                {
494
+                    txbPictureShowsAddress.Text = APP.showImageUrl.Replace("http://", "").Replace("/", "").Replace("static", "").Trim();
495
+                }
496
+                else
497
+                {
498
+                    txbPictureShowsAddress.Text = System.IO.File.ReadAllText(APP.dataPath + "pictureShowsAddress.txt", Encoding.Default).Replace("http://", "").Replace("/", "").Replace("static", "").Trim();
499
+                }
500
+           
501
+
455
                 ///  < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
502
                 ///  < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
456
                 if ("1".Equals(APP.CameraPosition))
503
                 if ("1".Equals(APP.CameraPosition))
457
                 {
504
                 {
491
                 {
538
                 {
492
                     rbnN.IsChecked = true;
539
                     rbnN.IsChecked = true;
493
                 }
540
                 }
541
+                #endregion
494
             }
542
             }
495
         }
543
         }
496
         /// <summary>
544
         /// <summary>
531
             ImgRecord.Visibility = Visibility.Visible;//设置结束时可录制
579
             ImgRecord.Visibility = Visibility.Visible;//设置结束时可录制
532
             ImgRecordTwo.Visibility = Visibility.Collapsed;//设置结束时可录制
580
             ImgRecordTwo.Visibility = Visibility.Collapsed;//设置结束时可录制
533
             BtnRecord.IsEnabled = true;//设置结束时可录制
581
             BtnRecord.IsEnabled = true;//设置结束时可录制
582
+
583
+            if (!string.IsNullOrWhiteSpace(txbInterfaceAddress.Text))
584
+            {
585
+                string ApplicationData = APP.dataPath + "interfaceAddress.txt";
586
+                string temp = "http://" + txbInterfaceAddress.Text;
587
+                System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
588
+            }
589
+            else
590
+            {
591
+                MessageWindow.Show("接口地址未输入");
592
+                return;
593
+            }
594
+            if (!string.IsNullOrWhiteSpace(txbImageUploadAddress.Text))//图片上传地址
595
+            {
596
+                string ApplicationData = APP.dataPath + "imageUploadAddress.txt";
597
+                string temp = "http://" + txbImageUploadAddress.Text + "/";
598
+                System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
599
+            }
600
+            else
601
+            {
602
+                MessageWindow.Show("上传地址未输入");
603
+                return;
604
+            }
605
+            if (!string.IsNullOrWhiteSpace(txbPictureShowsAddress.Text))
606
+            {
607
+                string ApplicationData = APP.dataPath + "pictureShowsAddress.txt";
608
+                string temp = "http://" + txbPictureShowsAddress.Text + "/static/";
609
+                System.IO.File.WriteAllText(ApplicationData, temp, Encoding.Default);
610
+            }
611
+            else
612
+            {
613
+                MessageWindow.Show("下载地址未输入");
614
+                return;
615
+            }
616
+            if (!APP.apiUrl.Equals(txbInterfaceAddress.Text))
617
+            {
618
+                APP.apiUrl = "http://" + txbInterfaceAddress.Text;
619
+                LoginType();
620
+            }
621
+            if (!APP.uploadUrl.Equals(txbImageUploadAddress.Text))
622
+            {
623
+                APP.uploadUrl = "http://" + txbImageUploadAddress.Text + "/";
624
+            }
625
+            if (!APP.showImageUrl.Equals(txbPictureShowsAddress.Text))
626
+            {
627
+                APP.showImageUrl = "http://" + txbPictureShowsAddress.Text + "/static/";
628
+            }
534
             if (rbnMP4.IsChecked == true)
629
             if (rbnMP4.IsChecked == true)
535
             {
630
             {
536
                 //存储文件
631
                 //存储文件
593
             {
688
             {
594
                 //存储文件
689
                 //存储文件
595
                 FileToolsCommon.SetConfigValue("VideoSavePath", txbStoragePath.Content.ToString());
690
                 FileToolsCommon.SetConfigValue("VideoSavePath", txbStoragePath.Content.ToString());
596
-                System.Windows.MessageBox.Show("路径已变更,下次创建微课时自动生效!!!");
691
+                MessageWindow.Show("路径已变更,下次创建微课时自动生效!!!");
597
             }
692
             }
598
         }
693
         }
599
         /// <summary>
694
         /// <summary>
1156
         public void InitializeUpload()
1251
         public void InitializeUpload()
1157
         {
1252
         {
1158
             APP.myloading.Show();
1253
             APP.myloading.Show();
1254
+
1159
             MouseNumber = 0;
1255
             MouseNumber = 0;
1160
             IsModify = false;
1256
             IsModify = false;
1161
             //加载视频列表
1257
             //加载视频列表
1197
                     vis = "Collapsed";
1293
                     vis = "Collapsed";
1198
                     cos = "Visible";
1294
                     cos = "Visible";
1199
                 }
1295
                 }
1296
+                //if(i==1)//ceshi
1297
+                //{
1298
+                //    vis = "Visible";
1299
+                //    cos = "Collapsed";
1300
+                //}
1200
                 if (i <= 16)
1301
                 if (i <= 16)
1201
                 {
1302
                 {
1202
                     pageData.menuList.Add(new FileDirectoryModel()
1303
                     pageData.menuList.Add(new FileDirectoryModel()
1321
 
1422
 
1322
                     if (dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid, out string ErrMessage))
1423
                     if (dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid, out string ErrMessage))
1323
                     {
1424
                     {
1324
-                        pageData.menuList[i].Visi = "Collapsed";
1325
-                        pageData.menuList[i].Coll = "Visible";
1425
+                        pageData.menuList[i].Visi = "Visible";
1426
+                        pageData.menuList[i].Coll = "Collapsed";
1326
 
1427
 
1327
                         DataContext = pageData;
1428
                         DataContext = pageData;
1328
-
1329
                         //MessageWindow.Show("视频上传服务器成功!");
1429
                         //MessageWindow.Show("视频上传服务器成功!");
1330
                         if (APP.W_UploadWindow == null)
1430
                         if (APP.W_UploadWindow == null)
1331
                         {
1431
                         {
1334
                                 Owner = this
1434
                                 Owner = this
1335
                             };
1435
                             };
1336
                         }
1436
                         }
1437
+                      
1337
                         //long size = Convert.ToInt64(FileToolsCommon.GetFileSizeByMB(pageData.menuList[i].FilePath));
1438
                         //long size = Convert.ToInt64(FileToolsCommon.GetFileSizeByMB(pageData.menuList[i].FilePath));
1338
                         APP.W_UploadWindow.Initialize(pageData.menuList[i].VideoName, pageData.menuList[i].VideoSizes, pageData.menuList[i].VideoType, pageData.menuList[i].FileGuid);
1439
                         APP.W_UploadWindow.Initialize(pageData.menuList[i].VideoName, pageData.menuList[i].VideoSizes, pageData.menuList[i].VideoType, pageData.menuList[i].FileGuid);
1339
                         APP.W_UploadWindow.ShowDialog();
1440
                         APP.W_UploadWindow.ShowDialog();
1441
+                    
1340
 
1442
 
1341
                     }
1443
                     }
1342
                     else
1444
                     else
2462
             }
2564
             }
2463
         }
2565
         }
2464
         /// <summary>
2566
         /// <summary>
2567
+        /// 状态更改为未登陆
2568
+        /// </summary>
2569
+        private void LoginType()
2570
+        {
2571
+            APP.IsLoginType = false;
2572
+            txbLoginType.Text = "未登录";
2573
+            APP.UserInfo = new Model_UserInfo();
2574
+            ImgUpload.Visibility = Visibility.Collapsed;
2575
+            ImgUploadTwo.Visibility = Visibility.Visible;
2576
+        }
2577
+        /// <summary>
2465
         /// 获取时间戳
2578
         /// 获取时间戳
2466
         /// </summary>
2579
         /// </summary>
2467
         /// <returns></returns>
2580
         /// <returns></returns>

Loading…
Cancel
Save