Exemple #1
0
        public static void PowerConnect(PowerUnit source, PowerUnit target, string name)
        {
            if (source == null || target == null)
            {
                return;
            }

            PowerPort port = new PowerPort(String.IsNullOrEmpty(name) ? source.Name + "->" + target.Name : name);

            port.Source = source;
            port.Target = target;

            source.Outputs.Add(port);
            target.Inputs.Add(port);
        }
Exemple #2
0
        public void Save()
        {
            //监听端口
            m_Configuration.AppSettings.Settings["WatchHousePort"].Value = WatchHousePort.ToString();
            m_Configuration.AppSettings.Settings["PowerPort"].Value      = PowerPort.ToString();

            m_Configuration.AppSettings.Settings["DBSource"].Value   = DBSource;
            m_Configuration.AppSettings.Settings["DBName"].Value     = DBName;
            m_Configuration.AppSettings.Settings["DBPort"].Value     = DBPort.ToString();
            m_Configuration.AppSettings.Settings["DBUserName"].Value = DBUserName;
            m_Configuration.AppSettings.Settings["DBPassword"].Value = DBPassword;

            m_Configuration.AppSettings.Settings["PicUrl"].Value      = PicUrl;
            m_Configuration.AppSettings.Settings["EmployeeUrl"].Value = EmployeeUrl;
            m_Configuration.AppSettings.Settings["AppUrl"].Value      = AppUrl;

            m_Configuration.Save();
        }