添加软件设置页面
This commit is contained in:
commit
004529ebb1
8 files changed
+136
-14
No files matched your search
@@ -0,0 +1,13 @@
|
||||
<Window x:Class="formula_manage.Windows.APP_set"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:formula_manage.Windows"
|
||||
mc:Ignorable="d" Loaded="Window_SET"
|
||||
Title="APP_set" Height="450" Width="800">
|
||||
<Grid>
|
||||
<CheckBox x:Name="Login_LINK" Height="19" Margin="15,15,605,0" VerticalAlignment="Top" Content="登录页面显示连接状态" IsTabStop="False" Checked="Login_LINK_Checked" Unchecked="Login_LINK_Checked"/>
|
||||
|
||||
</Grid>
|
||||
</Window>
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Documents;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using System.Windows.Media.Imaging;
|
||||
using System.Windows.Shapes;
|
||||
|
||||
namespace formula_manage.Windows
|
||||
{
|
||||
/// <summary>
|
||||
/// APP_set.xaml 的交互逻辑
|
||||
/// </summary>
|
||||
public partial class APP_set : Window
|
||||
{
|
||||
public APP_set()
|
||||
{
|
||||
WindowStartupLocation = WindowStartupLocation.CenterScreen;
|
||||
InitializeComponent();
|
||||
}
|
||||
public string INIPath = Convert.ToString(System.AppDomain.CurrentDomain.BaseDirectory) + "formula.ini";
|
||||
|
||||
bool Login_link;
|
||||
private void Window_SET(object sender, RoutedEventArgs e)
|
||||
{
|
||||
|
||||
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath);
|
||||
|
||||
Login_link = Boolean.Parse(Configini.IniReadvalue("SOFTWARE_SET", "L1")); //连接状态显示是否生效
|
||||
|
||||
}
|
||||
private void Login_LINK_Checked(object sender, RoutedEventArgs e)
|
||||
{
|
||||
Login_link = Login_LINK.IsChecked.GetValueOrDefault(); //显示是否生效
|
||||
UserClass.IniFile.IniFiles Configini = new UserClass.IniFile.IniFiles(INIPath); //配置文件
|
||||
Configini.IniWritevalue("SOFTWARE_SET", " L1", Login_link.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -55,7 +55,7 @@ namespace formula_manage.Windows
|
||||
TEXT_SQLUSER2.Text = Configini.IniReadvalue("SQL_SERVER", "SQL10");
|
||||
TEXT_SQLPASWORD2.Text = Configini.IniReadvalue("SQL_SERVER", "SQL11");
|
||||
|
||||
TEXT_SQLINK.IsChecked = SQL2; //数据库对象2控件属性
|
||||
TEXT_SQLINK.IsChecked = SQL2; //数据库对象2控件属性是否生效
|
||||
TEXT_SQLIP2.IsEnabled = SQL2;
|
||||
TEXT_SQLNAME2.IsEnabled = SQL2;
|
||||
TEXT_SQMOD2.IsEnabled = SQL2;
|
||||
|
||||
Reference in new issue
Block a user