private void SystemLogin_Loaded(object sender, RoutedEventArgs e)
        {
            //初始化表参数为空
            ParameterPassing.ParamTable = new string[] { "" };
            //设置LOGO图片
            this.Icon = ropt.GetResources(GBT.Properties.Resources.GBT);

            this.Title = "Login" + random.Next();

            this.ShowInTaskbar = false;

            //创建快捷方式
            //DesktopHortcut.CreateDesktopLnk(AppDomain.CurrentDomain.BaseDirectory);
            //数据库初始化
            ltxml.readXML();
            //默认语言
            cobLanguage.SelectedIndex = 0;
            try
            {
                ////加载图片
                //BitmapImage bi = new BitmapImage();
                //bi.BeginInit();
                //bi.UriSource = new Uri(@"\\192.168.0.2\UserAccount$\logo.jpg");
                //bi.UriSource = new Uri("GBT;component/logo.jpg", UriKind.RelativeOrAbsolute);
                //bi.DecodePixelWidth = 2048;
                //bi.EndInit();
                //imgWeb.Source = bi;
                imgWeb.Source = ropt.GetResources(GBT.Properties.Resources.Logo1, System.Drawing.Imaging.ImageFormat.Png);
            }
            catch (Exception) { }

            //延时一分钟切换状态
            TimerControl(1000);
        }
Exemplo n.º 2
0
 public DataBases()
 {
     InitializeComponent();
     this.Icon = ropt.GetResources(TheAdministratorFrom.Properties.Resources.GBT);
     dgDatabases.IsReadOnly = true;
     ltxml.readXML();
     if (DataEditAttribute.ID == "" || DataEditAttribute.ID == null)
     {
         DataEditAttribute.NewDef          = "true";
         DataEditAttribute.NewDataServices = "qds126671222.my3w.com";
         DataEditAttribute.NewSQLUser      = "******";
         DataEditAttribute.NewSQLPassword  = "******";
         DataEditAttribute.NewDatabases    = "qds126671222_db";
         ltxml.WriteXML();
     }
     lblMessage.Content = "Ready";
 }