Pārlūkot izejas kodu

zhao:解决冲突

tags/录制修改前
耀 pirms 4 gadiem
vecāks
revīzija
be190de5e9

+ 33
- 0
Common/system/HttpHelper.cs Parādīt failu

@@ -143,6 +143,39 @@ namespace Common.system
143 143
             }
144 144
             return null;
145 145
         }
146
+
147
+        /// <summary>
148
+        ///调用Post接口
149
+        /// </summary>
150
+        /// <param name="request"></param>
151
+        /// <returns></returns>
152
+        public static string HttpPost(string body, string Url)
153
+        {
154
+            try
155
+            {
156
+                Encoding encoding = Encoding.UTF8;
157
+
158
+                HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url);
159
+                request.Method = "POST";
160
+                request.Accept = "text/html,application/xhtml+xml,*/*";
161
+                request.ContentType = "application/json";
162
+
163
+                byte[] buffer = encoding.GetBytes(body);
164
+                request.ContentLength = buffer.Length;
165
+                request.GetRequestStream().Write(buffer, 0, buffer.Length);
166
+
167
+                HttpWebResponse response = (HttpWebResponse)request.GetResponse();
168
+                using (StreamReader reader = new StreamReader(response.GetResponseStream(), Encoding.UTF8))
169
+                {
170
+                    return reader.ReadToEnd();
171
+                }
172
+            }
173
+            catch (Exception ex)
174
+            {
175
+                // LogHelper.Instance.Debug($"POST接口连接失败,请求参数:{ex.Message}");
176
+                return "POST报错:" + ex.Message;
177
+            }
178
+        }
146 179
         /// <summary>
147 180
         /// Post Http请求
148 181
         /// </summary>

+ 14
- 0
XHWK.Model/ComboBoxBean.cs Parādīt failu

@@ -0,0 +1,14 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace XHWK.Model
8
+{
9
+    public class ComboBoxBean
10
+    {
11
+        public int Key { get; set; }
12
+        public string Value { get; set; }
13
+    }
14
+}

+ 111
- 0
XHWK.Model/Model_DirectorList.cs Parādīt failu

@@ -0,0 +1,111 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace XHWK.Model
8
+{
9
+    public class Model_DirectorList
10
+    {
11
+        /// <summary>
12
+        /// id
13
+        /// </summary>
14
+        public int? id { get; set; }
15
+
16
+        /// <summary>
17
+        /// 创建人姓名
18
+        /// </summary>
19
+        public string createname { get; set; }
20
+
21
+        /// <summary>
22
+        /// id
23
+        /// </summary>
24
+        public int? page { get; set; }
25
+
26
+        /// <summary>
27
+        /// id
28
+        /// </summary>
29
+        public int? pageSize { get; set; }
30
+
31
+        /// <summary>
32
+        /// 章节id
33
+        /// </summary>
34
+        public int directorid { get; set; }
35
+
36
+        /// <summary>
37
+        /// 章节名称
38
+        /// </summary>
39
+        public string directorname { get; set; }
40
+
41
+        /// <summary>
42
+        /// 所属章节
43
+        /// </summary>
44
+        public int? directorpid { get; set; }
45
+
46
+        /// <summary>
47
+        /// 章节排序
48
+        /// </summary>
49
+        public int directororder { get; set; }
50
+
51
+        /// <summary>
52
+        /// 是否是叶子节点
53
+        /// </summary>
54
+        public int? leaf { get; set; }
55
+
56
+        /// <summary>
57
+        /// 教材id
58
+        /// </summary>
59
+        public int? lsbid { get; set; }
60
+
61
+        /// <summary>
62
+        /// 章节列表
63
+        /// </summary>
64
+        public int? directortype { get; set; }
65
+
66
+        /// <summary>
67
+        /// 创建人
68
+        /// </summary>
69
+        public int? createid { get; set; }
70
+
71
+        /// <summary>
72
+        /// 创建时间
73
+        /// </summary>
74
+        public int? createtime { get; set; }
75
+
76
+        /// <summary>
77
+        /// 学校id
78
+        /// </summary>
79
+        public int? schoolid { get; set; }
80
+
81
+        /// <summary>
82
+        /// 子章节
83
+        /// </summary>
84
+        public List<Model_DirectorList> children { get; set; }
85
+
86
+        /// <summary>
87
+        /// 章节归属级别
88
+        /// </summary>
89
+        public int? asknum { get; set; }
90
+
91
+        /// <summary>
92
+        /// 章节归属级别
93
+        /// </summary>
94
+        public int? correctRate { get; set; }
95
+
96
+        /// <summary>
97
+        /// 章节归属级别
98
+        /// </summary>
99
+        public int? selected { get; set; }
100
+
101
+        /// <summary>
102
+        /// 章节归属级别
103
+        /// </summary>
104
+        public int directorlevel { get; set; }
105
+
106
+        public override string ToString()
107
+        {
108
+            return $"{nameof(id)}: {id}, {nameof(createname)}: {createname}, {nameof(page)}: {page}, {nameof(pageSize)}: {pageSize},{nameof(directorid)}: {directorid}, {nameof(directorname)}: {directorname}, {nameof(directorpid)}: {directorpid}, {nameof(directororder)}: {directororder}, {nameof(leaf)}: {leaf}, {nameof(lsbid)}: {lsbid}, {nameof(directortype)}: {directortype}, {nameof(directorlevel)}: {directorlevel}, {nameof(createid)}: {createid}, {nameof(createtime)}: {createtime}, {nameof(schoolid)}: {schoolid}, {nameof(children)}: {children}, {nameof(asknum)}: {asknum}, {nameof(correctRate)}: {correctRate}, {nameof(selected)}: {selected}";
109
+        }
110
+    }
111
+}

+ 102
- 0
XHWK.Model/Model_ResourceAdd.cs Parādīt failu

@@ -0,0 +1,102 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace XHWK.Model
8
+{
9
+    public class Model_ResourceAdd
10
+    {
11
+        //        converted: 0
12
+        //createid: 80
13
+        //directorid: 1009
14
+        //duration: 39
15
+        //imgUrl: ""
16
+        //level: 2
17
+        //lsbid: 40
18
+        //mp4code: "h264"
19
+        //resourcebelong: 3
20
+        //resourceclass: 2
21
+        //resourcecover: "12/resource/20200917/4f297df0-f8c0-11ea-adf5-81f24b97d4ff/weather_pic.jpg"
22
+        //resourcename: "weather_pic"
23
+        //resourcesize: 6105268
24
+        //resourcetype: 0
25
+        //resourceurl: "12/resource/20200917/4f297df0-f8c0-11ea-adf5-81f24b97d4ff/weather_pic.mp4"
26
+        //schoolid: 12
27
+        //suffix: "mp4"
28
+        //uid: 80
29
+        /// <summary>
30
+        /// 是否转换0未转换1已转换
31
+        /// </summary>
32
+        public int converted { get; set; }
33
+        /// <summary>
34
+        /// 创建人id	
35
+        /// </summary>
36
+        public int createid { get; set; }
37
+        /// <summary>
38
+        /// 章节id
39
+        /// </summary>
40
+        public int directorid { get; set; }
41
+        /// <summary>
42
+        /// 视频时长(秒)
43
+        /// </summary>
44
+        public int duration { get; set; }
45
+        /// <summary>
46
+        /// 
47
+        /// </summary>
48
+        public string imgUrl { get; set; }
49
+        /// <summary>
50
+        /// 资源级别1校本2个人(备课)3导学案4视频库
51
+        /// </summary>
52
+        public int level { get; set; }
53
+        /// <summary>
54
+        /// 教材关系表id
55
+        /// </summary>
56
+        public int lsbid { get; set; }
57
+        /// <summary>
58
+        /// mp4文件编码:mpeg4网页端不能播放,h264网页端能播放
59
+        /// </summary>
60
+        public string mp4code { get; set; }
61
+        /// <summary>
62
+        /// 资源归属1平台2校本3个人
63
+        /// </summary>
64
+        public int resourcebelong { get; set; }
65
+        /// <summary>
66
+        /// 资源分类1音频2视频3图片4文档
67
+        /// </summary>
68
+        public int resourceclass { get; set; }
69
+        /// <summary>
70
+        /// 封面图地址
71
+        /// </summary>
72
+        public string resourcecover { get; set; }
73
+        /// <summary>
74
+        /// 资源名称
75
+        /// </summary>
76
+        public string resourcename { get; set; }
77
+        /// <summary>
78
+        /// 文件大小   zxy lx
79
+        /// </summary>
80
+        public long resourcesize { get; set; }
81
+        /// <summary>
82
+        /// 资源归类0未知1课件 2学案(导学案)3习题 4微课视频(视频库)5教学设计
83
+        /// </summary>
84
+        public int resourcetype { get; set; }
85
+        /// <summary>
86
+        /// 资源地址
87
+        /// </summary>
88
+        public string resourceurl { get; set; }
89
+        /// <summary>
90
+        /// 学校id
91
+        /// </summary>
92
+        public int schoolid { get; set; }
93
+        /// <summary>
94
+        /// 文件后缀
95
+        /// </summary>
96
+        public string suffix { get; set; }
97
+        /// <summary>
98
+        /// 
99
+        /// </summary>
100
+        public int uid { get; set; }
101
+    }
102
+}

+ 16
- 0
XHWK.Model/Model_ResourceAddTwo.cs Parādīt failu

