static void Main(string[] args) { var platform = Platform.Detect; var app = new Application(platform); Styles.Load(); var win = new MainWindow(); var controller = PipelineController.Create(win); string project = null; if (Global.Unix && !Global.Linux) { project = Environment.GetEnvironmentVariable("MONOGAME_PIPELINE_PROJECT"); } else if (args != null && args.Length > 0) { project = string.Join(" ", args); } if (!string.IsNullOrEmpty(project)) { controller.OpenProject(project); } app.Run(win); }
public MoveAction(IProjectItem item, string newname) { _con = Instance; _oldname = Path.GetFileName(item.OriginalPath); _newname = newname; _item = item; }
public IncludeAction(List <IncludeItem> includes) { _items = new List <IProjectItem>(); _con = Instance; _includes = includes; _firsttime = true; }
public NewAction(PipelineController controller, string name, string location, ContentItemTemplate template) { _con = controller; _name = name; _location = location; _template = template; }
static void Main(string[] args) { var app = new Application(Platform.Detect); Styles.Load(); #if WINDOWS Xwt.Application.InitializeAsGuest(Xwt.ToolkitType.Wpf); #elif LINUX Xwt.Application.InitializeAsGuest(Xwt.ToolkitType.Gtk3); #endif var win = new MainWindow(); var controller = PipelineController.Create(win); string project = null; if (Global.Unix && !Global.Linux) { project = Environment.GetEnvironmentVariable("MONOGAME_PIPELINE_PROJECT"); } else if (args != null && args.Length > 0) { project = string.Join(" ", args); } if (!string.IsNullOrEmpty(project)) { controller.OpenProject(project); } app.Run(win); }
static void Main(string [] args) { #if WINDOWS Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); History.Default.Load(); var view = new MainView(); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); view.OpenProjectPath = projectFilePath; } var model = new PipelineProject(); var controller = new PipelineController(view, model); Application.Run(view); #endif #if LINUX || MONOMAC Gtk.Application.Init(); MainWindow win = new MainWindow(); win.Show(); var model = new PipelineProject(); new PipelineController(win, model); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); win.OpenProjectPath = projectFilePath; } win.OnShowEvent(); Gtk.Application.Run(); #endif }
private PipelineController(IView view) { Instance = this; PipelineSettings.Default.Load(); SelectedItems = new List <IProjectItem>(); _actionStack = new ActionStack(this); View = view; View.Attach(this); ProjectOpen = false; _watcher = new FileWatcher(this, view); _templateItems = new List <ContentItemTemplate>(); var root = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); if (Directory.Exists(Path.Combine(root, "..", "Resources", "Templates"))) { root = Path.Combine(root, "..", "Resources"); } LoadTemplates(Path.Combine(root, "Templates")); UpdateMenu(); view.UpdateRecentList(PipelineSettings.Default.ProjectHistory); }
static void Main(string [] args) { #if WINDOWS Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); History.Default.Load(); var view = new MainView(); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); view.OpenProjectPath = projectFilePath; } var model = new PipelineProject(); var controller = new PipelineController(view, model); Application.Run(view); #endif #if LINUX || MONOMAC Gtk.Application.Init (); MainWindow win = new MainWindow (); win.Show (); var model = new PipelineProject(); new PipelineController(win, model); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); win.OpenProjectPath = projectFilePath; } win.OnShowEvent (); Gtk.Application.Run (); #endif }
private PipelineController(IView view) { Instance = this; SelectedItems = new List <IProjectItem>(); _actionStack = new ActionStack(this); View = view; View.Attach(this); ProjectOpen = false; _templateItems = new List <ContentItemTemplate>(); var root = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); var macPath = Path.Combine(root, "..", "Resources"); var windowsAndLinuxPath = Path.Combine(root, "Templates"); #if IDE LoadTemplates(root); #else if (Directory.Exists(macPath)) { LoadTemplates(macPath); } else { LoadTemplates(windowsAndLinuxPath); } #endif UpdateMenu(); view.UpdateRecentList(PipelineSettings.Default.ProjectHistory); }
static void Main(string[] args) { Styles.Load(); var app = new Application(Platform.Detect); app.Style = "PipelineTool"; var win = new MainWindow(); var controller = PipelineController.Create(win); #if LINUX Global.Application.AddWindow(win.ToNative() as Gtk.Window); #endif string project = null; if (Global.Unix && !Global.Linux) { project = Environment.GetEnvironmentVariable("MONOGAME_PIPELINE_PROJECT"); } else if (args != null && args.Length > 0) { project = string.Join(" ", args); } if (!string.IsNullOrEmpty(project)) { controller.OpenProject(project); } app.Run(win); }
public MoveAction(PipelineController controller, string[] paths, string[] newpaths, FileType[] types) { _con = controller; this.paths = paths; this.newpaths = newpaths; this.types = types; }
public MoveAction(PipelineController controller, string path, string newpath, FileType type) { _con = controller; this.path = path; this.newpath = newpath; this.type = type; }
public ExcludeAction(PipelineController controller, IEnumerable<ContentItem> items) { _con = controller; _state = new ContentItemState[items.Count()]; var i = 0; foreach (var item in items) { _state[i++] = ContentItemState.Get(item); } }
public ExcludeAction(PipelineController controller, IEnumerable <ContentItem> items) { _con = controller; _state = new ContentItemState[items.Count()]; var i = 0; foreach (var item in items) { _state[i++] = ContentItemState.Get(item); } }
public CollectionEditorDialog(Window parrent, string text) : base(Global.GetNewDialog(parrent.Handle)) { Build(); this.Title = Mono.Unix.Catalog.GetString("Reference Editor"); this.AddButton("Ok", ResponseType.Ok); this.AddButton("Cancel", ResponseType.Cancel); this.DefaultResponse = ResponseType.Ok; this.controller = ((PipelineController)((MainWindow)parrent)._controller); FileFilter filter = new FileFilter(); filter.AddPattern("*.dll"); filechooserwidget1.Filter = filter; filechooserwidget1.SetCurrentFolder(controller.ProjectLocation); filechooserwidget1.SelectMultiple = true; var column = new TreeViewColumn(); var textCell = new CellRendererText(); var dataCell = new CellRendererText(); dataCell.Visible = false; column.PackStart(textCell, false); column.PackStart(dataCell, false); treeview1.AppendColumn(column); column.AddAttribute(textCell, "markup", 0); column.AddAttribute(dataCell, "text", 1); listStore = new TreeStore(typeof(string), typeof(string)); treeview1.Model = listStore; treeview1.Selection.Mode = SelectionMode.Multiple; string[] refs = text.Replace("\r\n", "~").Split('~'); foreach (string reff in refs) { if (reff != "") { AddValue(reff); } } }
static void Main(string [] args) { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); var view = new MainView(); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); view.OpenProjectPath = projectFilePath; } var model = new PipelineProject(); var controller = new PipelineController(view, model); Application.Run(view); }
public CollectionEditorDialog (Window parrent, string text) : base(Global.GetNewDialog(parrent.Handle)) { Build(); this.Title = Mono.Unix.Catalog.GetString ("Reference Editor"); this.AddButton("Ok", ResponseType.Ok); this.AddButton("Cancel", ResponseType.Cancel); this.DefaultResponse = ResponseType.Ok; this.controller = ((PipelineController)((MainWindow)parrent)._controller); FileFilter filter = new FileFilter (); filter.AddPattern ("*.dll"); filechooserwidget1.Filter = filter; filechooserwidget1.SetCurrentFolder(controller.ProjectLocation); filechooserwidget1.SelectMultiple = true; var column = new TreeViewColumn (); var textCell = new CellRendererText (); var dataCell = new CellRendererText (); dataCell.Visible = false; column.PackStart (textCell, false); column.PackStart (dataCell, false); treeview1.AppendColumn (column); column.AddAttribute (textCell, "markup", 0); column.AddAttribute (dataCell, "text", 1); listStore = new TreeStore (typeof (string), typeof (string)); treeview1.Model = listStore; treeview1.Selection.Mode = SelectionMode.Multiple; string[] refs = text.Replace("\r\n", "~").Split('~'); foreach (string reff in refs) if (reff != "") AddValue(reff); }
public ExcludeAction(PipelineController controller, IEnumerable<ContentItem> items, IEnumerable<string> folders) { _con = controller; _folder = (folders == null) ? new string[0] : folders.ToArray(); if(items == null) _state = new ContentItemState[0]; else { _state = new ContentItemState[items.Count()]; var i = 0; foreach (var item in items) { _state[i++] = ContentItemState.Get(item); } } }
public CollectionEditorDialog(string text, Window window) { Build(); this.controller = ((PipelineController)((MainWindow)window)._controller); FileFilter filter = new FileFilter(); filter.AddPattern("*.dll"); filechooserwidget1.Filter = filter; filechooserwidget1.SetCurrentFolder(controller.ProjectLocation); filechooserwidget1.SelectMultiple = true; var column = new TreeViewColumn(); var textCell = new CellRendererText(); var dataCell = new CellRendererText(); dataCell.Visible = false; column.PackStart(textCell, false); column.PackStart(dataCell, false); treeview1.AppendColumn(column); column.AddAttribute(textCell, "markup", 0); column.AddAttribute(dataCell, "text", 1); listStore = new TreeStore(typeof(string), typeof(string)); treeview1.Model = listStore; treeview1.Selection.Mode = SelectionMode.Multiple; string[] refs = text.Replace("\r\n", "~").Split('~'); foreach (string reff in refs) { if (reff != "") { AddValue(reff); } } }
public ExcludeAction(PipelineController controller, IEnumerable <ContentItem> items, IEnumerable <string> folders) { _con = controller; _folder = (folders == null) ? new string[0] : folders.ToArray(); if (items == null) { _state = new ContentItemState[0]; } else { _state = new ContentItemState[items.Count()]; var i = 0; foreach (var item in items) { _state[i++] = ContentItemState.Get(item); } } }
public IncludeAction(PipelineController controller, IEnumerable<string> files, IEnumerable<string> folders) { _con = controller; _files = files == null ? new string[0] : files.ToArray(); _folder = folders == null ? new string[0] : folders.ToArray(); for (int i = 0; i < _folder.Length; i++) { if (Path.IsPathRooted(_folder[i])) { string projectloc = controller._project.Location; if (_folder[i].Length >= projectloc.Length + 1) _folder[i] = _folder[i].Substring(projectloc.Length + 1); } if(_folder[i].EndsWith(Path.DirectorySeparatorChar.ToString())) _folder[i] = _folder[i].Remove(_folder[i].Length - 1); } }
static void Main(string [] args) { #if WINDOWS Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); PipelineSettings.Default.Load(); var view = new MainView(); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); view.OpenProjectPath = projectFilePath; } var controller = new PipelineController(view); Application.Run(view); #endif #if LINUX || MONOMAC Gtk.Application.Init(); Global.Initalize(); MainWindow win = new MainWindow(); win.Show(); new PipelineController(win); #if LINUX if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); win.OpenProjectPath = projectFilePath; } #elif MONOMAC var project = Environment.GetEnvironmentVariable("MONOGAME_PIPELINE_PROJECT"); if (!string.IsNullOrEmpty(project)) { win.OpenProjectPath = project; } #endif win.OnShowEvent(); Gtk.Application.Run(); #endif }
static void Main(string [] args) { #if WINDOWS Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); PipelineSettings.Default.Load(); var view = new MainView(); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); view.OpenProjectPath = projectFilePath; } var controller = new PipelineController(view); Application.Run(view); #endif #if LINUX || MONOMAC Gtk.Application.Init (); Global.Initalize (); MainWindow win = new MainWindow (); win.Show (); new PipelineController(win); #if LINUX if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); win.OpenProjectPath = projectFilePath; } #elif MONOMAC var project = Environment.GetEnvironmentVariable("MONOGAME_PIPELINE_PROJECT"); if (!string.IsNullOrEmpty (project)) { win.OpenProjectPath = project; } #endif win.OnShowEvent (); Gtk.Application.Run (); #endif }
static void Main(string [] args) { #if WINDOWS Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); History.Default.Load(); var view = new MainView(); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); view.OpenProjectPath = projectFilePath; } var model = new PipelineProject(); var controller = new PipelineController(view, model); Application.Run(view); #endif #if XWT #if MONOMAC Application.Initialize(ToolkitType.Cocoa); #endif #if LINUX Application.Initialize(ToolkitType.Gtk); #endif var view = new XwtView(); if (args != null && args.Length > 0) { var projectFilePath = string.Join(" ", args); view.OpenProjectPath = projectFilePath; } var model = new PipelineProject(); new PipelineController(view, model); view.Show(); Application.Run(); #endif }
public CollectionEditorDialog (string text, Window window) { Build(); this.controller = ((PipelineController)((MainWindow)window)._controller); FileFilter filter = new FileFilter (); filter.AddPattern ("*.dll"); filechooserwidget1.Filter = filter; filechooserwidget1.SetCurrentFolder(controller.ProjectLocation); filechooserwidget1.SelectMultiple = true; var column = new TreeViewColumn (); var textCell = new CellRendererText (); var dataCell = new CellRendererText (); dataCell.Visible = false; column.PackStart (textCell, false); column.PackStart (dataCell, false); treeview1.AppendColumn (column); column.AddAttribute (textCell, "markup", 0); column.AddAttribute (dataCell, "text", 1); listStore = new TreeStore (typeof (string), typeof (string)); treeview1.Model = listStore; treeview1.Selection.Mode = SelectionMode.Multiple; string[] refs = text.Replace("\r\n", "~").Split('~'); foreach (string reff in refs) if (reff != "") AddValue(reff); }
public ExcludeAction(PipelineController controller, List <IProjectItem> items, bool delete) { _items = new List <IProjectItem>(); _subitems = new List <ContentItem>(); _con = controller; _items.AddRange(items); _delete = delete; foreach (var item in items) { if (item is DirectoryItem) { foreach (var citem in _con.ProjectItem.ContentItems) { if (citem.OriginalPath.StartsWith(item.OriginalPath)) { _subitems.Add(citem); } } } } }
public IncludeAction(PipelineController controller, IEnumerable <string> files, IEnumerable <string> folders) { _con = controller; _files = files == null ? new string[0] : files.ToArray(); _folder = folders == null ? new string[0] : folders.ToArray(); for (int i = 0; i < _folder.Length; i++) { if (Path.IsPathRooted(_folder[i])) { string projectloc = controller._project.Location; if (_folder[i].Length >= projectloc.Length + 1) { _folder[i] = _folder[i].Substring(projectloc.Length + 1); } } if (_folder[i].EndsWith(Path.DirectorySeparatorChar.ToString())) { _folder[i] = _folder[i].Remove(_folder[i].Length - 1); } } }
public void Run(InvocationContext context, string project) { Styles.Load(); #if GTK var app = new Application(Platforms.Gtk); #elif WPF var app = new Application(Platforms.Wpf); #else var app = new Application(Platforms.Mac64); #endif app.Style = "PipelineTool"; PipelineSettings.Default.Load(); if (!string.IsNullOrEmpty(PipelineSettings.Default.ErrorMessage)) { var logwin = new LogWindow(); logwin.LogText = PipelineSettings.Default.ErrorMessage; app.Run(logwin); return; } #if !DEBUG try #endif { var win = new MainWindow(); var controller = PipelineController.Create(win); #if GTK Global.Application.AddWindow(win.ToNative() as Gtk.Window); #endif #if GTK && !DEBUG GLib.ExceptionManager.UnhandledException += (e) => { var logwin = new LogWindow(); logwin.LogText = e.ExceptionObject.ToString(); logwin.Show(); win.Close(); }; #endif if (!string.IsNullOrEmpty(project)) { controller.OpenProject(project); } app.Run(win); } #if !DEBUG catch (Exception ex) { PipelineSettings.Default.ErrorMessage = ex.ToString(); PipelineSettings.Default.Save(); app.Restart(); } #endif }
public IncludeAction(PipelineController controller, IEnumerable<string> files) { _con = controller; _files = files.ToArray(); }
public IncludeAction(PipelineController controller, IEnumerable <string> files) : this(controller, files, null) { }
public FileWatcher(PipelineController controller, IView view) { _controller = controller; _view = view; }
public ActionStack(PipelineController controller) { _controller = controller; _undoStack = new List <IProjectAction>(); _redoStack = new List <IProjectAction>(); }
public IncludeAction(PipelineController controller, IEnumerable <string> files) { _con = controller; _files = files.ToArray(); }
public IncludeAction(PipelineController controller, IEnumerable<string> files) : this(controller, files, null) { }