当前位置: 首页>>代码示例>>C#>>正文


C# Profile.WriteValue方法代码示例

本文整理汇总了C#中Profile.WriteValue方法的典型用法代码示例。如果您正苦于以下问题:C# Profile.WriteValue方法的具体用法?C# Profile.WriteValue怎么用?C# Profile.WriteValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Profile的用法示例。


在下文中一共展示了Profile.WriteValue方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetTempOffset

 public void SetTempOffset(double offset)
 {
     // Verify valid parameters
     if (offset < -10 || offset > 10)
         throw new ApplicationException("SetTempOffset requires a number between -10 and 10." + offset + " was received.");
     Profile p = new Profile();
     p.DeviceType = "Focuser";
     p.WriteValue(Gemini.SharedResources.SharedProfileDriverID, "Focuser Temp Offset", offset.ToString());
     TempOffset = offset;
 }
开发者ID:OptecInc,项目名称:FocRot-Software-PC,代码行数:10,代码来源:HubFocRot.cs

示例2: WriteProfile

 /// <summary>
 /// Write the device configuration to the  ASCOM  Profile store
 /// </summary>
 internal void WriteProfile()
 {
     using (Profile driverProfile = new Profile())
     {
         driverProfile.DeviceType = "Dome";
         driverProfile.WriteValue(driverID, traceStateProfileName, traceState.ToString());
         driverProfile.WriteValue(driverID, comPortProfileName, comPort.ToString());
     }
 }
开发者ID:isotbiberi,项目名称:ATA50DOME,代码行数:12,代码来源:Program.cs

示例3: SetTempCoeffName

 public void SetTempCoeffName(char mode, string newName)
 {
     // Verify valid parameters
     if (mode < 'A' || mode > 'E')
         throw new ApplicationException("SetTempCoeffName requires a mode parameter between 'A' and 'E'. " + mode + " was received.");
     Profile p = new Profile();
     p.DeviceType = "Focuser";
     p.WriteValue(Gemini.SharedResources.SharedProfileDriverID, "Focuser Temp Coeff Name " + mode, newName);
 }
开发者ID:OptecInc,项目名称:FocRot-Software-PC,代码行数:9,代码来源:HubFocRot.cs

示例4: cmdOK_Click

        // OK button event handler
        private void cmdOK_Click(object sender, EventArgs e)
        {
            // Place any validation constraint checks here

            if(!CheckTelescopeRegistration())
            {
                throw new Exception("Telescope not chosen");
            }
            using (ASCOM.Utilities.Profile p = new Profile())
            {
                p.DeviceType = "Dome";
                p.WriteValue(Dome.driverID, "comPort", (string)DomeCOMcomboBox.SelectedItem);
            }
            Dispose();
            //if(DomeCOMcomboBox.SelectedItem.ToString().Contains("COM"))
            //{
            //    Dome.comPort=(string)DomeCOMcomboBox.SelectedItem;
            //    try
            //    {
            //        Dome.Connected.set(true);
            //    }
            //    catch(Exception ex)
            //    {
            //        throw ex;
            //    }
            //}
            //Dome.comPort = DomeCOMTextBox.Text; // Update the state variables with results from the dialogue
            //Dome.traceState = chkTrace.Checked;
        }
开发者ID:Rossano,项目名称:Dome_Control,代码行数:30,代码来源:SetupDialogForm.cs

示例5: WriteProfile

 /// <summary>
 /// Write the device configuration to the  ASCOM  Profile store
 /// </summary>
 internal void WriteProfile()
 {
     using (Profile driverProfile = new Profile())
     {
         driverProfile.DeviceType = "Camera";
         driverProfile.WriteValue(driverID, traceStateProfileName, traceState.ToString());
         driverProfile.WriteValue(driverID, gainStateProfileName, gainState.ToString());
         driverProfile.WriteValue(driverID, offsetStateProfileName, offsetState.ToString());
         driverProfile.WriteValue(driverID, onTopStateProfileName, onTopState.ToString());
         driverProfile.WriteValue(driverID, coolerEnabledStateProfileName, coolerEnabledState.ToString());
         driverProfile.WriteValue(driverID, coolerComPortStateProfileName, coolerComPortState.ToString());
         driverProfile.WriteValue(driverID, baudrateAdjustStateProfileName, baudrateAdjustState.ToString());
     }
 }