@@ -0,0 +1,16 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace XHWK.Model
8
+{
9
+    public class Model_ResourceAddTwo 
10
+    {
11
+  public string videopath { get; set; }
12
+        public string coverpath { get; set; }
13
+        public int duration { get; set; }
14
+        public string mp4code { get; set; } 
15
+    }
16
+}

+ 47
- 0
XHWK.Model/Model_TsubjectbookList.cs Parādīt failu

@@ -0,0 +1,47 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Linq;
4
+using System.Text;
5
+using System.Threading.Tasks;
6
+
7
+namespace XHWK.Model
8
+{
9
+    public class Model_TsubjectbookList
10
+    {
11
+        private string tbid;
12
+        private int lsbid;
13
+        private string selected;
14
+        private int subjectid;
15
+        private string subjectname;
16
+        private string bookname;
17
+        private string coverpath;
18
+        /// <summary>
19
+        /// 教师教材关系id
20
+        /// </summary>
21
+        public string Tbid { get => tbid; set => tbid = value; }
22
+        /// <summary>
23
+        /// 教材关联关系表id
24
+        /// </summary>
25
+        public int Lsbid { get => lsbid; set => lsbid = value; }
26
+        /// <summary>
27
+        /// 是否选中:0未选中1已选中
28
+        /// </summary>
29
+        public string Selected { get => selected; set => selected = value; }
30
+        /// <summary>
31
+        /// 科目id
32
+        /// </summary>
33
+        public int Subjectid { get => subjectid; set => subjectid = value; }
34
+        /// <summary>
35
+        /// 科目名称
36
+        /// </summary>
37
+        public string Subjectname { get => subjectname; set => subjectname = value; }
38
+        /// <summary>
39
+        /// 册别名称
40
+        /// </summary>
41
+        public string Bookname { get => bookname; set => bookname = value; }
42
+        /// <summary>
43
+        /// 封面图地址
44
+        /// </summary>
45
+        public string Coverpath { get => coverpath; set => coverpath = value; }
46
+    }
47
+}

+ 5
- 0
XHWK.Model/XHWK.Model.csproj Parādīt failu

@@ -50,11 +50,16 @@
50 50
     <Reference Include="System.Xml" />
51 51
   </ItemGroup>
52 52
   <ItemGroup>
53
+    <Compile Include="ComboBoxBean.cs" />
53 54
     <Compile Include="Model_App.cs" />
54 55
     <Compile Include="Model_Canvas.cs" />
56
+    <Compile Include="Model_DirectorList.cs" />
55 57
     <Compile Include="Model_DrawData.cs" />
56 58
     <Compile Include="Model_Page.cs" />
59
+    <Compile Include="Model_ResourceAddTwo.cs" />
60
+    <Compile Include="Model_ResourceAdd.cs" />
57 61
     <Compile Include="Model_Screenshot.cs" />
62
+    <Compile Include="Model_TsubjectbookList.cs" />
58 63
     <Compile Include="Model_UserInfo.cs" />
59 64
     <Compile Include="Model_Video.cs" />
60 65
     <Compile Include="Model_WKData.cs" />

+ 1
- 1
XHWK.WKTool/App.config Parādīt failu

@@ -29,7 +29,7 @@
29 29
     文件上传: https://schoolfiletest.xhkjedu.com/
30 30
     展示文件:   https://schoolfiletest.xhkjedu.com/-->
31 31
     <!--摄像头位置 1.右上 2.左上 3.右下 4.左下-->
32
-    <add key="CameraPosition" value=""/>
32
+    <add key="CameraPosition" value="1"/>
33 33
     <!--上传每片大小 Mb-->
34 34
     <add key="UploadSliceLen" value="1"/>
35 35
   </appSettings>

+ 19
- 0
XHWK.WKTool/App.cs Parādīt failu

@@ -77,6 +77,18 @@ namespace XHWK.WKTool
77 77
         /// 数据存放目录
78 78
         /// </summary>
79 79
         public static string DataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData) + "\\XHMicroLesson\\";
80
+        /// <summary>
81
+        /// 教材列表
82
+        /// </summary>
83
+        public static List<Model_TsubjectbookList> TsubjectbookList=null;
84
+        /// <summary>
85
+        /// 章节列表
86
+        /// </summary>
87
+        public static List<Model_DirectorList> DirectorList = null;
88
+        /// <summary>
89
+        /// 上传个人空间 入参
90
+        /// </summary>
91
+        public static Model_ResourceAddTwo ResourceAddTwo = null;
80 92
         #region 点阵笔
81 93
         /// <summary>
82 94
         /// 点阵笔
@@ -132,7 +144,14 @@ namespace XHWK.WKTool
132 144
         /// 提示窗口
133 145
         /// </summary>
134 146
         public static PromptWindow W_PromptWindow = null;
147
+        /// <summary>
148
+        /// loding页面
149
+        /// </summary>
135 150
         public static LoadDialog myloading;
151
+        /// <summary>
152
+        /// 上传页面
153
+        /// </summary>
154
+        public static UploadWindow W_UploadWindow = null;
136 155
         #endregion
137 156
         #endregion
138 157
 

+ 3
- 0
XHWK.WKTool/AppUpdateWin.xaml Parādīt failu

@@ -15,6 +15,9 @@
15 15
     WindowStartupLocation="CenterScreen"
16 16
     WindowStyle="None"
17 17
     >
18
+    <Window.Effect>
19
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
20
+    </Window.Effect>
18 21
     <Grid>
19 22
         <Views:ZJClippingBorder
20 23
             Margin="10"

+ 55
- 57
XHWK.WKTool/CreateAMicroLessonWindow.xaml Parādīt failu

@@ -7,70 +7,51 @@
7 7
         mc:Ignorable="d"
8 8
         Title="星火微课" Height="346" Width="457"   AllowsTransparency="True"
9 9
     WindowStartupLocation="CenterScreen"
10
-    WindowStyle="None" Loaded="Window_Loaded" Margin="0"  BorderThickness="5,5,5,5">
10
+    WindowStyle="None" Loaded="Window_Loaded" Margin="0"  BorderThickness="7">
11 11
     <Window.Effect>
12
-        <DropShadowEffect BlurRadius="5" Color="#FF060606" Direction="80" ShadowDepth="0"/>
12
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
13 13
     </Window.Effect>
14
-    <Viewbox>
15
-        <Grid Height="341" Width="454" >
16
-            <!--分4行-->
17
-            <Grid.RowDefinitions>
18
-                <RowDefinition Height="45"/>
19
-                <RowDefinition Height="110"/>
20
-                <RowDefinition Height="80"/>
21
-                <RowDefinition Height="*"/>
22
-            </Grid.RowDefinitions>
23
-            <!--第一行 标题-->
24
-            <Border Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
25
-                <Grid>
26
-                    <TextBlock Text="创建微课" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
27
-                    <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click"/>
28
-                </Grid>
14
+    <Grid>
15
+        <!--分4行-->
16
+        <Grid.RowDefinitions>
17
+            <RowDefinition Height="45"/>
18
+            <RowDefinition Height="110"/>
19
+            <RowDefinition Height="80"/>
20
+            <RowDefinition Height="*"/>
21
+        </Grid.RowDefinitions>
22
+        <!--第一行 标题-->
23
+        <Border Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown" Grid.ColumnSpan="2">
24
+            <Grid>
25
+                <TextBlock Text="创建微课" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
26
+                <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click"/>
27
+            </Grid>
28
+        </Border>
29
+        <!--第二行 讲解名称-->
30
+        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,60,0,0" Grid.ColumnSpan="2">
31
+            <Label Content="*" FontSize="18" Padding="0,20,0,0" Foreground="#FF0000"/>
32
+            <TextBlock Text="讲解名称" FontSize="18" Padding="2,15,10,0"/>
33
+            <!--输入框-->
34
+            <Border Background="#CDD6E0" Width="321" Height="43" CornerRadius="3">
35
+                <TextBox x:Name="txbExplainName" Text="微课1" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="319" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
29 36
             </Border>
