Esempio n. 1
0
        void timer_Tick(object sender, EventArgs e)
        {
            if (flag == 0)
            {
                LoadWindow load = new LoadWindow();
                load.Show();

                Application.Current.Resources.Add("省市表", dbOperation.GetProvinceCity());
                UserInfo userInfo = Application.Current.Resources["User"] as UserInfo;
                this.userName = userInfo.ShowName;

                //加载标题
                this._user.Text = this.userName;
                //this._date.Text = DateTime.Now.ToLongDateString().ToString() +  DateTime.Now.ToString("dddd");
                this._date.Text = DateTime.Now.ToLongDateString().ToString();

                DataTable table = dbOperation.GetDbHelper().GetDataSet(string.Format("select companyName,phone from t_supplier where supplierId ='{0}'", (Application.Current.Resources["User"] as UserInfo).SupplierId == "" ? "zrd" : (Application.Current.Resources["User"] as UserInfo).SupplierId)).Tables[0];
                this._bottom.Text = "版权所有:" + table.Rows[0][0].ToString() + "  软著登字第0814101号    版本号:" + ConfigurationManager.AppSettings["version"] + "    技术服务热线:" + table.Rows[0][1].ToString();

                //DataTable dt = dbOperation.GetDbHelper().GetDataSet(string.Format("SELECT title,image from sys_client_sysdept where INFO_CODE ='{0}'", (Application.Current.Resources["User"] as UserInfo).DepartmentID)).Tables[0];
                string dept_str = "";
                if (deptId.Length >= 3)
                {
                    dept_str = deptId.Substring(0, 3).ToString();
                }
                else
                {
                    dept_str = deptId;
                }

                DataTable dt = dbOperation.GetDbHelper().GetDataSet(string.Format("SELECT title,image,INFO_NAME from sys_client_sysdept where INFO_CODE ='{0}'", dept_str)).Tables[0];
                if (dt.Rows[0][0].ToString() != "")
                {
                    this._title_dept.Text = dt.Rows[0][0].ToString();
                }
                else if (dt.Rows[0][2].ToString() != "")
                {
                    this._title_dept.Text = dt.Rows[0][2].ToString();
                }

                if (dt.Rows[0][1].ToString() != null && dt.Rows[0][1].ToString() != "")
                {
                    byte[] img = (byte[])dt.Rows[0][1];
                    ShowSelectedIMG(img);                //以流的方式显示图片的方法
                }

                this._logo.Visibility    = Visibility.Visible;
                this._title_1.Visibility = Visibility.Visible;
                //this._title_2.Visibility = Visibility.Visible;

                //加载父菜单和子菜单和首页
                MainMenu_Load();
                this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);

                flag           = 1;
                timer.Interval = new TimeSpan(1000);
                load.Close();
            }
            //header.UpdateTime();
        }
Esempio n. 2
0
        public void LoadGame(string loadFileName)
        {
            _loadWindow.Close();

            GameData loadData = Global.Instance.SaveManager.Load(loadFileName);

            Global.Instance.CurrentGameData = loadData;
            Global.Instance.GameManager.
            PerformTransition(GameStateTransitionType.MenuToInGame);
        }
Esempio n. 3
0
        private void Awake()
        {
            _loadWindow = GetComponentInChildren <LoadWindow>(true);
            _loadWindow.Init(this);
            _loadWindow.Close();

            _playerSettingsWindow =
                GetComponentInChildren <PlayerSettings>(true);
            _playerSettingsWindow.Init(this);
            _playerSettingsWindow.Close();
        }
Esempio n. 4
0
        private async void ViewModel_LoadGameClose(object sender, string name)
        {
            if (name != null)
            {
                try
                {
                    await model.loadGameAsync(name);
                }
                catch
                {
                    MessageBox.Show("Játék betöltése sikertelen!", "Hiba!", MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }

            loadWindow.Close();
        }
Esempio n. 5
0
        /// <summary>
        /// Játék betöltésének eseménykezelője.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="name">Betöltendő mentés neve</param>
        private async void ViewModel_LoadGameClose(object sender, String name)
        {
            if (name != null)
            {
                try
                {
                    await _model.LoadGame(name);
                }
                catch
                {
                    MessageBox.Show("Játék betöltése sikertelen!", "Hiba!", MessageBoxButton.OK, MessageBoxImage.Error);
                }
            }

            _loadWindow.Close(); // játékállapot betöltőtő ablak bezárása
        }
Esempio n. 6
0
        void timer_Tick(object sender, EventArgs e)
        {
            if (flag == 0)
            {
                LoadWindow load = new LoadWindow();
                load.Show();

                Application.Current.Resources.Add("省市表", operationService.GetProvinceCity());
                PubClass.ProvinceCityTable = Application.Current.Resources["省市表"] as DataTable;

                UserInfo userInfo = Application.Current.Resources["User"] as UserInfo;
                this.userName = userInfo.ShowName;

                //加载标题
                this._user.Text = this.userName;
                this._date.Text = DateTime.Now.ToLongDateString().ToString();
                DataTable table = operationService.GetUserSupplier(PubClass.supplierid);

                this._bottom.Text = "版权所有:" + table.Rows[0][0].ToString() + "  软著登字第0814101号    版本号:" + ConfigurationManager.AppSettings["version"] + "    技术服务热线:" + table.Rows[0][1].ToString();

                string dept_str = "";
                if (deptId.Length >= 3)
                {
                    dept_str = deptId.Substring(0, 3).ToString();
                }
                else
                {
                    dept_str = deptId;
                }

                this._title.Visibility = Visibility.Visible;

                //加载父菜单和子菜单和首页
                MainMenu_Load();
                this.SizeChanged += new SizeChangedEventHandler(MainWindow_SizeChanged);

                flag           = 1;
                timer.Interval = new TimeSpan(1000);
                load.Close();
            }
            //header.UpdateTime();
        }
Esempio n. 7
0
        private void LoadButton_Click(object sender, RoutedEventArgs e)
        {
            // Check if no item is selected.
            if (SaveListBox.SelectedItem == null)
            {
                MessageBox.Show("There is nothing selected!");
                return;
            }

            // Load the game.
            StupidDataGhost.GameEngine.LoadGame(SaveListBox.SelectedItem.ToString());

            // Load the list of saved games.
            StupidDataGhost.SaveList = StupidDataGhost.GameEngine.LoadListOfSaves(StupidDataGhost.SaveList);

            // Edit list box.
            SaveListBox.ItemsSource = null;
            SaveListBox.ItemsSource = StupidDataGhost.SaveList;

            LoadWindow.Close();
        }
Esempio n. 8
0
 private void CancelButton_Click(object sender, RoutedEventArgs e)
 {
     LoadWindow.Close();
 }