示例#1
0
        private void initINI()
        {
            string path = Assembly.GetExecutingAssembly().Location;

            path = path.Substring(0, path.LastIndexOf('\\')) + @"\config.ini";
            INIClass ini = new INIClass(path);

            this.ini = ini;
        }
示例#2
0
        private void readConfig()
        {
            string path = Assembly.GetExecutingAssembly().Location;

            path = path.Substring(0, path.LastIndexOf('\\')) + @"\config.ini";
            INIClass ini            = new INIClass(path);
            bool     autoSyncCircle = ini.IniReadValue("AUTOSYNC", "autoSyncCircle", "0") == "1";

            autoSyncOnStart = ini.IniReadValue("AUTOSYNC", "autoSyncOnStart", "0") == "1";
            decimal autoSyncInterval = int.Parse(ini.IniReadValue("AUTOSYNC", "interval", "5"));

            this.autoSyncInterval = autoSyncInterval;
            this.autoSyncCircle   = autoSyncCircle;
        }
示例#3
0
        private void ToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            string path = Assembly.GetExecutingAssembly().Location;

            path = path.Substring(0, path.LastIndexOf('\\')) + @"\config.ini";
            INIClass ini     = new INIClass(path);
            bool     confirm = true;

            if (ini.ExistINIFile())
            {
                confirm = ini.IniReadValue("EXIT", "exitConfirm", "1") == "1";
            }
            if (confirm)
            {
                Form3.Open(this);
            }
            else
            {
                Dispose();
                Close();
                Application.Exit();
            }
        }