30
-            <!--第二行 讲解名称-->
31
-            <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="10,60,0,0">
32
-                <Label Content="*" FontSize="18" Padding="0,20,0,0" Foreground="#FF0000"/>
33
-                <TextBlock Text="讲解名称" FontSize="18" Padding="2,15,10,0"/>
34
-                <!--输入框-->
35
-                <Border Background="#CDD6E0" Width="321" Height="43" CornerRadius="3">
36
-                    <TextBox x:Name="txbExplainName" Text="微课1" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="319" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
37
-                </Border>
38
-            </StackPanel>
39
-            <!--第三行 存放路径-->
40
-            <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="10,30,0,0">
41
-                <Label Content="*" FontSize="18" Padding="0,20,0,0" Foreground="#FF0000"/>
42
-                <TextBlock Text="存放路径" FontSize="18" Padding="2,15,10,0"/>
43
-                <!--输入框-->
44
-                <Border Background="#CDD6E0" Width="225" Height="43" CornerRadius="3">
45
-                    <TextBox x:Name="txbStoragePath" Text="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="223" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
46
-                </Border>
47
-                <!--浏览按钮-->
48
-                <Button  Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
49
-                    <Button.Template>
50
-                        <ControlTemplate TargetType="{x:Type Button}">
51
-                            <Border
52
-                                BorderBrush="{TemplateBinding Control.BorderBrush}"
53
-                                BorderThickness="1"
54
-                                CornerRadius="2">
55
-                                <Border.Background>#CDD6E0</Border.Background>
56
-                                <ContentPresenter
57
-                                    HorizontalAlignment="Center"
58
-                                    VerticalAlignment="Center"
59
-                                    Content="{TemplateBinding ContentControl.Content}" />
60
-                            </Border>
61
-                        </ControlTemplate>
62
-                    </Button.Template>
63
-                </Button>
64
-            </StackPanel>
65
-            <!--第四行 开始按钮-->
66
-            <Button  Cursor="Hand" Grid.Row="3" x:Name="btnStart" Content="开始" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="43" Margin="10,0,10,0" Click="BtnStart_Click">
37
+        </StackPanel>
38
+        <!--第三行 存放路径-->
39
+        <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="10,30,0,0" Grid.ColumnSpan="2">
40
+            <Label Content="*" FontSize="18" Padding="0,20,0,0" Foreground="#FF0000"/>
41
+            <TextBlock Text="存放路径" FontSize="18" Padding="2,15,10,0"/>
42
+            <!--输入框-->
43
+            <Border Background="#CDD6E0" Width="225" Height="43" CornerRadius="3">
44
+                <TextBox x:Name="txbStoragePath" Text="D:\" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="223" Height="42" BorderBrush="{x:Null}" BorderThickness="0"/>
45
+            </Border>
46
+            <!--浏览按钮-->
47
+            <Button  Cursor="Hand" x:Name="btnBrowse" Content="浏览" FontSize="18" Width="80" Height="43" Margin="18,0,0,0" Click="BtnBrowse_Click">
67 48
                 <Button.Template>
68 49
                     <ControlTemplate TargetType="{x:Type Button}">
69 50
                         <Border
70 51
                                 BorderBrush="{TemplateBinding Control.BorderBrush}"
71 52
                                 BorderThickness="1"
72 53
                                 CornerRadius="2">
73
-                            <Border.Background>#2D8CF0</Border.Background>
54
+                            <Border.Background>#CDD6E0</Border.Background>
74 55
                             <ContentPresenter
75 56
                                     HorizontalAlignment="Center"
76 57
                                     VerticalAlignment="Center"
@@ -79,6 +60,23 @@
79 60
                     </ControlTemplate>
80 61
                 </Button.Template>
81 62
             </Button>
82
-        </Grid>
83
-    </Viewbox>
63
+        </StackPanel>
64
+        <!--第四行 开始按钮-->
65
+        <Button  Cursor="Hand" Grid.Row="3" x:Name="btnStart" Content="开始" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="43" Margin="10,0,10,0" Click="BtnStart_Click" Grid.ColumnSpan="2">
66
+            <Button.Template>
67
+                <ControlTemplate TargetType="{x:Type Button}">
68
+                    <Border
69
+                                BorderBrush="{TemplateBinding Control.BorderBrush}"
70
+                                BorderThickness="1"
71
+                                CornerRadius="2">
72
+                        <Border.Background>#2D8CF0</Border.Background>
73
+                        <ContentPresenter
74
+                                    HorizontalAlignment="Center"
75
+                                    VerticalAlignment="Center"
76
+                                    Content="{TemplateBinding ContentControl.Content}" />
77
+                    </Border>
78
+                </ControlTemplate>
79
+            </Button.Template>
80
+        </Button>
81
+    </Grid>
84 82
 </Window>

+ 48
- 7
XHWK.WKTool/DAL/DAL_Upload.cs Parādīt failu

