Browse Source

Finish Setting function

+ Add setting functions
- Removed useless classes
ZhuYifan 5 years ago
parent
commit
b6faa66f9a

+ 6 - 14
WpfTest1/MainWindow.xaml

@@ -317,28 +317,20 @@
                             <Button x:Name="buttonChangeDoctorPWD" FontSize="18" Content="修改医师密码" HorizontalAlignment="Left" Margin="26,154,0,0" VerticalAlignment="Top" Width="236" Height="38" Click="buttonChangeDoctorPWD_Click"/>
                             <Button x:Name="buttonChangeDoctorPWD" FontSize="18" Content="修改医师密码" HorizontalAlignment="Left" Margin="26,154,0,0" VerticalAlignment="Top" Width="236" Height="38" Click="buttonChangeDoctorPWD_Click"/>
                         </Grid>
                         </Grid>
                     </TabItem>
                     </TabItem>
-                    <TabItem Header="软件激活管理及其他设置" Style="{StaticResource smallerHeader}" >
+                    <TabItem Header="其他设置" Style="{StaticResource smallerHeader}" >
                         <Grid>
                         <Grid>
-                            <GroupBox x:Name="groupBoxRegisterInfo" Header="软件激活信息" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="113" Width="1314">
+                            <GroupBox x:Name="groupBoxRegisterInfo" Header="医疗机构信息" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" Height="113" Width="1314">
                                 <Grid>
                                 <Grid>
-                                    <Label x:Name="label3_Copy3" Content="激活状态:已激活           授权于:" HorizontalAlignment="Left" Margin="10,15,0,0" VerticalAlignment="Top" FontSize="18"/>
-                                    <Label x:Name="labelOrganizationName" Content="[机构名称]" HorizontalAlignment="Left" Margin="300,15,0,0" VerticalAlignment="Top" FontSize="18"/>
-                                    <Button x:Name="buttonModifyRegisterInfo" Content="使用其他激活码激活此程序..." HorizontalAlignment="Left" Margin="931,15,0,0" VerticalAlignment="Top" Width="242" Height="34" FontSize="16" Click="buttonModifyRegisterInfo_Click"/>
+                                    <TextBox x:Name="textBoxOrganizationName" HorizontalAlignment="Left" FontSize="18" Height="36" Margin="10,20,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="500" />
+                                    <Button x:Name="buttonModifyRegisterInfo" Content="更新医疗机构名称" HorizontalAlignment="Left" Margin="931,15,0,0" VerticalAlignment="Top" Width="242" Height="34" FontSize="16" Click="buttonModifyRegisterInfo_Click"/>
                                 </Grid>
                                 </Grid>
                             </GroupBox>
                             </GroupBox>
                             <GroupBox x:Name="groupBoxDocSetting" Header="其他设置" HorizontalAlignment="Left" Margin="10,128,0,0" VerticalAlignment="Top" Height="150" Width="1314">
                             <GroupBox x:Name="groupBoxDocSetting" Header="其他设置" HorizontalAlignment="Left" Margin="10,128,0,0" VerticalAlignment="Top" Height="150" Width="1314">
                                 <Grid>
                                 <Grid>
-                                    <RadioButton x:Name="radioButtonBP_mmhg" GroupName="bp_unit" Content="mmHg" HorizontalAlignment="Left" Margin="105,10,0,0" VerticalAlignment="Top"/>
-                                    <RadioButton x:Name="radioButtonBP_kpa" GroupName="bp_unit" Content="kPa" HorizontalAlignment="Left" Margin="181,10,0,0" VerticalAlignment="Top"/>
-                                    <Label x:Name="label6" Content="血压显示单位:" HorizontalAlignment="Left" Margin="10,8,0,0" VerticalAlignment="Top"/>
-                                    <Button x:Name="buttonSaveDocSetting" Content="保存设置(重启后生效)" HorizontalAlignment="Left" Margin="254,6,0,0" VerticalAlignment="Top" Width="124" Click="buttonSaveDocSetting_Click"/>
-                                    <Label x:Name="label66" Content="数据库整理(以节约存储空间):" HorizontalAlignment="Left" Margin="10,50,0,0" VerticalAlignment="Top"/>
+                                    <Label x:Name="label66" Content="数据库清理(以节约存储空间):" HorizontalAlignment="Left" Margin="10,50,0,0" VerticalAlignment="Top"/>
                                     <Button x:Name="buttonOptmizeDatabase" Content="点击整理" HorizontalAlignment="Left" Margin="254,50,0,0" VerticalAlignment="Top" Width="124" Click="buttonOptmizeDatabase_Click"/>
                                     <Button x:Name="buttonOptmizeDatabase" Content="点击整理" HorizontalAlignment="Left" Margin="254,50,0,0" VerticalAlignment="Top" Width="124" Click="buttonOptmizeDatabase_Click"/>
-                                    <Label x:Name="label666" Content="清空所有已生成的PDF诊断报告:" HorizontalAlignment="Left" Margin="400,50,0,0" VerticalAlignment="Top"/>
+                                    <Label x:Name="label666" Content="清理缓存文件:" HorizontalAlignment="Left" Margin="400,50,0,0" VerticalAlignment="Top"/>
                                     <Button x:Name="buttonDeleteAllPdfReport" Content="点击清空" HorizontalAlignment="Left" Margin="600,50,0,0" VerticalAlignment="Top" Width="124" Click="buttonDeleteFiles_Click"/>
                                     <Button x:Name="buttonDeleteAllPdfReport" Content="点击清空" HorizontalAlignment="Left" Margin="600,50,0,0" VerticalAlignment="Top" Width="124" Click="buttonDeleteFiles_Click"/>
-                                    <Label x:Name="label6666" Content="清空所有已生成的导出波形文件:" HorizontalAlignment="Left" Margin="800,50,0,0" VerticalAlignment="Top"/>
-                                    <Button x:Name="buttonDeleteAllCSVWave" Content="点击清空" HorizontalAlignment="Left" Margin="1000,50,0,0" VerticalAlignment="Top" Width="124" Click="buttonDeleteFiles_Click"/>
-
                                 </Grid>
                                 </Grid>
                             </GroupBox>
                             </GroupBox>
                         </Grid>
                         </Grid>

