Ejemplo n.º 1
0
 protected internal BaseDapper()
 {
     _connectionContainer = new ConnectionContainer()
     {
         Connection = BootAppConnection.CreateConnection()
     };
 }
Ejemplo n.º 2
0
 protected internal BaseDap()
 {
     _connectionContainer = new ConnectionContainer()
     {
         Connection = GameDataConnection.CreateConnection()
     };
 }
Ejemplo n.º 3
0
        static void ConstructRoad(Connection connection, ConnectionContainer container)
        {
            ConstructRoad c = task as ConstructRoad;

            c.ElementContainer = container;
            c.Start();
            Remove();
        }
Ejemplo n.º 4
0
 public void Dispose()
 {
     if (!_leaveOpen)
     {
         _connectionContainer.Dispose();
     }
     _connectionContainer = null;
 }
Ejemplo n.º 5
0
        protected override void OnEnd()
        {
            Purchase();
            ConnectionContainer c = (ConnectionContainer)ElementContainer;

            c.BeginConstruction <Road> (TotalCost);
            base.OnEnd();
        }
Ejemplo n.º 6
0
 public CashoutDap(ConnectionContainer connectionContainer, bool leaveOpen)
 {
     if (connectionContainer != null &&
         connectionContainer.Connection != null)
     {
         LeaveOpen           = leaveOpen;
         ConnectionContainer = connectionContainer;
     }
 }
Ejemplo n.º 7
0
        void OnLoadFog()
        {
            points.SetUnitAtIndex <GivingTreeUnit> (0);
            points.SetUnitAtIndex <Flower> (2);
            // points.SetUnitAtIndex<University> (3);
            points.SetUnitAtIndex <MilkshakePool> (15);

            ConnectionContainer c = ConnectionsManager.GetContainer(points.GetConnectionsAtIndex(2)[3]);

            c.BeginConstruction <Road> ();
            c.EndConstruction();
        }
Ejemplo n.º 8
0
 void SpawnConnectionProxies(GameObject part)
 {
     foreach (int conID in part.GetComponent <Part>().ActiveConnections)
     {
         Connection c  = part.GetComponent <Part>().Connections[conID];
         GameObject go = Instantiate(connectionSprite);
         //BoxCollider col = go.AddComponent<BoxCollider>();
         //col.size = new Vector3(0.2f, 0.2f, 0.2f);
         go.transform.position       = c.Pln.Origin + c.Pln.ZVector.normalized * 0.002f;
         go.transform.rotation       = c.Pln.GetEulerQuaternion();
         go.transform.parent         = connectionProxyParent.transform;
         go.transform.localRotation *= Quaternion.Euler(90, 0, 0);
         go.layer = 17;
         go.GetComponentInChildren <SpriteRenderer>().enabled = false;
         go.name = "ConnectionProxy_" + c.ConID;
         ConnectionContainer conCont = go.AddComponent <ConnectionContainer>();
         conCont.Connection = c;
         connectionProxies.Add(go);
     }
 }
Ejemplo n.º 9
0
        void OnLoadConnections()
        {
            // Create initial roads
            List <Connection> topConnections = points.GetConnectionsAtIndex(0);

            for (int i = 0; i < topConnections.Count; i++)
            {
                ConnectionContainer c = ConnectionsManager.GetContainer(topConnections[i]);
                c.BeginConstruction <Road> ();
                c.EndConstruction();
            }

            /*List<Connection> topConnections2 = points.GetConnectionsAtIndex (12);
             * for (int i = 0; i < topConnections2.Count; i ++) {
             *      ConnectionContainer d = ConnectionsManager.GetContainer (topConnections2[i]);
             *      d.BeginConstruction<Road> ();
             *      d.EndConstruction ();
             * }*/

            fogOfWar.Init();
        }
Ejemplo n.º 10
0
 public DapperModelQuery(IEnumerable <T> query, ConnectionContainer dbConnection)
 {
     _query        = query;
     _dbConnection = dbConnection;
 }
Ejemplo n.º 11
0
 public DataSourceTreeController(DocumentController controller)
 {
     documentController = controller;
     configurationPath = Path.Combine(Extensions.GetAppDataPath(), 
         "ConnectionSettings.xml");
     
     Container = new ConnectionContainer();
    
     ImageList imageList = new ImageList();
     imageList.ColorDepth = ColorDepth.Depth32Bit;
     imageList.ImageSize = new Size(16, 16);
     imageList.Images.Add(Extensions.GetImageFromResourceUri("/XQueryConsole;component/Images/NewConnection.png"));
     imageList.Images.Add(Extensions.GetImageFromResourceUri("/XQueryConsole;component/Images/DataSource.png"));
     imageList.Images.Add(Extensions.GetImageFromResourceUri("/XQueryConsole;component/Images/DefaultDataSource.png"));
     imageList.Images.Add(Extensions.GetImageFromResourceUri("/XQueryConsole;component/Images/Table.png"));
     imageList.Images.Add(Extensions.GetImageFromResourceUri("/XQueryConsole;component/Images/Field.png"));
     dataTree = new TreeView();            
     dataTree.Dock = DockStyle.Fill;
     dataTree.BorderStyle = BorderStyle.FixedSingle;
     dataTree.ImageList = imageList;
     dataTree.ShowLines = false;
     dataTree.Font = new Font("Tahoma", 8.25f);
     
     try
     {
         Extensions.SetWindowTheme(dataTree.Handle, "explorer", null);
     }
     catch(Exception ex)
     {
         Trace.TraceError(ex.Message);
     }
     
     dataTree.BeforeExpand += new TreeViewCancelEventHandler(dataTree_BeforeExpand);
     dataTree.AfterExpand += new TreeViewEventHandler(dataTree_AfterExpand);
     dataTree.MouseMove += new MouseEventHandler(dataTree_MouseMove);
     dataTree.MouseDown += new MouseEventHandler(dataTree_MouseDown);
     dataTree.MouseUp += new MouseEventHandler(dataTree_MouseUp);
     dataTree.ItemDrag += new ItemDragEventHandler(dataTree_ItemDrag);            
     
     LoadConnections();
     Fill();
 }
Ejemplo n.º 12
0
 public ClickContainerEvent(ConnectionContainer container)
 {
     Container  = container;
     Connection = Container.Connection;
 }
Ejemplo n.º 13
0
 public MouseEnterConnectionEvent(ConnectionContainer connection) : base(connection)
 {
 }
Ejemplo n.º 14
0
 protected internal BaseDapper(ConnectionContainer container, bool leaveOpen)
 {
     _leaveOpen           = leaveOpen;
     _connectionContainer = container;
 }