public TagContainer(Hashtable options)
        {
            StatusEvent.FireStatusError(this, statusEvent, Globalisation.GetString(""));
            if (options.ContainsKey("Db"))
            {
                this.Db = (MyDatabase)options["Db"];
            }

            if (options.ContainsKey("listview"))
            {
                this.ListView = (ListView)options["listview"];
                this.ListView.View = System.Windows.Forms.View.LargeIcon;
                this.ListView.MouseDown += new MouseEventHandler(mouseDown);
            }

            if (options.ContainsKey("GridFile"))
            {
                this.GridFile = (GridFile)options["GridFile"];
            }
        }
示例#2
0
        public Form1()
        {
            InitializeComponent();

            this.StartPosition = FormStartPosition.CenterScreen;

            this.statusEvent += h_statusInfo;

            #region mulilanguage

            /*
             * Set multilanguage
             */
            // left menu
            this.ApplyMultiLangueToToolbar(this.left_toolStrip1);
            // Top menu
            this.ApplyMultiLangueToToolbar(this.top_toolstrip);
            // center menu
            this.ApplyMultiLangueToToolbar(this.center_toolstrip);
            // left tree contextmenu
            this.ApplyMultiLangueToDDMenu(this.left_treectxmenu);
            // center grid contextmenu
            this.ApplyMultiLangueToDDMenu(this.center_grid_contextmenu);
            // center bottom menu (selected tag liste)
            this.ApplyMultiLangueToToolbar(this.center_bottom_TagtoolStrip1);

            #endregion

            this.Db = new MyDatabase();

            // Init tree group
            Hashtable treeOption = new Hashtable();
            treeOption["Db"] = this.Db;
            treeOption["tree"] = this.left_treeview;
            treeOption["contextmenu"] = this.left_treectxmenu;
            treeOption["autoLoad"] = true;
            this.TreeGroup = new TreeGroup(treeOption);
            this.TreeGroup.statusEvent += h_statusInfo;

            // Init center listview
            Hashtable listviewOption = new Hashtable();
            listviewOption["Db"] = this.Db;
            listviewOption["Form"] = this;
            listviewOption["listview"] = this.center_listview;
            listviewOption["contextmenu"] = this.center_grid_contextmenu;
            this.GridFile = new GridFile(listviewOption);
            this.GridFile.statusEvent += h_statusInfo;

            // Init center bottom Tag Container
            Hashtable tagContainerOption = new Hashtable();
            tagContainerOption["Db"] = this.Db;
            tagContainerOption["listview"] = this.center_bottomLIstView;
            tagContainerOption["GridFile"] = this.GridFile;
            this.TagContainer = new TagContainer(tagContainerOption);
            this.TagContainer.statusEvent += h_statusInfo;

            // Init right File Info
            Hashtable fileTagOption = new Hashtable();
            fileTagOption["Db"] = this.Db;
            fileTagOption["Form"] = this;
            fileTagOption["listview"] = this.right_listviewTag;
            fileTagOption["infopanel"] = this.right_bottom_FileInfoContainer;
            fileTagOption["GridFile"] = this.GridFile;
            this.FileTag = new FileTag(fileTagOption);
            this.FileTag.statusEvent += h_statusInfo;
            DelegateFileTag = new FileTagLoadList(LoadTagWithList);

            // load lisy type fichier (center toolbar)
            this.ReloadComboTypeFile();
        }