Example #1
0
File: Form1.cs Project: teemee/vz
        private void button1_Click(object sender, EventArgs e)
        {
            IniFile ini = new IniFile("C:\\vzconfig.ini");
            ini.Write("init", "server", textBoxServer.Text);
            ini.Write("init", "VzSenderExe", boxSenderPfad.Text);

            // Lesen mit ini.Read("init", "server"));
        }
Example #2
0
 private void categoryButton_Click(object sender, EventArgs e)
 {
     if (File.Exists(@"SFM\SFMM\" + addonListView.SelectedItems[0].Text + @"\" + "info.ini"))
     {
         string cat;
         var    infoIni = new IniFile(@"SFM\SFMM\" + addonListView.SelectedItems[0].Text + @"\" + "info.ini");
         var    s       = infoIni.Read("Category");
         cat = Interaction.InputBox("Type what you would like to categorize this addon as.", "Categorize",
                                    s);
         if (cat != "")
         {
             infoIni.Write("Category", cat);
             AddonList();
         }
     }
 }
Example #3
0
        private void SaveSettings()
        {
            _myIni.Write("Path", tbPath.Text, "Common");
            _myIni.Write("ShowLyrics", Convert.ToBoolean(cbLyrics.Checked).ToString(), "Common");
            _myIni.Write("RelatedArtist", Convert.ToBoolean(cbRelated.Checked).ToString(), "Common");
            _myIni.Write("AlbumArt", Convert.ToBoolean(cbAlbum.Checked).ToString(), "Common");
            _myIni.Write("SortDownload", Convert.ToBoolean(cbDlSort.Checked).ToString(), "Common");
            _myIni.Write("Notify", Convert.ToBoolean(cbNotify.Checked).ToString(), "Common");
            _myIni.Write("Autostart", Convert.ToBoolean(cbAutoStart.Checked).ToString(), "Common");
            _myIni.Write("Device", cbDevices.SelectedIndex.ToString(), "Device");
            _myIni.Write("Tracking", Convert.ToBoolean(cbTracking.Checked).ToString(), "Common");
            _myIni.Write("AllowNext", Convert.ToBoolean(cbTracking.Checked).ToString(), "ServerClient");
            _myIni.Write("AllowPause", Convert.ToBoolean(cbTracking.Checked).ToString(), "ServerClient");
            _myIni.Write("Serverip", tbServerIp.Text, "ServerClient");
            _myIni.Write("Serverport", tbPortNum.Text, "ServerClient");
            _myIni.Write("Serial", Convert.ToBoolean(cbScd.Checked).ToString(), "Device");
            _myIni.Write("SerialPort", cbCom.SelectedIndex.ToString(), "Device");
            var color = cbColors.SelectedIndex + 1;

            _myIni.Write("BarColor", color.ToString(), "Common");
            int tempplay = tbPlay.Text[0];

            _myIni.Write("Play", tempplay.ToString(), "HotKeys");
            int tempnext = tbNext.Text[0];

            _myIni.Write("Next", tempnext.ToString(), "HotKeys");
            _myIni.Write("Enabled", Convert.ToBoolean(cbSlack.Checked).ToString(), "Slack");
            _myIni.Write("Apikey", tbSlackApi.Text, "Slack");
            _myIni.Write("Botname", tbBotname.Text, "Slack");
            _myIni.Write("Channel", tbSlackchannel.Text, "Slack");


            if (cbAutoStart.Checked)
            {
                Util.SetAutoStart(keyName, assemblyLocation);
            }
            else
            {
                if (Util.IsAutoStartEnabled(keyName, assemblyLocation))
                {
                    Util.UnSetAutoStart(keyName);
                }
            }
        }
Example #4
0
 private void button8_Click(object sender, EventArgs e)
 {
     configIni.Write("SFMPATH", textBox1.Text);
     MessageBox.Show("Please Relaunch SFMM");
 }
        private void Update_ini_file()
        {
            Logger.Info("Updating ini File", "Strava V2.0/JOB_Common_Parameters/Update_ini_file()");
            IniFile iniFile = new IniFile(INI_filename);

            iniFile.Write("StravaToken", Strava_token);
            iniFile.Write("Athlete_name", Athlete_name);
            iniFile.Write("Athlete_id", Athlete_id);
            iniFile.Write("Athlete_filename", Athlete_filename);
            iniFile.Write("Activities_filename", Activities_filename);
            iniFile.Write("Activities_stats_filename", Activities_stats_filename);
            iniFile.Write("Gear_filename", Gear_filename);
            iniFile.Write("Power_filename", Power_filename);
            iniFile.Write("Default_export_folder", Default_export_path);
            iniFile.Write("Athlete_FTP", Athlete_FTP);
            if (unit_of_measure)
            {
                iniFile.Write("Select_Unit", "Imperial");
            }
            else
            {
                iniFile.Write("Select_Unit", "Metric");
            }
            iniFile.Write("ShowOtherTab", show_other.ToString());
            iniFile.Write("ShowRunTab", show_runs.ToString());
            Logger.Info("Completed Updating ini File", "Strava V2.0/JOB_Common_Parameters/Update_ini_file()");
        }