Przeglądaj źródła

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

# Conflicts:
#	XHWK.WKTool/App.cs
tags/录制修改前
耀 4 lat temu
rodzic
commit
c9bd7f37e4

+ 2
- 2
XHWK.Model/Properties/AssemblyInfo.cs Wyświetl plik

@@ -31,5 +31,5 @@ using System.Runtime.InteropServices;
31 31
 //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值
32 32
 //通过使用 "*",如下所示:
33 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 Wyświetl plik

@@ -20,11 +20,11 @@
20 20
     <!--记住密码-->
21 21
     <add key="isRemind" value="" />
22 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 29
     <add key="CertapiRequestAddress" value="http://certapi.xhkjedu.com"/>
30 30
     <!--摄像头位置 1.右上 2.左上 3.右下 4.左下-->
@@ -32,7 +32,7 @@
32 32
     <!--上传每片大小 Mb-->
33 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 37
   </appSettings>
38 38
 </configuration>

+ 4
- 0
XHWK.WKTool/App.cs Wyświetl plik

@@ -40,6 +40,10 @@ namespace XHWK.WKTool
40 40
         /// 认证接口地址
41 41
         /// </summary>
42 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 48
         /// <summary>
45 49
         /// 用户信息

+ 16
- 0
XHWK.WKTool/DAL/DAL_Upload.cs Wyświetl plik

@@ -89,6 +89,22 @@ namespace XHWK.WKTool.DAL
89 89
                     if (resultObj.code == 0 && resultObj.obj != null)
90 90
                     {
91 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 108
                         return true;
93 109
                     }
94 110
                     else

+ 1
- 0
XHWK.WKTool/LoginWindow.xaml.cs Wyświetl plik

@@ -133,6 +133,7 @@ namespace XHWK.WKTool
133 133
             }
134 134
             else
135 135
             {
136
+                APP.IsLoginType = false;
136 137
                 APP.myloading.Hide();
137 138
                 MessageWindow.Show(APP.ServerMsg);
138 139
             }

+ 5
- 5
XHWK.WKTool/UploadWindow.xaml.cs Wyświetl plik

@@ -95,11 +95,11 @@ namespace XHWK.WKTool
95 95
             if (code == 0)