开发者ID:vakulenko,项目名称:CAM8_software,代码行数:17,代码来源:Driver.cs

示例6: WriteProfile

 /// <summary>
 /// Write the device configuration to the  ASCOM  Profile store
 /// </summary>
 internal void WriteProfile()
 {
     using (Profile driverProfile = new Profile())
     {
         driverProfile.DeviceType = "Telescope";
         driverProfile.WriteValue(driverID, traceStateProfileName, traceState.ToString());
         driverProfile.WriteValue(driverID, comPortProfileName, comPort.ToString());
         driverProfile.CreateSubKey(driverID, "Capabilities");
     }
 }
开发者ID:dharbott,项目名称:Sepikascope2-Driver-And-Tester,代码行数:13,代码来源:Driver.cs

示例7: WriteProfile

 /// <summary>
 /// Write the device configuration to the  ASCOM  Profile store
 /// </summary>
 internal void WriteProfile()
 {
     using (Profile driverProfile = new Profile())
     {
         driverProfile.DeviceType = this.deviceType;
         driverProfile.WriteValue(this.driverId, traceStateProfileName, traceState.ToString());
         driverProfile.WriteValue(this.driverId, tcpPortProfileName, tcpPort.ToString());
     }
 }
开发者ID:pludov,项目名称:ArdFocuser,代码行数:12,代码来源:BaseDriver.cs

示例8: HubFocuserRev2

        static HubFocuserRev2()
        {
            // Get the connections settings from profile.
            EventLogger.LogMessage("Constructing STATIC HubFocuser class.", System.Diagnostics.TraceLevel.Info);

            Profile p = new Profile();
            p.DeviceType = "Focuser";
            PopulateFocuserTypes();

            connectionMethod = (ConnectionMethods)Enum.Parse(typeof(ConnectionMethods),
                p.GetValue(pDriverID, pConnMeth, "", ConnectionMethods.Serial.ToString()));

            // Add note to inform users that the second profile item is not used to hold settings...
            string msg = "This profile item is not used to store any settings. It's only purpose is to link " +
                " the FocusLynx Focuser 2, shown in the chooser, to a ProgID used for COM object creation.";
            p.WriteValue(pUnusedDriverID, "Note:", msg);

            // Initialize the hubFocusers
            instance1 = new HubFocuserRev2(FOCUSER_NUMBER.ONE);
            instance2 = new HubFocuserRev2(FOCUSER_NUMBER.TWO);

            setupFocuserCommunicator();
        }
开发者ID:OptecInc,项目名称:FocusLynx-Software-PC,代码行数:23,代码来源:HubFocuserRev2.cs

示例9: WriteProfile

 /// <summary>
 /// Write the device configuration to the  ASCOM  Profile store
 /// </summary>
 internal void WriteProfile()
 {
     using (Profile driverProfile = new Profile())
     {
         driverProfile.DeviceType = "Telescope";
         driverProfile.WriteValue(driverID, "traceState", traceState.ToString());
         driverProfile.WriteValue(driverID, "comPort", comPort.ToString());
         driverProfile.WriteValue(driverID, "rightAscensionSideralRatePlus", rightAscensionSideralRatePlus.ToString());
         driverProfile.WriteValue(driverID, "rightAscensionSideralRateMinus", rightAscensionSideralRateMinus.ToString());
         driverProfile.WriteValue(driverID, "declinationSideralRatePlus", declinationSideralRatePlus.ToString());
         driverProfile.WriteValue(driverID, "declinationSideralRateMinus", declinationSideralRateMinus.ToString());
     }
 }
开发者ID:mikenorgate,项目名称:arduino-st4,代码行数:16,代码来源:Driver.cs

