Beispiel #1
0
 private string GetConnectString(MineDataPanelName mdpn)
 {
     try
     {
         title      = Enum.GetName(typeof(MineDataPanelName), mdpn);
         configPath = Application.StartupPath + "\\" + PANEL_FORM_NAME;
         if (!File.Exists(configPath))
         {
             MessageBox.Show("无法找到数配置文件:" + PANEL_FORM_NAME);
             return(String.Empty);
         }
         GetPrivateProfileString(title, "PanelFormName", "NULL", PanelFormName, PanelFormName.Capacity, configPath);
         string panelFormName = PanelFormName.ToString();
         return(panelFormName);
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     return(String.Empty);
 }
 private string GetConnectString(MineDataPanelName mdpn)
 {
     try
     {
         title = Enum.GetName(typeof(MineDataPanelName), mdpn);
         configPath = Application.StartupPath + "\\" + PANEL_FORM_NAME;
         if (!File.Exists(configPath))
         {
             MessageBox.Show("无法找到数配置文件:" + PANEL_FORM_NAME);
             return String.Empty;
         }
         GetPrivateProfileString(title, "PanelFormName", "NULL", PanelFormName, PanelFormName.Capacity, configPath);
         string panelFormName = PanelFormName.ToString();
         return panelFormName;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
     return String.Empty;
 }
 public LibPanels(MineDataPanelName mdpn)
 {
     panelFormName = GetConnectString(mdpn);
 }
Beispiel #4
0
 public LibPanels(MineDataPanelName mdpn)
 {
     panelFormName = GetConnectString(mdpn);
 }