示例#1
0
        public void Load(AppSettingsClass appSettings)
        {
            instance = appSettings.MemberwiseClone() as AppSettingsClass;

            instance.PathSettings.ScriptingPath       = ApplicationPathClass.GetFullPath(appSettings.PathSettings.ScriptingPath);
            instance.PathSettings.TempPath            = ApplicationPathClass.GetFullPath(appSettings.PathSettings.TempPath);
            instance.PathSettings.DatabasesConfigPath = ApplicationPathClass.GetFullPath(appSettings.PathSettings.DatabasesConfigPath);
        }
示例#2
0
 private void SaveUserDesign()
 {
     if ((_mw != null) && (_ss != null))
     {
         _mw.XmlDataFileName = xmlEditDefinition.originalXmlFile;
         _ss.SharedFolder    = ApplicationPathClass.GetFullPath(Application.UserAppDataPath);
         _ss.StorageName     = Name;
         _ss.AddOrUpdate(Name, _mw);
     }
 }
示例#3
0
        private void SaveUserDesign()
        {
            if ((_mw != null) && (_ss != null))
            {
                _mw.ReportFileName    = txtREPORTFILE.Text;
                _mw.XmlDataFileName   = txtXMLDataFile.Text;
                _mw.XsdSchemaFileName = txtXSDSchemaFile.Text;

                _ss.SharedFolder = ApplicationPathClass.GetFullPath(Application.UserAppDataPath);
                _ss.StorageName  = this.Name;
                _ss.AddOrUpdate(this.Name.ToString(), _mw);
            }
        }
示例#4
0
        public void SaveSettings()
        {
            fastJSON.JSON.Parameters.UseExtensions = true;

            AppSettingsClass appsetting = instance.MemberwiseClone() as AppSettingsClass;

            appsetting.PathSettings.DatabasesConfigPath = ApplicationPathClass.GetPathCode(instance.PathSettings.DatabasesConfigPath);
            appsetting.PathSettings.TempPath            = ApplicationPathClass.GetPathCode(instance.PathSettings.TempPath);
            appsetting.PathSettings.ScriptingPath       = ApplicationPathClass.GetPathCode(instance.PathSettings.ScriptingPath);

            string jsonText = fastJSON.JSON.ToNiceJSON(appsetting);

            File.WriteAllText(Application.StartupPath + "\\config\\AppSettings.json", jsonText);
        }
示例#5
0
 private void SaveUserDesign()
 {
     if ((_mw != null) && (_ss != null))
     {
         try
         {
             _mw.cbEventName  = cbEvents.Text;
             _ss.SharedFolder = ApplicationPathClass.GetFullPath(Application.UserAppDataPath);
             _ss.StorageName  = SharedName;
             _ss.AddOrUpdate(SharedName, _mw);
         }
         catch (Exception ex)
         {
             SendMessageClass.Instance().SendAllErrors($@"{SharedName}->SaveUserDesign()->{ex.Message}");
         }
     }
 }
示例#6
0
        private void LoadUserDesign()
        {
            _ss.SharedFolder        = ApplicationPathClass.GetFullPath(Application.UserAppDataPath);
            _ss.StorageName         = Name;
            _ss.DestroyWhenDisposed = false;
            try
            {
                var mw2 = (MerkeWerte)_ss[Name];
                if (mw2 == null)
                {
                    return;
                }
                _mw = mw2;

                AddCbXMLFileText(_mw.XmlDataFileName);
                if (!string.IsNullOrEmpty(_mw.XmlDataFileName))
                {
                    fctXML.OpenFile(_mw.XmlDataFileName);
                }
                AddCbXSDFileText(_mw.XsdSchemaFileName);
                if (!string.IsNullOrEmpty(_mw.XsdSchemaFileName))
                {
                    fctXSD.OpenFile(_mw.XsdSchemaFileName);
                }
                AddCbReportFileText(_mw.ReportFileName);
                if (!string.IsNullOrEmpty(_mw.ReportFileName))
                {
                    fctFRX.OpenFile(_mw.ReportFileName);
                }

                foreach (ReportSqlCommands scmd in _mw.SqlCommands)
                {
                    AddItem(scmd.cmd, scmd.caption);
                }

                if (lvCreateStatements.Items.Count > 0)
                {
                    lvCreateStatements.Items[0].Selected = true;
                }
            }
            catch (Exception ex)
            {
                _notifies?.AddToERROR(AppStaticFunctionsClass.GetFormattedError($@"{Name}-> LoadUserDesign()", ex));
            }
        }
示例#7
0
 private void SaveUserDesign()
 {
     if ((_mw != null) && (_ss != null))
     {
         _mw.ReportFileName    = cbReportFile.Text;
         _mw.XmlDataFileName   = cbXMLFile.Text;
         _mw.XsdSchemaFileName = cbXSDFile.Text;
         _mw.SqlCommands       = new List <ReportSqlCommands>();
         foreach (ListViewItem lvi in lvCreateStatements.Items)
         {
             ReportSqlCommands rcmd = lvi.Tag as ReportSqlCommands;
             _mw.SqlCommands.Add(rcmd);
         }
         _ss.SharedFolder = ApplicationPathClass.GetFullPath(Application.UserAppDataPath);
         _ss.StorageName  = Name;
         _ss.AddOrUpdate(Name, _mw);
     }
 }
示例#8
0
 private void LoadUserDesign()
 {
     _ss.SharedFolder        = ApplicationPathClass.GetFullPath(Application.UserAppDataPath);
     _ss.StorageName         = SharedName;
     _ss.DestroyWhenDisposed = false;
     try
     {
         var mw2 = (MerkeWerte)_ss[SharedName];
         if (mw2 == null)
         {
             return;
         }
         _mw           = mw2;
         cbEvents.Text = _mw.cbEventName;
     }
     catch (Exception ex)
     {
         SendMessageClass.Instance().SendAllErrors($@"{SharedName}->LoadUserDesign()->{ex.Message}");
     }
 }
示例#9
0
 private void LoadUserDesign()
 {
     _ss.SharedFolder        = ApplicationPathClass.GetFullPath(Application.UserAppDataPath);
     _ss.StorageName         = Name;
     _ss.DestroyWhenDisposed = false;
     try
     {
         var mw2 = (MerkeWerte)_ss[Name];
         if (mw2 == null)
         {
             return;
         }
         _mw = mw2;
         xmlEditDefinition.originalXmlFile = _mw.XmlDataFileName;
         xmlEditDefinition.LoadXmlFromFile(_mw.XmlDataFileName);
     }
     catch (Exception ex)
     {
         SendMessageClass.Instance().SendAllErrors(Name + " -> LoadUserDesign() ->" + ex.Message);
     }
 }
示例#10
0
 private void LoadUserDesign()
 {
     _ss.SharedFolder        = ApplicationPathClass.GetFullPath(Application.UserAppDataPath);
     _ss.StorageName         = this.Name;
     _ss.DestroyWhenDisposed = false;
     try
     {
         MerkeWerte mw2 = (MerkeWerte)_ss[this.Name.ToString()];
         if (mw2 != null)
         {
             _mw = mw2;
             txtXMLDataFile.Text   = _mw.XmlDataFileName;
             txtXSDSchemaFile.Text = _mw.XsdSchemaFileName;
             txtREPORTFILE.Text    = _mw.ReportFileName;
         }
     }
     catch (Exception ex)
     {
         SendMessageClass.Instance().SendAllErrors(this.Name.ToString() + " -> LoadUserDesign() ->" + ex.Message);
     }
 }