示例10: WriteProfile

		/// <summary>
		/// Write the device configuration to the  ASCOM  Profile store
		/// </summary>
		internal void WriteProfile()
		{
			using (Profile driverProfile = new Profile())
			{
				driverProfile.DeviceType = "Video";
				driverProfile.WriteValue(m_driverID, m_traceStateProfileName, m_traceState.ToString());
				driverProfile.WriteValue(m_driverID, m_ccdDriverProgIdProfileName, m_ccdDriverProgId.ToString());
			}
		}
开发者ID:hpavlov,项目名称:occurec,代码行数:12,代码来源:Driver.cs

示例11: WriteProfile

 /// <summary>
 /// Write the device configuration to the  ASCOM  Profile store
 /// </summary>
 internal void WriteProfile()
 {
     using (Profile driverProfile = new Profile())
     {
         driverProfile.DeviceType = "Camera";
         driverProfile.WriteValue(driverID, traceStateProfileName, traceState.ToString());
         driverProfile.WriteValue(driverID, gainStateProfileName, gainState.ToString());
         driverProfile.WriteValue(driverID, offsetStateProfileName, offsetState.ToString());
         driverProfile.WriteValue(driverID, onTopStateProfileName, onTopState.ToString());
         driverProfile.WriteValue(driverID, slowCoolingEnabledProfileName, slowCoolingEnabledState.ToString());
         driverProfile.WriteValue(driverID, slowCoolingSpeedProfileName, slowCoolingSpeedState.ToString());
     }
 }
开发者ID:vakulenko,项目名称:CAM8_software,代码行数:16,代码来源:Driver.cs

示例12: WriteProfile

        /// <summary>
        /// Write the device configuration to the  ASCOM  Profile store
        /// </summary>
        internal void WriteProfile()
        {
            using (Profile driverProfile = new Profile())
            {
                driverProfile.DeviceType = "Focuser";

                driverProfile.WriteValue(driverID, traceStateProfileName, traceState.ToString());
                driverProfile.WriteValue(driverID, comPortProfileName, comPort.ToString());

                driverProfile.WriteValue(driverID, TempCoeffProfileName, TempCoeff.ToString());
                driverProfile.WriteValue(driverID, TempCompEnabledProfileName, TempCompEnabled.ToString());

                driverProfile.WriteValue(driverID, MaxVelProfileName, MaxVel.ToString());
                driverProfile.WriteValue(driverID, AccelProfileName, Accel.ToString());
                driverProfile.WriteValue(driverID, IdleOffProfileName, IdleOff.ToString());
                driverProfile.WriteValue(driverID, ReverseProfileName, Reverse.ToString());

                driverProfile.WriteValue(driverID, HomeProfileName, Home.ToString());
                driverProfile.WriteValue(driverID, InvertHomeProfileName, InvertHome.ToString());
                driverProfile.WriteValue(driverID, HomeDirectionProfileName, HomeDirection.ToString());
                driverProfile.WriteValue(driverID, HomeVelProfileName, HomeVel.ToString());
                driverProfile.WriteValue(driverID, HomeUseSwitchProfileName, HomeUseSwitch.ToString());
                driverProfile.WriteValue(driverID, HomeDistanceProfileName, HomeDistance.ToString());
                driverProfile.WriteValue(driverID, HomePositionProfileName, HomePosition.ToString());
            }
        }
开发者ID:bdm310,项目名称:StellarFocus_Driver,代码行数:29,代码来源:Driver.cs

