public ProductSettingsTracker(Lifetime lifetime, ClientFactory clientFactory, IViewable<ISyncSource> syncSources, IFileSystemTracker fileSystemTracker, JetBoxSettingsStorage jetBoxSettings) { myClientFactory = clientFactory; mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); mySettingsStore.Changed.Advise(lifetime, _ => InitClient()); myRootFolder = FileSystemPath.Parse("ReSharperPlatform"); InitClient(); syncSources.View(lifetime, (lt1, source) => source.FilesToSync.View(lt1, (lt2, fileToSync) => { SyncFromCloud(fileToSync.Value); var fileTrackingLifetime = new SequentialLifetimes(lt2); fileToSync.Change.Advise(lt2, args => { var path = args.Property.Value; if (lifetime.IsTerminated || path.IsNullOrEmpty()) { fileTrackingLifetime.TerminateCurrent(); } else { fileTrackingLifetime.Next(lt => fileSystemTracker.AdviseFileChanges(lt, path, delta => delta.Accept(new FileChangesVisitor(myClient, myRootFolder)))); } }); })); }
public void OnAsset(IViewable entity, string value) { var prefab = Resources.Load <GameObject>(value); var obj = Object.Instantiate(prefab, _viewContainer); var c = entity.contextInfo.name; obj.name = c + " " + value; switch (c) { case "Audio": { var e = (AudioEntity)entity; e.AddAudioPositionListener(obj.GetComponent <IAudioPositionListener>()); e.AddAudioDestroyedListener(obj.GetComponent <IAudioDestroyedListener>()); break; } case "Game": { var e = (GameEntity)entity; e.AddGamePositionListener(obj.GetComponent <IGamePositionListener>()); e.AddGameDestroyedListener(obj.GetComponent <IGameDestroyedListener>()); break; } } // Currently the responsiblity of MB objects to add their listeners var iview = obj.GetComponent <IView>(); iview.Link(entity, _contexts.game); }
public void ChangeView(string _viewType) { #if DEBUG || DEVELOPMENT_BUILD Debug.Log(_viewType); #endif View newView = Utility.ToEnum <View>(_viewType); for (int i = 0; i < views.Length; i++) { IViewable viewable = views[i].gameObject.GetComponent <IViewable>(); if (_viewType.ToString() == views[i].name) { if (viewable != null) { viewable.SetView(true); currentView = newView; } else { #if DEBUG || DEVELOPMENT_BUILD Debug.Log("Unable to find IViewable interface on object " + views[i].name); #endif } } else { viewable.SetView(false); } } }
public virtual void set(IViewable obj) { _toDisplay = obj; transform.gameObject.SetActive(true); Debug.Log("PLANET VIEW SET " + obj); render(); }
public PsiCodeFormatter(Lifetime lifetime, PsiLanguage language, ISettingsStore settingsStore, IViewable<IPsiCodeFormatterExtension> extensions, ISettingsOptimization settingsOptimization) : base(settingsStore) { myLanguage = language; myExtensions = extensions.ToLiveEnumerable(lifetime); mySettingsOptimization = settingsOptimization; }
public void Fonogram(IDTO idto) { Fonogram fonogram = DtoToDbModels.ConvertToFonogram(idto as IFonogramDTO); Fonogram newFonogram = _saver.SaveFonogram(fonogram); _viewable = DbModelsToViewable.ConvertToFonogramViewable(newFonogram); }
public APresenter(IViewable view) { View = view; _viewGameObject = (view as Component).gameObject; Item = AcquireItemReference(); // the following use ItemData so Views should only be enabled to create this Presenter after ItemData is set View.HudPublisher = InitializeHudPublisher(); }
static public IzvodjacViewModel GetIzvodjacViewModel(IViewable data) { IzvodjacViewModel izvodjacview = new IzvodjacViewModel(); izvodjacview.SetData(data); return(izvodjacview); }
public void Izvodjac(IDTO idto) { Izvodjac izvodjac = DtoToDbModels.ConvertToIzvodjac(idto as IDTO); izvodjac = Updater.UpdateIzvodjac(izvodjac); _viewable = DbModelsToViewable.ConvertToIzvodjacViewable(izvodjac); }
public void Fonogram(IDTO idto) { Fonogram fonogram = DtoToDbModels.ConvertToFonogram(idto as IFonogramDTO); fonogram = Updater.UpdateFonogram(fonogram); _viewable = DbModelsToViewable.ConvertToFonogramViewable(fonogram); }
public void Album(IDTO idto) { Album album = DtoToDbModels.ConvertToAlbum(idto as IAlbumDTO); album = Updater.UpdateAlbum(album); _viewable = DbModelsToViewable.ConvertToAlbumViewable(album); }
public void SetData(IViewable data) { IIzvodjacViewable izvodjac = data as IIzvodjacViewable; Id = izvodjac.Id; Naziv = izvodjac.Naziv; SetAlbumi(izvodjac); SetFonogrami(izvodjac); }
/// <summary> /// Initializes a new instance of the <see cref="AItemPresenter"/> class. /// Note: Presenters use Model Data, so Views should only be enabled to create this Presenter after the Model's Data has been set /// </summary> /// <param name="view">The view.</param> public AItemPresenter(IViewable view) { View = view; _viewGameObject = (view as Component).gameObject; Model = AcquireModelReference(); Data = (Model as IHasData).Data; View.HudPublisher = InitializeHudPublisher(); // derived Presenters should call Subscribe() if they have any subscriptions to make }
public AngularJsCodeFormatter(Lifetime lifetime, PsiLanguageType language, ISettingsStore settingsStore, ISettingsOptimization settingsOptimization, JavaScriptFormattingInfoProviderBase formattingProvider, JavaScriptIndentingInfoProviderBase indentingProvider, IViewable<IJavaScriptCodeFormatterExtension> extensions) : base(lifetime, language, settingsStore, settingsOptimization, formattingProvider, indentingProvider, extensions) { }
public AngularJsCodeFormatter(Lifetime lifetime, PsiLanguageType language, ISettingsStore settingsStore, ISettingsOptimization settingsOptimization, JavaScriptFormattingInfoProviderBase formattingProvider, JavaScriptIndentingInfoProviderBase indentingProvider, IViewable <IJavaScriptCodeFormatterExtension> extensions) : base(lifetime, language, settingsStore, settingsOptimization, formattingProvider, indentingProvider, extensions) { }
static public AlbumViewModel GetAlbumViewModel(IViewable data) { AlbumViewModel albumview = new AlbumViewModel(); albumview.SetData(data); return(albumview); //ovde treba obaviti konverziju iz album u albumview }
static public FonogramViewModel GetFonogramViewModel(IViewable data) { FonogramViewModel fonogramview = new FonogramViewModel(); fonogramview.SetData(data); return(fonogramview); // prvo odratiti interface segregation neophodan za gornju metodu }
public JavaScriptDependentFilesCacheHack( Lifetime lifetime, IViewable<ILibraryFiles> libraryFiles, JavaScriptDependentFilesModuleFactory dependentFilesModuleFactory, JavaScriptDependentFilesBuilder builder, IShellLocks locks, IPsiConfiguration configuration, IPersistentIndexManager persistentIndexManager) : base(lifetime, new ListEvents<ILibraryFiles>(lifetime, "booo"), dependentFilesModuleFactory, builder, locks, configuration, persistentIndexManager) { }
public void OpenDocument(IViewable viewable) { try { Process.Start(Path.GetFullPath(viewable.DocumentPath())); } catch (Exception ex) { MessageBox.Show("An Error ocurred attempting to open document: " + ex.Message.ToString(), "Insert Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void SetData(IViewable data) { IFonogramViewable fonogram = data as IFonogramViewable; Id = fonogram.Id; Naziv = fonogram.Naziv; SetIzvodjaci(fonogram); GodinaIzdanja = fonogram.GodinaIzdanja; KataloskiBroj = fonogram.KataloskiBroj; AlbumNaziv = fonogram.AlbumNaziv; }
public void SetData(IViewable data) { IAlbumViewable album = data as IAlbumViewable; Id = album.Id; Naziv = album.Naziv; SetIzvodjaci(album); GodinaIzdanja = album.GodinaIzdanja; KataloskiBroj = album.KataloskiBroj; SetFonogrami(album); }
/// <summary> /// Begins the loop, displaying the game. /// </summary> /// <param name="theView">The game's opening view</param> public static void Begin(IViewable theView) { CurrentView = theView; while (true) { Console.Clear(); Console.WriteLine(CurrentView.Write()); var input = Console.ReadKey().Key; CurrentView.Update(new UpdateEventArgs(input)); } }
protected void Page_Load(object sender, EventArgs e) { // display a list of modules for the project this.ProjectModulesList.DataSource = ViewData.Model.Project.ListModules(); this.ProjectModulesList.DataBind(); // display the specified model's page if (ViewData.Model.ModuleId != null) { IProjectModule moduleToShow = ViewData.Model.Module; IViewable viewableModule = (IViewable)moduleToShow; } }
public void setSource(IViewable view) { //unregister old event handler if (content != null) { content.eViewChanged -= OnSourceUpdate; } content = view; //register new event handler if (content != null) { content.eViewChanged += OnSourceUpdate; } }
public void DisplayInformation(IViewable item) { this.Title = String.Format("{0}, Properties", item.Name); this.txtFullPath.Text = item.Path; this.txtName.Text = item.Name; this.txtType.Text = item.Type; this.txtAvgSize.Text = item.Size; if (item is FileEntry) { this.grdEntries.DataStore = ((FileEntry)item).BundleEntries; } else { this.tabEntries.Visible = false; } }
public HighlightingTracker(Lifetime lifetime, ITextControlManager textControlManager, IDocumentMarkupManager markupManager, IViewable <IHighlightingChangeHandler> handlers) { textControlManager.TextControls.View(lifetime, (textControlLifetime, textControl) => { var markupModel = markupManager.GetMarkupModel(textControl.Document); Action <DocumentMarkupModifiedEventArgs> onChanged = args => { Lifetimes.Using(l => { handlers.View(l, (_, h) => { h.OnHighlightingChanged(textControl.Document, args.Added, args.Removed, args.Modified); }); }); }; markupModel.Changed += onChanged; textControlLifetime.AddAction(() => markupModel.Changed -= onChanged); }); }
public static void ShowTrianglesIEnumerator(this IViewable view, string message = "") { StringBuilder sb = new StringBuilder(); if (!string.IsNullOrEmpty(message)) { sb.AppendLine(message); } foreach (KeyValuePair <string, IViewableTriangle> item in view.TriangleDictionary) { sb.AppendFormat("{0}: {1}; {2}: ", NAME, item.Key, SIDES); foreach (double side in item.Value.Sides) { sb.AppendFormat("{0}; ", side); } sb.AppendFormat(" {0}: {1:F3};", SQUARE, item.Value.Square); sb.AppendLine(); } Console.WriteLine(sb); }
//////////////////////////////////////////////////////////////////////////////////////// // PUBLIC METHODS //////////////////////////////////////////////////////////////////////////////////////// /// <summary> /// Returns an object that impliments IViewable from the location that /// has the Name property equal to targetName /// </summary> /// <param name="targetName">A string that matches the object's Name property</param> /// <returns>An IViewable object if a match found. Otherwise, returns null</returns> public IViewable GetViewableMatchInLocation(string targetName) { IViewable viewableMatch = null; if (targetName == "") { viewableMatch = this; return(viewableMatch); } viewableMatch = GetItemMatchInLocation(targetName); if (viewableMatch != null) { return(viewableMatch); } viewableMatch = GetActorMatchInLocation(targetName); if (viewableMatch != null) { return(viewableMatch); } return(null); }
public AMortalFocusablePresenter(IViewable view) : base(view) { _eventMgr = GameEventManager.Instance; }
public PsiCodeFormatter(Lifetime lifetime, PsiLanguage language, ISettingsStore settingsStore, IViewable <IPsiCodeFormatterExtension> extensions, ISettingsOptimization settingsOptimization) : base(settingsStore) { myLanguage = language; myExtensions = extensions.ToLiveEnumerable(lifetime); mySettingsOptimization = settingsOptimization; }
public AFocusableItemPresenter(IViewable view) : base(view) { }
public AMortalItemPresenter(IViewable view) : base(view) { _eventMgr = GameEventManager.Instance; Subscribe(); }
public void Fonogram(IDTO idto) { Fonogram fonogram = RetrieveFonogram.GetById(idto.Id); _viewable = DbModelsToViewable.ConvertToFonogramViewable(fonogram); }
public void Izvodjac(IDTO idto) { Izvodjac izvodjac = RetrieveIzvodjac.GetById(idto.Id); _viewable = DbModelsToViewable.ConvertToIzvodjacViewable(izvodjac); }
public SystemPresenter(IViewable view) : base(view) { }
public PlanetoidPresenter(IViewable view) : base(view) { Subscribe(); }
public StarPresenter(IViewable view) : base(view) { _systemView = _viewGameObject.GetSafeMonoBehaviourComponentInParents<SystemView>(); }
public SystemPresenter(IViewable view) : base(view) { _childViewsInSystem = _viewGameObject.GetSafeInterfacesInChildren<IViewable>().Except(view); }
public SectorPresenter(IViewable view) : base(view) { }
public PropertiesDialog(IViewable item) : this() { this.DisplayInformation(item); }
public void render(IViewable viewable, clickViews viewCallBacks) { Debug.Log("render MainView " + viewable); clear(centralView); viewable.renderUIView(centralView.transform, viewCallBacks); }
public void Album(IDTO idto) { Album album = RetrieveAlbum.GetById(idto.Id); _viewable = DbModelsToViewable.ConvertToAlbumViewable(album); }
public ProductSettingsTracker(Lifetime lifetime, ClientFactory clientFactory, IViewable <ISyncSource> syncSources, IFileSystemTracker fileSystemTracker, JetBoxSettingsStorage jetBoxSettings) { myClientFactory = clientFactory; mySettingsStore = jetBoxSettings.SettingsStore.BindToContextLive(lifetime, ContextRange.ApplicationWide); mySettingsStore.Changed.Advise(lifetime, _ => InitClient()); myRootFolder = FileSystemPath.Parse("ReSharperPlatform"); InitClient(); syncSources.View(lifetime, (lt1, source) => source.FilesToSync.View(lt1, (lt2, fileToSync) => { SyncFromCloud(fileToSync.Value); var fileTrackingLifetime = new SequentialLifetimes(lt2); fileToSync.Change.Advise(lt2, args => { var path = args.Property.Value; if (lifetime.IsTerminated || path.IsNullOrEmpty()) { fileTrackingLifetime.TerminateCurrent(); } else { fileTrackingLifetime.Next(lt => fileSystemTracker.AdviseFileChanges(lt, path, delta => delta.Accept(new FileChangesVisitor(myClient, myRootFolder)))); } }); })); }
public StarPresenter(IViewable view) : base(view) { _systemView = _viewGameObject.GetSafeFirstInterfaceInParents<IViewable>(excludeSelf: true); }
private void addToViewableStack(IViewable el) { renderedViewableStack.Add(el); renderMain(); }
public UniverseCenterPresenter(IViewable view) : base(view) { }