+ 19 - 137
WpfTest1/MainWindow.xaml.cs

@@ -59,23 +59,14 @@ namespace WpfTest1
             selectUserfilter.setMainWindow(this);
             selectUserfilter.setMainWindow(this);
             selectUserevaluation.setMainWindow(this);
             selectUserevaluation.setMainWindow(this);
             selectUserHistory.setMainWindow(this);
             selectUserHistory.setMainWindow(this);
+            textBoxOrganizationName.Text = cfg.organization_name;
         }
         }
 
 
         #region 初始化与系统调用部分
         #region 初始化与系统调用部分
 
 
         //初始化全部组件后需要先输入医生密码才能进入
         //初始化全部组件后需要先输入医生密码才能进入
-        //async 
         private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
         private void MetroWindow_Loaded(object sender, RoutedEventArgs e)
         {   
         {   
-            //Thread.Sleep(2000);
-            //首先验证注册机制
-            
-            bool registerSuccess = cfg.CheckRegisterCode();
-            if (!registerSuccess)
-            {
-                SmallDialogs.RegisterCode rc = new SmallDialogs.RegisterCode(this,cfg,true);
-                rc.ShowDialog();
-            }
             //之后测试登陆
             //之后测试登陆
             SmallDialogs.LoginWindow lw = new SmallDialogs.LoginWindow(this);
             SmallDialogs.LoginWindow lw = new SmallDialogs.LoginWindow(this);
             lw.ShowDialog();
             lw.ShowDialog();
@@ -92,6 +83,7 @@ namespace WpfTest1
             loadQuestionaire(filterQuestionaire, "filter");
             loadQuestionaire(filterQuestionaire, "filter");
             loadQuestionaire(evaluationQuestionaire, "evaluation");
             loadQuestionaire(evaluationQuestionaire, "evaluation");
             labelHomepageCversion.Content = "编译日期:" + Toolkits.Constants.compileDate;
             labelHomepageCversion.Content = "编译日期:" + Toolkits.Constants.compileDate;
+            
         }
         }
 
 
         private void loadQuestionaire(List<QuestionAnswerPair> oneQuestionaire, string type = "filter")
         private void loadQuestionaire(List<QuestionAnswerPair> oneQuestionaire, string type = "filter")
@@ -1266,122 +1258,25 @@ namespace WpfTest1
         }
         }
         #endregion
         #endregion
 
 
-        #region 常用语编辑
-        /*
-        //系统设置--常用语编辑
-        private void commlangGrid_Loaded(object sender, RoutedEventArgs e)
-        {
-            LoadCommlangDataGrid();
-        }
-        public void LoadCommlangDataGrid()
-        {
-            //连接字符串
-            string Connstr = "Data Source=" + System.Environment.CurrentDirectory + "\\Junde.db3"; ;
-            //连接对象
-            System.Data.SQLite.SQLiteConnection con = new System.Data.SQLite.SQLiteConnection(Connstr);
-            //Sql语句
-            string selectCmd = "SELECT * FROM CommonWords LIMIT 100";
-            con.Open();
-            da = new System.Data.SQLite.SQLiteDataAdapter(selectCmd, con);
-            ds = new DataSet();
-            da.Fill(ds);
-
-            dataGridCommlang.ItemsSource = ds.Tables[0].DefaultView;
-            con.Close();
-        }
-        //新增常用语
-        private void buttonAddCommlang_Click(object sender, RoutedEventArgs e)
-        {
-            AddCommonWords a_new_commonword = new AddCommonWords(this);
-            a_new_commonword.Show();
-        }
-        //编辑常用语
-        private void buttonChangeCommlang_Click(object sender, RoutedEventArgs e)
-        {
-            try
-            {
-                var target = (DataRowView)this.dataGridCommlang.SelectedItem;
-                //MessageBox.Show(target["id"].ToString());
-                ModifyCommonWords modify_one = new ModifyCommonWords(this, target["id"].ToString());
-                modify_one.Show();
-            }
-            catch (Exception err)
-            {
-                this.ShowMessageAsync("警告", "请选择一个常用语进行修改\r\n调试信息:" + err.Message + "\r\n" + err.StackTrace);
-            }
-        }
-        //删除常用语
-        private async void buttonDeleteCommlang_Click(object sender, RoutedEventArgs e)
-        {
-            try
-            {
-                var target = (DataRowView)this.dataGridCommlang.SelectedItem;
-                if (target == null)
-                {
-                    await this.ShowMessageAsync("提示", "请选择一个常用语进行删除");
-                    return;
-                }
-                MessageDialogResult clickresult = await this.ShowMessageAsync("提示", "确认删除该常用语吗?", MessageDialogStyle.AffirmativeAndNegative);
-                if (clickresult == MessageDialogResult.Affirmative)//确认
-                {
-                    int status = SQLite.SQLiteModel.DeleteCommonWordsItem(target["id"].ToString());
-                    if (status > 0)
-                    {
-                        await this.ShowMessageAsync("提示", "删除成功!");
-                    }
-                    else
-                    {
-                        await this.ShowMessageAsync("警告", "目标已被删除");
-                    }
-                }
-                else//取消
-                {
-                    return;
-                }
-            }
-            catch (Exception err)
-            {
-                await this.ShowMessageAsync("警告", "请选择一个常用语进行删除!\r\n调试信息:" + err.Message + "\r\n" + err.StackTrace);
-            }
-
+        #region 其他设置
 
 
-            LoadCommlangDataGrid();
-        }
-        //双击表格触发修改常用语的功能
-        private void dataGridCommlang_MouseDoubleClick(object sender, MouseButtonEventArgs e)
-        {
-            buttonChangeCommlang_Click(sender, e);
-        }
-        //*/
-        #endregion
-
-        #region 软件激活管理
-        //重新激活程序
+        /// <summary>
+        /// 更换医疗机构名称
+        /// </summary>
+        /// <param name="sender">默认</param>
+        /// <param name="e">默认</param>
         private void buttonModifyRegisterInfo_Click(object sender, RoutedEventArgs e)
         private void buttonModifyRegisterInfo_Click(object sender, RoutedEventArgs e)
         {
         {
-            SmallDialogs.RegisterCode rc = new SmallDialogs.RegisterCode(this, cfg, false);
-            rc.ShowDialog();
-        }
-
-        //保存其他医生级别的设置,如显示血压的单位
-        private void buttonSaveDocSetting_Click(object sender, RoutedEventArgs e)
-        {
-            string bp_unit_temp = "1";
-            if (radioButtonBP_kpa.IsChecked == true)
-            {
-                bp_unit_temp = "2";
-            }
             try
             try
             {
             {
-                SQLite.SQLiteModel.UpdateDocSetting(bp_unit_temp);
+                SQLiteModel.UpdateOrganizationName(Toolkits.FilterDangerousCharacter.filter(textBoxOrganizationName.Text));
             }
             }
-            catch (Exception err)
+            catch (Exception)
             {
             {
-                this.ShowMessageAsync("错误", "数据库读写失败,调试信息:\r\n" + err.StackTrace);
+                MessageBox.Show("更新失败!", "错误");
             }
             }
-
-            cfg.refresh();
-            this.ShowMessageAsync("提示", "修改成功");
+            MessageBox.Show("更新成功", "提示");
+            
         }
         }
 
 
         /// <summary>
         /// <summary>