@@ -40,7 +40,7 @@ namespace XHWK.WKTool.DAL
40 40
             {
41 41
                 try
42 42
                 {
43
-                    JObject jo = HttpHelper.PostFunction(FileRequestAddress + @"/chunkdb/isexist", @"application/x-www-form-urlencoded", @"md5=" + MD5, "");
43
+                    JObject jo = HttpHelper.PostFunction(FileRequestAddress /*"http://192.168.2.18:8908"*/ + @"/chunkdb/isexist", @"application/x-www-form-urlencoded", @"md5=" + MD5, "");
44 44
                     //0成功,1失败
45 45
                     if (jo["code"].ToString() == "0")
46 46
                     {
@@ -87,14 +87,18 @@ namespace XHWK.WKTool.DAL
87 87
             {
88 88
                 try
89 89
                 {
90
-                    JObject jo = HttpHelper.PostFunction(FileRequestAddress + @"/chunkdb/mergechunk", @"application/x-www-form-urlencoded", @"savefolder=" + Savefolder + "&identifier=" + FileCode, "");
90
+                    JObject jo = HttpHelper.PostFunction(FileRequestAddress /*"http://192.168.2.18:8908"*/ + @"/chunkdb/mergechunk", @"application/x-www-form-urlencoded", @"savefolder=" + Savefolder + "&identifier=" + FileCode, "");
91
+                    Model.ResultVo<Model_ResourceAddTwo> resultObj = JsonHelper.JsonToObj<Model.ResultVo<Model_ResourceAddTwo>>(jo.ToString()); ;
92
+                    APP.ResourceAddTwo = new Model_ResourceAddTwo();
91 93
                     //0成功,1失败
92
-                    if (jo["code"].ToString() == "0")
94
+                    if (resultObj.code == 0 && resultObj.obj != null)
93 95
                     {
96
+                        APP.ResourceAddTwo = resultObj.obj;
94 97
                         return true;
95 98
                     }
96 99
                     else
97 100
                     {
101
+                        //Message = "上传失败!";
98 102
                         Message = jo["msg"].ToString();
99 103
                         return false;
100 104
                     }
@@ -141,7 +145,7 @@ namespace XHWK.WKTool.DAL
141 145
                     ErrMessage = "未找到课程!";
142 146
                     return false;
143 147
                 }
144
-                string UploadUrl = FileRequestAddress + "/chunkdb/upchunk";
148
+                string UploadUrl = FileRequestAddress /*"http://192.168.2.18:8908" */+ "/chunkdb/upchunk";//zxyceshi
145 149
                 if (VideoInfo.IsUpload)
146 150
                 {
147 151
                     ErrMessage = "视频已上传";
@@ -167,12 +171,41 @@ namespace XHWK.WKTool.DAL
167 171
                         //已上传长度
168 172
                         long len = VideoInfo.Uploaded * VideoInfo.SliceLen;
169 173
                         string fileName = FileToolsCommon.GetFileName(VideoInfo.VideoPath);
174
+
175
+
176
+                        ////分块
177
+                        //for (; len + VideoInfo.SliceLen < filelen; VideoInfo.Uploaded++)
178
+                        //{
179
+                        //    len = VideoInfo.Uploaded * VideoInfo.SliceLen;
180
+                        //    //取指定长度的流
181
+                        //    byte[] byteArray = FileToolsCommon.ReadBigFileSpecifyLength(VideoInfo.VideoPath, len, (int)VideoInfo.SliceLen);
182
+                        //    //参数
183
+                        //    NameValueCollection formFields = new NameValueCollection();
184
+                        //    formFields.Add("identifier", VideoInfo.FileGuid);
185
+                        //    formFields.Add("chunkNumber", (VideoInfo.Uploaded + 1).ToString());
186
+                        //    formFields.Add("filename", fileName);
187
+                        //    formFields.Add("totalchunk", VideoInfo.Block.ToString());
188
+                        //    formFields.Add("md5", VideoInfo.FileMD5);
189
+                        //    JObject jo = HttpHelper.UploadRequestflow(UploadUrl, byteArray, fileName, formFields);
190
+                        //    //0成功,1失败
191
+                        //    if (jo["code"].ToString() != "0")
192
+                        //    {
193
+                        //        ErrMessage = jo["msg"].ToString();
194
+                        //        return false;
195
+                        //    }
196
+                        //}
197
+
198
+
199
+
200
+
201
+
202
+
170 203
                         //分块
171
-                        for (; len + VideoInfo.SliceLen < filelen; VideoInfo.Uploaded++)
204
+                        do
172 205
                         {
173 206
                             len = VideoInfo.Uploaded * VideoInfo.SliceLen;
174 207
                             //取指定长度的流
175
-                            byte[] byteArray = FileToolsCommon.ReadBigFileSpecifyLength(VideoInfo.VideoPath, len, 102400);
208
+                            byte[] byteArray = FileToolsCommon.ReadBigFileSpecifyLength(VideoInfo.VideoPath, len, (int)VideoInfo.SliceLen);
176 209
                             //参数
177 210
                             NameValueCollection formFields = new NameValueCollection();
178 211
                             formFields.Add("identifier", VideoInfo.FileGuid);
@@ -180,6 +213,14 @@ namespace XHWK.WKTool.DAL
180 213
                             formFields.Add("filename", fileName);
181 214
                             formFields.Add("totalchunk", VideoInfo.Block.ToString());
182 215
                             formFields.Add("md5", VideoInfo.FileMD5);
216
+                            VideoInfo.Uploaded++;
217
+                            //formFields.Add();///教材
218
+                            //if()//章节若没选不传
219
+                            //{
220
+                            //    formFields.Add();
221
+                            //}
222
+
223
+
183 224
                             JObject jo = HttpHelper.UploadRequestflow(UploadUrl, byteArray, fileName, formFields);
184 225
                             //0成功,1失败
185 226
                             if (jo["code"].ToString() != "0")
@@ -187,7 +228,7 @@ namespace XHWK.WKTool.DAL
187 228
                                 ErrMessage = jo["msg"].ToString();
188 229
                                 return false;
189 230
                             }
190
-                        }
231
+                        } while (len + VideoInfo.SliceLen < filelen);
191 232
                         //合并文件
192 233
                         bool isres = ReportFileMerge(APP.UserInfo.Schoolid.ToString() + "/resource", VideoInfo.FileGuid, out ErrMessage);
193 234
                         if (isres)

+ 146
- 0
XHWK.WKTool/DAL/Interface.cs Parādīt failu

@@ -1,4 +1,5 @@
1 1
 using Common.system;
2
+using Newtonsoft.Json.Linq;
2 3
 using System;
3 4
 using System.Collections.Generic;
4 5
 using System.Linq;
@@ -43,5 +44,150 @@ namespace XHWK.WKTool.DAL
43 44
                 return 1;
44 45
             }
45 46
         }
47
+        /// <summary>
48
+        /// 教师教材列表
49
+        /// </summary>
50
+        /// <param name="request"></param>
51
+        /// <returns></returns>
52
+        public int TsubjectbookList()
53
+        {
54
+            APP.TsubjectbookList = new List<Model_TsubjectbookList>();
55
+            try
56
+            {
57
+                string url = ZConfig.apiUrl + "/tsubjectbook/list";//地址
58
+                Dictionary<string, int> dic = new Dictionary<string, int>
59
+                {
60
+                    { "teacherid",APP.UserInfo.Userid}
61
+                };
62
+                string body = JsonHelper.ToJson(dic);
63
+                ResultVo<List<Model_TsubjectbookList>> result = HttpHelper.PostAndRespSignle<ResultVo<List<Model_TsubjectbookList>>>(url, postData: body);
64
+                if (result != null)
65
+                {
66
+                    APP.ServerMsg = result.msg;
67
+                    APP.TsubjectbookList = result.obj;
68
+                    return result.code;
69
+                }
70
+                else
71
+                {
72
+                    APP.ServerMsg = "网络异常!";
73
+                    return 1;
74
+                }
75
+            }
76
+            catch (Exception ex)
77
+            {
78
+                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
79
+                return 1;
80
+            }
81
+        }
82
+        /// <summary>
83
+        /// 章节--列表
84
+        /// </summary>
85
+        /// <param name="request"></param>
86
+        /// <returns></returns>
87
+        public int DirectorList(int lsbid,int directortype,int createid)
88
+        {
89
+            APP.DirectorList = new List<Model_DirectorList>();
90
+            try
91
+            {
92
+                string url = ZConfig.apiUrl + "/director/list";//地址
93
+                Dictionary<string, int> dic = new Dictionary<string, int>
94
+                {
95
+                    { "lsbid", lsbid },
96
+                    { "directortype", directortype },
97
+                    { "createid", createid }
98
+                };
99
+                string body = JsonHelper.ToJson(dic);
100
+                ResultVo<List<Model_DirectorList>> result = HttpHelper.PostAndRespSignle<ResultVo<List<Model_DirectorList>>>(url, postData: body);
101
+                if (result != null)
102
+                {
103
+                    APP.ServerMsg = result.msg;
104
+                    APP.DirectorList = result.obj;
105
+                    return result.code;
106
+                }
107
+                else
108
+                {
109
+                    APP.ServerMsg = "网络异常!";
110
+                    return 1;
111
+                }
112
+            }
113
+            catch (Exception ex)
114
+            {
115
+                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
116
+                return 1;
117
+            }
118
+        }
119
+        /// <summary>
120
+        /// 资源--添加
121
+        /// </summary>
122
+        /// <param name="request"></param>
123
+        /// <returns></returns>
124
+        public int ResourceAdd(Model_ResourceAdd model)
125
+        {
126
+            APP.DirectorList = new List<Model_DirectorList>();
127
+            try
128
+            {
129
+                string url = ZConfig.apiUrl + "/resource/add";//地址
130
+                Dictionary<string, object> dic = new Dictionary<string, object>();
131
+                //            converted: 0
132
+                //createid: 80
133
+                //directorid: 1009
134
+                //duration: 39
135
+                //imgUrl: ""
136
+                //level: 2
137
+                //lsbid: 40
138
+                //mp4code: "h264"
139
+                //resourcebelong: 3
140
+                //resourceclass: 2
141
+                //resourcecover: "12/resource/20200917/4f297df0-f8c0-11ea-adf5-81f24b97d4ff/weather_pic.jpg"
142
+                //resourcename: "weather_pic"
143
+                //resourcesize: 6105268
144
+                //resourcetype: 0
145
+                //resourceurl: "12/resource/20200917/4f297df0-f8c0-11ea-adf5-81f24b97d4ff/weather_pic.mp4"
146
+                //schoolid: 12
147
+                //suffix: "mp4"
148
+                //uid: 80
149
+                dic.Add("converted", model.converted);
150
+                dic.Add("createid", model.createid);
151
+                if(model.directorid!=999999)//章节上传可以不选
152
+                {
153
+                    dic.Add("directorid", model.directorid);
154
+                }
155
+                dic.Add("duration", model.duration);
156
+                dic.Add("imgUrl", model.imgUrl);
157
+                dic.Add("level", model.level);
158
+                dic.Add("lsbid", model.lsbid);
159
+                dic.Add("mp4code", model.mp4code);
160
+                dic.Add("resourcebelong", model.resourcebelong);
161
+                dic.Add("resourceclass", model.resourceclass);
162
+                dic.Add("resourcecover", model.resourcecover);
163
+                dic.Add("resourcename", model.resourcename);
164
+                dic.Add("resourcesize", model.resourcesize);
165
+                dic.Add("resourcetype", model.resourcetype);
166
+                dic.Add("resourceurl", model.resourceurl);
167
+                dic.Add("schoolid", model.schoolid);
168
+                dic.Add("suffix", model.suffix);
169
+                //dic.Add("uid", model.uid);
170
+
171
+
172
+                string body = JsonHelper.ToJson(dic);
173
+                string xmlDoc = HttpHelper.HttpPost(body, url);
174
+                JObject obj = JObject.Parse(xmlDoc);
175
+                if (obj != null)
176
+                {
177
+                    APP.ServerMsg = obj["msg"].ToString();
178
+                    return Convert.ToInt32(obj["code"].ToString());
179
+                }
180
+                else
181
+                {
182
+                    APP.ServerMsg = "网络异常!";
183
+                    return 1;
184
+                }
185
+            }
186
+            catch (Exception ex)
187
+            {
188
+                LogHelper.WriteErrLog("【调用接口(RegisterController)】错误日志:" + ex.Message, ex);
189
+                return 1;
190
+            }
191
+        }
46 192
     }
47 193
 }

+ 8
- 39
XHWK.WKTool/LoginWindow.xaml Parādīt failu

@@ -8,26 +8,12 @@
8 8
         Title="LoginWindow" Height="358" Width="471"   AllowsTransparency="True"
9 9
     ShowInTaskbar="False"
10 10
     WindowStartupLocation="CenterOwner"
11
-    WindowStyle="None">
11
+    WindowStyle="None"  BorderThickness="7">
12
+    <Window.Effect>
13
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
14
+    </Window.Effect>
12 15
     <Viewbox>
13
-        <Border Background="#fefefe" Height="358" Width="471">
14
-            <Border Background="#fdfdfd" Height="357" Width="470">
15
-                <Border Background="#fcfcfc" Height="356" Width="469">
16
-                    <Border Background="#fafafa" Height="355" Width="468">
17
-                        <Border Background="#f9f9f9" Height="354" Width="467">
18
-                            <Border Background="#f6f6f6" Height="353" Width="466">
19
-                                <Border Background="#f3f3f3" Height="352" Width="465">
20
-                                    <Border Background="#eeeeee" Height="351" Width="464">
21
-                                        <Border Background="#e9e9e9" Height="350" Width="463">
22
-                                            <Border Background="#e2e2e2" Height="349" Width="462">
23
-                                                <Border Background="#dcdcdc" Height="348" Width="461">
24
-                                                    <Border Background="#d3d3d3" Height="347" Width="460">
25
-                                                        <Border Background="#cccccc" Height="346" Width="459">
26
-                                                            <Border Background="#bfbfbf" Height="345" Width="458">
27
-                                                                <Border Background="#aeaeae" Height="344" Width="457">
28
-                                                                    <Border Background="#bababa" Height="343" Width="456">
29
-                                                                        <!--<Border Background="#e4e4e4" Height="342" Width="455">-->
30
-                                                                        <Grid Height="343" Width="456" Background="#FFFFFF">
16
+        <Grid Height="358" Width="471" Background="#FFFFFF">
31 17
             <!--分5行-->
32 18
             <Grid.RowDefinitions>
33 19
                 <RowDefinition Height="45"/>
@@ -47,7 +33,7 @@
47 33
             <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="20,20,0,0">
48 34
                 <TextBlock Text="登陆" FontSize="18" Padding="2,15,10,0"/>
49 35
                 <!--输入框-->
50
-                                                                                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
36
+                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
51 37
                     <TextBox x:Name="txbAccountNumber" Text="" FontSize="16" Foreground="#333333" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
52 38
                 </Border>
53 39
             </StackPanel>
@@ -55,7 +41,7 @@
55 41
             <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="20,20,0,0">
56 42
                 <TextBlock Text="密码" FontSize="18" Padding="2,15,10,0"/>
