Ejemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();

            //Current path
            currentPath = tsl_path.Text;
            Extension readEmail = new Extension();

            readEmail.SaveEmailMarked(currentPath);

            EnvironmentExt.Set("OutlookSave", tsl_path.Text);
        }
Ejemplo n.º 2
0
        private DragHelper dragHelper = new DragHelper();                                                  //Helper class for dragging in a ListView

        #endregion

        #region Initialization

        public Form1()
        {
            InitializeComponent();

            Application.ThreadException += Application_ThreadException;

            //====================================================
            //Filling dictionaries for ListView columns
            //====================================================

            foreach (string column in columnsForFiles)
            {
                columnsFiles.Add(column, COLUMN_WIDTH);
            }

            foreach (string column in columnsForDrives)
            {
                columnsDrives.Add(column, COLUMN_WIDTH);
            }

            //====================================================
            //Combo Box Setup - Display Modes
            //====================================================

            foreach (string item in viewModes)
            {
                toolStripComboBox1.Items.Add(item);
            }
            toolStripComboBox1.SelectedIndex         = 0;
            toolStripComboBox1.SelectedIndexChanged += toolStripComboBox1_SelectedIndexChanged;


            //====================================================
            //Configuring a ListView
            //====================================================

            //Event handlers

            lv_files.MouseDoubleClick += lv_files_MouseDoubleClick;
            lv_files.ColumnClick      += lv_files_ColumnClick;

            //Default mode

            lv_files.View = View.LargeIcon;

            //Current path

            tsl_path.Text = EnvironmentExt.Get("OutlookSave");

            //====================================================
            //Configuring a TreeView
            //====================================================

            tv_files.BeforeExpand += tv_files_BeforeExpand;
            tv_files.AfterSelect  += tv_files_AfterSelect;

            //Editing labels

            tv_files.AfterLabelEdit += tv_files_AfterLabelEdit;

            //====================================================
            //Drag-n-Drop Oo ListView
            //====================================================

            lv_files.MouseDown         += lv_files_MouseDown;
            lv_files.MouseMove         += lv_files_MouseMove;
            lv_files.DragEnter         += lv_files_DragEnter;
            lv_files.DragLeave         += lv_files_DragLeave;
            lv_files.DragDrop          += lv_files_DragDrop;
            lv_files.QueryContinueDrag += lv_files_QueryContinueDrag;
        }