@@ -1394,19 +1289,20 @@ namespace WpfTest1
             try
             try
             {
             {
                 //获取标记为删除的病人记录
                 //获取标记为删除的病人记录
-                List<string> ids_to_be_deleted = SQLite.SQLiteModel.getDeletedPatients();
+                List<int> ids_to_be_deleted = SQLite.SQLiteModel.getDeletedPatients();
                 //确实删除这些病人记录
                 //确实删除这些病人记录
                 SQLite.SQLiteModel.realDeleteRecords();
                 SQLite.SQLiteModel.realDeleteRecords();
                 //确实删除这些病人所含有的检查记录
                 //确实删除这些病人所含有的检查记录
-                foreach(string each_line in ids_to_be_deleted)
+                foreach(int each_line in ids_to_be_deleted)
                 {
                 {
-                    //SQLite.SQLiteModel.DeleteRecordItem(each_line);
+                    SQLite.SQLiteModel.deleteRecordByPid(each_line);
                 }
                 }
+                //SQLiteModel.optmizeDatabase();
                 MessageBox.Show("操作完成", "信息");
                 MessageBox.Show("操作完成", "信息");
             }
             }
-            catch (Exception)
+            catch (Exception err)
             {
             {
-                MessageBox.Show("数据库异常", "错误");
+                MessageBox.Show("数据库异常\r\b"+err.Message+"\r\b"+err.StackTrace, "错误");
             }
             }
         }
         }
 
 
@@ -1445,22 +1341,8 @@ namespace WpfTest1
                 MessageBox.Show("文件系统异常", "错误");
                 MessageBox.Show("文件系统异常", "错误");
             }
             }
         }
         }
-
-
-
-
-
-
-
-
-
-
         #endregion
         #endregion
 
 
         #endregion
         #endregion
-
-        
     }
     }
-
-
 }
 }

+ 0 - 57
WpfTest1/PatientInfo.xaml

