Exemplo n.º 1
0
 public ImportWebSO(AP_Appliction _appl)
 {
     InitializeComponent();
     appl = _appl;
 }
Exemplo n.º 2
0
 public ChangePwd(AP_Appliction _appl)
 {
     InitializeComponent();
     appl = _appl;
 }
Exemplo n.º 3
0
        private void InitializeFomShow()
        {
            this.appl = new AP_Appliction(this);

            string Msg        = string.Empty;
            string SystemRoot = System.Environment.GetEnvironmentVariable("SystemRoot");

            SystemRoot = SystemRoot.Substring(0, 2) + "\\Log";

            //SystemRoot = System.Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);


            DTsConfig sC = new DTsConfig();

            sC.LoadDecryptFile();
            if (string.IsNullOrEmpty(sC.LogPath))
            {
                if (Msg != "")
                {
                    Msg += "\n";
                }
                Msg += "尚未設定「歷程紀錄位置」\n系統預設路徑為:" + SystemRoot;
            }
            //if (string.IsNullOrEmpty(sC.SetingPath))
            //{
            //    if (Msg != "") { Msg += "\n\n"; }
            //    Msg += "尚未設定「設定檔紀錄位置」\n系統預設路徑為:" + SystemRoot;
            //}

            if (Msg != "")
            {
                sC.LogPath    = SystemRoot;
                sC.SetingPath = SystemRoot;
                sC.CreateEncrypt();

                this.appl.ResetDTsConfig();

                if (Msg != "")
                {
                    Msg += "\n\n";
                }
                Msg += "若要變更路徑,由工具列「設定」「一般設定」進行變更";
                this.appl.SetSystemLog(Msg, MessageType.Warning);
                this.appl.MessageBox(Msg, MessageType.Warning);
            }
            try
            {
                SAP _sap = new SAP();
                appl.setDBLink();
            }
            catch
            {
                appl.oVar.isSetDB = false;
                Menu_2_Seting_Click(null, null);
                return;
            }

            if (!appl.oVar.isLogin)
            {
                Menu_1_Login_Click(null, null);
                return;
            }
        }