57 43
                 <!--输入框-->
58
-                                                                                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
44
+                <Border Background="#cccbce" Width="371" Height="43" CornerRadius="3">
59 45
                     <PasswordBox x:Name="pobPassword" FontSize="16" Foreground="#333333" PasswordChar="*" Padding="5,12,2,2" Width="369" Height="41" BorderBrush="{x:Null}" BorderThickness="0"/>
60 46
                 </Border>
61 47
             </StackPanel>
@@ -65,7 +51,7 @@
65 51
                 </Viewbox>
66 52
                 <TextBlock Text="记住账号" FontSize="18" Height="30" Padding="5,3,0,0"/>
67 53
             </StackPanel>
68
-            
54
+
69 55
             <!--第五行 开始按钮-->
70 56
             <Button  Cursor="Hand" Grid.Row="4" x:Name="btnStart" Content="登录" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="50" Margin="10,0,10,0" Click="BtnStart_Click">
71 57
                 <Button.Template>
@@ -84,22 +70,5 @@
84 70
                 </Button.Template>
85 71
             </Button>
86 72
         </Grid>
87
-                                                                        </Border>
88
-                                                                    </Border>
89
-                                                                </Border>
90
-                                                            </Border>
91
-                                                        </Border>
92
-                                                    </Border>
93
-                                                </Border>
94
-                                            </Border>
95
-                                        </Border>
96
-                                    </Border>
97
-                                </Border>
98
-                            </Border>
99
-                        </Border>
100
-                    </Border>
101
-                </Border>
102
-            </Border>
103
-        <!--</Border>-->
104 73
     </Viewbox>
105 74
 </Window>

+ 3
- 2
XHWK.WKTool/MessageWindow.xaml Parādīt failu

@@ -7,9 +7,10 @@
7 7
         mc:Ignorable="d" 
8 8
         Title="星火微课" WindowStartupLocation="CenterScreen"
9 9
     WindowStyle="None" AllowsTransparency="True"    WindowState="Normal"
10
-    ShowInTaskbar="False" Topmost="True" ResizeMode="NoResize" d:DesignHeight="250" Width="600" Height="220" BorderThickness="5,5,5,5" MouseMove="Window_MouseMove">
10
+    ShowInTaskbar="False" Topmost="True" ResizeMode="NoResize" 
11
+        d:DesignHeight="250" Width="600" Height="220"  MouseMove="Window_MouseMove"  BorderThickness="7">
11 12
     <Window.Effect>
12
-        <DropShadowEffect BlurRadius="8" Color="#FF060606" Direction="80" ShadowDepth="0"/>
13
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
13 14
     </Window.Effect>
14 15
     <Grid>
15 16
         <Grid.RowDefinitions>

+ 21
- 18
XHWK.WKTool/PrintWindow.xaml Parādīt failu

@@ -8,7 +8,10 @@
8 8
         Title="PrintWindow" Height="600" Width="900" AllowsTransparency="True"
9 9
     ShowInTaskbar="False"
10 10
     WindowStartupLocation="CenterOwner"
11
-    WindowStyle="None">
11
+    WindowStyle="None"  BorderThickness="7">
12
+    <Window.Effect>
13
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
14
+    </Window.Effect>
12 15
     <Grid>
13 16
         <Grid.RowDefinitions>
14 17
             <RowDefinition Height="120"/>
@@ -19,26 +22,17 @@
19 22
             <Grid.RowDefinitions>
20 23
                 <RowDefinition Height="auto"/>
21 24
                 <RowDefinition Height="*"/>
22
-                <RowDefinition Height="50"/>
25
+                <RowDefinition Height="70"/>
23 26
             </Grid.RowDefinitions>
24
-            <TextBlock Grid.Row="0" Text="打印预览" Background="#2E8CF0" Foreground="#FFFFFF" Width="50" HorizontalAlignment="Left" Margin="10,5,0,0"/>
27
+            <!--<TextBlock Grid.Row="0" Text="打印预览" Background="#2E8CF0" Foreground="#FFFFFF" Width="50" HorizontalAlignment="Left" Margin="10,5,0,0"/>-->
25 28
             <StackPanel Grid.Row="1" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,10,0,0">
26 29
                 <TextBlock  Text="打印机:" Width="210" FontSize="20"/>
27
-                <TextBlock Text="份数:" FontSize="20" Margin="120,0,0,0"/>
28
-                <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White" />
29
-                <Grid>
30
-                    <Grid.RowDefinitions>
31
-                        <RowDefinition Height="auto"/>
32
-                        <RowDefinition Height="auto"/>
33
-                    </Grid.RowDefinitions>
34
-                    <Button Grid.Row="0" x:Name="btnLess"  Content="-" Click="BtnLess_Click"/>
35
-                    <Button Grid.Row="1" x:Name="btnAdd"  Content="+" Click="BtnAdd_Click"/>
36
-                </Grid>
37 30
             </StackPanel>
38
-            <Button Grid.Row="1" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,20,0" Click="BtnClose_Click">
31
+
32
+            <Button Grid.Row="2" x:Name="btnClose" Background="#CC4848" Foreground="#FFFFFF" Content="×" FontSize="20" Width="30" Height="30" HorizontalAlignment="Right" Margin="0,0,20,0" Click="BtnClose_Click">
39 33
 
40 34
             </Button>
41
-            <StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,2,0,0">
35
+            <StackPanel Grid.Row="2" HorizontalAlignment="Left" Orientation="Horizontal" Margin="10,2,0,0" Height="40">
42 36
                 <ComboBox Cursor="Hand" Width="210"
43 37
                                 x:Name="cmbClass"
44 38
                                 Padding="10,0,10,0"
@@ -48,11 +42,20 @@
48 42
                                 FontSize="14"
49 43
                                 SelectedValuePath="Key"
50 44
                                 />
51
-                <TextBlock Text="点型:" FontSize="20"  Margin="120,10,0,0"/>
45
+                <TextBlock Text="份数:" FontSize="20" Margin="120,0,0,0" Padding="0,10,0,0"/>
46
+                <TextBlock x:Name="txbNumberOfCopies" Width="100" Text="1" FontSize="16" Padding="50,10,0,0" Background="White"/>
47
+                <Grid>
48
+                    <Grid.RowDefinitions>
49
+                        <RowDefinition Height="auto"/>
50
+                        <RowDefinition Height="auto"/>
51
+                    </Grid.RowDefinitions>
52
+                    <Button Grid.Row="0" x:Name="btnLess"  Content="-" Click="BtnLess_Click"/>
53
+                    <Button Grid.Row="1" x:Name="btnAdd"  Content="+" Click="BtnAdd_Click"/>
54
+                </Grid>
55
+                <!--<TextBlock Text="点型:" FontSize="20"  Margin="120,10,0,0"/>
52 56
                 <RadioButton x:Name="rbnSquarePoint" Content="方点" FontSize="16"  Margin="0,15,0,0" IsChecked="True"/>
53
-                <RadioButton x:Name="rbnDots" Content="圆点" FontSize="16"  Margin="0,15,0,0"/>
57
+                <RadioButton x:Name="rbnDots" Content="圆点" FontSize="16"  Margin="0,15,0,0"/>-->
54 58
             </StackPanel>
55
-            <TextBlock Grid.Row="2" Text="关闭" HorizontalAlignment="Right" Margin="0,2,20,0"  Width="30" Height="30"/>
56 59
         </Grid>
57 60
         <Grid Grid.Row="1">
58 61
             <Image x:Name="imgPri"/>

+ 9
- 9
XHWK.WKTool/PrintWindow.xaml.cs Parādīt failu

@@ -78,11 +78,11 @@ namespace XHWK.WKTool
78 78
             string msg = string.Empty;
79 79
             string outPut = string.Empty;
80 80
             int pyte = 0; //0为方点 1为圆点
81
-            if(rbnSquarePoint.IsChecked==false)
82
-            {
83
-                pyte = 1;
84
-            }
85
-            LatticeFileHelper.GeneratingPDF(pdf, tpf, out pr, out msg, out outPut, pyte);
81
+            //if(rbnSquarePoint.IsChecked==false)
82
+            //{
83
+            //    pyte = 1;
84
+            //}
85
+            LatticeFileHelper.GeneratingPDF(pdf, tpf, out pr, out msg, out outPut/*, pyte*/);
86 86
             if (pr == 0)