@@ -1,57 +0,0 @@
-<UserControl x:Class="WpfTest1.PatientInfo"
-             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WpfTest1"
-             xmlns:my="clr-namespace:WpfTest1"
-             mc:Ignorable="d" Height="116" Width="1330"
-             >
-    <!--d:DesignHeight="300" d:DesignWidth="300"-->
-    <Grid>
-        <Grid Margin="0,0,0,0">
-            <GroupBox x:Name="groupBox" Header="病例基本信息及输入参数" HorizontalAlignment="Left" Margin="0,0,0,-116" VerticalAlignment="Top" Height="116" Width="1330">
-                <Grid Margin="0,0,84,0">
-                    <Label x:Name="label2_Copy" Content="身份证号:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy1" Content="病例号:" HorizontalAlignment="Left" Margin="215,9,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy2" Content="姓名:" HorizontalAlignment="Left" Margin="400,9,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy3" Content="孕次:" HorizontalAlignment="Left" Margin="532,10,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy4" Content="产次:" HorizontalAlignment="Left" Margin="603,10,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy5" Content="年龄:" HorizontalAlignment="Left" Margin="675,10,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy6" Content="身高:" HorizontalAlignment="Left" Margin="759,10,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy7" Content="cm   体重:" HorizontalAlignment="Left" Margin="844,10,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <TextBox x:Name="textBoxIDNum" HorizontalAlignment="Left" Height="25" Margin="80,9,0,0" TextWrapping="Wrap" Text="123123123123123139" VerticalAlignment="Top" Width="130" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxPaID" HorizontalAlignment="Left" Height="17" Margin="264,10,0,0" TextWrapping="Wrap" Text="123123123123123139" VerticalAlignment="Top" Width="131" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxName" HorizontalAlignment="Left" Height="17" Margin="440,10,0,0" TextWrapping="Wrap" Text="李二狗" VerticalAlignment="Top" Width="87" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxPerg_time" HorizontalAlignment="Left" Height="24" Margin="573,10,0,0" TextWrapping="Wrap" Text="12" VerticalAlignment="Top" Width="25" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxProd_time" HorizontalAlignment="Left" Height="25" Margin="645,10,0,0" TextWrapping="Wrap" Text="23" VerticalAlignment="Top" Width="25" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxAge" HorizontalAlignment="Left" Height="25" Margin="721,10,0,0" TextWrapping="Wrap" Text="100" VerticalAlignment="Top" Width="33" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxHeight" HorizontalAlignment="Left" Height="17" Margin="805,10,0,0" TextWrapping="Wrap" Text="299" VerticalAlignment="Top" Width="34" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxDescription" HorizontalAlignment="Left" Height="17" Margin="1030,10,0,0" TextWrapping="Wrap" Text="(无)" VerticalAlignment="Top" Width="160" IsEnabled="False"/>
-                    <Label x:Name="label2_Copy11" Content="收缩压:" HorizontalAlignment="Left" Margin="10,48,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="bp_unit1" Content="mmHg" HorizontalAlignment="Left" Margin="108,48,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy12" Content="舒张压:" HorizontalAlignment="Left" Margin="157,48,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="bp_unit2" Content="mmHg" HorizontalAlignment="Left" Margin="252,49,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy22" Content="平均动脉压:" HorizontalAlignment="Left" Margin="313,49,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="bp_unit3" Content="mmHg" HorizontalAlignment="Left" Margin="426,49,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy33" Content="体重指数:" HorizontalAlignment="Left" Margin="484,49,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy44" Content="kg   备注:" HorizontalAlignment="Left" Margin="963,11,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy55" Content="孕周:" HorizontalAlignment="Left" Margin="619,48,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy66" Content="周" HorizontalAlignment="Left" Margin="709,48,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy77" Content="天" HorizontalAlignment="Left" Margin="783,48,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <TextBox x:Name="textBoxHighBP" HorizontalAlignment="Left" Height="22" Margin="68,48,0,0" TextWrapping="Wrap"  VerticalAlignment="Top" Width="33" IsEnabled="False" TextChanged="textBoxHighBP_TextChanged"/>
-                    <TextBox x:Name="textBoxLowBP" HorizontalAlignment="Left" Height="25" Margin="215,48,0,0" TextWrapping="Wrap"  VerticalAlignment="Top" Width="32" IsEnabled="False" TextChanged="textBoxLowBP_TextChanged"/>
-                    <TextBox x:Name="textBoxMeanBP" HorizontalAlignment="Left" Height="25" Margin="389,48,0,0" TextWrapping="Wrap"  VerticalAlignment="Top" Width="32" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxWeight" HorizontalAlignment="Left" Height="25" Margin="923,9,0,0" TextWrapping="Wrap" Text="999" VerticalAlignment="Top" Width="35" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxBMI" HorizontalAlignment="Left" Height="25" Margin="544,47,0,0" TextWrapping="Wrap" Text="23.1235" VerticalAlignment="Top" Width="54" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxWeek" HorizontalAlignment="Left" Height="25" Margin="665,48,0,0" TextWrapping="Wrap" Text="100" VerticalAlignment="Top" Width="33" IsEnabled="False"/>
-                    <TextBox x:Name="textBoxDay" HorizontalAlignment="Left" Height="17" Margin="741,47,0,0" TextWrapping="Wrap" Text="299" VerticalAlignment="Top" Width="34" IsEnabled="False"/>
-                    
-
-                </Grid>
-
-            </GroupBox>
-
-        </Grid>
-    </Grid>
-</UserControl>

+ 0 - 130
WpfTest1/PatientInfo.xaml.cs

@@ -1,130 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-using WpfTest1.SQLite;
-
-namespace WpfTest1
-{
-    /// <summary>
-    /// PatientInfo.xaml 的交互逻辑
-    /// PatientInfo是显示在各个界面的病例信息组件
-    /// </summary>
-    public partial class PatientInfo : UserControl
-    {
-        public PatientInfo()
-        {
-            InitializeComponent();
-            textBoxHighBP.IsEnabled = false;
-            textBoxLowBP.IsEnabled = false;
-        }
-        public void setPatientInfo(Patient onePerson, bool bpReadOnly = false)
-        {
-            
-            fillBlanks(onePerson);
-            if (bpReadOnly)
-            {
-                textBoxHighBP.IsEnabled = false;
-                textBoxLowBP.IsEnabled = false;
-            }
-            else
-            {
-                textBoxHighBP.IsEnabled = true;
-                textBoxLowBP.IsEnabled = true;
-            }
-        }
-
-        public void setPatientInfo(Patient onePerson, double highBp, double lowBp, Toolkits.Config cfg, bool bpReadOnly = true)
-        {
-            fillBlanks(onePerson);
-            if (cfg.bp_unit_hhmg == 1)
-            {
-                textBoxHighBP.Text = highBp.ToString();
-                textBoxLowBP.Text = lowBp.ToString();
-                textBoxMeanBP.Text = ((highBp + lowBp) / 2).ToString();
-                bp_unit1.Content = "mmHg";
-                bp_unit2.Content = "mmHg";
-                bp_unit3.Content = "mmHg";
-            }
-            else
-            {
-                textBoxHighBP.Text = (highBp*4/3).ToString();
-                textBoxLowBP.Text = (lowBp*4/3).ToString();
-                textBoxMeanBP.Text = (((highBp * 4 / 3) + (lowBp * 4 / 3)) / 2).ToString();
-                bp_unit1.Content = "kPa";
-                bp_unit2.Content = "kPa";
-                bp_unit3.Content = "kPa";
-            }
-            
-            if (bpReadOnly)
-            {
-                textBoxHighBP.IsEnabled = false;
-                textBoxLowBP.IsEnabled = false;
-            }
-            else
-            {
-                textBoxHighBP.IsEnabled = true;
-                textBoxLowBP.IsEnabled = true;
-            }
-        }
-
-        private void fillBlanks(Patient onePerson)
-        {/*
-            textBoxIDNum.Text = onePerson.idNum;
-            textBoxPaID.Text = onePerson.record_id;
-            textBoxName.Text = onePerson.name;
-            textBoxPerg_time.Text = onePerson.pregnancy_times.ToString();
-            textBoxProd_time.Text = onePerson.birth_times.ToString();
-            textBoxHeight.Text = onePerson.height.ToString();
-            textBoxDescription.Text = onePerson.description == "" ? "(无)" : onePerson.description;
-            textBoxWeight.Text = onePerson.weight.ToString();
-            textBoxBMI.Text = (onePerson.weight / ((onePerson.height / 100.0) * (onePerson.height / 100.0))).ToString(); //体重(kg)/身高(m)^2
-            textBoxWeek.Text = ((DateTime.Now - onePerson.pregnancy_date).Days / 7 + 1).ToString();
-            textBoxDay.Text = ((DateTime.Now - onePerson.pregnancy_date).Days % 7).ToString();
-
-            if (onePerson.idNum.Length >= 13)
-            {
-                //假设身份证号合法
-                string birthday = onePerson.idNum.Substring(6, 8);
-                //MessageBox.Show(birthday);
-                DateTime birthdayDate = new DateTime(Convert.ToInt32(birthday.Substring(0, 4)), Convert.ToInt32(birthday.Substring(4, 2)), Convert.ToInt32(birthday.Substring(6, 2)));
-                int age = Toolkits.OtherSmallFunction.getAgeByBirthDay(birthdayDate);
-                textBoxAge.Text = age.ToString();
-            }
-            else
-            {
-                textBoxAge.Text = "--";
-            }*/
-        }
-
-        private void textBoxHighBP_TextChanged(object sender, TextChangedEventArgs e)
-        {
-            calculateAverageBP();
-        }
-        private void textBoxLowBP_TextChanged(object sender, TextChangedEventArgs e)
-        {
-            calculateAverageBP();
-        }
-        private void calculateAverageBP()
-        {
-            try
-            {
-                textBoxMeanBP.Text = ((Convert.ToDouble(textBoxHighBP.Text) + Convert.ToDouble(textBoxLowBP.Text)) / 2).ToString();
-            }
-            catch
-            {
-                ;
-            }
-        }
-    }
-}

