private void Window_Closing(object sender, CancelEventArgs e)
        {
            //if (m_SteamProcess == null) return;
            //m_SteamProcess.CloseMainWindow();
            //m_SteamProcess.Close();

            SteamCommandEventArgs args = new SteamCommandEventArgs($"{textBox_Path.Text}/bin/dontstarve_dedicated_server_nullrenderer");

            SteamCommandEvent(this, args);
        }
        private void Process_Exited(object sender, EventArgs e)
        {
            if (SteamCommandEvent == null)
            {
                Close();
            }
            string path = string.Empty;

            Dispatcher.Invoke(new Action(() => { path = textBox_Path.Text; }));
            path += @"\bin\dontstarve_dedicated_server_nullrenderer.exe";

            SteamCommandEventArgs args = new SteamCommandEventArgs(path);

            SteamCommandEvent(this, args);

            m_SteamProcess = null;
        }
예제 #3
0
        private void Window_ReceiveLocalCommandValues(object sender, SteamCommandEventArgs commandArgs)
        {
            if (!File.Exists(commandArgs.NewServerPath))
            {
                return;
            }

            if (commandArgs.NewServerPath.Contains("dontstarve_dedicated_server_nullrenderer"))
            {
                DataRow newPath = UI.ServerLocal.NewRow();
                newPath.ItemArray = new object[3] {
                    0, "Steam", commandArgs.NewServerPath
                };
                UI.ServerLocal.Rows.Add(newPath);
                UI.ServerLocal.RefreshDataTable();
                SQLiteHelper.SaveDataTable(UI.ServerLocal, nameof(UI.ServerLocal));
            }
        }
예제 #4
0
        private void Window_ReceiveCloudCommandValues(object sender, SteamCommandEventArgs commandArgs)
        {
            //if (!File.Exists(commandArgs.NewServerPath)) return;
            int indexConn = dataGrid_CloudServer_Connections.SelectedIndex;

            if (commandArgs.NewServerPath.Contains("dontstarve_dedicated_server_nullrenderer"))
            {
                DataRow newPath = ServerCloudOrigin.NewRow();
                newPath.ItemArray = new object[3] {
                    ServerCloudOrigin.Rows.Count, "Steam", commandArgs.NewServerPath
                };
                ServerCloudOrigin.Rows.Add(newPath);

                SQLiteHelper.SaveDataTable(ServerCloudOrigin, nameof(UI.ServerCloud));

                //需要查找远程服务器链接列表整合后的列表ID
                //UI.Connections.DefaultView[indexConn][4] = 1;
                var tt = UI.Connections.DefaultView[indexConn][4];
            }
        }