60 lines
1.5 KiB
C#
60 lines
1.5 KiB
C#
using Remontor.Connector;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Drawing;
|
|
using System.Linq;
|
|
using System.Runtime;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using System.Windows.Forms;
|
|
|
|
namespace Remontor.Setting
|
|
{
|
|
public partial class settingAppControl : UserControl
|
|
{
|
|
public settingAppControl()
|
|
{
|
|
InitializeComponent();
|
|
UpdateSetting();
|
|
|
|
}
|
|
public void UpdateSetting()
|
|
{
|
|
if (SGlobalSetting.settingApp != null)
|
|
{
|
|
path.Text = SGlobalSetting.settingApp.pathApp;
|
|
nb_ItemHistorySize.Value = SGlobalSetting.settingApp.sizeHistoryItem;
|
|
|
|
}
|
|
}
|
|
|
|
|
|
public void Save()
|
|
{
|
|
SGlobalSetting.settingApp.pathApp = path.Text;
|
|
SGlobalSetting.settingApp.sizeHistoryItem = (int)nb_ItemHistorySize.Value;
|
|
|
|
}
|
|
|
|
public bool edited()
|
|
{
|
|
return (SGlobalSetting.settingApp.pathApp != path.Text ||
|
|
SGlobalSetting.settingApp.sizeHistoryItem != (int)nb_ItemHistorySize.Value);
|
|
|
|
}
|
|
|
|
private void bt_path_open_Click(object sender, EventArgs e)
|
|
{
|
|
SConnector.FormMain.ShowOn = true;
|
|
DialogResult result = openFileDialog1.ShowDialog();
|
|
if (result == DialogResult.OK)
|
|
{
|
|
path.Text = openFileDialog1.FileName;
|
|
}
|
|
SConnector.FormMain.ShowOn = false;
|
|
}
|
|
}
|
|
}
|