+ 0 - 32
WpfTest1/PatientInfoShort.xaml

@@ -1,32 +0,0 @@
-<UserControl x:Class="WpfTest1.PatientInfoShort"
-            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
-             xmlns:local="clr-namespace:WpfTest1"
-             xmlns:my="clr-namespace:WpfTest1"
-             mc:Ignorable="d" Height="86" Width="410"
-             >
-    <!--d:DesignHeight="300" d:DesignWidth="300"-->
-    <Grid>
-        <Grid Margin="0,0,0,0">
-            <GroupBox x:Name="groupBox" Header="病例信息" HorizontalAlignment="Left" Margin="0,0,0,-116" VerticalAlignment="Top" Height="86" Width="410">
-                <Grid Margin="0,0,-5,0">
-                    <Label x:Name="label2_Copy1" Content="病例号:" HorizontalAlignment="Left" Margin="10,23,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="labelName" Content="[name]" HorizontalAlignment="Left" Margin="10,-5,0,0" VerticalAlignment="Top" FontSize="20" FontWeight="Bold"/>
-                    <Label x:Name="label2_Copy3" Content="孕次:" HorizontalAlignment="Left" Margin="297,0,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy4" Content="产次:" HorizontalAlignment="Left" Margin="300,23,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="labelPregTime" Content="[time]" HorizontalAlignment="Left" Margin="339,0,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="labelHeight" Content="[Height]" HorizontalAlignment="Left" Margin="235,0,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="labelPaId" Content="[patinet_id]" HorizontalAlignment="Left" Margin="68,23,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy33" Content="性别:女    身高:" HorizontalAlignment="Left" Margin="130,0,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="label2_Copy44" Content="体重:" HorizontalAlignment="Left" Margin="189,23,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="labelProdTime" Content="[time]" HorizontalAlignment="Left" Margin="339,23,0,0" VerticalAlignment="Top" FontSize="12"/>
-                    <Label x:Name="labelWeight" Content="[wright]" HorizontalAlignment="Left" Margin="240,23,0,0" VerticalAlignment="Top" FontSize="12"/>
-                </Grid>
-
-            </GroupBox>
-
-        </Grid>
-    </Grid>
-</UserControl>

+ 0 - 38
WpfTest1/PatientInfoShort.xaml.cs

@@ -1,38 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Navigation;
-using System.Windows.Shapes;
-
-namespace WpfTest1
-{
-    /// <summary>
-    /// PatientInfoShort.xaml 的交互逻辑
-    /// </summary>
-    public partial class PatientInfoShort : UserControl
-    {
-        public PatientInfoShort()
-        {
-            InitializeComponent();
-        }
-
-        public void fillBlanks(SQLite.Patient pa)
-        {/*
-            labelName.Content = pa.name;
-            labelPaId.Content = pa.record_id;
-            labelHeight.Content = pa.height;
-            labelWeight.Content = pa.weight;
-            labelPregTime.Content = pa.pregnancy_times;
-            labelProdTime.Content = pa.birth_times;*/
-        }
-    }
-}

+ 19 - 112
WpfTest1/SQLite/SQLiteModel.cs

@@ -230,17 +230,17 @@ namespace WpfTest1.SQLite
         /// <summary>
         /// <summary>
         /// getDeletedPatients:从Patient表中获取所有已被标记为删除的数据的id
         /// getDeletedPatients:从Patient表中获取所有已被标记为删除的数据的id
         /// </summary>
         /// </summary>
-        public static List<string> getDeletedPatients()
+        public static List<int> getDeletedPatients()
         {
         {
             string sql = "SELECT p_id FROM Patient WHERE p_delete_flag = 1";
             string sql = "SELECT p_id FROM Patient WHERE p_delete_flag = 1";
             SQLiteHelper db = new SQLiteHelper(dbPath);
             SQLiteHelper db = new SQLiteHelper(dbPath);
             SQLiteParameter[] parameters = new SQLiteParameter[] { };
             SQLiteParameter[] parameters = new SQLiteParameter[] { };
-            List<string> result = new List<string>();
+            List<int> result = new List<int>();
             using (SQLiteDataReader reader = db.ExecuteReader(sql, parameters))
             using (SQLiteDataReader reader = db.ExecuteReader(sql, parameters))
             {
             {
                 while (reader.Read())
                 while (reader.Read())
                 {
                 {
-                    string id = reader.IsDBNull(0) ? "" : reader.GetString(0);
+                    int id = reader.IsDBNull(0) ? 0 : reader.GetInt32(0);
                     result.Add(id);
                     result.Add(id);
                 }
                 }
             }
             }
@@ -581,6 +581,20 @@ namespace WpfTest1.SQLite
             return db.ExecuteNonQuery(sql, parameters);
             return db.ExecuteNonQuery(sql, parameters);
         }
         }
 
 
