コード例 #1
0
        public void T3_stations_can_be_found_by_name()
        {
            ICity s = CityFactory.CreateCity("Paris");

            IStation c1 = s.AddStation("Opera", 0, 0);

            s.FindStation("Opera").Should().BeSameAs(c1);
            s.FindStation("Chatelet").Should().BeNull();


            IStation c2 = s.AddStation("Chatelet", 1, 1);

            s.FindStation("Opera").Should().BeSameAs(c1);
            s.FindStation("Chatelet").Should().BeSameAs(c2);
            s.FindStation("Ivry").Should().BeNull();

            IStation c3 = s.AddStation("Ivry", 2, 2);
            IStation c4 = s.AddStation("Villejuif", 3, 3);
            IStation c5 = s.AddStation("Bourse", 4, 4);

            s.FindStation("Opera").Should().BeSameAs(c1);
            s.FindStation("Chatelet").Should().BeSameAs(c2);
            s.FindStation("Ivry").Should().BeSameAs(c3);
            s.FindStation("Villejuif").Should().BeSameAs(c4);
            s.FindStation("Bourse").Should().BeSameAs(c5);
        }
コード例 #2
0
 public static void CallToSubscriber(IStation station, ITerminal callingTerminal, ITerminal calledTerminal)
 {
     if (callingTerminal.PortUsed.Id != null && calledTerminal.PortUsed.Id != null)
     {
         if (callingTerminal.PortUsed.Status == PortStatus.Busy &&
             calledTerminal.PortUsed.Status == PortStatus.Busy)
         {
             lock (someLock)
             {
                 CallPort(callingTerminal.PortUsed, callingTerminal);
                 EventMessage += callingTerminal.MessageCall;
             }
             lock (someLock)
             {
                 CallPort(calledTerminal.PortUsed, calledTerminal);
                 EventMessage += calledTerminal.MessageCall;
             }
         }
         else
         {
             throw new GeneralizedException("One or both terminals are not available for a call.");
         }
     }
     else
     {
         throw new DisconnectTerminalException();
     }
 }
コード例 #3
0
ファイル: TaskScheduler.cs プロジェクト: wpmyj/c3
        /// <summary>
        ///
        /// </summary>
        /// <param name="task"></param>
        /// <returns></returns>
        private ICommuniPort GetCommuniPort(ITask task)
        {
            IDevice  device  = task.Device;
            IStation station = device.Station;

            return(station.CommuniPort);
        }
コード例 #4
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="hd"></param>
        private void CreateDevices(Hardware hd)
        {
            // device
            //
            foreach (IDPU dpu in this.DPUs)
            {
                IDeviceSourceProvider deviceSourceProvider = dpu.DeviceSourceProvider;
                deviceSourceProvider.SourceConfigs = this.SourceConfigs;
                IDeviceSource[] deviceSources = deviceSourceProvider.GetDeviceSources();
                foreach (IDeviceSource deviceSource in deviceSources)
                {
                    IDeviceFactory factory = dpu.DeviceFactory;
                    IDevice        device  = factory.Create(deviceSource);


                    device.DeviceSource = deviceSource;

                    // find station by device
                    //
                    Guid     stationGuid = deviceSource.StationGuid;
                    IStation station     = hd.Stations.Find(stationGuid);
                    if (station == null)
                    {
                        string s = string.Format("not find station by guid '{0}'", stationGuid);
                        throw new Exception(s);
                    }
                    station.Devices.Add(device);
                    device.Station = station;

                    ITaskFactory taskFactory = dpu.TaskFactory;
                    taskFactory.Create(device);
                }
            }
        }
コード例 #5
0
ファイル: SystemTest.cs プロジェクト: lahuerta83/BarkNpark
        public IStation GetStationTest([PexAssumeUnderTest] global::BarkNPark.System target, StationCode code)
        {
            IStation result = target.GetStation(code);

            return(result);
            // TODO: add assertions to method SystemTest.GetStationTest(System, StationCode)
        }
