예제 #1
0
 private void mnuSetting_Click(object sender, EventArgs e)
 {
     using (var sysSetting = new SysSetting(vars.SYS_PROFILE.CompanyCode, DataActionMode.Edit))
     {
         sysSetting.StartPosition = FormStartPosition.CenterScreen;
         sysSetting.ShowDialog(this);
     }
 }
예제 #2
0
파일: Main.cs 프로젝트: liusile/WGProject
 private void ToolSysSetting_Click(object sender, EventArgs e)
 {
     try
     {
         Form frm = new SysSetting();
         frm.ShowDialog();
         var sysConfig = new SysConfigService().Get();
         SysConfig.PrintType    = sysConfig.PrintType;
         SysConfig.IP           = sysConfig.IP;
         SysConfig.Port         = sysConfig.Port;
         SysConfig.DomainName   = sysConfig.DomainName;
         SysConfig.ScanPortName = sysConfig.ScanPortName;
         if (serialPort_Scan.IsOpen)
         {
             serialPort_Scan.Close();
         }
         serialPort_Scan.PortName = SysConfig.ScanPortName ?? "";
         serialPort_Scan.Open();
     }catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }