コード例 #1
0
        public void UpdateViewer()
        {
            UCCommuniPortConfigUI      ui = (UCCommuniPortConfigUI)_v.UC;
            CommuniPortConfigParameter p  = (CommuniPortConfigParameter)this.Model;

            ui.CommuniPortConfig = p.CommuniPortConfig;
        }
コード例 #2
0
ファイル: ControllerFactory.cs プロジェクト: wpmyj/c3
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        static public IController Create(IParameter p)
        {
            IController c = null;

            if (p is StringParameter)
            {
                c = new StringParameterController((StringParameter)p);
            }
            else if (p is CommuniPortConfigParameter)
            {
                CommuniPortConfigParameter p2 = (CommuniPortConfigParameter)p;
                c = new CommuniPortConfigController(p2);
            }
            else if (p is NumberParameter)
            {
                NumberParameter numP = (NumberParameter)p;
                c = new NumberParameterController(numP);
            }
            else if (p is EnumParameter)
            {
                EnumParameter enumP = (EnumParameter)p;
                c = new EnumParameterController(enumP);
            }

            if (c == null)
            {
                throw new ArgumentException(p.ToString());
            }
            return(c);
        }
コード例 #3
0
        public void UpdateModel()
        {
            //throw new NotImplementedException();
            //this.CommuniPortConfigParameter .CommuniPortConfig = this.CommuniPortConfigUI .
            UCCommuniPortConfigUI      ui = (UCCommuniPortConfigUI)_v.UC;
            CommuniPortConfigParameter p  = (CommuniPortConfigParameter)this.Model;

            p.CommuniPortConfig = ui.CommuniPortConfig;
        }
コード例 #4
0
        //private ICommuniPortConfig _communiPortConfig;
        #endregion //CommuniPortConfig

        #region GetCommuniPortConfig
        /// <summary>
        ///
        /// </summary>
        /// <returns></returns>
        private IParameter GetCommuniPortConfig()
        {
            IParameter p = this.CommuniPortConfigGroup.Parameters[PN_COMMUNIPORTCONFIG];

            if (p == null)
            {
                p = new CommuniPortConfigParameter(PN_COMMUNIPORTCONFIG,
                                                   NullCommuniPortConfig.Default, PO_COMMUNIPORTCONFIG);
                // not need
                //
                //p.Text = "";
                this.CommuniPortConfigGroup.Parameters.Add(p);
            }
            return(p);
        }
コード例 #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="p"></param>
 public CommuniPortConfigController(CommuniPortConfigParameter p)
 {
     this.Model = p;
 }
コード例 #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="p"></param>
 public CommuniPortConfigController(CommuniPortConfigParameter p)
 {
     this.Model = p;
 }
コード例 #7
0
ファイル: StationBase.cs プロジェクト: hkiaipc/C3
 /// <summary>
 /// 
 /// </summary>
 /// <returns></returns>
 private IParameter GetCommuniPortConfig()
 {
     IParameter p = this.CommuniPortConfigGroup.Parameters[PN_COMMUNIPORTCONFIG];
     if (p == null)
     {
         p = new CommuniPortConfigParameter(PN_COMMUNIPORTCONFIG,
             NullCommuniPortConfig.Default, PO_COMMUNIPORTCONFIG);
         // not need
         //
         //p.Text = "";
         this.CommuniPortConfigGroup.Parameters.Add(p);
     }
     return p;
 }