コード例 #6
0
ファイル: TaskScheduler.cs プロジェクト: wpmyj/c3
 /// <summary>
 ///
 /// </summary>
 /// <param name="station"></param>
 private void DoStation(IStation station)
 {
     foreach (IDevice device in station.Devices)
     {
         DoDevice(device);
     }
 }
コード例 #7
0
 private void releaseProductFromStation(Product product, IStation station)
 {
     if (station != null && product != null && station.CurrentProduct != null && station.CurrentProduct.Name == product.Name)
     {
         station.ReleaseProduct();
     }
 }
コード例 #8
0
ファイル: Service.cs プロジェクト: Dloz/EpamTasks
 public void RegisterStation(IStation station)
 {
     if (station != null)
     {
         this.Station = station;
     }
 }
コード例 #9
0
        private List <IStation> findWatingProducts(IStation station)
        {
            List <IStation> result = new List <IStation>();

            try
            {
                foreach (IStation cStation in this.lineStations)
                {
                    Product product = cStation.CurrentProduct;
                    if (product != null && cStation.IsFinished)
                    {
                        List <string> nextStationNames = product.Router.NextStationNames(cStation.Name);
                        if (nextStationNames.Contains(station.Name))
                        {
                            result.Add(cStation);
                        }
                    }
                }
                return(result);
            }
            catch (Exception ex)
            {
                //this.myLog.LogAlert(AlertType.Error, this.name, this.GetType().ToString(), "findWatingProduct()", ex.ToString(), "system");
                Console.WriteLine(ex);
            }
            return(result);
        }
