public MindMapLayoutArgs(Graphics graphics, MindMap chart, Font font) : this() { Graphics = graphics; Chart = chart; Font = font; }
static Document LoadSingleMindMap(Version documentVersion, XmlDocument dom) { MindMap map = MindMap.LoadAsXml(documentVersion, dom.DocumentElement); if (map == null) { return(null); } Document doc = new Document(); doc.Author = map.Author; doc.Company = map.Company; doc.Version = map.Version; doc.Description = ST.HtmlToText(map.Remark); // foreach (KeyValuePair <string, string> attr in map.ExtendAttributes) { doc.Attributes[attr.Key] = attr.Value; } doc.Charts.Add(map); return(doc); }
private GameObject GetTargetRoomPoint() { MindMap mindMap = GetComponent <MindMap> (); targetRoomPoint = mindMap.GetRoomPoint(roomToGo); return(targetRoomPoint); }
public async Task <IActionResult> PutMindMap(int id, MindMap mindMap) { if (id != mindMap.Id) { return(BadRequest()); } try { await _repository.Update(mindMap); } catch (DbUpdateConcurrencyException) { if (!MindMapExists(id)) { return(NotFound()); } else { throw; } } return(NoContent()); }
private void GetPath() { if (aStar == null) { Init(); } else { StoreNode(aStar.GetCurrentNode(transform.position)); currentNodeTimeSpent = maximumTimeSpentByNode; MindMap mindMap = GetComponent <MindMap> (); targetRoomPoint = mindMap.GetRoomPoint(roomToGo); if (targetRoomPoint != null) { path = aStar.FindPath(transform.position, targetRoomPoint.transform.position); if (path != null) { isFinalTargetRoomPoint = true; aStar.SetPath(path); // Debug.Log ("Path OK"); } else { Debug.Log("Cannot move"); } } else { Debug.Log("The room for " + roomToGo + "does not exist"); } } }
public void CRUDMindMap() { Project project; List <Project> projects = DB.GetProjects(); if (projects.Count == 0) { project = DB.CreateProject("a Project", "A desc of a project", DateTime.Now); } else { project = projects[0]; } string firstName = "a mindmap first name"; string secondName = "a mindmap second name"; //Verify creation MindMap mindMap = DB.CreateMindmap(firstName, project); Assert.IsNotNull(mindMap); Assert.AreEqual(firstName, mindMap.Name); Assert.AreEqual(project.Id, mindMap.ProjectId); //Verify update Assert.IsTrue(DB.UpdateMindMap(secondName, mindMap)); //Verify delete Assert.IsTrue(DB.Delete(mindMap)); DB.Delete(project); }
public bool Delete(MindMap mindMap) { bool result = DB.Delete(mindMap); mindMap.Project.MindMaps.Remove(mindMap); return(result); }
public void PaintNavigationMap(MindMap map, float zoom, PaintEventArgs e) { if (map == null) { throw new ArgumentNullException(); } var graphics = new GdiGraphics(e.Graphics); ResetObjects(graphics, map); if (!map.BackColor.IsEmpty) { e.Graphics.Clear(map.BackColor); } if (map.Root != null) { Liner = LayoutManage.GetLiner(map.LayoutType); Font font = ChartBox.DefaultChartFont; var font2 = new GdiFont(font.FontFamily, font.Size * zoom); //GenerateFoldingButtonImage(map, zoom); PaintNavigationMap(graphics, map.Root, zoom, font2); PaintNavigationMapLinkLines(graphics, map.Root, zoom, font2); } }
protected Rectangle GetLinksFullBounds(MindMap map) { if (map == null) { throw new ArgumentNullException(); } Rectangle result = Rectangle.Empty; Link[] lines = map.GetLinks(true); for (int i = 0; i < lines.Length; i++) { Link line = lines[i]; if (line.Visible) { lines[i].RefreshLayout(); Rectangle rect = line.LayoutData.GetFullBounds(); rect.Inflate(10, 10); if (i == 0) { result = rect; } else { result = Rectangle.Union(result, rect); } } } return(result); }
public RenderArgs(RenderMode mode, Graphics graphics, MindMap chart, Font font) : this() { Mode = mode; Graphics = new GdiGraphics(graphics); Chart = chart; Font = new GdiFont(font); }
public RenderArgs(IGraphics graphics, MindMap chart, IFont font) : this() { Mode = RenderMode.Export; Chart = chart; Graphics = graphics; Font = font; }
private void MindmapControl_Click(object sender, EventArgs e) { MindMap m = (sender as UserControl).Tag as MindMap; MindmapMenu mindmapMenu = new MindmapMenu(m, controller); mindmapMenu.ShowDialog(); Refresh(); }
public NodeCreate(MindMap mindMap) { InitializeComponent(); foreach (Node node in mindMap.GetAllNodes()) { cbxPrevious.Items.Add(node); } }
public MindmapMenu(MindMap aMindMap, Controller aController) { mindMap = aMindMap; controller = aController; InitializeComponent(); Loaded += MindmapMenu_Loaded; }
public bool UpdateMindMap(string text, MindMap mindMap) { //Update root node to have same text bool result = DB.UpdateMindMap(text, mindMap); mindMap.Name = text; result = result && UpdateNode(text, null, mindMap.Root); return(result); }
public FormatTable(Point location, Size size, Color bcolor, Color fcolor, MindMap mm) : base() { this.Location = location; this.Size = size; this.BackColor = bcolor; this.ForeColor = fcolor; this.mindmap = mm; splitLayout(); }
void InitializePreviewMap() { MindMap map = new MindMap(); map.Margin = Padding.Empty; map.Root.Text = LanguageManage.GetText("Center Topic"); map.Root.Children.Add(new Topic("Topic 1")); map.Root.Children.Add(new Topic("Topic 2")); map.Root.Children.Add(new Topic("Topic 3")); mindMapView1.Map = map; }
public bool CreateMindMap(string aName, Project project) { //Create and verify MindMap mindMap = DB.CreateMindmap(aName, project); bool result = mindMap != null; //assign values and return mindMap.Project = project; mindMap.Root = DB.CreateNode(aName, null, mindMap); project.MindMaps.Add(mindMap); return(result); }
public MindMap Create() { MindMap map = new MindMap("Big Map"); Topic root = new Topic("Root"); map.Root = root; CreateTopics(root, 1, Count); return(map); }
private void OnMapChanged(MindMap old) { if (old != null) { old.TopicAdded -= new TopicEventHandler(Map_TopicAdded); } BuildTree(); if (Map != null) { Map.TopicAdded += new TopicEventHandler(Map_TopicAdded); } }
private void OnMapChanged(MindMap old) { if (old != null) { old.TopicAdded -= Map_TopicAdded; } BuildTree(); if (Map != null) { Map.TopicAdded += Map_TopicAdded; } }
public async void Save() { JsonNode jsonNode = new JsonNode(); JsonNode jsonObject = BuildJSON(jsonNode, RootNode); MindMap instance = new MindMap { Name = CurrentMindMap.Name + "_BACKUP", Id = Guid.NewGuid().ToString(), Content = CurrentMindMap.Content }; await _mindmapTable.InsertAsync(instance); CurrentMindMap.Content = JsonConvert.SerializeObject(jsonObject); UpdateMindMap(CurrentMindMap); }
public void ChangeDemonstrationMode() { MindMap mindMap = GameObject.FindObjectOfType <MindMap>(); if (mindMap.mode == DemonstrationMode.Flat) { mindMap.mode = DemonstrationMode.Volume; } else if (mindMap.mode == DemonstrationMode.Volume) { mindMap.mode = DemonstrationMode.Flat; } GameObject.Find("SaveController").GetComponent <SaveController>().SaveMap(GameObject.FindObjectOfType <MindMap>().gameObject); }
void Update() { if (GameObject.FindObjectOfType <MindMap>()) { MindMap mindMap = GameObject.FindObjectOfType <MindMap>(); if (mindMap.mode == DemonstrationMode.Flat) { transform.Find("ModeButton").GetComponent <Image>().sprite = VolumeModeButtonSprite; } else if (mindMap.mode == DemonstrationMode.Volume) { transform.Find("ModeButton").GetComponent <Image>().sprite = FlatModeButtonSprite; } } }
private void btnCreate_Click(object sender, EventArgs e) { if (this.menuBtn != null) { MindMap mm = new MindMap(this.menuBtn.colorBoard, this.menuBtn.colorParent, this.menuBtn.colorChild, this.menuBtn.colorPath, this.menuBtn.shapeParent, this.menuBtn.shapeChild, this.menuBtn.stylePath); mm.Show(); } else { MessageBox.Show("Choose an element in a panel, please !", "Warning", MessageBoxButtons.OK, MessageBoxIcon.Warning); } }
public Size LayoutMap(MindMap map, MindMapLayoutArgs e) { if (map == null) { throw new ArgumentNullException(); } if (map.Root != null) { Rectangle bounds = Layout(map.Root, e); Rectangle linesBounds = GetLinksFullBounds(map); if (!linesBounds.IsEmpty) { bounds = Rectangle.Union(bounds, linesBounds); } // page size var psx = Math.Max(0, (map.PageSize.Width - (bounds.Width + map.Margin.Horizontal)) / 2); var psy = Math.Max(0, (map.PageSize.Height - (bounds.Height + map.Margin.Vertical)) / 2); Offset(map.Root, map.Margin.Left - bounds.X + psx, map.Margin.Top - bounds.Y + psy); // refresh line's layout Link[] lines = map.GetLinks(true); for (int i = 0; i < lines.Length; i++) { lines[i].RefreshLayout(); } bounds.Width += map.Margin.Horizontal; bounds.Height += map.Margin.Vertical; // page size bounds.Width = Math.Max(bounds.Width, map.PageSize.Width); bounds.Height = Math.Max(bounds.Height, map.PageSize.Height); map.LayoutInitialized = true; return(bounds.Size); } else { return(Size.Empty); } }
void MenuNewChartFromHere_Click(object sender, EventArgs e) { if (mindMapView1.SelectedTopic != null && !ReadOnly && Owner != null) { var root = mindMapView1.SelectedTopic.Clone(); root.CutFromMap(); var map = new MindMap(root, ST.RemoveUnvisibleCharts(root.Text)); if (ChartThemeManage.Default.DefaultTheme != null) { map.ApplyTheme(ChartThemeManage.Default.DefaultTheme); } root.Expand(); Owner.Document.Charts.Add(map); Owner.ActiveChartPage(map); } }
protected override void OnChartChanged() { base.OnChartChanged(); if (Chart is MindMap) { MindMap chart = (MindMap)Chart; mindMapView1.Map = chart; chart.NameChanged += new EventHandler(chart_NameChanged); chart.LayoutTypeChanged += new EventHandler(chart_LayoutTypeChanged); } else { throw new ArgumentNullException(); } Icon = GetIconByLayoutType(); }
public bool CreateNode(string aName, Node previous, MindMap mindMap) { //Create and verify Node node = DB.CreateNode(aName, previous, mindMap); bool result = node != null; //set root if previous null and assign values if (previous != null) { previous.Childrens.Add(node); } else { mindMap.Root = node; } node.Previous = previous; node.MindMap = mindMap; return(result); }
public async Task <ActionResult <MindMap> > PostMindMap(MindMapDTO mindMap) { var room = await _roomRepository.Get(mindMap.RoomId); if (room == null) { return(BadRequest()); } var doc = new MindMap { DateOfCreation = DateTime.UtcNow, Name = mindMap.Name, Room = room, }; await _repository.Add(doc); return(Ok()); // CreatedAtAction("GetChat", new { id = mindMap.Id }, mindMap); }