Пример #1
0
        public frmAdd(IEnumerable <string> presentFilelist, AddWindowType add)
        {
            InitializeComponent();

            WindowSave.RestoreWindows(Properties.Settings.Default.frmAdd, this);
            RestoreColumns();

            this.Icon = Utils.GetIcon();

            AddType     = add;
            presentFile = presentFilelist;
            SetPresentFiles();

            Model           = new Aga.Controls.Tree.TreeModel();
            treeView1.Model = Model;
            this.Text       = Variables.BookName;
            nodeDetectedTexts.EditorShowing  += new CancelEventHandler(nodeDetectedTexts_EditorShowing);
            nodeDetectedTexts.ChangesApplied += new EventHandler(nodeDetectedTexts_ChangesApplied);
            nodeFile.DrawText          += new EventHandler <Aga.Controls.Tree.NodeControls.DrawEventArgs>(node_DrawText);
            nodeDetectedTexts.DrawText += new EventHandler <Aga.Controls.Tree.NodeControls.DrawEventArgs>(node_DrawText);
            treeView1.Expanded         += new EventHandler <TreeViewAdvEventArgs>(treeView1_Expanded);
            treeView1.Collapsed        += new EventHandler <TreeViewAdvEventArgs>(treeView1_Expanded);

            if (AddType == AddWindowType.SpineEdit)
            {
                cbShowAll.Visible     = false;
                cbShowAnchors.Visible = false;
                btnSearchNet.Visible  = false;
            }
        }
Пример #2
0
        public frmAdd(IEnumerable<string> presentFilelist, AddWindowType add)
        {
            InitializeComponent();

            WindowSave.RestoreWindows(Properties.Settings.Default.frmAdd, this);
            RestoreColumns();

            this.Icon = Utils.GetIcon();

            AddType = add;
            presentFile = presentFilelist;
            SetPresentFiles();

            Model = new Aga.Controls.Tree.TreeModel();
            treeView1.Model = Model;
            this.Text = Variables.BookName;
            nodeDetectedTexts.EditorShowing += new CancelEventHandler(nodeDetectedTexts_EditorShowing);
            nodeDetectedTexts.ChangesApplied += new EventHandler(nodeDetectedTexts_ChangesApplied);
            nodeFile.DrawText += new EventHandler<Aga.Controls.Tree.NodeControls.DrawEventArgs>(node_DrawText);
            nodeDetectedTexts.DrawText += new EventHandler<Aga.Controls.Tree.NodeControls.DrawEventArgs>(node_DrawText);
            treeView1.Expanded += new EventHandler<TreeViewAdvEventArgs>(treeView1_Expanded);
            treeView1.Collapsed += new EventHandler<TreeViewAdvEventArgs>(treeView1_Expanded);

            if (AddType == AddWindowType.SpineEdit)
            {
                cbShowAll.Visible = false;
                cbShowAnchors.Visible = false;
                btnSearchNet.Visible = false;
            }
        }
Пример #3
0
        protected void Add(AddWindowType add)
        {
            AddSelectedNode = tree.SelectedNodes.Count > 0 ? tree.SelectedNodes.LastOrDefault().Tag as Node : null;

            List<string> CleanedFilename = GetFilenames(Model.Nodes, false);

            frmAdd frm = new frmAdd(CleanedFilename, add);
            Variables.OpenedForm.Add(frm);
            frm.Show();
            frm.FilesAdded += new EventHandler<FilesAddedArgs>(frm_FilesAdded);
        }
Пример #4
0
        protected void Add(AddWindowType add)
        {
            AddSelectedNode = tree.SelectedNodes.Count > 0 ? tree.SelectedNodes.LastOrDefault().Tag as Node : null;

            List <string> CleanedFilename = GetFilenames(Model.Nodes, false);

            frmAdd frm = new frmAdd(CleanedFilename, add);

            Variables.OpenedForm.Add(frm);
            frm.Show();
            frm.FilesAdded += new EventHandler <FilesAddedArgs>(frm_FilesAdded);
        }