コード例 #10
0
        private IStation findWatingProduct(IStation station)
        {
            IStation result = null;

            try
            {
                for (int i = this.lineStations.Count() - 1; i >= 0; i--)
                {
                    IStation cStation = this.lineStations.ElementAt(i);
                    Product  product  = cStation.CurrentProduct;

                    if (product != null && cStation.IsFinished)
                    {
                        List <string> nextStationNames = product.Router.NextStationNames(cStation.Name);
                        foreach (string nextStName in nextStationNames)
                        {
                            if (nextStName == station.Name)
                            {
                                //this.MoveProduct(product, cStation);
                                result = cStation;
                                return(result);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                //this.myLog.LogAlert(AlertType.Error, this.name, this.GetType().ToString(), "findWatingProduct()", ex.ToString(), "system");
                Console.WriteLine(ex);
            }
            return(result);
        }
コード例 #11
0
        private bool checkIfNextStateFinal(Product product, IStation station)
        {
            bool result = false;

            string productName = product != null ? product.Name : "product is null";

            if (product.Router.IsNextStateFinal)
            {
                this.myLog.LogAlert(AlertType.System, id.ToString(), this.GetType().ToString(), "moveProduct()",
                                    productName + " finished the line!", "system");

                // tell station to remove the product
                this.releaseProductFromStation(product, station);

                // tell owner to remove the product from the line
                if (this.OnProductFinishedLine != null)
                {
                    this.OnProductFinishedLine(this, new DispatcherMoveArgs()
                    {
                        Product = product
                    });
                }

                // exit, because moving is not needed
                result = true;
            }
            return(result);
        }
コード例 #12
0
    public override void HandleOrder(Order o)
    {
        lastOrder = o.type;
        if (o.type == eOrderType.MOVE)
        {
            if (assigned)
            {
                assigned = false;
                assigneStation.RemoveWorker();
                animator.SetTrigger("StopWork");
            }
            movable.MoveTo(o.position);
        }

        if (o.type == eOrderType.WORK)
        {
            if (assigned)
            {
                assigned = false;
                assigneStation.RemoveWorker();
            }
            movable.MoveTo(o.position);
            targetStation = o.station;
        }
    }
コード例 #13
0
    protected override void Update()
    {
        base.Update();
        if (lastOrder == eOrderType.WORK && movable.hasReachedPosition)
        {
            if (targetStation.AssignWorker())
            {
                assigned = true;
                animator.SetTrigger("StartWork");
                assigneStation = targetStation;
            }
            lastOrder = eOrderType.NONE;
        }

        if (assigned && assigneStation.tag == "Truck")
        {
            Truck truck = (Truck)assigneStation;
            if (truck.state != Truck.eState.UNLOADING)
            {
                assigned = false;
                assigneStation.RemoveWorker();
                animator.SetTrigger("StopWork");
            }
        }
    }
コード例 #14
0
 public static void AnswerTheCall(IStation station, ITerminal callingTerminal, ITerminal calledTerminal)
 {
     if (callingTerminal.PortUsed.Id != null && calledTerminal.PortUsed.Id != null)
     {
         if (callingTerminal.PortUsed.Status == PortStatus.Call &&
             calledTerminal.PortUsed.Status == PortStatus.Call)
         {
             lock (someLock)
             {
                 callingTerminal.SubscriberNumber.CallLog.Add(new CallLog(callingTerminal.SubscriberNumber));
                 TalkPort(callingTerminal.PortUsed, callingTerminal);
                 EventMessage += callingTerminal.MessageTalk;
             }
             lock (someLock)
             {
                 TalkPort(calledTerminal.PortUsed, calledTerminal);
                 EventMessage += calledTerminal.MessageTalk;
             }
         }
         else
         {
             throw new GeneralizedException("One or both terminals are not available to answer the call.");
         }
     }
     else
     {
         throw new DisconnectTerminalException();
     }
 }
コード例 #15
0
ファイル: SystemTest.cs プロジェクト: lahuerta83/BarkNpark
        public IStation getFirstAvailableStationTest([PexAssumeUnderTest] global::BarkNPark.System target)
        {
            IStation result = target.getFirstAvailableStation();

            return(result);
            // TODO: add assertions to method SystemTest.getFirstAvailableStationTest(System)
        }
コード例 #16
0
        public Error GetTroopObject(out ITroopObject troopObject)
        {
            if (newTroopObject != null)
            {
                troopObject = newTroopObject;
                return(Error.Ok);
            }

            if (stub.State != TroopState.Stationed)
            {
                troopObject = null;
                return(Error.TroopNotStationed);
            }

            originalStation = stub.Station;

            if (!stub.Station.Troops.RemoveStationed(stub.StationTroopId))
            {
                troopObject = null;
                return(Error.TroopNotStationed);
            }

            troopObject = stub.City.CreateTroopObject(stub, originalStation.PrimaryPosition.X, originalStation.PrimaryPosition.Y + 1);

            newTroopObject = troopObject;

            troopObject.BeginUpdate();
            troopObject.Stats = new TroopStats(formula.GetTroopRadius(stub, null), formula.GetTroopSpeed(stub));
            world.Regions.Add(troopObject);
            troopObject.EndUpdate();

            return(Error.Ok);
        }
コード例 #17
0
 /// <summary>
 /// Initializes client properties.
 /// </summary>
 private void Initialize()
 {
     this.Crs              = new Crs(this);
     this.Delays           = new Delays(this);
     this.Service          = new Service(this);
     this.Station          = new Station(this);
     this.BaseUri          = new Uri("https://kanehuxleyapi.azurewebsites.net:443");
     SerializationSettings = new JsonSerializerSettings
     {
         Formatting            = Formatting.Indented,
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     DeserializationSettings = new JsonSerializerSettings
     {
         DateFormatHandling    = DateFormatHandling.IsoDateFormat,
         DateTimeZoneHandling  = DateTimeZoneHandling.Utc,
         NullValueHandling     = NullValueHandling.Ignore,
         ReferenceLoopHandling = ReferenceLoopHandling.Serialize,
         ContractResolver      = new ReadOnlyJsonContractResolver(),
         Converters            = new List <JsonConverter>
         {
             new Iso8601TimeSpanConverter()
         }
     };
     CustomInitialize();
 }
コード例 #18
0
 public WeatherStation(IStation station)
 {
     Name         = station.Name;
     StationId    = station.StationId;
     State        = station.State;
     GeoLongitude = station.GeoLongitude;
     GeoLatitude  = station.GeoLatitude;
 }
コード例 #19
0
 public static void DeleteStation(IBillingCompany billingCompany, IStation station)
 {
     if (!billingCompany.Stations.Contains(station))
     {
         return;
     }
     billingCompany.Stations.Remove(station);
 }
コード例 #20
0
        // EXPLORATION
        public virtual void Explore(IStation station, string description)
        {
            this.Station = station;
            this.textBoxStatus.Text = description;
            Text += ": " + description;

            Show();
        }
コード例 #21
0
ファイル: Station.cs プロジェクト: molodec1337322/MosMetro1
 public void ConnectStation(IStation station, bool isViceVersa)
 {
     ConnectedStations.Add(station);
     if (isViceVersa == true)
     {
         station.ConnectStation(this, false);
     }
 }
コード例 #22
0
ファイル: PassengerView.cs プロジェクト: mars113/ggj2018
 public void FailedAnimate(IStation station)
 {
     _facePrefab.GetComponent <SpriteRenderer>().DOFade(0.0f, _failFadeDuration).Play();
     _labelPrefab.GetComponent <SpriteRenderer>().DOFade(0.0f, _failFadeDuration).Play();
     _passengerPrefab.GetComponent <SpriteRenderer>().DOFade(0.0f, _failFadeDuration).Play().OnComplete(() => {
         MonoBehaviour.Destroy(_passengerPrefab);
         station.RearrangePassengersView();
     });
 }
コード例 #23
0
        public TestProvider(IStation station, IBillingSystem billingSystem)
        {
            if (station == null) throw new ArgumentNullException(nameof(station));
            if (billingSystem == null) throw new ArgumentNullException(nameof(billingSystem));

            this._station = station;
            this._billingSystem = billingSystem;
            billingSystem.RegisterStation(station);
        }
コード例 #24
0
        public void DeleteAbonent(IAbonent abonent)
        {
            IStation station = GetStationByPhoneNumberContains(abonent.PhoneNumber);
            IPort    port    = station.Ports.FirstOrDefault(p => p.PhoneNumber == abonent.PhoneNumber);

            port.OutcomingCall -= station.CallingRequest;
            port.CallTerminate -= station.OnCallTerminate;
            _abonentList.Remove(abonent);
        }
コード例 #25
0
        public void RestoreProductOnStation(Product product, string stationName)
        {
            IStation station = this.lineStations.FirstOrDefault(p => p.Name.Equals(stationName));

            if (station != null)
            {
                station.AddProduct(product);
            }
        }
コード例 #26
0
ファイル: Card.cs プロジェクト: cobussmit74/kata-clam-card
        public void StartJourney(IStation station)
        {
            if (CurrentJourneyStartFrom != null)
            {
                throw new JourneyException("A Journey is already underway");
            }

            CurrentJourneyStartFrom = station ?? throw new ArgumentNullException(nameof(station));
        }
コード例 #27
0
        public MyInstanceProvider(IStation dep)
        {
            if (dep == null)
            {
                throw new ArgumentNullException("dep");
            }

            this.dep = dep;
        }
コード例 #28
0
 public override void SubscriptionToStationEvents(IStation station)
 {
     station.CallIsProcessed += (sender, call) =>
     {
         Console.ForegroundColor = ConsoleColor.Green;
         Console.WriteLine("Statistics: {0}", call);
         Console.ForegroundColor = ConsoleColor.Gray;
     };
 }
コード例 #29
0
ファイル: Class1.cs プロジェクト: wpmyj/c3
        public override void OnAdd(IStation station)
        {
            //throw new NotImplementedException();
            Station st  = (Station)station;
            string  xml = CommuniPortConfigSerializer.Serialize(st.CommuniPortConfig);
            int     id  = DBI.Instance.InsertStation(st.Name, xml, st.Ordinal, st.Street, st.Remark);

            st.Guid = GuidHelper.Create((uint)id);
        }
コード例 #30
0
 private void RegisterHandlerForStation(IStation station)
 {
     station.CallService.Call += (sender, callInfo) =>
     {
         var user = GetUserByTerminal(sender as Terminal);
         CallService.SetAdditionalInfo(user, callInfo);
         CallService.AddCall(callInfo);
     };
 }
コード例 #31
0
        public void InvokeTakeoffCompleted(IStation runway)
        {
            var res = Serialize(runway);

            if (res != null)
            {
                AirportActions.TakeoffCompletedAction?.Invoke(res);
            }
        }
コード例 #32
0
ファイル: DeviceUIBase.cs プロジェクト: hkiaipc/C3
        public DialogResult Add(DeviceType deviceType, IStation station, out IDevice newDevice)
        {
            if (deviceType == null)
            {
                throw new ArgumentNullException("deviceType");
            }

            if (station == null)
            {
                throw new ArgumentNullException("station");
            }

            return OnAdd(deviceType, station, out newDevice);
        }
コード例 #33
0
ファイル: DeviceUI.cs プロジェクト: hkiaipc/C3
        /// <summary>
        /// 
        /// </summary>
        /// <param name="deviceType"></param>
        /// <param name="station"></param>
        /// <param name="newDevice"></param>
        /// <returns></returns>
        protected override DialogResult OnAdd(DeviceType deviceType, IStation station, out IDevice newDevice)
        {
            newDevice = null;
            FrmDeviceGroups f = new FrmDeviceGroups();

            f.DeviceType = deviceType;
            //f.Device = (IDevice)Activator.CreateInstance(f.DeviceType.Type);
            f.Device = f.DeviceType.Create(this.Dpu);
            f.Station = station;
            f.AdeStatus = ADEStatus.Add;
            f.Groups = f.Device.Groups;

            DialogResult dr = f.ShowDialog();
            if (dr == DialogResult.OK)
            {
                newDevice = f.Device;
            }
            return dr;
        }
コード例 #34
0
ファイル: StationUI.cs プロジェクト: hkiaipc/C3
        /// <summary>
        /// 
        /// </summary>
        /// <param name="stationType"></param>
        /// <param name="newStation"></param>
        /// <returns></returns>
        public DialogResult Add(StationType stationType, StationCollection stations, out IStation newStation)
        {
            newStation = null;

            Debug.Assert(stationType != null);
            Debug.Assert(stations != null);

            FrmStationGroups f = new FrmStationGroups();
            f.AdeStatus = ADEStatus.Add;
            f.StationType = stationType;
            f.Stations = stations;
            f.Station = stationType.Create(this.Spu);
            f.Groups = f.Station.Groups;
            DialogResult dr = f.ShowDialog();
            if (dr == DialogResult.OK)
            {
                newStation = f.Station;
            }
            return dr;
        }
コード例 #35
0
ファイル: StationTreeNode.cs プロジェクト: hkiaipc/C3
        /// <summary>
        /// 
        /// </summary>
        /// <param name="station"></param>
        public StationTreeNode(IStation station)
        {
            this.Station = station;
            RefreshStationTreeNode(station);

            //
            //
            station.CommuniPortChanged += new EventHandler(station_CommuniPortChanged);

            //
            //
            //this.ImageKey = IconNames.Disconnect;
            //this.SelectedImageKey = IconNames.Disconnect;
            SetImageKey(IconNames.Disconnect);

            station.Tag = this;

            foreach (IDevice device in station.Devices)
            {
                DeviceTreeNode deviceNode = new DeviceTreeNode(device);
                this.Nodes.Add(deviceNode);
            }
        }
コード例 #36
0
 protected virtual void PropagateOnClassicalTransmit(IStation station, IClassicalState state)
 {
     _counterTransmitedClassical++;
     if (OnClassicalTransmit != null)
     { OnClassicalTransmit(this, state); };
 }
コード例 #37
0
 protected void PropagateOnReceive(IStation station, IInformationState state)
 {
     if (OnReceive != null)
     { OnReceive(this, state); };
 }
コード例 #38
0
 public void RegisterStation(IStation station)
 {
     station.ConnectionFailedEvent += ProcessConnectionFailed;
     station.CallEndEvent += ProcessCall;
 }
コード例 #39
0
 protected virtual void PropagateOnQuantumReceive(IStation station, IQuantumState state)
 {
     _counterReceivedQuantum++;
     if (OnQuantumReceive != null)
     { OnQuantumReceive(this, state); };
 }
コード例 #40
0
        private static void Reroute(Route r, IStation closest, IStation destination)
        {
            Sim target = r.Follower.Target as Sim;
            Vector3 currentStartPoint = r.GetCurrentStartPoint();
            float distanceRemaining = r.GetDistanceRemaining();

            Route route = target.CreateRoute();
            route.SetOption(Route.RouteOption.EnableSubwayPlanning, false);
            route.SetOption2(Route.RouteOption2.EnableHoverTrainPlanning, false);
            route.SetOption(Route.RouteOption.EnablePlanningAsCar, r.GetOption(Route.RouteOption.EnablePlanningAsCar));
            route.SetOption(Route.RouteOption.PlanUsingStroller, r.GetOption(Route.RouteOption.PlanUsingStroller));
            route.SetOption(Route.RouteOption.ReplanUsingStroller, r.GetOption(Route.RouteOption.ReplanUsingStroller));
            route.SetOption(Route.RouteOption.BeginAsStroller, r.GetOption(Route.RouteOption.BeginAsStroller));
            Slot routeEnterEndSlot = closest.RouteEnterEndSlot;
            if (routeEnterEndSlot != Slot.None)
            {
                GameObject routingSlotEnterFootprint = closest.RoutingSlotEnterFootprint;
                if (routingSlotEnterFootprint != null)
                {
                    route.AddObjectToIgnoreForRoute(routingSlotEnterFootprint.ObjectId);
                }
                if (route.PlanToSlot(closest, routeEnterEndSlot).Succeeded())
                {
                    Slot routeExitBeginSlot = destination.RouteExitBeginSlot;
                    Vector3 slotPosition = destination.GetSlotPosition(routeExitBeginSlot);
                    GameObject routingSlotExitFootprint = destination.RoutingSlotExitFootprint;
                    if (routingSlotExitFootprint != null)
                    {
                        r.AddObjectToIgnoreForRoute(routingSlotExitFootprint.ObjectId);
                    }
                    r.SetOption(Route.RouteOption.EnableSubwayPlanning, false);
                    r.SetOption2(Route.RouteOption2.EnableHoverTrainPlanning, false);
                    if (!r.ReplanFromPoint(slotPosition).Succeeded())
                    {
                        r.ReplanFromPoint(currentStartPoint);
                    }
                    else if ((route.GetDistanceRemaining() + r.GetDistanceRemaining()) < (distanceRemaining + SimRoutingComponent.kDistanceMustSaveInOrderToUseSubway))
                    {
                        if (closest is IHoverTrainStation)
                        {
                            r.ReplanAllowed = false;
                            Route route2 = target.CreateRoute();
                            PathType elevatedTrainPath = PathType.ElevatedTrainPath;
                            List<Vector3> list = new List<Vector3>();
                            list.Add(closest.GetSlotPosition(closest.RouteEnterEndSlot));
                            list.Add(destination.GetSlotPosition(destination.RouteExitBeginSlot));
                            if (list.Count > 0)
                            {
                                route2.InsertCustomPathAtIndex(0, list.ToArray(), false, true, elevatedTrainPath);
                                route2.ReplanAllowed = false;
                                RoutePlanResult planResult = route2.PlanResult;
                                planResult.mType = RoutePlanResultType.Succeeded;
                                route2.PlanResult = planResult;
                                PathData pathData = route2.GetPathData(0);
                                pathData.ObjectId = destination.ObjectId;
                                pathData.PathType = PathType.ElevatedTrainPath;
                                route2.SetPathData(ref pathData);
                                r.InsertRouteSubPathsAtIndex(0, route2);
                            }
                        }

                        r.InsertRouteSubPathsAtIndex(0x0, route);
                        r.SetOption(Route.RouteOption.EnableSubwayPlanning, true);
                        r.SetOption2(Route.RouteOption2.EnableHoverTrainPlanning, true);
                    }
                    else
                    {
                        r.ReplanFromPoint(currentStartPoint);
                    }
                }
            }
        }
コード例 #41
0
ファイル: StationPersisterBase.cs プロジェクト: hkiaipc/C3
 public abstract void OnAdd(IStation station);
コード例 #42
0
ファイル: ProcessManager.cs プロジェクト: wra222/testgit
        private StationMaintainInfo convertToMaintainInfoFromObj(IStation temp)
        {
            StationMaintainInfo station = new StationMaintainInfo();

            station.Station = temp.StationId;
            //station.StationType = temp.StationType;
            station.OperationObject = temp.OperationObject;
            station.Cdt = temp.Cdt;
            station.Descr = temp.Descr;
            station.Editor = temp.Editor;
            station.Udt = temp.Udt;

            return station;
        }
コード例 #43
0
ファイル: Station.generated.cs プロジェクト: heinzsack/DEV
		///	<summary> This method copy's each database field into the <paramref name="target"/> interface. </summary>
		public void Copy_To(IStation target, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) target.Id = this.Id;
			target.NameId = this.NameId;
			target.SortOrder = this.SortOrder;
			target.Title = this.Title;
			target.RblNummer = this.RblNummer;
			target.Gate = this.Gate;
			target.Lat = this.Lat;
			target.Lon = this.Lon;
			target.ParentStationId = this.ParentStationId;
			target.ColorARGBWert = this.ColorARGBWert;
			target.LastUpdateToken = this.LastUpdateToken;
		}
コード例 #44
0
 protected virtual void PropagateOnQuantumTransmit(IStation station, IQuantumState state)
 {
     _counterTransmitedQuantum++;
     if (OnQuantumTransmit != null)
     { OnQuantumTransmit(this, state); };
 }
コード例 #45
0
 protected override void PropagateOnQuantumReceive(IStation station, IQuantumState state)
 {
     base.PropagateOnQuantumReceive(station, state);
 }
コード例 #46
0
ファイル: StationPersisterBase.cs プロジェクト: hkiaipc/C3
 public void Add(IStation station)
 {
     OnAdd(station);
 }
コード例 #47
0
ファイル: StationTreeNode.cs プロジェクト: hkiaipc/C3
 /// <summary>
 /// 
 /// </summary>
 /// <param name="station"></param>
 private void RefreshStationTreeNode(IStation station)
 {
     this.Name = station.Name;
     this.Text = station.Name;
 }
コード例 #48
0
ファイル: StationPersisterBase.cs プロジェクト: hkiaipc/C3
 public void Update(IStation station)
 {
     OnUpdate(station);
 }
コード例 #49
0
ファイル: Station.generated.cs プロジェクト: heinzsack/DEV
		///	<summary> This method copy's each database field from the <paramref name="source"/> interface to this data row.</summary>
		public void Copy_From(IStation source, bool includePrimaryKey = false)
		{
			if (includePrimaryKey) this.Id = source.Id;
			this.NameId = source.NameId;
			this.SortOrder = source.SortOrder;
			this.Title = source.Title;
			this.RblNummer = source.RblNummer;
			this.Gate = source.Gate;
			this.Lat = source.Lat;
			this.Lon = source.Lon;
			this.ParentStationId = source.ParentStationId;
			this.ColorARGBWert = source.ColorARGBWert;
			this.LastUpdateToken = source.LastUpdateToken;
		}
コード例 #50
0
ファイル: Station.generated.cs プロジェクト: heinzsack/DEV
		///	<summary> 
		///		This method copy's each database field which is in the <paramref name="includedColumns"/> 
		///		from the <paramref name="source"/> interface to this data row.
		/// </summary>
		public void Copy_From_But_TakeOnly(IStation source, params string[] includedColumns)
		{
			if (includedColumns.Contains(StationenTable.IdCol)) this.Id = source.Id;
			if (includedColumns.Contains(StationenTable.NameIdCol)) this.NameId = source.NameId;
			if (includedColumns.Contains(StationenTable.SortOrderCol)) this.SortOrder = source.SortOrder;
			if (includedColumns.Contains(StationenTable.TitleCol)) this.Title = source.Title;
			if (includedColumns.Contains(StationenTable.RblNummerCol)) this.RblNummer = source.RblNummer;
			if (includedColumns.Contains(StationenTable.GateCol)) this.Gate = source.Gate;
			if (includedColumns.Contains(StationenTable.LatCol)) this.Lat = source.Lat;
			if (includedColumns.Contains(StationenTable.LonCol)) this.Lon = source.Lon;
			if (includedColumns.Contains(StationenTable.ParentStationIdCol)) this.ParentStationId = source.ParentStationId;
			if (includedColumns.Contains(StationenTable.ColorARGBWertCol)) this.ColorARGBWert = source.ColorARGBWert;
			if (includedColumns.Contains(StationenTable.LastUpdateTokenCol)) this.LastUpdateToken = source.LastUpdateToken;
		}
コード例 #51
0
 protected virtual void PropagateOnClassicalReceive(IStation station, IClassicalState state)
 {
     _counterReceivedClassical++;
     if (OnClassicalReceive != null)
     { OnClassicalReceive(this, state); };
 }
コード例 #52
0
 protected void PropagateOnTransmit(IStation station, IInformationState state)
 {
     if (OnTransmit != null)
     { OnTransmit(this, state); };
 }
コード例 #53
0
ファイル: StationPersisterBase.cs プロジェクト: hkiaipc/C3
 public abstract void OnUpdate(IStation station);
コード例 #54
0
ファイル: StationPersisterBase.cs プロジェクト: hkiaipc/C3
 public abstract void OnDelete(IStation station);
コード例 #55
0
ファイル: StationPersisterBase.cs プロジェクト: hkiaipc/C3
 public void Delete(IStation station)
 {
     OnDelete(station);
 }
コード例 #56
0
ファイル: StationModel.cs プロジェクト: hkiaipc/C3
 public StationModel(IStation station)
 {
     this._station = station;
     this.ControllerType = typeof(StationController);
 }
コード例 #57
0
 protected override void PropagateOnClassicalReceive(IStation station, IClassicalState state)
 {
     IClassicalBit tempBit = FactoryClassicalData.generateBit(false);
     tempBit.AssociateState(state);
     ReceivedData.Add(FactoryClassicalData.decodeBitByUsualBasis(tempBit));
     base.PropagateOnClassicalReceive(station,state);
 }
コード例 #58
0
ファイル: DeviceUIBase.cs プロジェクト: hkiaipc/C3
 /// <summary>
 /// 
 /// </summary>
 /// <param name="deviceType"></param>
 /// <param name="station"></param>
 /// <param name="newDevice"></param>
 /// <returns></returns>
 protected abstract DialogResult OnAdd(DeviceType deviceType, IStation station, out IDevice newDevice);