Example #1
0
        public Config(Writer writer, Format fmt, GetConfig get_new_config)
        {
            m_fmt = fmt;

            m_get_new_config = get_new_config ?? no_new_config;

            file = new VectFormatter(writer);
            file.seperator          = fmt.line_spacing > 0 ? "" : " ";
            file.seperator_spacing  = fmt.line_spacing;
            file.footer_spacing     = 1;

            top_vect = new_vect(writer, fmt.format_vect, "#(", "TV");
            vect     = new_vect(writer, fmt.format_vect, "#(", "V");
            vect_cdr = new_vect(writer, fmt.format_vect, " . #(", "-V");

            cons      = new_cons(writer, fmt.do_abbrev, true, "C");
            top_cons  = new_cons(writer, fmt.do_abbrev, true, "TC");
            vect_cons = new_cons(writer, fmt.do_abbrev, fmt.format_vect, "VC");
            head_cons = new_cons(writer, fmt.do_abbrev, fmt.format_head, "HC");

            vect_cons_cdr = new_cons_cdr(writer, fmt.format_vect, fmt.dot_cdr, fmt.dot_nil, "-VC");
            head_cons_cdr = new_cons_cdr(writer, fmt.format_head, fmt.dot_cdr, fmt.dot_nil, "-HC");
            appl_cons_cdr = new_cons_cdr(writer, fmt.format_appl, fmt.dot_cdr, fmt.dot_nil, "-AC");
            data_cons_cdr = new_cons_cdr(writer, fmt.format_data, fmt.dot_cdr, fmt.dot_nil, "-DC");

            atom = new AtomFormatter(writer);

            atom_cdr = new AtomFormatter(writer);
            atom_cdr.header = " . ";
        }
Example #2
0
 public DExamInquiry()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #3
0
 public DWorkList()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #4
0
 public DPatientSource()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #5
0
 public DExamItemDict()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #6
0
 public DUser()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #7
0
        private void lblPopulateConfig_Click(object sender, EventArgs e)
        {
            SetValuesInInfoToBlank();
            var port = GetSerialPort();

            if (port != null)
            {
                var config     = new GetConfig();
                var connect    = new EnterUSBScopeMode();
                var disconnect = new ExitUSBScopeMode();

                //Getting name of scope
                WriteFrame(disconnect, port);
                System.Threading.Thread.Sleep((Convert.ToInt16(cbxReadDelay.Text)));
                WriteFrame(connect, port);
                System.Threading.Thread.Sleep((Convert.ToInt16(cbxReadDelay.Text)));
                var bytes = InstReadBuffer(port);

                ScopeReady Ready = (ScopeReady)GetResponse(connect, port);
                if (Ready != null)
                {
                    Config.ScopeType properScope = Ready.ScopeType;
                    lblModel.Text = "Detected: " + Convert.ToString(properScope) + System.Environment.NewLine + "Readed: \"" + GetScopeName(Ready.Data) + "\"";
                }
                else
                {
                    GetScopeType type = new GetScopeType();
                    Ready = (ScopeReady)GetResponse(type, port);

                    if (Ready != null)
                    {
                        Config.ScopeType properScope = Ready.ScopeType;
                        lblModel.Text = "Detected: " + Convert.ToString(properScope) + "  Readed: \"" + GetScopeName(Ready.Data) + "\"";
                    }
                    else
                    {
                        lblModel.Text = "Scope not detected:   \"" + GetScopeName(InstReadBuffer(port)) + "'";
                    }
                }
                //Getting config of scope

                DSO.Interfaces.ICurrentConfig cfg = (DSO.Interfaces.ICurrentConfig)GetResponse(config, port);
                if (cfg != null)
                {
                    lblCplChangeable.Text   = cfg.CoupleChangeableByHost.ToString();
                    lblMinMaxCpl.Text       = cfg.MinCoupleSetting + "/" + cfg.MaxCoupleSetting;
                    lblMinMaxRecLength.Text = cfg.MinRecordLength + "/" + cfg.MaxRecordLength;
                    lblMinMaxSens.Text      = cfg.MinVerticalSensitivity + "/" + cfg.MaxVerticalSensitivity;
                    lblMinMaxTb.Text        = cfg.MinTimebaseSetting + "/" + cfg.MaxTimebaseSetting;
                    lblMinMaxTrigLevel.Text = cfg.MinTriggerLevel + "/" + cfg.MaxTriggerLevel;
                    lblMinMaxTrigMode.Text  = cfg.MinTriggerModeSetting + "/" + cfg.MaxTriggerModeSetting;;
                    lblMinMaxTrigPos.Text   = cfg.MinTriggerPosition + "/" + cfg.MaxTriggerPosition;;
                    lblMinMaxTrigSlope.Text = cfg.MinSlopeModeSetting + "/" + cfg.MaxSlopeModeSetting;

                    if (cfg.Ch1Present == true && cfg.Ch2Present == true)
                    {
                        lblNoOfChannels.Text = "2";
                    }
                    else if (cfg.Ch1Present == false || cfg.Ch2Present == false)
                    {
                        lblNoOfChannels.Text = "1";
                    }

                    lblSensChangeable.Text = cfg.SensitivityChangeableByHost.ToString();
                }
                port.Dispose();
            }
        }