+        /// <summary>
+        /// 删除病例pid对应的所有记录
+        /// </summary>
+        /// <param name="r_id">记录ID</param>
+        public static int deleteRecordByPid(int p_id)
+        {
+            string sql = "DELETE FROM Record WHERE p_id=@p_id";
+            SQLiteHelper db = new SQLiteHelper(dbPath);
+            SQLiteParameter[] parameters = new SQLiteParameter[]{
+                                                               new SQLiteParameter("@p_id",p_id)
+                                                               };
+            return db.ExecuteNonQuery(sql, parameters);
+        }
+
         #endregion
         #endregion
 
 
 
 
@@ -787,7 +801,7 @@ namespace WpfTest1.SQLite
             }
             }
         }
         }
         //更新激活码信息
         //更新激活码信息
-        public static void UpdateRegisterCode(string name, string pw, string code)
+        public static void UpdateOrganizationName(string name)
         {
         {
             //Boolean a = false;
             //Boolean a = false;
             string sql = "UPDATE Config SET value=@name WHERE key='organization_name'";
             string sql = "UPDATE Config SET value=@name WHERE key='organization_name'";
@@ -796,115 +810,8 @@ namespace WpfTest1.SQLite
                                                                new SQLiteParameter("@name",name)
                                                                new SQLiteParameter("@name",name)
                                                                };
                                                                };
             db.ExecuteNonQuery(sql, parameters);
             db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@pw WHERE key='organization_pw'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@pw",pw)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@code WHERE key='organization_active_code'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@code",code)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-        }
-        //更新血压单位显示hhmg或者kpa,如果为1则是hhmg
-        public static void UpdateDocSetting(string value)
-        {
-            //Boolean a = false;
-            string sql = "UPDATE Config SET value=@value WHERE key='bp_unit_mmhg'";
-            SQLiteHelper db = new SQLiteHelper(dbPath);
-            SQLiteParameter[] parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@value",value)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-        }
-        //更新平滑参数
-        public static void UpdateSmoothPara(int ori_pts, int ori_times, int dri_pts, int dri_times, int filter_when_saving)
-        {
-            //Boolean a = false;
-            string sql = "UPDATE Config SET value=@ori_pts WHERE key='original_smooth_points'";
-            SQLiteHelper db = new SQLiteHelper(dbPath);
-            SQLiteParameter[] parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@ori_pts",ori_pts)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@ori_times WHERE key='original_smooth_times'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@ori_times",ori_times)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@dri_pts WHERE key='derive_smooth_points'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@dri_pts",dri_pts)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@dri_times WHERE key='derive_smooth_times'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@dri_times",dri_times)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@filter_when_saving WHERE key='filter_when_saving'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@filter_when_saving",filter_when_saving)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-        }
-        //只更新特征值数列的平滑参数
-        public static void UpdateEigenSmoothPara(int egi_pts, int egi_times)
-        {
-            //Boolean a = false;
-            string sql = "UPDATE Config SET value=@egi_pts WHERE key='eigen_smooth_points'";
-            SQLiteHelper db = new SQLiteHelper(dbPath);
-            SQLiteParameter[] parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@egi_pts",egi_pts)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@egi_times WHERE key='eigen_smooth_times'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@egi_times",egi_times)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-        }
-
-        //更新报告中report_figure_name
-        public static void UpdateReportFigureName(string new_name)
-        {
-            string sql = "UPDATE Config SET value=@new_name WHERE key='report_figure_name'";
-            SQLiteHelper db = new SQLiteHelper(dbPath);
-            SQLiteParameter[] parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@new_name",new_name)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-        }
-        //更新主公式等参数
-        public static void UpdateGeneralExpression(string new_segment_name, string segement_threhold, string new_expression)
-        {
-            string sql = "UPDATE Config SET value=@new_segment_name WHERE key='segement_name'";
-            SQLiteHelper db = new SQLiteHelper(dbPath);
-            SQLiteParameter[] parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@new_segment_name",new_segment_name)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@segement_threhold WHERE key='segement_threhold'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@segement_threhold",segement_threhold)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
-            sql = "UPDATE Config SET value=@new_expression WHERE key='general_expression'";
-            db = new SQLiteHelper(dbPath);
-            parameters = new SQLiteParameter[]{
-                                                               new SQLiteParameter("@new_expression",new_expression)
-                                                               };
-            db.ExecuteNonQuery(sql, parameters);
         }
         }
+       
 
 
         #endregion
         #endregion
 
 

+ 0 - 25
WpfTest1/SmallDialogs/RegisterCode.xaml

