置百丈玄冰而崩裂,掷须臾池水而漂摇。
ASP.NET

C# 设置开机自动启动方法

C# 设置开机自动启动方法

我们做系统时,有时候需要开机启动,下面就是开机启动方法:

        /// <summary>
        /// 设置开机启动
        /// </summary>
        /// <param name="started">是否开机启动</param>
        /// <param name="exeName">程序名称</param>
        /// <param name="path">程序路径</param>
        /// <returns></returns>
        public static bool SetAutoStart(bool started, string exeName, string path)
        {
            RegistryKey key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", true);//打开注册表子项
            if (key == null)//如果该项不存在的话,则创建该子项
            {
                key = Registry.LocalMachine.CreateSubKey("SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run");
            }
            if (started == true)
            {
                try
                {
                    key.SetValue(exeName, path);//设置为开机启动
                    key.Close();
                }
                catch
                {
                    return false;
                }
            }
            else
            {
                try
                {
                    key.DeleteValue(exeName);//取消开机启动
                    key.Close();
                }
                catch
                {
                    return false;
                }
            }
            return true;
        }

直接调用就可以了,会在注册表写入开机启动

强强 2022/8/4 1评论

ASP.NET

WPF中的多绑定实现

wpf 有时候有多绑定的需求

 需要多绑定MultiBinding 节点报告,如

<Style x:Key="Color_Patient" TargetType="{x:Type igDP:CellValuePresenter}">
	 <Setter  Property="Foreground">
		<Setter.Value>
			<MultiBinding Converter="{StaticResource ColorEConvert}" Mode="TwoWay">
				<Binding Path="DataItem.ADM_ID_ISS"></Binding>
				<Binding Path="DataItem.ISEXIGENCE"></Binding>
				<Binding Path="DataItem.REQ_SERVICE"></Binding>
			</MultiBinding>
		</Setter.Value>
	</Setter>
	<Setter Property="Background" Value="{Binding Path=DataItem.REMARK,Converter={StaticResource ColorFConvert}, Mode=TwoWay}"/>
</Style>


强强 2022/6/27 0评论

PACS系统安装

RIS默认端口

临床默认端口

临床检查列表默认端口:8089

临床阅片器默认端口:8091


Clinic_Viewer:8090

Clinic_Client:8089

Clinic_Server:8087



域临床:ICE端口:3331

Area_Server-File:6001 

Area_Clinic_Viewer:6090

强强 2022/6/13 1评论