Example #8
0
 public DClinicDoctorDict()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #9
0
 public DInterestPatient()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #10
0
 public DDeptDataDict()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #11
0
 public DChargeItemClassDict()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #12
0
 /// <summary>
 /// 获取原始图片
 /// </summary>
 /// <param name="helper"></param>
 /// <param name="ImageUrl"></param>
 /// <returns></returns>
 public static string GetImagesUrl(string ImageUrl)
 {
     return(GetConfig.FullPath() + ImageUrl);
 }
Example #13
0
 /// <summary>
 /// 获取原始图片
 /// </summary>
 /// <param name="helper"></param>
 /// <param name="ImageUrl"></param>
 /// <returns></returns>
 public static string GetImagesUrl(this HtmlHelper helper, string ImageUrl)
 {
     return(GetConfig.FullPath() + ImageUrl);
 }
Example #14
0
 public DBespeak()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #15
0
 public DQcDeptManDict()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #16
0
 public DAreaDict() : base(GetConfig.GetSisConnStr())
 {
 }
Example #17
0
    /// <summary>
    /// 提交后保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnUpload_Click(object sender, EventArgs e)
    {
        // mapFilePath = HttpContext.Current.Server.MapPath(filePath);
        string UploadImageName = "";
        string UploadType      = Request.Form["Upload"];                            //图片方式
        int    ImageSize       = StringDeal.ToInt(GetConfig.Image("ImageSize"));    //图片最大上传
        string UploadImagePath = GetConfig.Image("UploadImagePath");                //图片上传路径
        string ImageType       = GetConfig.Image("ImageType");                      //允许图片类型
        bool   IsThumbnail     = StringDeal.ToBool(Request.Form["IsThumbnail"]);    //是否生成缩略图
        int    ThumbWidth      = StringDeal.ToInt(Request.Form["ThumbWidth"]);      //缩略图宽
        int    ThumbHeight     = StringDeal.ToInt(Request.Form["ThumbHeight"]);     //缩略图高
        string ThumbMode       = Request.Form["ThumbMode"];
        bool   IsWatermark     = StringDeal.ToBool(Request.Form["IsWatermark"]);    //加水印
        string WatermarkImage  = GetConfig.Image("WatermarkImage");                 //水印图地址
        int    WatermarkPos    = StringDeal.ToInt(GetConfig.Image("WatermarkPos")); //水印放置位置
        string SelectImage     = Request.Form["SelectImage"];                       //选择服务器上的图片名
        string WebUrl          = Request.Form["WebUrl"];                            //网络图片地址

        if (String.IsNullOrEmpty(UploadImagePath))
        {
            UploadImagePath = "../../Upload/image/";
        }
        if (ImageSize == 0)
        {
            ImageSize = 1020000;
        }
        else
        {
            ImageSize = ImageSize * 1024;
        }
        if (String.IsNullOrEmpty(ImageType))
        {
            ImageType = "jpg,gif,png,bmp,jpeg";
        }
        if (UploadType == "upload1")
        {
            UploadImagePath = UploadImagePath + DateTime.Today.ToString("yyyyMM") + "/";
            Files.CreateFolder(UploadImagePath);
            #region 大文件上传
            try
            {
                foreach (Telerik.WebControls.UploadedFile file in RadUploadContext.Current.UploadedFiles)
                {
                    System.Drawing.Image image = System.Drawing.Image.FromStream(file.InputStream);
                    if (file.FileName != "")
                    {
                        if (file.ContentLength > ImageSize)
                        {
                            StringDeal.Alter("文件大小不能超过" + ImageSize / 1024 + "KB");
                        }
                        else if (StringDeal.GetExtNameIsArry(ImageType.Split(','), file.FileName))
                        {
                            string FileExt = file.GetExtension();
                            System.Threading.Thread.Sleep(1000);
                            string FileName = StringDeal.GetGuid() + FileExt;
                            file.SaveAs(this.Server.MapPath(UploadImagePath + FileName), true);
                            Response.StatusCode = 200;
                            #region 生成缩略图
                            if (IsThumbnail)
                            {
                                Thumbnail th = new Thumbnail();
                                th.Mode              = ThumbMode;
                                th.FileName          = FileName;
                                th.OriginalImagePath = UploadImagePath;
                                th.Width             = ThumbWidth;
                                th.Height            = ThumbHeight;
                                th.MakeThumbnail();
                            }
                            #endregion
                            UploadImageName = UploadImagePath + FileName;
                        }
                        else
                        {
                            StringDeal.Alter("上传图片格式不正确!");
                        }
                    }
                    image.Dispose();
                }
            }
            catch
            {
            }
            #endregion
        }
        else if (UploadType == "upload2")
        {
            #region  择服务器上的保存
            if (IsThumbnail)
            {
                if (SelectImage != string.Empty)
                {
                    if (!HXD.Common.Utils.IsUrl(SelectImage))
                    {
                        if (HXD.Common.Utils.isPhotoIco(SelectImage))
                        {
                            System.IO.File.Delete(Server.MapPath("~" + HXD.Common.Utils.PhotoIco(SelectImage)));
                        }
                        string FileName = string.Empty;
                        FileName        = SelectImage.Substring(SelectImage.LastIndexOf('/') + 1);
                        UploadImagePath = SelectImage.Remove(SelectImage.LastIndexOf('/') + 1);
                        Thumbnail th = new Thumbnail();
                        th.Mode              = ThumbMode;
                        th.FileName          = FileName;
                        th.OriginalImagePath = UploadImagePath;
                        th.Width             = ThumbWidth;
                        th.Height            = ThumbHeight;
                        th.MakeThumbnail();
                    }
                }
            }
            UploadImageName = SelectImage;
            #endregion
        }
        else
        {
            #region 输入网络图片地址保存
            UploadImageName = WebUrl;
            #endregion
        }

        Response.Write("<script language='javascript' type='text/javascript'>window.parent.loadinndlg().document.getElementById('" + InputName + "').value='" + UploadImageName + "';window.parent.cancel();</script>");
    }