@@ -1,25 +0,0 @@
-<Window x:Class="WpfTest1.SmallDialogs.RegisterCode"
-        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
-        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
-        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
-        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:WpfTest1.SmallDialogs"
-        mc:Ignorable="d"
-        Title="激活本系统" Height="500" Width="800">
-    <Grid>
-        <Grid>
-            <Label x:Name="label" Content="请输入本机构名称:" HorizontalAlignment="Left" Height="36" Margin="29,26,0,0" VerticalAlignment="Top" Width="183" FontSize="18"/>
-            <Label x:Name="label1" Content="请输入激活码:" HorizontalAlignment="Left" Height="32" Margin="29,189,0,0" VerticalAlignment="Top" Width="144" FontSize="18"/>
-            <TextBox x:Name="textBox_username" HorizontalAlignment="Left" Height="39" Margin="29,62,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="738" FontSize="18" FontFamily="Microsoft YaHei UI"/>
-            <TextBox x:Name="textBox_password" HorizontalAlignment="Left" Height="31" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="738" Margin="29,140,0,0" FontSize="18" FontFamily="Microsoft YaHei UI"/>
-            <TextBox x:Name="textBox_code" HorizontalAlignment="Left" Height="91" Margin="29,226,0,0" TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="738" FontFamily="Microsoft YaHei Light"/>
-            <Button x:Name="button_check" Content="验证" HorizontalAlignment="Left" Height="39" Margin="214,394,0,0" VerticalAlignment="Top" Width="100" Click="button_Click" FontSize="18" FontFamily="Microsoft YaHei Light"/>
-            <Label x:Name="label2" Content="请输入激活口令:" HorizontalAlignment="Left" Height="34" Margin="29,106,0,0" VerticalAlignment="Top" Width="171" FontSize="18"/>
-            <Button x:Name="button_Cancel" Content="取消" HorizontalAlignment="Left" Height="39" Margin="488,394,0,0" VerticalAlignment="Top" Width="102"  FontSize="18" FontFamily="Microsoft YaHei Light" Click="button_Cancel_Click"/>
-            <Button x:Name="button_Reset" Content="重置" HorizontalAlignment="Left" Height="39" Margin="350,394,0,0" VerticalAlignment="Top" Width="100" FontSize="18" FontFamily="Microsoft YaHei Light" Click="button_Reset_Click"/>
-            <Label x:Name="label3" Content="激活方法:输入购买本产品时所注册的本机构名称(报告单中的机构名称也以此为准)和由此软件提供商发送给您的激活口令与激活码粘" HorizontalAlignment="Left" Margin="29,322,0,0" VerticalAlignment="Top"/>
-            <Label x:Name="label3_Copy" Content="贴在相应位置,点击“激活”按钮完成激活即可使用本软件全部业务功能。" HorizontalAlignment="Left" Margin="88,347,0,0" VerticalAlignment="Top"/>
-
-        </Grid>
-    </Grid>
-</Window>

+ 0 - 94
WpfTest1/SmallDialogs/RegisterCode.xaml.cs

@@ -1,94 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-using System.Windows;
-using System.Windows.Controls;
-using System.Windows.Data;
-using System.Windows.Documents;
-using System.Windows.Input;
-using System.Windows.Media;
-using System.Windows.Media.Imaging;
-using System.Windows.Shapes;
-
-namespace WpfTest1.SmallDialogs
-{
-    /// <summary>
-    /// RegisterCode.xaml 的交互逻辑
-    /// </summary>
-    public partial class RegisterCode : Window
-    {
-        MainWindow father;
-        Toolkits.Config cfg;
-        bool forceShutdown;
-        public RegisterCode(MainWindow father,Toolkits.Config cfg,bool forceShutdown)
-        {
-            InitializeComponent();
-            this.father = father;
-            this.cfg = cfg;
-            this.forceShutdown = forceShutdown;
-            textBox_username.Text = cfg.organization_name;
-            textBox_password.Text = cfg.organization_pw;
-            textBox_code.Text = cfg.organization_active_code;
-        }
-
-        private void button_Click(object sender, RoutedEventArgs e)
-        {
-            if(textBox_username.Text == "")
-            {
-                MessageBox.Show("机构名称不能为空", "提示");
-                textBox_username.Focus();
-                return;
-            }
-            if (textBox_password.Text == "")
-            {
-                MessageBox.Show("激活口令不能为空", "提示");
-                textBox_password.Focus();
-                return;
-            }
-            if (textBox_code.Text == "")
-            {
-                MessageBox.Show("激活码不能为空", "提示");
-                textBox_code.Focus();
-                return;
-            }
-
-            if (cfg.CheckRegisterCode(
-                Toolkits.FilterDangerousCharacter.filter(textBox_username.Text),
-                Toolkits.FilterDangerousCharacter.filter(textBox_password.Text),
-                Toolkits.FilterDangerousCharacter.filter(textBox_code.Text)
-                ))
-            {
-                SQLite.SQLiteModel.UpdateRegisterCode(
-                Toolkits.FilterDangerousCharacter.filter(textBox_username.Text),
-                Toolkits.FilterDangerousCharacter.filter(textBox_password.Text),
-                Toolkits.FilterDangerousCharacter.filter(textBox_code.Text));
-                cfg.refresh();
-                this.Close();
-            }
-            else
-            {
-                MessageBox.Show("激活失败,请检查验证码和机构信息是否匹配", "警告");
-                return;
-            }
-
-        }
-
-        private void button_Cancel_Click(object sender, RoutedEventArgs e)
-        {
-            if (forceShutdown)
-            {
-                this.father.Close();
-            }
-            this.Close();
-        }
-
-        private void button_Reset_Click(object sender, RoutedEventArgs e)
-        {
-            textBox_username.Text = cfg.organization_name;
-            textBox_password.Text = cfg.organization_pw;
-            textBox_code.Text = cfg.organization_active_code;
-        }
-    }
-}

+ 0 - 49
WpfTest1/Toolkits/Config.cs