示例13: writeSettings

        /// <summary>
        /// Write settings to ASCOM profile storage
        /// </summary>
        public void writeSettings()
        {
            tl.LogMessage("Switch_writeSettings", "Enter");
            using (Profile p = new Profile())
            {
                p.DeviceType = "Switch";

                p.WriteValue(IP9212_switch_id, ip_addr_profilename, ip_addr);
                p.WriteValue(IP9212_switch_id, ip_port_profilename, ip_port);
                p.WriteValue(IP9212_switch_id, ip_login_profilename, ip_login);
                p.WriteValue(IP9212_switch_id, ip_pass_profilename, ip_pass);

                p.WriteValue(IP9212_switch_id, switch_port_profilename, switch_roof_port.ToString());
                p.WriteValue(IP9212_switch_id, opened_port_profilename, opened_sensor_port.ToString());
                p.WriteValue(IP9212_switch_id, closed_port_profilename, closed_sensor_port.ToString());

                p.WriteValue(IP9212_switch_id, telescope_power_port_profilename, telescope_power_port.ToString());
                p.WriteValue(IP9212_switch_id, focuser_power_port_profilename, focuser_power_port.ToString());
                p.WriteValue(IP9212_switch_id, heating_port_profilename, heating_port.ToString());
                p.WriteValue(IP9212_switch_id, roof_power_port_profilename, roofpower_port.ToString());

                p.WriteValue(IP9212_switch_id, telescope_power_port_state_type_profilename, telescope_power_port_state_type.ToString());
                p.WriteValue(IP9212_switch_id, focuser_power_port_state_type_profilename, focuser_power_port_state_type.ToString());
                p.WriteValue(IP9212_switch_id, heating_port_state_type_profilename, heating_port_state_type.ToString());
                p.WriteValue(IP9212_switch_id, roof_power_port_state_type_profilename, roofpower_port_state_type.ToString());

                p.WriteValue(IP9212_switch_id, traceStateProfileName, traceState.ToString());
            }
            tl.LogMessage("Switch_writeSettings", "Exit");
        }
开发者ID:BorisE,项目名称:IP9212DomeDriver,代码行数:33,代码来源:ip9212_switch.cs

示例14: WriteProfile

        /// <summary>
        /// Write the device configuration to the  ASCOM  Profile store
        /// </summary>
        internal void WriteProfile()
        {
            tl.LogMessage("WriteProfile", "Enter");
            
            using (Profile driverProfile = new Profile())
            {
                driverProfile.DeviceType = "Dome";
                driverProfile.WriteValue(driverID, traceStateProfileName, traceState.ToString());

                driverProfile.WriteValue(driverID, IP9212_switch_class.ip_addr_profilename, IP9212_switch_class.ip_addr);
                driverProfile.WriteValue(driverID, IP9212_switch_class.ip_port_profilename, IP9212_switch_class.ip_port);
                driverProfile.WriteValue(driverID, IP9212_switch_class.ip_login_profilename, IP9212_switch_class.ip_login);
                driverProfile.WriteValue(driverID, IP9212_switch_class.ip_pass_profilename, IP9212_switch_class.ip_pass);

                driverProfile.WriteValue(driverID, IP9212_switch_class.switch_port_profilename, IP9212_switch_class.switch_roof_port.ToString());
                driverProfile.WriteValue(driverID, IP9212_switch_class.opened_port_profilename, IP9212_switch_class.opened_sensor_port.ToString());
                driverProfile.WriteValue(driverID, IP9212_switch_class.closed_port_profilename, IP9212_switch_class.closed_sensor_port.ToString());


                driverProfile.WriteValue(driverID, MyWebClient.NETWORK_TIMEOUT_profilename, MyWebClient.NETWORK_TIMEOUT.ToString());
                driverProfile.WriteValue(driverID, IP9212_switch_class.CACHE_CHECKCONNECTED_INTERVAL_profilename, IP9212_switch_class.CACHE_CHECKCONNECTED_INTERVAL.ToString());
                driverProfile.WriteValue(driverID, IP9212_switch_class.CACHE_SHUTTERSTATUS_INTERVAL_NORMAL_profilename, IP9212_switch_class.CACHE_SHUTTERSTATUS_INTERVAL_NORMAL.ToString());
                driverProfile.WriteValue(driverID, IP9212_switch_class.CACHE_SHUTTERSTATUS_INTERVAL_REDUCED_profilename, IP9212_switch_class.CACHE_SHUTTERSTATUS_INTERVAL_REDUCED.ToString());
            }
            tl.LogMessage("Switch_writeSettings", "Exit");



            tl.LogMessage("WriteProfile", "Exit");
        }
开发者ID:BorisE,项目名称:IP9212DomeDriver,代码行数:33,代码来源:Driver.cs


注:本文中的Profile.WriteValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。