Exemplo n.º 1
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            pics          pic  = new pics();
            MMViewManeger mmvm = new MMViewManeger(pic, tmr);

            pic.Show();
        }
Exemplo n.º 2
0
        private void Drawing()
        {
            MultilevelGenerator.MultiLevel ML = new MultilevelGenerator.MultiLevel(this.tmr);
            MindMapTMR NewTMR = ML.Run();

            pics pic = new pics(NewTMR, tmr, ML, 0, new List <pics>());

            //MMViewManeger mmvm = new MMViewManeger(pic, tmr);
            pic.ShowDialog();
        }
Exemplo n.º 3
0
        private void button3_Click_1(object sender, EventArgs e)
        {
            MultiLevel ML     = new MultiLevel(this.tmr);
            MindMapTMR NewTMR = ML.Run();

            pics pic = new pics(NewTMR, tmr, ML, 0, new System.Collections.Generic.List <pics>());

            //MMViewManeger mmvm = new MMViewManeger(pic, tmr);
            pic.ShowDialog();
        }
Exemplo n.º 4
0
        private void MultiLevelMMapForm_Load(object sender, EventArgs e)
        {
            pics pic = new pics(_TopTMR, _OriginalTMR, _ML, 0, picsForms, _settings, _DrawSizeMode);

            pic.Text = this.Text;
            pic.Show();

            for (int i = 0; i < picsForms.Count; i++)
            {
                picsForms[i].MdiParent = this;
            }
        }
Exemplo n.º 5
0
 internal void HandleOtherExpandions(Frame.Type type, int frameIndex, int formIndex)
 {
     for (int i = 0; i < _parentForm.MLForms.Count; i++)
     {
         if (_parentForm.MLForms[i] != this)
         {
             pics PicForm = _parentForm.MLForms[i].picsForms[formIndex];
             if (type == Frame.Type.Noun)
             {
                 PicForm.HandleExpansion(PicForm.viewer._TMR.Nounframes[frameIndex], _parentForm.MLForms[i].picsForms);
             }
             else
             {
                 PicForm.HandleExpansion(PicForm.viewer._TMR.VerbFrames[frameIndex], _parentForm.MLForms[i].picsForms);
             }
         }
     }
 }