87 87
             {
88 88
                 outPut = outPut.Replace("[", "").Replace("]", "").Replace("\"", "").Trim();
@@ -100,10 +100,10 @@ namespace XHWK.WKTool
100 100
                 string standardError = string.Empty;
101 101
                 string standardOutput = string.Empty;
102 102
                 int frequency = Convert.ToInt32(txbNumberOfCopies.Text);
103
-                for (int i=0;i< frequency;i++)
104
-                {
105
-                    LatticeFileHelper.PrinterTPFFile(tpf, 1, cmbClass.Text, out printResult, out standardError, out standardOutput);
106
-                }
103
+                //for (int i=0;i< frequency;i++)
104
+                //{
105
+                    LatticeFileHelper.PrinterTPFFile(tpf, frequency, cmbClass.Text, out printResult, out standardError, out standardOutput);
106
+                //}
107 107
                 if(printResult==0)// 0为成功
108 108
                 {
109 109
                     MessageWindow.Show("打印成功", "", MessageBoxButton.OKCancel);

+ 4
- 1
XHWK.WKTool/PromptWindow.xaml Parādīt failu

@@ -8,7 +8,10 @@
8 8
         Title="PromptWindow" Height="210" Width="553" WindowStartupLocation="CenterOwner"
9 9
     WindowStyle="None" AllowsTransparency="True"    WindowState="Normal"
10 10
     ShowInTaskbar="True"   ResizeMode="NoResize"
11
-  >
11
+    BorderThickness="7">
12
+    <Window.Effect>
13
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
14
+    </Window.Effect>
12 15
     <Grid Background="#FFFFFF">
13 16
         <Grid.RowDefinitions>
14 17
             <RowDefinition Height="auto"/>

+ 84
- 0
XHWK.WKTool/UploadWindow.xaml Parādīt failu

@@ -0,0 +1,84 @@
1
+<Window x:Class="XHWK.WKTool.UploadWindow"
2
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6
+        xmlns:local="clr-namespace:XHWK.WKTool"
7
+        mc:Ignorable="d"
8
+        Title="UploadWindow" Height="346" Width="457"   AllowsTransparency="True"
9
+    WindowStartupLocation="CenterScreen"
10
+    WindowStyle="None" Loaded="Window_Loaded" Margin="0"    BorderThickness="7">
11
+    <Window.Effect>
12
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
13
+    </Window.Effect>
14
+    <Viewbox>
15
+        <Grid Height="341" Width="454" >
16
+            <!--分4行-->
17
+            <Grid.RowDefinitions>
18
+                <RowDefinition Height="45"/>
19
+                <RowDefinition Height="80"/>
20
+                <RowDefinition Height="60"/>
21
+                <RowDefinition Height="60"/>
22
+                <RowDefinition Height="*"/>
23
+            </Grid.RowDefinitions>
24
+            <!--第一行 标题-->
25
+            <Border Grid.Row="0" Background="#2D8CF0" MouseLeftButtonDown="Window_MouseLeftButtonDown">
26
+                <Grid>
27
+                    <TextBlock Text="上传" Foreground="#FFFFFF" FontSize="16" Padding="10,13,0,0"/>
28
+                    <Button  Cursor="Hand" Grid.Row="0" x:Name="btnDown" Content="×" Foreground="#FFFFFF" FontSize="25" Padding="10,0,10,0" HorizontalAlignment="Right" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Click="BtnDown_Click"/>
29
+                </Grid>
30
+            </Border>
31
+            <!--第三行 教材-->
32
+            <ComboBox Cursor="Hand"
33
+                            x:Name="book_list"
34
+                            Grid.Row="2"
35
+                            Height="30"
36
+                      Width="300"
37
+                            Margin="0,0,0,0"
38
+                            Padding="10,0,0,0"
39
+                            VerticalContentAlignment="Center"
40
+                            DisplayMemberPath="Value"
41
+                            FontSize="14"
42
+                            ItemsSource="{Binding bookList}"
43
+                            SelectedValuePath="Key"
44
+                      SelectionChanged="toolbar_list_SelectionChanged"
45
+                          >
46
+                <ComboBox.Resources>
47
+                    <SolidColorBrush x:Key="{x:Static SystemColors.WindowBrushKey}" Color="WhiteSmoke" />
48
+                    <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}" Color="Gray" />
49
+                </ComboBox.Resources>
50
+            </ComboBox>
51
+            <!--章节-->
52
+            <ComboBox Cursor="Hand"
53
+                            x:Name="cmbTeachingMaterial"
54
+                            Grid.Row="3"
55
+                               Height="30"
56
+                             Width="300"
57
+                            Padding="10,0,0,0"
58
+                            VerticalContentAlignment="Center"
59
+                            Background="White"
60
+                            DisplayMemberPath="Value"
61
+                            FontSize="14"
62
+                            Foreground="Black"
63
+                            ItemsSource="{Binding zhangjieList}"
64
+                            SelectedValuePath="Key" />
65
+            <!--第四行 开始按钮-->
66
+            <Button  Cursor="Hand" Grid.Row="4" x:Name="btnStart" Content="确定" FontSize="18" Foreground="#FFFFFF" Style="{StaticResource {x:Static ToolBar.ButtonStyleKey}}" Width="418" Height="43" Margin="10,0,10,0" Click="BtnStart_Click">
67
+                <Button.Template>
68
+                    <ControlTemplate TargetType="{x:Type Button}">
69
+                        <Border
70
+                                BorderBrush="{TemplateBinding Control.BorderBrush}"
71
+                                BorderThickness="1"
72
+                                CornerRadius="2">
73
+                            <Border.Background>#2D8CF0</Border.Background>
74
+                            <ContentPresenter
75
+                                    HorizontalAlignment="Center"
76
+                                    VerticalAlignment="Center"
77
+                                    Content="{TemplateBinding ContentControl.Content}" />
78
+                        </Border>
79
+                    </ControlTemplate>
80
+                </Button.Template>
81
+            </Button>
82
+        </Grid>
83
+    </Viewbox>
84
+</Window>

+ 261
- 0
XHWK.WKTool/UploadWindow.xaml.cs Parādīt failu

@@ -0,0 +1,261 @@
1
+using System;
2
+using System.Collections.Generic;
3
+using System.Collections.ObjectModel;
4
+using System.Linq;
5
+using System.Text;
6
+using System.Threading.Tasks;
7
+using System.Windows;
8
+using System.Windows.Controls;
9
+using System.Windows.Data;
10
+using System.Windows.Documents;
11
+using System.Windows.Input;
12
+using System.Windows.Media;
13
+using System.Windows.Media.Imaging;
14
+using System.Windows.Shapes;
15
+using XHWK.Model;
16
+using XHWK.WKTool.DAL;
17
+
18
+namespace XHWK.WKTool
19
+{
20
+    /// <summary>
21
+    /// UploadWindow.xaml 的交互逻辑
22
+    /// </summary>
23
+    public partial class UploadWindow : Window
24
+    {
25
+        /// <summary>
26
+        /// 调用接口
27
+        /// </summary>
28
+        private readonly Interface @interface = new Interface();
29
+        /// <summary>
30
+        /// 前台数据
31
+        /// </summary>
32
+        internal LoginPageData pageData = new LoginPageData();
33
+        /// <summary>
34
+        /// 文件名
35
+        /// </summary>
36
+        private string Resourcename = string.Empty;
37
+        /// <summary>
38
+        /// 文件大小
39
+        /// </summary>
40
+        private long Resourcesize = 0;
41
+        /// <summary>
42
+        /// 文件类型
43
+        /// </summary>
44
+        private string Suffix = string.Empty;
45
+        public UploadWindow()
46
+        {
47
+            InitializeComponent();
48
+        }
49
+        /// <summary>
50
+        /// 初始化
51
+        /// </summary>
52
+        public void Initialize(string _resourcename,long _resourcesize,string _suffix) 
53
+        {
54
+            Resourcename = _resourcename;
55
+            Resourcesize = _resourcesize;
56
+            Suffix = _suffix;
57
+            Tsubjectbook();
58
+        }
59
+        /// <summary>
60
+        /// 教材接口调用
61
+        /// </summary>
62
+        /// <returns></returns>
63
+        private void Tsubjectbook()
64
+        {
65
+            int code = @interface.TsubjectbookList();
66
+            if (code == 0)
67
+            {
68
+                for (int i = 0; i < APP.TsubjectbookList.Count; i++)
69
+                {
70
+                    pageData.bookList.Add(new ComboBoxBean()
71
+                    {
72
+                        Key = APP.TsubjectbookList[i].Lsbid,
73
+                        Value = $"{APP.TsubjectbookList[i].Subjectname}  {APP.TsubjectbookList[i].Bookname}"
74
+                    });
75
+                }
76
+                book_list.SelectedIndex = 0;
77
+                DataContext = pageData;
78
+                Director();
79
+            }
80
+            else
81
+            {
82
+                MessageWindow.Show(APP.ServerMsg);
83
+            }
84
+        }
85
+        /// <summary>
86
+        /// 章节接口调用
87
+        /// </summary>
88
+        private void Director()
89
+        {
90
+            int selectIndex = book_list.SelectedIndex;
91
+            if(selectIndex<0)
92
+            {
93
+                selectIndex = 0;
94
+            }
95
+            int code = @interface.DirectorList(APP.TsubjectbookList[selectIndex].Lsbid,2,APP.UserInfo.Userid);
96
+            if (code == 0)
97
+            {
98
+                pageData.zhangjieList.Clear();
99
+                //pageData.zhangjieList.Add(new ComboBoxBean()
100
+                //{
101
+                //    Key = 999999,
102
+                //    Value = "全部"
103
+                //});
104
+                for (int i = 0; i < APP.DirectorList.Count; i++)
105
+                {
106
+                    Model_DirectorList item = APP.DirectorList[i];
107
+                    pageData.zhangjieList.Add(new ComboBoxBean()
108
+                    {
109
+                        Key = item.directorid,
110
+                        Value = item.directorname
111
+                    });
112
+                    addChild(item);
113
+                }
114
+                cmbTeachingMaterial.SelectedIndex = 0;
115
+            }
116
+            else
117
+            {
118
+                MessageWindow.Show(APP.ServerMsg);
119
+            }
120
+        }
121
+        /// <summary>
122
+        /// 子章节递归
123
+        /// </summary>
124
+        /// <param name="directorList"></param>
125
+        private void addChild(Model_DirectorList directorList)
126
+        {
127
+            if (directorList.children != null && directorList.children.Count > 0)
128
+            {
129
+                foreach (Model_DirectorList child in directorList.children)
130
+                {
131
+                    pageData.zhangjieList.Add(new ComboBoxBean()
132
+                    {
133
+                        Key = child.directorid,
134
+                        Value = getSpace(child.directorlevel) + child.directorname
135
+                    });
136
+                    if (child.children != null && child.children.Count > 0)
137
+                    {
138
+                        addChild(child);
139
+                    }
140
+                }
141
+            }
142
+        }
143
+        /// <summary>
144
+        /// 章节是否加空格符
145
+        /// </summary>
146
+        /// <param name="num"></param>
147
+        /// <returns></returns>
148
+        private string getSpace(int num)
149
+        {
150
+            string str = "";
151
+            for (int i = 0; i < num; i++)
152
+            {
153
+                str += "  ";
154
+            }
155
+            return str;
156
+        }
157
+        private void Window_Loaded(object sender, RoutedEventArgs e)
158
+        {
159
+
160
+        }
161
+
162
+        private void Window_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
163
+        {
164
+
165
+        }
166
+        /// <summary>
167
+        /// 教材下拉框改变事件
168
+        /// </summary>
169
+        /// <param name="sender"></param>
170
+        /// <param name="e"></param>
171
+        private void toolbar_list_SelectionChanged(object sender, SelectionChangedEventArgs e)
172
+        {
173
+            Director();
174
+        }
175
+
176
+        private void BtnDown_Click(object sender, RoutedEventArgs e)
177
+        {
178
+            this.Hide();
179
+        }
180
+        /// <summary>
181
+        /// 上传到个人空间
182
+        /// </summary>
183
+        /// <param name="sender"></param>
184
+        /// <param name="e"></param>
185
+        private void BtnStart_Click(object sender, RoutedEventArgs e)
186
+        {
187
+            //        converted: 0
188
+            //createid: 80
189
+            //directorid: 1009
190
+            //duration: 39
191
+            //imgUrl: ""
192
+            //level: 2
193
+            //lsbid: 40
194
+            //mp4code: "h264"
195
+            //resourcebelong: 3
196
+            //resourceclass: 2
197
+            //resourcecover: "12/resource/20200917/4f297df0-f8c0-11ea-adf5-81f24b97d4ff/weather_pic.jpg"
198
+            //resourcename: "weather_pic"
199
+            //resourcesize: 6105268
200
+            //resourcetype: 0
201
+            //resourceurl: "12/resource/20200917/4f297df0-f8c0-11ea-adf5-81f24b97d4ff/weather_pic.mp4"
202
+            //schoolid: 12
203
+            //suffix: "mp4"
204
+            //uid: 80
205
+            Model_ResourceAdd model_ResourceAdd = new Model_ResourceAdd();
206
+            model_ResourceAdd.converted = 0;
207
+            model_ResourceAdd.createid = APP.UserInfo.Userid;
208
+            model_ResourceAdd.directorid= Convert.ToInt32(cmbTeachingMaterial.SelectedValue.ToString());
209
+            model_ResourceAdd.duration = APP.ResourceAddTwo.duration;
210
+            model_ResourceAdd.imgUrl = "";
211
+            model_ResourceAdd.level = 2;
212
+            model_ResourceAdd.lsbid= Convert.ToInt32(book_list.SelectedValue.ToString());
213
+            model_ResourceAdd.mp4code = APP.ResourceAddTwo.mp4code;
214
+            model_ResourceAdd.resourcebelong = 3;
215
+            model_ResourceAdd.resourceclass = 2;
216
+            model_ResourceAdd.resourcecover = APP.ResourceAddTwo.coverpath;
217
+            model_ResourceAdd.resourcename = Resourcename;
218
+            model_ResourceAdd.resourcesize = Resourcesize;//zxy 文件大小
219
+            model_ResourceAdd.resourcetype = 0;
220
+            model_ResourceAdd.resourceurl = APP.ResourceAddTwo.videopath;
221
+            model_ResourceAdd.schoolid = APP.UserInfo.Schoolid;
222
+            if(Suffix.Equals("FLV"))
223
+            {
224
+                Suffix = "flv";
225
+            }
226
+            else if(Suffix.Equals("AVI"))
227
+            {
228
+                Suffix = "avi";
229
+            }
230
+            else
231
+            {
232
+                Suffix = "mp4";
233
+            }
234
+
235
+            model_ResourceAdd.suffix = Suffix;
236
+            //model_ResourceAdd.uid = 0;//zxy
237
+            int code = @interface.ResourceAdd(model_ResourceAdd);
238
+            if(code==0)
239
+            {
240
+                MessageWindow.Show("视频上传成功!");
241
+                Hide();
242
+            }
243
+            else
244
+            {
245
+                MessageWindow.Show(APP.ServerMsg);
246
+            }
247
+        }
248
+    }
249
+    public class LoginPageData : NotifyModel
250
+    {
251
+        public ObservableCollection<ComboBoxBean> bookList { get; set; }
252
+
253
+        public ObservableCollection<ComboBoxBean> zhangjieList { get; set; }
254
+
255
+        public LoginPageData()
256
+        {
257
+            bookList = new ObservableCollection<ComboBoxBean>();
258
+            zhangjieList = new ObservableCollection<ComboBoxBean>();
259
+        }
260
+    }
261
+}

+ 7
- 9
XHWK.WKTool/XHMicroLessonSystemWindow.xaml Parādīt failu

@@ -9,8 +9,10 @@
9 9
         xmlns:local="clr-namespace:XHWK.WKTool"
10 10
         mc:Ignorable="d"
11 11
         Title="星火微课系统" Height="1040" Width="1276" WindowStartupLocation="CenterScreen"
12
-    WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True" ResizeMode="CanMinimize" BorderThickness="10"
13
-   >
12
+    WindowStyle="None"    AllowsTransparency="True"  Background="#EFF1F8" ShowInTaskbar="True" ResizeMode="CanMinimize" BorderThickness="7">
13
+    <Window.Effect>
14
+        <DropShadowEffect BlurRadius="10" Color="#bababa" Direction="80" ShadowDepth="0"/>
15
+    </Window.Effect>
14 16
     <!--<Grid>
15 17
         <Border CornerRadius="0,0,0,0"
16 18
                 Background="White"
@@ -251,10 +253,6 @@
251 253
                             </StackPanel>
252 254
                         </Button>
253 255
                     </StackPanel>
254
-                    <Label x:Name="lbl1" Content="Label" HorizontalAlignment="Left" Margin="469,10,0,0" Grid.Row="1" VerticalAlignment="Top" RenderTransformOrigin="0.802,0.126"/>
255
-                    <Label x:Name="lbl2" Content="Label" HorizontalAlignment="Left" Margin="780,10,0,0" Grid.Row="1" VerticalAlignment="Top" RenderTransformOrigin="0.34,0.173"/>
256
-                    <Label x:Name="lbl3" Content="Label" HorizontalAlignment="Left" Margin="469,49,0,0" Grid.Row="1" VerticalAlignment="Top" RenderTransformOrigin="0.11,0.159"/>
257
-                    <Label x:Name="lbl4" Content="Label" HorizontalAlignment="Left" Margin="780,44,0,0" Grid.Row="1" VerticalAlignment="Top"/>
258 256
                 </Grid>
259 257
                 <!--主内容-->
260 258
                 <Grid Grid.Row="1" x:Name="GridMain" Width="1276" Visibility="Visible">
@@ -325,9 +323,9 @@
325 323
                     Width="60" Height="20"
326 324
                     Click="last_button_Click">
327 325
                             <Button.Content>
328
-                                <StackPanel>
329
-                                    <Image Width="16" Height="12" Source=".\Images\class_p1.png" />
330
-                                </StackPanel>
326
+                            <StackPanel>
327
+                                <Image Width="16" Height="12" Source=".\Images\class_p1.png" />
328
+                            </StackPanel>
331 329
                             </Button.Content>
332 330
                         </Button>
333 331
                         <Grid Width="60"  Background="Transparent">

+ 69
- 20
XHWK.WKTool/XHMicroLessonSystemWindow.xaml.cs Parādīt failu

@@ -471,9 +471,15 @@ namespace XHWK.WKTool
471 471
             {
472 472
                 gridUpload.Visibility = Visibility.Collapsed;
473 473
                 GridMain.Visibility = Visibility.Visible;
474
+                if(APP.pageData.pagenum>0)
475
+                {
476
+                    gridPage.Visibility = Visibility.Visible;
477
+                }
478
+                DataContext = APP.pageData;
474 479
             }
475 480
             else
476 481
             {
482
+                gridPage.Visibility = Visibility.Collapsed;
477 483
                 gridUpload.Visibility = Visibility.Visible;
478 484
                 GridMain.Visibility = Visibility.Collapsed;
479 485
                 InitializeUpload();
@@ -592,6 +598,19 @@ namespace XHWK.WKTool
592 598
             {
593 599
                 FileToolsCommon.SetConfigValue("CameraPosition", "4");
594 600
             }
601
+
602
+            if (rbnMP4.IsChecked == true)
603
+            {
604
+                FileToolsCommon.SetConfigValue("VideoType", "1");
605
+            }
606
+            else if (rbnFLV.IsChecked == true)
607
+            {
608
+                FileToolsCommon.SetConfigValue("VideoType", "2");
609
+            }
610
+            else if (rbnAVI.IsChecked == true)
611
+            {
612
+                FileToolsCommon.SetConfigValue("VideoType", "3");
613
+            }
595 614
             APP.CameraPosition = FileToolsCommon.GetConfigValue("CameraPosition");
596 615
             GridMain.Visibility = Visibility.Visible;
597 616
             gridSetUp.Visibility = Visibility.Collapsed;
@@ -638,6 +657,28 @@ namespace XHWK.WKTool
638 657
                 {
639 658
                     rbnLeftUnder.IsChecked = true;
640 659
                 }
660
+             string type=   FileToolsCommon.GetConfigValue("VideoType");//<!--视频格式 1、MP4 2、FlV 3、AVI-->
661
+                if ("1".Equals(type))
662
+                {
663
+                    rbnMP4.IsChecked = true;
664
+                }
665
+                else if ("2".Equals(type))
666
+                {
667
+                    rbnFLV.IsChecked = true;
668
+                }
669
+                else if ("3".Equals(type))
670
+                {
671
+                    rbnAVI.IsChecked = true;
672
+                }
673
+                string isSound = FileToolsCommon.GetConfigValue("IsSound");//<!--声音 true 有 false 无-->
674
+                if(isSound=="true")
675
+                {
676
+                    rbnY.IsChecked = true;
677
+                }
678
+                else
679
+                {
680
+                    rbnN.IsChecked = true;
681
+                }
641 682
             }
642 683
         }
