private void LoadFirst() { // Проверка авторизации Properties.Settings settings = Properties.Settings.Default; Registered = Data.Authorization(settings.CopyOwner, settings.CopyKey); Bonus = !Registered; string configfilename = Application.StartupPath + "\\config.ini"; if (File.Exists(configfilename)) { MemIniFile mif = new MemIniFile(configfilename); string section = "Application"; mif.WriteInteger(section, "Station", Properties.Settings.Default.Station); mif.WriteString(section, "StartupPath", Application.StartupPath); mif.WriteBool(section, "Registered", Registered); mif.WriteBool(section, "Bonus", Bonus); string[] channels = Properties.Settings.Default.Channels.Split('\t'); // Загрузка плагина точек KR500 PointPlugin.LoadPlugin(Application.StartupPath + "\\Points.KR500.dll"); FetchKR500Functions.StartFetch( new Tuple <int, string[], string, exitApp, int>( Properties.Settings.Default.Station, channels, mif.ToString(), closeServer, Properties.Settings.Default.TimeOut)); } }
private void saveCustomReportProps() { //Data.SetReportProps(printReport.ReportName, printReport.PrintAuto, // printReport.PrintTime, printReport.PrintPeriod); MemIniFile mif = new MemIniFile(String.Empty); mif.FromString(Properties.Settings.Default.ReportsConfig); mif.WriteString(internalname, "ReportName", printReport.ReportName); mif.WriteBool(internalname, "PrintAuto", printReport.PrintAuto); mif.WriteDate(internalname, "PrintTime", printReport.PrintTime); mif.WriteInteger(internalname, "PrintPeriod", printReport.PrintPeriod); //mif.UpdateFile(); Properties.Settings settings = Properties.Settings.Default; settings.ReportsConfig = mif.ToString(); settings.Save(); }
private void LoadFirst() { // Проверка авторизации Properties.Settings settings = Properties.Settings.Default; Registered = Data.Authorization(settings.CopyOwner, settings.CopyKey); Bonus = !Registered; string configfilename = Application.StartupPath + "\\config.ini"; if (File.Exists(configfilename)) { MemIniFile mif = new MemIniFile(configfilename); string section = "Application"; mif.WriteInteger(section, "Station", Properties.Settings.Default.Station); mif.WriteString(section, "StartupPath", Application.StartupPath); mif.WriteBool(section, "Registered", Registered); mif.WriteBool(section, "Bonus", Bonus); FetchVirtualFunctions.StartFetch(new Tuple <int, string, exitApp>( Properties.Settings.Default.Station, mif.ToString(), closeServer)); } }