/// <summary>
        /// 更新集群下所有服务器信息
        /// </summary>
        /// <param name="clusterInfo">当前选定的集群信息</param>
        /// <param name="bindData">界面绑定的集群</param>
        private void RefreshServersData(ClusterInfo clusterInfo, ref UserInterfaceData bindData)
        {
            //将当前选定的集群信息赋值给界面绑定的类实例
            ExtendHelper.CopyAllProperties(clusterInfo.ClusterSetting, bindData);

            //更新当前选定的集群服务器DataGrid信息
            bindData.ClusterServersTable.Clear();
            ExtendHelper.CopyAllProperties(clusterInfo, bindData);
        }
Beispiel #2
0
        public DSTServerLauncher()
        {
            InitializeComponent();
            SQLiteHelper.OpenSQLite(appStartupPath + @"\DSTServerManager.db");

            m_TabItemXaml = System.Windows.Markup.XamlWriter.Save(tabItemMain);
            TabControl_ServerLog.SelectionChanged += TabControl_ServerLog_SelectionChanged;

            #region 界面绑定数据初始化

            UI = new UserInterfaceData(dataGrid_ClusterInfo_ServersList.Columns.Count);
            BindingState();

            textBox_BasicInfo_Key.Text = ConfigHelper.GetValue("textBox_BasicInfo_Key");
            dataGrid_LocalServer_ServersPath.FrozenColumnCount = 2;
            dataGrid_CloudServer_ServersPath.FrozenColumnCount = 2;

            BackgroundWorker userdataWorker = new BackgroundWorker();
            userdataWorker.DoWork             += UserDataWorker_DoWork;
            userdataWorker.RunWorkerCompleted += UserdataWorker_RunWorkerCompleted;
            userdataWorker.RunWorkerAsync();

            #endregion
        }