Пример #1
0
        public static void SaveSettings()
        {
            INIParser parser = new INIParser(GetAbsoluteConfigFilePath(), Encoding.UTF8);

            parser.SetValue("Parameters", "last_change_tabletop", last_change_tabletop);
            parser.SetValue("Parameters", "last_interaction_id", last_interaction_id);
            parser.SetValue("Parameters", "last_change_server_users", last_change_server_users);
            parser.SetValue("Parameters", "last_change_server_webusers", last_change_server_webusers);
            parser.SetValue("Parameters", "last_change_server_contributions", last_change_server_contributions);
            parser.SetValue("Parameters", "last_change_server_feedbacks", last_change_server_feedbacks);
            parser.SetValue("Parameters", "last_change_server_interactions", last_change_server_interactions);
            parser.SetValue("Parameters", "last_change_interaction_files", last_change_interaction_files);
            parser.SetValue("Parameters", "last_change_interaction_files_id", last_change_interaction_files_id);
            parser.Save(GetAbsoluteConfigFilePath(), Encoding.UTF8);
        }
Пример #2
0
        public static void LoadSettings()
        {
            INIParser parser = new INIParser(GetAbsoluteConfigFilePath(), Encoding.UTF8);

            client_url = parser.GetValue("Parameters", "client_url", client_url);
            interaction_log_absolute_file_path = parser.GetValue("Parameters", "interaction_log_absolute_file_path", GetAbsolutePath() + interaction_log_absolute_file_path);
            last_change_tabletop             = parser.GetValue("Parameters", "last_change_tabletop", last_change_tabletop);
            last_interaction_id              = parser.GetValue("Parameters", "last_interaction_id", last_interaction_id);
            last_change_server_users         = parser.GetValue("Parameters", "last_change_server_users", last_change_server_users);
            last_change_server_webusers      = parser.GetValue("Parameters", "last_change_server_webusers", last_change_server_webusers);
            last_change_server_contributions = parser.GetValue("Parameters", "last_change_server_contributions", last_change_server_contributions);
            last_change_server_feedbacks     = parser.GetValue("Parameters", "last_change_server_feedbacks", last_change_server_feedbacks);
            last_change_server_interactions  = parser.GetValue("Parameters", "last_change_server_interactions", last_change_server_interactions);
            last_change_interaction_files    = parser.GetValue("Parameters", "last_change_interaction_files", last_change_interaction_files);
            last_change_interaction_files_id = parser.GetValue("Parameters", "last_change_interaction_files_id", last_change_interaction_files_id);

            latitudes.Clear(); longitudes.Clear();
            for (int counter = 1; counter < 12; counter++)
            {
                latitudes.Add(counter, parser.GetValue("Locations", "P" + counter.ToString() + "Lat", 0f));
                longitudes.Add(counter, parser.GetValue("Locations", "P" + counter.ToString() + "Long", 0f));
            }
            latitude_error  = parser.GetValue("Locations", "latitude_error", latitude_error);
            longitude_error = parser.GetValue("Locations", "longitude_error", longitude_error);

            site_name = parser.GetValue("Parameters", "site_name", site_name);
            server_to_local_refresh_rate = parser.GetValue("Parameters", "server_to_local_refresh_rate", server_to_local_refresh_rate);
            local_to_server_refresh_rate = parser.GetValue("Parameters", "local_to_server_refresh_rate", local_to_server_refresh_rate);
            store_cmd_log_in_file        = parser.GetValue("Parameters", "store_cmd_log_in_file", store_cmd_log_in_file);
            show_other_tabs                = parser.GetValue("Parameters", "show_other_tabs", show_other_tabs);
            start_auto                     = parser.GetValue("Parameters", "start_auto", start_auto);
            max_interaction_size           = parser.GetValue("Parameters", "max_interaction_size", max_interaction_size);
            sync_interactions_to_server    = parser.GetValue("Parameters", "sync_interactions_to_server", sync_interactions_to_server);
            sync_interactions_from_server  = parser.GetValue("Parameters", "sync_interactions_from_server", sync_interactions_from_server);
            sync_interactions_to_dropbox   = parser.GetValue("Parameters", "sync_interactions_to_dropbox", sync_interactions_to_dropbox);
            sync_interactions_from_dropbox = parser.GetValue("Parameters", "sync_interactions_from_dropbox", sync_interactions_from_dropbox);
            send_notifications             = parser.GetValue("Parameters", "send_notifications", send_notifications);
        }