public override void clicked(TaskPositioner positioner) { if (OnClicked != null) { OnClicked.Invoke(this); } }
public override void clicked(TaskPositioner taskPositioner) { if (Plugin.AtlasPluginManager.allDependenciesLoadedFor(this.Plugin)) { String fullContextPath = Path.Combine(Plugin.PluginRootFolder, ContextFile).Replace('\\', '/'); VirtualFilesystemResourceProvider resourceProvider = new VirtualFilesystemResourceProvider(Path.GetDirectoryName(fullContextPath)); try { AnomalousMvcContext context; using (Stream stream = resourceProvider.openFile(Path.GetFileName(fullContextPath))) { context = Plugin.MvcCore.loadContext(stream); } context.RuntimeName = UniqueName; context.setResourceProvider(resourceProvider); Plugin.TimelineController.setResourceProvider(resourceProvider); Plugin.MvcCore.startRunningContext(context); } catch (Exception ex) { Log.Error("Cannot load context '{0}'\nReason: {1}", ContextFile, ex.Message); } } else { MessageBox.show("Additional files needed to run this task. Would you like to download them now?", "Files Needed", MessageBoxStyle.IconQuest | MessageBoxStyle.Yes | MessageBoxStyle.No, result => { if (result == MessageBoxStyle.Yes) { Plugin.AtlasPluginManager.requestDependencyDownloadFor(this.Plugin); } }); } }
public override void clicked(TaskPositioner positioner) { ShowOnTaskbar = TeethController.HighlightContacts = !TeethController.HighlightContacts; if (!TeethController.HighlightContacts) { fireItemClosed(); } }
public override void clicked(TaskPositioner positioner) { IntVector2 location = positioner.findGoodWindowPosition(0, 0); VolumeControl volumeControl = new VolumeControl(); volumeControl.Hidden += new EventHandler(volumeControl_Hidden); volumeControl.show(location.x, location.y); }
public override void clicked(TaskPositioner positioner) { IntVector2 location = positioner.findGoodWindowPosition(0, 0); windowMenu.setPosition(location.x, location.y); Gui.Instance.keepWidgetOnscreen(windowMenu); LayerManager.Instance.upLayerItem(windowMenu); windowMenu.setVisibleSmooth(true); }
public override void clicked(TaskPositioner positioner) { if (OnClicked != null) { CurrentTaskPositioner = positioner; OnClicked.Invoke(this); CurrentTaskPositioner = null; } }
public override void clicked(TaskPositioner taskPositioner) { if (rocketDebugger == null) { rocketDebugger = new RocketDebuggerWindow(); guiManager.addManagedDialog(rocketDebugger); } rocketDebugger.Position = taskPositioner.findGoodWindowPosition(rocketDebugger.Width, rocketDebugger.Height); rocketDebugger.Visible = true; rocketDebugger.Closed += rocketDebugger_Closed; }
public override void clicked(TaskPositioner taskPositioner) { if (Context != null) { Context.runAction(actionName); } else { Log.Warning("Context was null cannot run action '{0}'", actionName); } }
public override void clicked(TaskPositioner positioner) { if (bulletScene != null) { ShowOnTaskbar = bulletScene.Active = !bulletScene.Active; if (!bulletScene.Active) { fireItemClosed(); } } }
public override void clicked(TaskPositioner positioner) { if (!dialog.Visible) { dialog.Visible = true; } else { dialog.bringToFront(); } }
public override void clicked(TaskPositioner positioner) { if (standaloneController.SceneViewController.HasCloneWindow) { standaloneController.SceneViewController.destroyCloneWindow(); fireItemClosed(); } else { cloneWindowDialog.open(true); } }
public override void clicked(TaskPositioner positioner) { IntVector2 location = positioner.findGoodWindowPosition(0, 0); ColorMenu colorMenu = ColorMenu.ShowColorMenu(location.x, location.y, delegate(Color color) { sceneViewController.ActiveWindow.BackColor = color; }); colorMenu.Hiding += (sender, e) => { fireItemClosed(); }; }
public override void clicked(TaskPositioner positioner) { if (!dialog.Visible) { if (dialog.AllowAutoPosition) { dialog.Position = positioner.findGoodWindowPosition(dialog.Width, dialog.Height); } dialog.Visible = true; } else { dialog.bringToFront(); } }
public override void clicked(TaskPositioner positioner) { EmbeddedResourceProvider embeddedResourceProvider = new EmbeddedResourceProvider(assembly, resourceRoot); if (sortFiles) { embeddedResourceProvider.sortFiles(NaturalSortAlgorithm.CompareFunc); } timelineController.setResourceProvider(embeddedResourceProvider); //Load and run the mvc context context = mvcCore.loadContext(embeddedResourceProvider.openFile(mvcContextName)); context.RuntimeName = UniqueName; context.setResourceProvider(embeddedResourceProvider); mvcCore.startRunningContext(context); }
public override void clicked(TaskPositioner positioner) { if (!popupContainer.Visible) { IntVector2 loc; if (positioner != null) { loc = positioner.findGoodWindowPosition(popupContainer.Width, popupContainer.Height); } else { loc = new IntVector2(0, 0); } popupContainer.show(loc.x, loc.y); } }
public override void clicked(TaskPositioner taskPositioner) { FileSaveDialog saveDialog = new FileSaveDialog(MainWindow.Instance, "Save Microcode Cache", Environment.CurrentDirectory, Root.getSingleton().getRenderSystem().Name + ".mcc", "Microcode Cache (*.mcc)|*.mcc"); saveDialog.showModal((result, path) => { if (result == NativeDialogResult.OK) { using (Stream stream = File.Open(path, FileMode.Create, FileAccess.Write)) { GpuProgramManager.Instance.saveMicrocodeCache(stream); } } fireItemClosed(); }); }
public override void clicked(TaskPositioner positioner) { PopupMenu menu = (PopupMenu)Gui.Instance.createWidgetT("PopupMenu", "PopupMenu", 0, 0, 1, 1, Align.Default, "Popup", ""); menu.Visible = false; automatic = menu.addItem("Automatic"); sixteenNine = menu.addItem("16:9"); fourThree = menu.addItem("4:3"); oneOne = menu.addItem("1:1"); menu.ItemAccept += new MyGUIEvent(menu_ItemAccept); menu.Closed += new MyGUIEvent(menu_Closed); IntVector2 position = positioner.findGoodWindowPosition(menu.Width, menu.Height); menu.setPosition(position.x, position.y); menu.setVisibleSmooth(true); }
public override void clicked(TaskPositioner taskPositioner) { Task introTask; if (PlatformConfig.ForwardTouchAsMouse) { introTask = standaloneController.TaskController.getTask("DDPlugin.IntroductionTutorial.MobileTask"); } else { introTask = standaloneController.TaskController.getTask("DDPlugin.IntroductionTutorial.DesktopTutorial"); } if (introTask != null) { introTask.clicked(EmptyTaskPositioner.Instance); } }
public override void clicked(TaskPositioner taskPositioner) { if (Plugin.AtlasPluginManager.allDependenciesLoadedFor(this.Plugin)) { VirtualFilesystemResourceProvider resourceProvider = new VirtualFilesystemResourceProvider(Plugin.PluginRootFolder); try { Slideshow slideshow; using (Stream stream = resourceProvider.openFile(SlideshowFile)) { slideshow = SharedXmlSaver.Load <Slideshow>(stream); } if (slideshow.Version == Slideshow.CurrentVersion) { AnomalousMvcContext context = slideshow.createContext(resourceProvider, Plugin.GuiManager); context.RuntimeName = UniqueName; context.setResourceProvider(resourceProvider); Plugin.TimelineController.setResourceProvider(resourceProvider); Plugin.MvcCore.startRunningContext(context); } else { MessageBox.show(String.Format("Cannot run slideshow \"{0}.\" It was created in a different version of Anomalous Medical.\nYou will need to download an updated version.", Name), "Error", MessageBoxStyle.IconError | MessageBoxStyle.Ok); InlineRmlUpgradeCache.removeSlideshowPanels(slideshow); } } catch (Exception ex) { Log.Error("Cannot load context '{0}'\nReason: {1}", SlideshowFile, ex.Message); } } else { MessageBox.show("Additional files needed to run this task. Would you like to download them now?", "Files Needed", MessageBoxStyle.IconQuest | MessageBoxStyle.Yes | MessageBoxStyle.No, result => { if (result == MessageBoxStyle.Yes) { Plugin.AtlasPluginManager.requestDependencyDownloadFor(this.Plugin); } }); } }
public override void clicked(TaskPositioner positioner) { IntVector2 pos = positioner.findGoodWindowPosition(selectionModeChooser.Width, selectionModeChooser.Height); selectionModeChooser.show(pos.x, pos.y); }
public override void clicked(TaskPositioner taskPositioner) { IntVector2 position = taskPositioner.findGoodWindowPosition(slideLayoutPicker.Width, slideLayoutPicker.Height); slideLayoutPicker.show(position.x, position.y); }
/// <summary> /// Called when this item is clicked. If you don't have a TaskPositioner to use send the EmptyTaskPositioner instance, /// don't pass null, creates too many checks. Some tasks will have checked for null, but that is because they are old /// always provide an instance when calling this function. /// </summary> public abstract void clicked(TaskPositioner taskPositioner);