예제 #1
0
        /// <summary>
        /// toolStripButton1_Click
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripButton1_Click(object sender, EventArgs e)
        {
            Form frmSettings = new Settings();

            frmSettings.Show();
        }
예제 #2
0
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void toolStripButton5_Click(object sender, EventArgs e)
        {
            if (IsFirstRunOrShowSettings())
                return;

            bool bail = false;
            bail = !Directory.Exists(Properties.Settings.Default.DownloadPath);

            if (!bail)
                bail = string.Empty.Equals(Properties.Settings.Default.DownloadPath);
            if (bail)
            {
                Settings tmpSettings = new Settings();
                tmpSettings.Show();
            }

            const string WindowsExplorer = "explorer";

            toolStripStatusLabel.Text = "Opening windows explorer ... ";

            try
            {
                var proc = Process.Start(new ProcessStartInfo()
                {
                    FileName = WindowsExplorer,
                    Arguments = Properties.Settings.Default.DownloadPath,
                });
            }
            catch
            {
                toolStripStatusLabel.Text += "[Failed]";

                return;
            }

            toolStripStatusLabel.Text += "[Ok]";

            Thread.Sleep(1000);
        }
예제 #3
0
        /// <summary>
        /// IsFirstRunOrShowSettings
        /// </summary>
        /// <returns></returns>
        private bool IsFirstRunOrShowSettings()
        {
            bool blnIsFirstRun = FeedMiner.FirstRun;

            // if it's the first run, show the settings form
            if (FeedMiner.FirstRun)
            {
                Settings frmSettings = new Settings();

                frmSettings.Show();

                // set first run to "false"
                FeedMiner.FirstRun = false;
            }

            return blnIsFirstRun;
        }