@@ -10,23 +10,10 @@ namespace WpfTest1.Toolkits
 {
 {
     public class Config
     public class Config
     {
     {
-        public int original_smooth_points = 3;
-        public int drive_smooth_points = 11;
-        public int eigen_smooth_points = 1;
-        public int original_smooth_times = 2;
-        public int drive_smooth_times = 1;
-        public int eigen_smooth_times = 1;
-        
         public string organization_name = "";
         public string organization_name = "";
         public string organization_pw = "";
         public string organization_pw = "";
         public string organization_active_code = "";
         public string organization_active_code = "";
-        public string segement_name = ""; //总指标段名称,用$分隔
-        public string segement_threhold = ""; //总指标段阈值,用$分隔
-        public string report_figure_name = "";//报告单中波形图名称
-        public string general_expression = "";//自动诊断所使用公式
-        public int filter_when_saving = 1;
 
 
-        public int bp_unit_hhmg = 1;
         Dictionary<string, string> middle = new Dictionary<string, string>();
         Dictionary<string, string> middle = new Dictionary<string, string>();
         public Config()
         public Config()
         {
         {
@@ -40,24 +27,6 @@ namespace WpfTest1.Toolkits
             {
             {
                 switch (key)
                 switch (key)
                 {
                 {
-                    case "original_smooth_points":
-                        original_smooth_points = Convert.ToInt32(middle[key]);
-                        break;
-                    case "derive_smooth_points":
-                        drive_smooth_points = Convert.ToInt32(middle[key]);
-                        break;
-                    case "eigen_smooth_points":
-                        eigen_smooth_points = Convert.ToInt32(middle[key]);
-                        break;
-                    case "original_smooth_times":
-                        original_smooth_times = Convert.ToInt32(middle[key]);
-                        break;
-                    case "derive_smooth_times":
-                        drive_smooth_times = Convert.ToInt32(middle[key]);
-                        break;
-                    case "eigen_smooth_times":
-                        eigen_smooth_times = Convert.ToInt32(middle[key]);
-                        break;
                     case "organization_name":
                     case "organization_name":
                         organization_name = middle[key];
                         organization_name = middle[key];
                         break;
                         break;
@@ -67,24 +36,6 @@ namespace WpfTest1.Toolkits
                     case "organization_active_code":
                     case "organization_active_code":
                         organization_active_code = middle[key];
                         organization_active_code = middle[key];
                         break;
                         break;
-                    case "segement_name":
-                        segement_name = middle[key];
-                        break;
-                    case "segement_threhold":
-                        segement_threhold = middle[key];
-                        break;
-                    case "report_figure_name":
-                        report_figure_name = middle[key];
-                        break;
-                    case "general_expression":
-                        general_expression = middle[key];
-                        break;
-                    case "filter_when_saving":
-                        filter_when_saving = Convert.ToInt32(middle[key]);
-                        break;
-                    case "bp_unit_mmhg":
-                        bp_unit_hhmg = Convert.ToInt32(middle[key]);
-                        break;
                     default:
                     default:
                         break;
                         break;
                 }
                 }

+ 0 - 21
WpfTest1/WpTest.csproj

@@ -186,18 +186,12 @@
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
     </ApplicationDefinition>
     </ApplicationDefinition>
     <Compile Include="Exceptions\SplitException.cs" />
     <Compile Include="Exceptions\SplitException.cs" />
-    <Compile Include="PatientInfoShort.xaml.cs">
-      <DependentUpon>PatientInfoShort.xaml</DependentUpon>
-    </Compile>
     <Compile Include="SmallDialogs\AboutBox.xaml.cs">
     <Compile Include="SmallDialogs\AboutBox.xaml.cs">
       <DependentUpon>AboutBox.xaml</DependentUpon>
       <DependentUpon>AboutBox.xaml</DependentUpon>
     </Compile>
     </Compile>
     <Compile Include="SmallDialogs\LoginWindow.xaml.cs">
     <Compile Include="SmallDialogs\LoginWindow.xaml.cs">
       <DependentUpon>LoginWindow.xaml</DependentUpon>
       <DependentUpon>LoginWindow.xaml</DependentUpon>
     </Compile>
     </Compile>
-    <Compile Include="SmallDialogs\RegisterCode.xaml.cs">
-      <DependentUpon>RegisterCode.xaml</DependentUpon>
-    </Compile>
     <Compile Include="SQLite\Bar1.cs" />
     <Compile Include="SQLite\Bar1.cs" />
     <Compile Include="SQLite\Answer.cs" />
     <Compile Include="SQLite\Answer.cs" />
     <Compile Include="SQLite\UserSelection.cs" />
     <Compile Include="SQLite\UserSelection.cs" />
@@ -224,9 +218,6 @@
     <Compile Include="SmallDialogs\ModifyUser.xaml.cs">
     <Compile Include="SmallDialogs\ModifyUser.xaml.cs">
       <DependentUpon>ModifyUser.xaml</DependentUpon>
       <DependentUpon>ModifyUser.xaml</DependentUpon>
     </Compile>
     </Compile>
-    <Compile Include="PatientInfo.xaml.cs">
-      <DependentUpon>PatientInfo.xaml</DependentUpon>
-    </Compile>
     <Compile Include="selectUser.xaml.cs">
     <Compile Include="selectUser.xaml.cs">
       <DependentUpon>selectUser.xaml</DependentUpon>
       <DependentUpon>selectUser.xaml</DependentUpon>
     </Compile>
     </Compile>
@@ -243,10 +234,6 @@
     <Compile Include="Toolkits\FilterDangerousCharacter.cs" />
     <Compile Include="Toolkits\FilterDangerousCharacter.cs" />
     <Compile Include="Toolkits\OtherSmallFunction.cs" />
     <Compile Include="Toolkits\OtherSmallFunction.cs" />
     <Compile Include="Toolkits\StringToPY.cs" />
     <Compile Include="Toolkits\StringToPY.cs" />
-    <Page Include="PatientInfoShort.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
     <Page Include="SmallDialogs\AboutBox.xaml">
     <Page Include="SmallDialogs\AboutBox.xaml">
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
@@ -255,10 +242,6 @@
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
     </Page>
     </Page>
-    <Page Include="SmallDialogs\RegisterCode.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
     <Page Include="SmallDialogs\AddDoctor.xaml">
     <Page Include="SmallDialogs\AddDoctor.xaml">
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
@@ -291,10 +274,6 @@
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
     </Page>
     </Page>
-    <Page Include="PatientInfo.xaml">
-      <SubType>Designer</SubType>
-      <Generator>MSBuild:Compile</Generator>
-    </Page>
     <Page Include="Resources\Icons.xaml">
     <Page Include="Resources\Icons.xaml">
       <Generator>MSBuild:Compile</Generator>
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
       <SubType>Designer</SubType>