643 684
         /// <summary>
@@ -2821,6 +2862,8 @@ namespace XHWK.WKTool
2821 2862
         /// <param name="e"></param>
2822 2863
         private void BtnUploads_Click(object sender, RoutedEventArgs e) 
2823 2864
         {
2865
+     
2866
+
2824 2867
             pageData.menuList[Subscript].IsEnabled = false;
2825 2868
             List<System.Windows.Controls.Button> buttons = FindChilds<System.Windows.Controls.Button>(listView1, "btnUpload");
2826 2869
             for (int i = 0; i < buttons.Count; i++)
@@ -2831,19 +2874,35 @@ namespace XHWK.WKTool
2831 2874
 
2832 2875
                     if (dAL_Upload.UploadVideo(pageData.menuList[i].FileGuid, out string ErrMessage))
2833 2876
                     {
2834
-                        pageData.menuList[i].Visi = "Visible";
2835
-                        pageData.menuList[i].Coll = "Collapsed";
2877
+                        //foreach (Model_WKData wKData in APP.WKDataList)
2878
+                        //{
2879
+                        //    if (wKData.VideoList == null)
2880
+                        //        continue;
2881
+                        //    //if()
2882
+                        //    //{
2883
+
2884
+                        //    //}
2885
+                        //}
2886
+                            pageData.menuList[i].Visi = "Collapsed";
2887
+                        pageData.menuList[i].Coll = "Visible";
2836 2888
 
2837 2889
                         DataContext = pageData;
2838 2890
 
2839
-                        System.Windows.MessageBox.Show("视频上传成功!");
2891
+                        //MessageWindow.Show("视频上传服务器成功!");
2892
+                        if (APP.W_UploadWindow == null)
2893
+                        {
2894
+                            APP.W_UploadWindow = new UploadWindow();
2895
+                            APP.W_UploadWindow.Owner = this;
2896
+                        }
2897
+                        //long size = Convert.ToInt64(FileToolsCommon.GetFileSizeByMB(pageData.menuList[i].FilePath));
2898
+                            APP.W_UploadWindow.Initialize(pageData.menuList[i].VideoName,11110 /*Convert.ToInt64(pageData.menuList[i].VideoSize)*/, pageData.menuList[i].VideoType);
2899
+                        APP.W_UploadWindow.ShowDialog();
2900
+                     
2840 2901
                     }
2841 2902
                     else
2842 2903
                     {
2843
-                        System.Windows.MessageBox.Show(ErrMessage);
2904
+                        MessageWindow.Show(ErrMessage);
2844 2905
                     }
2845
-
2846
-
2847 2906
                 }
