コード例 #1
0
        public SrcpPower GetSrcpPower()
        {
            if (srcpPower == null)
            {
                Control control = null;
                try
                {
                    control = selectBus;
                    int bus = selectBus.Bus;

                    control = null;

                    if (current == null)
                    {
                        current = new SrcpPower(serverConnection);
                    }
                    current.Init(bus);
                    srcpPower = current;
                }
                catch
                {
                    if (control != null)
                    {
                        control.Focus();
                    }
                    throw;
                }
            }
            return(srcpPower);
        }
コード例 #2
0
 void Initialize(ServerConnection connection, SrcpPower current)
 {
     serverConnection = connection;
     selectBus.SetServer(connection);
     if (current != null)
     {
         this.current  = current;
         selectBus.Bus = current.Bus;
     }
     else
     {
         selectBus.Bus = 1;
     }
 }
コード例 #3
0
 public void Initialize(SrcpPower current)
 {
     Initialize(current.Connection, current);
 }
コード例 #4
0
 public NewAndUpdatePower(SrcpPower current) : this()
 {
     Initialize(current);
 }