示例#1
0
        public MainForm()
        {
            InitializeComponent();
            _clipboardViewerNext = SetClipboardViewer(this.Handle);      // Adds our form to the chain

            //Set the data directory of our .db file
            AppDomain.CurrentDomain.SetData("DataDirectory", IOVariables.databaseFile);

            Directory.CreateDirectory(IOVariables.clipboardWatcherLocalFolder);
            BLIO.CreateDatabaseIfNotExist();

            //Create folders if they dont exist
            Directory.CreateDirectory(BLSettings.Settings.SaveImagePath);
            Directory.CreateDirectory(BLSettings.Settings.SaveTextPath);

            //------Content usercontrols------\\
            ucText     = new UCText();
            ucImages   = new UCImages();
            ucHistory  = new UCHistory();
            ucSettings = new UCSettings();


            //Delete empty folders in /images and /text
            BLIO.DeleteEmptyDirectories(BLSettings.Settings.SaveImagePath);
            BLIO.DeleteEmptyDirectories(BLSettings.Settings.SaveTextPath);

            TrayContextMenuStrip.Renderer = new ToolStripMenuRenderer();
            this.Opacity = 0;
        }