Example #1
0
        private void ReadUserSettings()
        {
            try
            {
                if (System.IO.File.Exists(settingsDir + "\\" + AUDIT_GRID_SETTINGS))
                {
                    gridViewAudit.RestoreLayoutFromXml(settingsDir + "\\" + AUDIT_GRID_SETTINGS);
                }

                //Now read user settings, ReadAppSettings() must be called first
                Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));

                this.StartPosition = FormStartPosition.Manual;
                this.Top           = iniFile.ReadValue(FORM_NAME, "Top", 200);
                this.Left          = iniFile.ReadValue(FORM_NAME, "Left", 300);
                this.Width         = iniFile.ReadValue(FORM_NAME, "Width", 750);
                this.Height        = iniFile.ReadValue(FORM_NAME, "Height", 450);
            }
            catch (Exception error)
            {
                XtraMessageBox.Show("An error occurred while reading the user settings file." + Environment.NewLine +
                                    "Error CNF-205 in " + FORM_NAME + ".ReadUserSettings(): " + error.Message,
                                    FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #2
0
 private void WriteUserSettings()
 {
    try
    {
       Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));
       iniFile.WriteValue(FORM_NAME, "Top", this.Top);
       iniFile.WriteValue(FORM_NAME, "Left", this.Left);
    }
    catch (Exception error)
    {
       XtraMessageBox.Show("An error occurred while saving the user settings file." + Environment.NewLine +
              "Error CNF-209 in " + FORM_NAME + ".WriteUserSettings(): " + error.Message,
            FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
 }
Example #3
0
 private void WriteUserSettings()
 {
     try
     {
         Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));
         iniFile.WriteValue(FORM_NAME, "Top", this.Top);
         iniFile.WriteValue(FORM_NAME, "Left", this.Left);
     }
     catch (Exception error)
     {
         XtraMessageBox.Show("An error occurred while saving the user settings file." + Environment.NewLine +
                             "Error CNF-298 in " + FORM_NAME + ".WriteUserSettings(): " + error.Message,
                             FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #4
0
      private void ReadUserSettings()
      {
         try
         {
            //Now read user settings, ReadAppSettings() must be called first
            Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));

            this.Top = iniFile.ReadValue(FORM_NAME, "Top", 200);
            this.Left = iniFile.ReadValue(FORM_NAME, "Left", 300);
         }
         catch (Exception error)
         {
            XtraMessageBox.Show("An error occurred while reading the user settings file." + Environment.NewLine +
                   "Error CNF-208 in " + FORM_NAME + ".ReadUserSettings(): " + error.Message,
                 FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
      }
Example #5
0
        private void ReadUserSettings()
        {
            try
            {
                //Now read user settings, ReadAppSettings() must be called first
                Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));

                this.Top  = iniFile.ReadValue(FORM_NAME, "Top", 200);
                this.Left = iniFile.ReadValue(FORM_NAME, "Left", 300);
            }
            catch (Exception error)
            {
                XtraMessageBox.Show("An error occurred while reading the user settings file." + Environment.NewLine +
                                    "Error CNF-297 in " + FORM_NAME + ".ReadUserSettings(): " + error.Message,
                                    FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #6
0
 private void WriteUserSettings()
 {
    try
    {
       gridViewTemplateList.SaveLayoutToXml(settingsDir + "\\" + TEMPLATE_LIST_GRID_SETTINGS);
       Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));
       iniFile.WriteValue(FORM_NAME, "Top", this.Top);
       iniFile.WriteValue(FORM_NAME, "Left", this.Left);
       iniFile.WriteValue(FORM_NAME, "Width", this.Width);
       iniFile.WriteValue(FORM_NAME, "Height", this.Height);
    }
    catch (Exception error)
    {
       XtraMessageBox.Show("An error occurred while saving the user settings file." + Environment.NewLine +
              "Error CNF-309 in " + FORM_NAME + ".WriteUserSettings(): " + error.Message,
            FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
    }
 }
Example #7
0
 private void WriteUserSettings()
 {
     try
     {
         gridViewTemplateList.SaveLayoutToXml(settingsDir + "\\" + TEMPLATE_LIST_GRID_SETTINGS);
         Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));
         iniFile.WriteValue(FORM_NAME, "Top", this.Top);
         iniFile.WriteValue(FORM_NAME, "Left", this.Left);
         iniFile.WriteValue(FORM_NAME, "Width", this.Width);
         iniFile.WriteValue(FORM_NAME, "Height", this.Height);
     }
     catch (Exception error)
     {
         XtraMessageBox.Show("An error occurred while saving the user settings file." + Environment.NewLine +
                             "Error CNF-309 in " + FORM_NAME + ".WriteUserSettings(): " + error.Message,
                             FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
Example #8
0
        private void WriteUserSettings()
        {
            try
            {
                gridViewTradeDataChanges.SaveLayoutToXml(Path.Combine(settingsDir, TRADE_DATA_CHANGES_GRID_SETTINGS));

                Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));
                iniFile.WriteValue(FORM_NAME, "Top", this.Top);
                iniFile.WriteValue(FORM_NAME, "Left", this.Left);
                iniFile.WriteValue(FORM_NAME, "Width", this.Width);
                iniFile.WriteValue(FORM_NAME, "Height", this.Height);
            }
            catch (Exception error)
            {
                XtraMessageBox.Show("An error occurred while saving the user settings file." + Environment.NewLine +
                                    "Error CNF-317 in " + FORM_NAME + ".WriteUserSettings(): " + error.Message,
                                    FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #9
0
      private void ReadUserSettings()
      {
         try
         {
            if (System.IO.File.Exists(settingsDir + "\\" + TEMPLATE_LIST_GRID_SETTINGS))
                gridViewTemplateList.RestoreLayoutFromXml(settingsDir + "\\" + TEMPLATE_LIST_GRID_SETTINGS);
            
            //Now read user settings, ReadAppSettings() must be called first
            Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));

            this.Top = iniFile.ReadValue(FORM_NAME, "Top", 200);
            this.Left = iniFile.ReadValue(FORM_NAME, "Left", 300);
            this.Width = iniFile.ReadValue(FORM_NAME, "Width", 750);
            this.Height = iniFile.ReadValue(FORM_NAME, "Height", 450);
         }
         catch (Exception error)
         {
            XtraMessageBox.Show("An error occurred while reading the user settings file." + Environment.NewLine +
                   "Error CNF-308 in " + FORM_NAME + ".ReadUserSettings(): " + error.Message,
                 FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
      }
      private void WriteUserSettings()
      {
         try
         {
            gridViewTradeDataChanges.SaveLayoutToXml(Path.Combine(settingsDir, TRADE_DATA_CHANGES_GRID_SETTINGS));

            Sempra.Ops.IniFile iniFile = new Sempra.Ops.IniFile(FileNameUtils.GetUserIniFileName(settingsDir));
            iniFile.WriteValue(FORM_NAME, "Top", this.Top);
            iniFile.WriteValue(FORM_NAME, "Left", this.Left);
            iniFile.WriteValue(FORM_NAME, "Width", this.Width);
            iniFile.WriteValue(FORM_NAME, "Height", this.Height);
         }
         catch (Exception error)
         {
            XtraMessageBox.Show("An error occurred while saving the user settings file." + Environment.NewLine +
                   "Error CNF-317 in " + FORM_NAME + ".WriteUserSettings(): " + error.Message,
                 FORM_ERROR_CAPTION, MessageBoxButtons.OK, MessageBoxIcon.Error);
         }
      }