Example #18
0
 public DReportRelation()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #19
0
 public DClinicOfficeDict()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #20
0
 /// <summary>
 /// 从XML删除字段信息
 /// </summary>
 public void DeleteXml()
 {
     xml             = new XmlDoc();
     xml.xmlfilePath = GetConfig.System("TableXmlPath") + Val.TableName + ".xml";
     xml.DeleteNode("/" + Val.TableName, "Name", Val.Name);
 }
Example #21
0
 public DArchives()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #22
0
        /// <summary>
        /// 从XML修改字段信息
        /// </summary>
        public void UpdateXml()
        {
            xml             = new XmlDoc();
            xml.xmlfilePath = GetConfig.System("TableXmlPath") + Val.TableName + ".xml";
            switch (Val.Type)
            {
            case "SingleLine":
                SingleLineType();
                break;

            case "Password":
                PasswordType();
                break;

            case "MultiLine":
                MultiLineType();
                break;

            case "Editor":
                EditorType();
                break;

            case "Select":
                SelectType();
                break;

            case "Number":
                NumberType();
                break;

            case "DateTime":
                DateTimeType();
                break;

            case "Image":
                ImageType();
                break;

            case "File":
                FileType();
                break;

            case "BatchImage":
                BatchImageType();
                break;

            case "BatchFile":
                BatchFileType();
                break;

            case "OtherMenu":
                OtherMenuType();
                break;

            case "Provinces":
                ProvincesType();
                break;

            case "Increment":
                Increment();
                break;
            }
            xml.UpdateNote("/" + Val.TableName, "Name", Val.Name, Val.Default, Field_Col, Field_Val);
        }
