Exemplo n.º 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);
        }
Exemplo n.º 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;
     }
 }
Exemplo n.º 3
0
 public void Initialize(SrcpPower current)
 {
     Initialize(current.Connection, current);
 }
Exemplo n.º 4
0
 public NewAndUpdatePower(SrcpPower current) : this()
 {
     Initialize(current);
 }