Example #1
0
        protected void PortalConnected()
        {
            builder            = new TIATree.TreeNodeBuilder(tiaThread, tiaPortal);
            builder.BuildDone += TreeDone;
            builder.Descend    = ProjectDescend;
            builder.Leaf       = ProjectLeaf;

            projectTreeView.Nodes.Clear();
            projectTreeView.AfterCheck += node_AfterCheck;
            builder.StartBuild(projectTreeView.Nodes);

            if (tiaPortal.Projects.Count > 0)
            {
                languageToolStripMenuItem.DropDownItems.Clear();
                Project             proj  = tiaPortal.Projects[0];
                LanguageAssociation langs = proj.LanguageSettings.ActiveLanguages;
                culture = proj.LanguageSettings.EditingLanguage.Culture.Name;
                foreach (Language l in langs)
                {
                    ToolStripMenuItem item = new ToolStripMenuItem(l.Culture.Name);
                    item.Tag    = l.Culture.Name;
                    item.Click += langClicked;

                    languageToolStripMenuItem.DropDownItems.Add(item);
                }
                languageToolStripMenuItem.DropDownOpened += langDropDownOpened;
            }
        }
Example #2
0
 protected void FormClosingEventHandler(object sender, FormClosingEventArgs e)
 {
     TIATree.TreeNodeBuilder b = builder;
     if (b != null)
     {
         b.CancelBuild();
     }
 }
Example #3
0
 public BrowseDialog(TIAAsyncWrapper thread, TiaPortal portal)
 {
     InitializeComponent();
     AutoExpandMaxChildren = -1;
     builder                     = new TIATree.TreeNodeBuilder(thread, portal);
     builder.BuildDone          += TreeDone;
     VisibleChanged             += UpdateList;
     FormClosing                += FormClosingEventHandler;
     blockTree.MouseDoubleClick += TreeDoubleClick;
 }
Example #4
0
 protected void PortalDisconnected()
 {
     builder.CancelBuild();
     projectTreeView.Nodes.Clear();
     builder = null;
 }