public CloudViewModel(Cloud cloud, CloudNavigationModel navigation)
        {
            _cloud = cloud;
            _navigation = navigation;

            _depCenterByThought = new Dependent(() =>
            {
                _centerByThought = CalculateCenterByThought();
                UpdateInertialCoordinates();
            });

            DispatcherTimer timer = new DispatcherTimer();
            timer.Interval = TimeSpan.FromSeconds(0.05);
            timer.Tick += new EventHandler(AnimateThoughts);
            timer.Start();
        }
 public ThoughtViewModelSimulated(Cloud cloud, IThoughtContainer container)
 {
     _container = container;
     _cloud = cloud;
 }
 public CloudTabViewModel(Cloud cloud, CloudNavigationModel navigation)
 {
     _cloud = cloud;
     _navigation = navigation;
 }
Beispiel #4
0
            public void WriteFactData(CorrespondenceFact obj, BinaryWriter output)
            {
                Cloud fact = (Cloud)obj;

                _fieldSerializerByType[typeof(Guid)].WriteData(output, fact._unique);
            }
 public CloudSummaryViewModel(Cloud cloud)
 {
     _cloud = cloud;
 }
 public void OpenCloud(Cloud cloud)
 {
     if (!_openClouds.Contains(cloud))
         _openClouds.Add(cloud);
 }
 public CloudNavigationModel(Cloud cloud)
 {
     _cloud = cloud;
 }
 // Business constructor
 public Thought(
     Cloud cloud
     )
 {
     _unique = Guid.NewGuid();
     InitializeResults();
     _cloud = new PredecessorObj<Cloud>(this, RoleCloud, cloud);
 }
        // Fields

        // Results

        // Business constructor
        public Share(
            Identity recipient
            ,Cloud cloud
            )
        {
            InitializeResults();
            _recipient = new PredecessorObj<Identity>(this, RoleRecipient, recipient);
            _cloud = new PredecessorObj<Cloud>(this, RoleCloud, cloud);
        }
        // Fields

        // Results

        // Business constructor
        public CloudCentralThought(
            Cloud cloud
            ,IEnumerable<CloudCentralThought> prior
            ,Thought value
            )
        {
            InitializeResults();
            _cloud = new PredecessorObj<Cloud>(this, RoleCloud, cloud);
            _prior = new PredecessorList<CloudCentralThought>(this, RolePrior, prior);
            _value = new PredecessorObj<Thought>(this, RoleValue, value);
        }
			public CorrespondenceFact CreateFact(FactMemento memento)
			{
				Cloud newFact = new Cloud(memento);

				// Create a memory stream from the memento data.
				using (MemoryStream data = new MemoryStream(memento.Data))
				{
					using (BinaryReader output = new BinaryReader(data))
					{
						newFact._unique = (Guid)_fieldSerializerByType[typeof(Guid)].ReadData(output);
					}
				}

				return newFact;
			}