Exemplo n.º 6
0
        public void HandleExpansion(Frame f, List <pics> Picforms)
        {
            bool Flag = false;

            if (f != null)
            {
                MindMapTMR NewTMR = new MindMapTMR();

                if (f is NounFrame)
                {
                    List <Frame> Frames = new List <Frame>();
                    Frames.Add(f);


                    foreach (Frame frame in this.ML.VerbFrames_NounFrames.Keys)
                    {
                        foreach (Dictionary <OurMindMapOntology.MindMapConcept, List <Frame> > dictionary in this.ML.VerbFrames_NounFrames[frame])
                        {
                            foreach (OurMindMapOntology.MindMapConcept c in dictionary.Keys)
                            {
                                if (c == f.Concept)
                                {
                                    Frames.Clear();
                                    Frames = dictionary[c];
                                    if (Frames.Count > 1)
                                    {
                                        Flag = true;
                                    }
                                }
                            }
                        }
                    }

                    foreach (Frame _f in Frames)
                    {
                        NounFrame nounframe = (NounFrame)_f;
                        if (NewTMR.Nounframes.Contains(nounframe) == false)
                        {
                            NewTMR.Nounframes.Add(nounframe);
                        }
                        Dictionary <CaseRole, List <VerbFrame> > AssociatedActions = this.OriginalTMR.GetNounFrameAssociatedactions(this.OriginalTMR.Nounframes.IndexOf((NounFrame)_f));
                        foreach (CaseRole cr in AssociatedActions.Keys)
                        {
                            foreach (VerbFrame vf in AssociatedActions[cr])
                            {
                                if (NewTMR.VerbFrames.Contains(vf) == false)
                                {
                                    NewTMR.VerbFrames.Add(vf);
                                }
                            }
                        }

                        foreach (CaseRole cr in nounframe.Ownerof.Keys)
                        {
                            for (int i = 0; i < nounframe.Ownerof[cr].Count; i++)
                            {
                                if (NewTMR.Nounframes.Contains(nounframe.Ownerof[cr][i]) == false)
                                {
                                    NewTMR.Nounframes.Add(nounframe.Ownerof[cr][i]);
                                }
                            }
                        }

                        foreach (NounFrame nf in this.OriginalTMR.Nounframes)
                        {
                            foreach (CaseRole cr in nf.Ownerof.Keys)
                            {
                                foreach (NounFrame nf2 in nf.Ownerof[cr])
                                {
                                    if (nf2 == nounframe && NewTMR.Nounframes.Contains(nf) == false)
                                    {
                                        NewTMR.Nounframes.Add(nf);
                                    }
                                }
                            }
                        }
                    }
                }
                else if (f is VerbFrame)
                {
                    NounFrame nf = null;

                    VerbFrame vf = (VerbFrame)f;
                    foreach (CaseRole cr in vf.CaseRoles.Keys)
                    {
                        foreach (NounFrame nf1 in vf.CaseRoles[cr])
                        {
                            foreach (NounFrame nf2 in ML.MainNounFrames)
                            {
                                if (nf1 == nf2)
                                {
                                    nf = nf1;
                                    NewTMR.Nounframes.Add(nf);
                                }
                            }
                        }
                    }
                    if (nf != null)
                    {
                        if (ML.MainNounFrames_VerbFrames[nf][vf.Concept].Count > 1)
                        {
                            Flag = true;
                            foreach (VerbFrame vf2 in ML.MainNounFrames_VerbFrames[nf][vf.Concept])
                            {
                                NewTMR.VerbFrames.Add(vf2);
                                //NewTMR.VerbFrames.Add((VerbFrame)ML.NewFrame_OriginalFrame[(Frame)vf2]);
                            }
                        }
                        else
                        {
                            NewTMR.VerbFrames.Add((VerbFrame)ML.NewFrame_OriginalFrame[(Frame)vf]);
                        }
                    }
                }

                for (int k = 0; k < NewTMR.VerbFrames.Count; k++)
                {
                    VerbFrame vf = NewTMR.VerbFrames[k];
                    foreach (DomainRelationType drt in vf.DomainRelations.Keys)
                    {
                        for (int i = 0; i < vf.DomainRelations[drt].Count; i++)
                        {
                            if (NewTMR.VerbFrames.Contains(vf.DomainRelations[drt][i]) == false)
                            {
                                NewTMR.VerbFrames.Add(vf.DomainRelations[drt][i]);
                            }
                        }
                    }
                }

                for (int k = 0; k < NewTMR.VerbFrames.Count; k++)
                {
                    VerbFrame vf = NewTMR.VerbFrames[k];
                    foreach (TemporalRelationType trt in vf.TemporalRelations.Keys)
                    {
                        for (int i = 0; i < vf.TemporalRelations[trt].Count; i++)
                        {
                            if (NewTMR.VerbFrames.Contains(vf.TemporalRelations[trt][i]) == false)
                            {
                                NewTMR.VerbFrames.Add(vf.TemporalRelations[trt][i]);
                            }
                        }
                    }
                }

                foreach (VerbFrame vf in NewTMR.VerbFrames)
                {
                    foreach (DomainRelationType drt in vf.DomainRelations_n.Keys)
                    {
                        for (int i = 0; i < vf.DomainRelations_n[drt].Count; i++)
                        {
                            if (NewTMR.Nounframes.Contains(vf.DomainRelations_n[drt][i]) == false)
                            {
                                NewTMR.Nounframes.Add(vf.DomainRelations_n[drt][i]);
                            }
                        }
                    }
                }

                foreach (VerbFrame vf in NewTMR.VerbFrames)
                {
                    foreach (TemporalRelationType trt in vf.TemporalRelations_n.Keys)
                    {
                        for (int i = 0; i < vf.TemporalRelations_n[trt].Count; i++)
                        {
                            if (NewTMR.Nounframes.Contains(vf.TemporalRelations_n[trt][i]) == false)
                            {
                                NewTMR.Nounframes.Add(vf.TemporalRelations_n[trt][i]);
                            }
                        }
                    }
                }

                foreach (VerbFrame vf in NewTMR.VerbFrames)
                {
                    foreach (CaseRole cr in vf.CaseRoles.Keys)
                    {
                        foreach (NounFrame nf in vf.CaseRoles[cr])
                        {
                            if (NewTMR.Nounframes.Contains(nf) == false)
                            {
                                NewTMR.Nounframes.Add(nf);
                            }
                        }
                    }
                }

                List <NounFrame> nfs = new List <NounFrame>();
                if (Flag == false)
                {
                    foreach (NounFrame nf in NewTMR.Nounframes)
                    {
                        foreach (CaseRole cr in nf.Ownerof.Keys)
                        {
                            foreach (NounFrame nf2 in nf.Ownerof[cr])
                            {
                                if (NewTMR.Nounframes.Contains(nf2) == false)
                                {
                                    nfs.Add(nf2);
                                }
                            }
                        }
                    }
                }

                foreach (NounFrame nf in nfs)
                {
                    if (NewTMR.Nounframes.Contains(nf) == false)
                    {
                        NewTMR.Nounframes.Add(nf);
                    }
                }
                pics newForm;

                if (Flag == true)
                {
                    newForm = new pics(NewTMR, this.OriginalTMR, ML, _level + 1, Picforms, _settings, _DrawSizeMode);
                }
                else
                {
                    if (NewTMR.VerbFrames.Count != 0 || NewTMR.VerbFrames.Count != 0)
                    {
                        MultilevelGenerator.MultiLevel NewML = new MultilevelGenerator.MultiLevel(NewTMR);
                        MindMapTMR NewNewTMR = NewML.Run();
                        newForm = new pics(NewNewTMR, this.OriginalTMR, NewML, _level + 1, Picforms, _settings, _DrawSizeMode);
                    }
                    else
                    {
                        return;
                    }
                }
                if (f.Concept != null)
                {
                    newForm.descText = f.Concept.Text;
                }
                else if (f is NounFrame)
                {
                    newForm.descText = ((NounFrame)f).Text;
                }
                else
                {
                    newForm.descText = ((VerbFrame)f).VerbName;
                }


                newForm.Text      = this.Text;
                newForm.MdiParent = this.MdiParent;
                newForm.Show();
            }
        }