96 96
             {
97 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 103
                 for (int i = 0; i < APP.DirectorList.Count; i++)
104 104
                 {
105 105
                     Model_DirectorList item = APP.DirectorList[i];

+ 51
- 28
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Wyświetl plik

@@ -69,8 +69,8 @@
69 69
                                 Cursor="Hand"
70 70
                         BorderThickness="0" Click="BtnModify_Click">
71 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 74
                             </Grid>
75 75
                         </Button>
76 76
                     </StackPanel>
@@ -105,24 +105,24 @@
105 105
                                 Cursor="Hand"
106 106
                         BorderThickness="0" Click="BtnPlay_Click">
107 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 110
                             </Grid>
111 111
                         </Button>
112 112
                         <Button x:Name="btnUpload" Background="Transparent"
113 113
                                 Cursor="Hand"
114 114
                         BorderThickness="0" Click="BtnUploads_Click">
115 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 118
                             </Grid>
119 119
                         </Button>
120 120
                         <Button x:Name="btnDelete" Background="Transparent"
121 121
                                 Cursor="Hand"
122 122
                         BorderThickness="0" Click="BtnDelete_Click">
123 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 126
                             </Grid>
127 127
                         </Button>
128 128
                     </StackPanel>
@@ -139,14 +139,13 @@
139 139
         </RadialGradientBrush>
140 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 144
         <!--分3行-->
146 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 149
         </Grid.RowDefinitions>
151 150
         <Grid Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Margin="0,0,0,0" MinHeight="100px" MouseDown="Grid_MouseDown">
152 151
             <Grid.RowDefinitions>
@@ -371,6 +370,9 @@
371 370
                 <RowDefinition Height="70"/>
372 371
                 <RowDefinition Height="70"/>
373 372
                 <RowDefinition Height="70"/>
373
+                <RowDefinition Height="70"/>
374
+                <RowDefinition Height="70"/>
375
+                <RowDefinition Height="70"/>
374 376
                 <RowDefinition Height="*"/>
375 377
             </Grid.RowDefinitions>
376 378
             <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Left" Margin="30,30,0,0">
@@ -395,11 +397,32 @@
395 397
                 <RadioButton x:Name="rbnY" Cursor="Hand" Content="有" FontSize="14" Foreground="#333333" Margin="10,2,0,0" IsChecked="True"/>
396 398
                 <RadioButton x:Name="rbnN" Cursor="Hand" Content="无" FontSize="14" Foreground="#333333" Margin="20,2,0,0"/>
397 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 426
                 </Border>
404 427
                 <!--浏览按钮-->
405 428
                 <Button Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
@@ -419,16 +442,16 @@
419 442
                     </Button.Template>
420 443
                 </Button>
421 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 446
                 <TextBlock Text="    版本号" FontSize="16" Width="80" Foreground="#2D8CF0"/>
424 447
                 <TextBlock x:Name="txbv" Text="V0.0.0" FontSize="16" Foreground="#333333" Padding="10,0,0,0"/>
425 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 450
                 <TextBlock Text="版权所有" FontSize="16" Width="80" Foreground="#2D8CF0"/>
428 451
                 <TextBlock Text="河南星火燎原软件科技有限公司" FontSize="14" Foreground="#333333" Padding="10,0,0,0"/>
429 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 455
                 <Button.Template>
433 456
                     <ControlTemplate TargetType="{x:Type Button}">
434 457
                         <Border
@@ -553,19 +576,19 @@
553 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 580
                     <Image x:Name="imgRed" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Visible"/>
558 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 583
                     <Image x:Name="imgGray" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
561 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 586
                     <Image x:Name="imgCyanBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
564 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 589
                     <Image x:Name="imgYellow" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
567 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 592
                     <Image x:Name="imgBlue" Source=".\Images\microLessonSystem_999.png" Width="12" Visibility="Collapsed"/>
570 593
                 </Button>
571 594
                 <TextBlock Text="粗细:" FontSize="14" Padding="15,5,0,0" Margin="5,5,0,0"/>
@@ -585,5 +608,5 @@
585 608
         </Grid>
586 609
 
587 610
     </Grid>
588
-
611
+    </Viewbox>
589 612
 </Window>

+ 118
- 5
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Wyświetl plik

@@ -13,6 +13,7 @@ using System.Drawing;
13 13
 using System.Drawing.Imaging;
14 14
 using System.IO;
15 15
 using System.Linq;
16
+using System.Text;
16 17
 using System.Threading;
17 18
 using System.Windows;
18 19
 using System.Windows.Controls;
@@ -120,7 +121,20 @@ namespace XHWK.WKTool
120 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 139
             //GridMain.Height= PrimaryScreen.ScaleScreenSize().Height - 40;
126 140
 
@@ -452,6 +466,39 @@ namespace XHWK.WKTool
452 466
                 //ImgRecord.Visibility = Visibility.Collapsed;//设置时不可录制
453 467
                 //ImgRecordTwo.Visibility = Visibility.Visible;//设置时不可录制
454 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 502
                 ///  < !--摄像头位置 1.右上 2.左上 3.右下 4.左下-- >
456 503
                 if ("1".Equals(APP.CameraPosition))
457 504
                 {
@@ -491,6 +538,7 @@ namespace XHWK.WKTool
491 538
                 {
492 539
                     rbnN.IsChecked = true;
493 540
                 }
541
+                #endregion
494 542
             }
495 543
         }
496 544
         /// <summary>
@@ -531,6 +579,53 @@ namespace XHWK.WKTool
531 579
             ImgRecord.Visibility = Visibility.Visible;//设置结束时可录制
532 580
             ImgRecordTwo.Visibility = Visibility.Collapsed;//设置结束时可录制
533 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 629
             if (rbnMP4.IsChecked == true)
535 630
             {
536 631
                 //存储文件
@@ -593,7 +688,7 @@ namespace XHWK.WKTool
593 688
             {
594 689
                 //存储文件
595 690
                 FileToolsCommon.SetConfigValue("VideoSavePath", txbStoragePath.Content.ToString());
596
-                System.Windows.MessageBox.Show("路径已变更,下次创建微课时自动生效!!!");
691
+                MessageWindow.Show("路径已变更,下次创建微课时自动生效!!!");
597 692
             }
598 693
         }
599 694
         /// <summary>
@@ -1156,6 +1251,7 @@ namespace XHWK.WKTool
1156 1251
         public void InitializeUpload()
1157 1252
         {
1158 1253
             APP.myloading.Show();
1254
+
1159 1255
             MouseNumber = 0;
1160 1256
             IsModify = false;
1161 1257
             //加载视频列表
@@ -1197,6 +1293,11 @@ namespace XHWK.WKTool
1197 1293
                     vis = "Collapsed";
1198 1294
                     cos = "Visible";
1199 1295
                 }
1296
+                //if(i==1)//ceshi
1297
+                //{
1298
+                //    vis = "Visible";
1299
+                //    cos = "Collapsed";
1300
+                //}
1200 1301
                 if (i <= 16)
1201 1302
                 {
1202 1303
                     pageData.menuList.Add(new FileDirectoryModel()
@@ -1321,11 +1422,10 @@ namespace XHWK.WKTool
1321 1422
 
1322 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 1428
                         DataContext = pageData;
1328
-
1329 1429
                         //MessageWindow.Show("视频上传服务器成功!");
1330 1430
                         if (APP.W_UploadWindow == null)
1331 1431
                         {
@@ -1334,9 +1434,11 @@ namespace XHWK.WKTool
1334 1434
                                 Owner = this
1335 1435
                             };
1336 1436
                         }
1437
+                      
1337 1438
                         //long size = Convert.ToInt64(FileToolsCommon.GetFileSizeByMB(pageData.menuList[i].FilePath));
1338 1439
                         APP.W_UploadWindow.Initialize(pageData.menuList[i].VideoName, pageData.menuList[i].VideoSizes, pageData.menuList[i].VideoType, pageData.menuList[i].FileGuid);
1339 1440
                         APP.W_UploadWindow.ShowDialog();
1441
+                    
1340 1442
 
1341 1443
                     }
1342 1444
                     else
@@ -2462,6 +2564,17 @@ namespace XHWK.WKTool
2462 2564
             }
2463 2565
         }
2464 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 2579
         /// </summary>
2467 2580
         /// <returns></returns>

Ładowanie…
Anuluj
Zapisz