Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            SaveFileDialog savefile = new SaveFileDialog();

            savefile.Filter = MongoDBHelper.IniFilter;
            if (savefile.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                StreamWriter save = new StreamWriter(savefile.FileName);
                save.Write(MongodbDosCommand.GenerateIniFile(ctlGenerateMongod.MongodCommand));
                save.Close();
                System.Diagnostics.Process.Start(savefile.FileName);
            }
        }
Example #2
0
        /// <summary>
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnGenerate_Click(object sender, EventArgs e)
        {
            var savefile = new SaveFileDialog {
                Filter = Utility.ConfFilter
            };

            if (savefile.ShowDialog() != DialogResult.OK)
            {
                return;
            }
            var save = new StreamWriter(savefile.FileName);

            save.Write(MongodbDosCommand.GenerateIniFile(ctlGenerateMongod.MongodCommand));
            save.Close();
            Process.Start(savefile.FileName);
        }