Exemplo n.º 1
0
        public AppViewModel(IWindowManager wm)
        {
            WorldSettings      = new SimulationSettings(); // TODO load from xml
            raftWorldModel     = new RaftSoundPlayer(WorldSettings);
            CommunicationModel = new InProcNetwork()
            {
                ConnectionEstablishLatency = 500,
                ConnectionDefaultLatency   = 100,
                ConnectionCloseLatency     = 400
            };
            RaftDiagramDefinition diagramDefinition = new RaftDiagramDefinition(raftWorldModel, CommunicationModel, WorldSettings);

            Diagram1    = new DiagramViewModel(diagramDefinition);
            modelLoader = new DiagramXmlSerializer(Diagram1);

            RightPanel = new SimulationSettingsViewModel(this, WorldSettings);
        }
Exemplo n.º 2
0
        public MainViewModel(
            TickerExplorerViewModel tickerExplorer,
            StrategyExplorerViewModel strategyExplorer,
            ErrorListViewModel errorList,
            SimulationSettingsViewModel simulationSettings,
            GlobalCommandContainer commands)
        {
            this.TickerExplorer = tickerExplorer;
            this.ErrorList = errorList;
            this.SimulationSettings = simulationSettings;
            this.StrategyExplorer = strategyExplorer;
            this.Commands = commands;

            var assembly = Assembly.GetEntryAssembly();
            var v = new Version(((AssemblyFileVersionAttribute)Attribute.GetCustomAttribute(
                assembly, typeof(AssemblyFileVersionAttribute), false)).Version);
            Title = string.Format("{0} v{1}.{2}",
                assembly.GetName().Name,
                v.Major,
                v.Minor);
        }
Exemplo n.º 3
0
 public SimulationSettingsGetter(SimulationSettingsViewModel simulationSettings)
 {
     this.simulationSettings = simulationSettings;
 }