Example #23
0
    /// <summary>
    /// 提交后保存
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void btnUpload_Click(object sender, EventArgs e)
    {
        string UploadFileName = "";
        string UploadType     = Request.Form["Upload"];                         //文件方式
        int    FileSize       = StringDeal.ToInt(GetConfig.File("FileSize"));   //文件最大上传
        string UploadFilePath = GetConfig.File("UploadFilePath");               //文件上传路径
        string SelectFile     = Request.Form["SelectFile"];                     //选择服务器上的文件名
        string WebUrl         = Request.Form["WebUrl"].Replace("'", "&acute;"); //网络文件地址

        if (String.IsNullOrEmpty(UploadFilePath))
        {
            UploadFilePath = "../../Upload/File/";
        }
        if (FileSize == 0)
        {
            FileSize = 1020000;
        }
        else
        {
            FileSize = FileSize * 1024;
        }
        if (UploadType == "upload1")
        {
            UploadFilePath = UploadFilePath + DateTime.Today.ToString("yyyyMM") + "/";
            Files.CreateFolder(UploadFilePath);
            #region 大文件上传
            try
            {
                foreach (Telerik.WebControls.UploadedFile file in RadUploadContext.Current.UploadedFiles)
                {
                    if (file.FileName != "")
                    {
                        if (file.ContentLength > FileSize)
                        {
                            StringDeal.Alter("文件大小不能超过" + FileSize / 1024 + "KB");
                        }
                        else if (FormatUploadType(file.FileName))
                        {
                            string FileExt = file.GetExtension();
                            System.Threading.Thread.Sleep(1000);
                            string FileName = StringDeal.GetGuid() + FileExt;
                            file.SaveAs(this.Server.MapPath(UploadFilePath + FileName), true);
                            Response.StatusCode = 200;
                            UploadFileName     += UploadFilePath + FileName + ",";
                        }
                        else
                        {
                            StringDeal.Alter("上传文件格式不正确!");
                        }
                    }
                }
            }
            catch
            {
            }
            #endregion
        }
        else if (UploadType == "upload2")
        {
            #region  择服务器上的保存
            UploadFileName = SelectFile;
            #endregion
        }
        else
        {
            #region 输入网络文件地址保存
            UploadFileName = WebUrl;
            #endregion
        }
        this.JavascriptServer.Text = "BackVal('" + InputName + "','" + UploadFileName.Trim(',') + "');</script>";
    }
Example #24
0
 public DUsersRole()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #25
0
 public DChargeClass()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #26
0
 public DDeptVsQueue()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #27
0
 private System.Data.DataSet queryDs; //查询数据集
 public DStat()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #28
0
 public DReport()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #29
0
 public DQueueInfo()
     : base(GetConfig.GetPacsConnStr())
 {
 }
Example #30
0
 public DImgEquipment()
     : base(GetConfig.GetSisConnStr())
 {
 }
Example #31
0
 public static VectorWriter create(Writer writer, Format fmt, GetConfig get_new_config)
 {
     Config config = new Config(writer, fmt, get_new_config);
     return new VectorWriter(config.file, config);
 }
Example #32
0
 public DImage()
     : base(GetConfig.GetSisConnStr())
 {
 }