public void LoadFile(string path) { if (path == null) { throw new ArgumentNullException(nameof(path)); } if (!File.Exists(path)) { return; } LoadMEPackage(path); CodexMapControl?.Open(Pcc); QuestMapControl?.Open(Pcc); StateEventMapControl?.Open(Pcc); ConsequenceMapControl?.Open(Pcc, "ConsequenceMap"); RecentsController.AddRecent(path, false); RecentsController.SaveRecentList(true); Title = $"Plot Editor - {path}"; OnPropertyChanged(nameof(CurrentFile)); //Hiding "Recents" panel if (MainTabControl.SelectedIndex == 0) { MainTabControl.SelectedIndex = 1; } }
public LibraryTabElement(Action <string> onObjectFieldDoubleClick, CustomMenuController customMenuController, GraphTypeMetadata graphTypeMetadata) { OnObjectFieldDoubleClick = onObjectFieldDoubleClick; var uxmlAsset = Resources.Load <VisualTreeAsset>(ResourceAssetPaths.LibraryTabElement_UXML); uxmlAsset.CloneTree(this); m_currentGraphDisplay = this.Q <ObjectDisplayField>(OPENED_GRAPH_FIELD); m_createGraphInstanceButton = this.Q <Button>(CREATE_GRAPH_INSTANCE_BUTTON); m_generateGraphClassButton = this.Q <Button>(GENERATE_GRAPH_CLASS_BUTTON); m_generateNodeClassButton = this.Q <Button>(GENERATE_NODE_CLASS_BUTTON); m_generateNodeViewDrawerClassButton = this.Q <Button>(GENERATE_NODEVIEWDRAWER_CLASS_BUTTON); m_graphTypeMetadata = graphTypeMetadata; m_recentsController = new RecentsController(this); m_favoritesController = new FavoritesController(this); m_allGraphsController = new AllGraphsController(this); m_customMenuController = customMenuController; m_customMenuController.AddCustomMenu("CreateGraphInstance", new CreateGraphInstanceCustomMenu(m_graphTypeMetadata)); m_customMenuController.AddCustomMenu("GenerateGraphClass", new GenerateGraphClassCustomMenu()); m_customMenuController.AddCustomMenu("GenerateNodeClass", new GenerateNodeClassCustomMenu(m_graphTypeMetadata)); m_customMenuController.AddCustomMenu("GenerateNodeViewDrawerClass", new GenerateNodeViewDrawerClassCustomMenu(m_graphTypeMetadata)); m_createGraphInstanceButton.clicked += () => { m_customMenuController.ShowCustomMenu("CreateGraphInstance"); }; m_generateGraphClassButton.clicked += () => { m_customMenuController.ShowCustomMenu("GenerateGraphClass"); }; m_generateNodeClassButton.clicked += () => { m_customMenuController.ShowCustomMenu("GenerateNodeClass"); }; m_generateNodeViewDrawerClassButton.clicked += () => { m_customMenuController.ShowCustomMenu("GenerateNodeViewDrawerClass"); }; }
public PlotEditor() : base("Plot Editor") { InitializeComponent(); RecentsController.InitRecentControl(Toolname, Recents_MenuItem, fileName => LoadFile(fileName)); FindObjectUsagesControl.parentRef = this; }
public AnimationImporter() : base("Animation Importer") { DataContext = this; LoadCommands(); InitializeComponent(); RecentsController.InitRecentControl(Toolname, Recents_MenuItem, fileName => LoadFile(fileName)); }
public PlotEditor() : base("Plot Editor") { GotoCommand = new GenericCommand(FocusGoto, () => Pcc != null); InitializeComponent(); RecentsController.InitRecentControl(Toolname, Recents_MenuItem, fileName => LoadFile(fileName)); FindObjectUsagesControl.parentRef = this; }
public InterpEditor() : base("Interp Editor") { MemoryAnalyzer.AddTrackedMemoryItem(new MemoryAnalyzerObjectExtended("Interp Editor", new WeakReference(this))); LoadCommands(); DataContext = this; StatusText = "Select package file to load"; InitializeComponent(); RecentsController.InitRecentControl(Toolname, Recents_MenuItem, LoadFile); timelineControl.SelectionChanged += TimelineControlOnSelectionChanged; }
public WwiseEditorWPF() : base("Wwise Editor") { DataContext = this; StatusText = "Select package file to load"; LoadCommands(); InitializeComponent(); RecentsController.InitRecentControl(Toolname, Recents_MenuItem, fileName => LoadFile(fileName)); graphEditor = (WwiseGraphEditor)GraphHost.Child; graphEditor.BackColor = GraphEditorBackColor; if (File.Exists(OptionsPath)) { var options = JsonConvert.DeserializeObject <Dictionary <string, object> >(File.ReadAllText(OptionsPath)); if (options.ContainsKey("AutoSave")) { AutoSaveView_MenuItem.IsChecked = (bool)options["AutoSave"]; } } soundPanel.SoundPanel_TabsControl.SelectedIndex = 1; soundPanel.HIRCObjectSelected += SoundPanel_HIRCObjectSelected; }
public void PropogateRecentsChange(IEnumerable <string> newRecents) { RecentsController.PropogateRecentsChange(false, newRecents); }