2848 2907
             }
2849 2908
         }
@@ -3272,17 +3331,9 @@ namespace XHWK.WKTool
3272 3331
             Thumb thu = (Thumb)sender;
3273 3332
             Canvas.SetLeft(thu, Canvas.GetLeft(thu) + e.HorizontalChange);
3274 3333
             Canvas.SetTop(thu, Canvas.GetTop(thu) + e.VerticalChange);
3275
-            //lbl1.Content = e.HorizontalChange + "," + e.VerticalChange;
3276
-            lbl2.Content = Mouse.GetPosition(gridM);
3277 3334
                 switch (thu.Name)
3278 3335
                 {
3279 3336
                     case "RectLeftUp":
3280
-                        //imgCanvas.Width -= e.HorizontalChange;
3281
-                        //imgCanvas.Height -= e.VerticalChange;
3282
-                        //imgCanvas.Margin = new Thickness(Mouse.GetPosition(gridM).X , Mouse.GetPosition(gridM).Y , 0, 0);
3283
-                        ////imgCanvas.Width = imgRightDown.X- Mouse.GetPosition(gridM).X-10.0;
3284
-                        ////imgCanvas.Height = imgRightDown.Y - Mouse.GetPosition(gridM).Y - 10.0
3285
-                        //lbl1.Content = imgRightDown.X + "," + imgRightDown.Y; ;
3286 3337
                         imgCanvas.Width = imgRightDown.X - (Mouse.GetPosition(gridM).X);
3287 3338
                         imgCanvas.Height = imgRightDown.Y - (Mouse.GetPosition(gridM).Y);
3288 3339
                         imgCanvas.Margin = new Thickness(Mouse.GetPosition(gridM).X, Mouse.GetPosition(gridM).Y, 0, 0);
@@ -3304,12 +3355,10 @@ namespace XHWK.WKTool
3304 3355
                     default:
3305 3356
                         break;
3306 3357
                 }
3307
-                lbl1.Content = imgCanvas.Margin.Left + "," + imgCanvas.Margin.Top;
3308
-                lbl2.Content = (imgCanvas.Margin.Left+ imgCanvas.Width) +"," + imgCanvas.Margin.Top;
3309
-                lbl3.Content = imgCanvas.Margin.Left + "," + (imgCanvas.Margin.Top+ imgCanvas.Height);
3310
-                lbl4.Content= (imgCanvas.Margin.Left + imgCanvas.Width )+ "," + (imgCanvas.Margin.Top + imgCanvas.Height);
3311
-                //lbl3.Content = imgCanvas.Width + "," + imgCanvas.Height;
3312
-                //lbl4.Content = (imgCanvas.Margin.Left + imgCanvas.ActualWidth)+","+ (imgCanvas.Margin.Top + imgCanvas.ActualHeight);
3358
+                //lbl1.Content = imgCanvas.Margin.Left + "," + imgCanvas.Margin.Top;
3359
+                //lbl2.Content = (imgCanvas.Margin.Left+ imgCanvas.Width) +"," + imgCanvas.Margin.Top;
3360
+                //lbl3.Content = imgCanvas.Margin.Left + "," + (imgCanvas.Margin.Top+ imgCanvas.Height);
3361
+                //lbl4.Content= (imgCanvas.Margin.Left + imgCanvas.Width )+ "," + (imgCanvas.Margin.Top + imgCanvas.Height);
3313 3362
             }
3314 3363
             catch (Exception ex)
3315 3364
             {

+ 7
- 0
XHWK.WKTool/XHWK.WKTool.csproj Parādīt failu

@@ -162,6 +162,9 @@
162 162
     <Compile Include="ScreenRecordingToolbarWindow.xaml.cs">
163 163
       <DependentUpon>ScreenRecordingToolbarWindow.xaml</DependentUpon>
164 164
     </Compile>
165
+    <Compile Include="UploadWindow.xaml.cs">
166
+      <DependentUpon>UploadWindow.xaml</DependentUpon>
167
+    </Compile>
165 168
     <Compile Include="XHMicroLessonSystemWindow.xaml.cs">
166 169
       <DependentUpon>XHMicroLessonSystemWindow.xaml</DependentUpon>
167 170
     </Compile>
@@ -211,6 +214,10 @@
211 214
       <Generator>MSBuild:Compile</Generator>
212 215
       <SubType>Designer</SubType>
213 216
     </Page>
217
+    <Page Include="UploadWindow.xaml">
218
+      <SubType>Designer</SubType>
219
+      <Generator>MSBuild:Compile</Generator>
220
+    </Page>
214 221
     <Page Include="XHMicroLessonSystemWindow.xaml">
215 222
       <Generator>MSBuild:Compile</Generator>
216 223
       <SubType>Designer</SubType>

+ 2
- 2
XHWK.WKTool/ZConfig.cs Parādīt failu

@@ -13,9 +13,9 @@ namespace XHWK.WKTool.Config
13 13
         /// <summary>
14 14
         /// 当前版本号
15 15
         /// </summary>
16
-        public static int versionCode = 3;
16
+        public static int versionCode = 4;
17 17
 
18
-        public static string versionName = "1.0.2";
18
+        public static string versionName = "1.0.3";
19 19
 
20 20
         //接口地址
21 21
         public static string apiUrl = isDebug ? "http://schoolapitest.xhkjedu.com" : "http://schoolapi.xhkjedu.com";

Notiek ielāde…
Atcelt
Saglabāt