Inheritance: System.Windows.Forms.Form
コード例 #1
0
        private void ShowNewForm(object sender, EventArgs e)
        {
            ServerSettingsWindow ssw = new ServerSettingsWindow();

            ssw.ShowDialog();

            GetServerLists();
        }
コード例 #2
0
        private void ShowNewForm(object sender, EventArgs e)
        {
            //use the static DefaultWindow for keep state which you input recently
            ServerSettingsWindow ssw = ServerSettingsWindow.DefaultWindow;            //new ServerSettingsWindow();

            ssw.ShowDialog();

            GetServerLists();
        }
コード例 #3
0
        private void OpenSettingsWindow(object sender, EventArgs e)
        {
            Database.ServerDetails sd = (Database.ServerDetails)lvServerLists.Items[this._selIndex].Tag;

            ServerSettingsWindow ssw = new ServerSettingsWindow(sd);

            ssw.ApplySettings       += new ApplySettings(ssw_ApplySettings);
            ssw.GetClientWindowSize += new GetClientWindowSize(ssw_GetClientWindowSize);
            ssw.ShowDialog();

            GetServerLists();
        }
コード例 #4
0
        private void ToolbarButtons_Click(object sender, EventArgs e)
        {
            if (sender == btnDisconnect)
            {
                Disconnect();
            }
            else if (sender == btnConnect)
            {
                Connect();
            }
            else if (sender == btnReconnect)
            {
                Reconnect(false, _isFitToWindow, false);
            }
            else if (sender == btnSettings)
            {
                ServerSettingsWindow ssw = new ServerSettingsWindow(CurrentServer);

                ssw.ApplySettings       += new ApplySettings(Ssw_ApplySettings);
                ssw.GetClientWindowSize += new GetClientWindowSize(Ssw_GetClientWindowSize);
                ssw.ShowDialog();

                CurrentServer = ssw.CurrentServerSettings();

                ServerSettingsChanged?.Invoke(sender, CurrentServer, ListIndex);
            }
            else if (sender == btnFullscreen)
            {
                DialogResult dr = MessageBox.Show("You are about to enter in Fullscreen mode.\r\nBy default, the remote desktop resolution will be the same as what you see on the window.\r\n\r\nWould you like to resize it automatically based on your screen resolution though it will be permanent as soon as you leave in Fullscreen.\r\n\r\nNote: This will reconnect.", Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question);

                if (dr == DialogResult.Yes)
                {
                    Reconnect(false, false, true);
                }
                else
                {
                    rdpClient.FullScreen = true;
                }
            }
            else if (sender == m_FTS_FitToScreen)
            {
                DialogResult dr = MessageBox.Show("This will resize the server resolution based on this current client window size, though it will not affect you current settings.\r\n\r\nDo you want to continue?", Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

                if (dr == DialogResult.OK)
                {
                    Reconnect(true, true, false);
                }
            }
            else if (sender == m_FTS_Strech)
            {
                if (int.Parse(m_FTS_Strech.Tag.ToString()) == 0)
                {
                    rdpClient.AdvancedSettings3.SmartSizing = true;
                    m_FTS_Strech.Text = "Don't Stretch";
                    m_FTS_Strech.Tag  = 1;
                }
                else
                {
                    rdpClient.AdvancedSettings3.SmartSizing = false;
                    m_FTS_Strech.Text = "Stretch";
                    m_FTS_Strech.Tag  = 0;
                }
            }
        }
コード例 #5
0
ファイル: RdpClientWindow.cs プロジェクト: kongkong7/AppDev
        void ToolbarButtons_Click(object sender, EventArgs e)
        {
            if (sender == btnDisconnect)
            {
                Disconnect();
            }
            else if (sender == btnConnect)
            {
                Connect();
            }
            else if (sender == btnReconnect)
            {
                Reconnect(false, this._isFitToWindow, false);
            }
            else if (sender == btnSettings)
            {
                ServerSettingsWindow ssw = new ServerSettingsWindow(this._sd);
                ssw.ApplySettings += new ApplySettings(ssw_ApplySettings);
                ssw.GetClientWindowSize += new GetClientWindowSize(ssw_GetClientWindowSize);
                ssw.ShowDialog();

                this._sd = ssw.CurrentServerSettings();

                if (ServerSettingsChanged != null)
                {
                    ServerSettingsChanged(sender, this._sd, this._listIndex);
                }
            }
            else if (sender == btnFullscreen)
            {
                DialogResult dr = MessageBox.Show("You are about to enter in Fullscreen mode.\r\nBy default, the remote desktop resolution will be the same as what you see on the window.\r\n\r\nWould you like to resize it automatically based on your screen resolution though it will be permanent as soon as you leave in Fullscreen.\r\n\r\nNote: This will reconnect.", this.Text, MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dr == DialogResult.Yes)
                {
                    Reconnect(false, false, true);
                }
                else
                {
                    rdpClient.FullScreen = true;
                }
            }
            else if (sender == m_FTS_FitToScreen)
            {
                DialogResult dr = MessageBox.Show("This will resize the server resolution based on this current client window size, though it will not affect you current settings.\r\n\r\nDo you want to continue?", this.Text, MessageBoxButtons.OKCancel, MessageBoxIcon.Information);

                if (dr == DialogResult.OK)
                {
                    Reconnect(true, true, false);
                }
            }
            else if (sender == m_FTS_Strech)
            {
                if (int.Parse(m_FTS_Strech.Tag.ToString()) == 0)
                {
                    rdpClient.AdvancedSettings3.SmartSizing = true;
                    m_FTS_Strech.Text = "Don't Stretch";
                    m_FTS_Strech.Tag = 1;
                }
                else
                {
                    rdpClient.AdvancedSettings3.SmartSizing = false;
                    m_FTS_Strech.Text = "Stretch";
                    m_FTS_Strech.Tag = 0;
                }
            }
        }
コード例 #6
0
        private void OpenSettingsWindow(object sender, EventArgs e)
        {
            Database.ServerDetails sd = (Database.ServerDetails)lvServerLists.Items[this._selIndex].Tag;
            
            ServerSettingsWindow ssw = new ServerSettingsWindow(sd);
            ssw.ApplySettings += new ApplySettings(ssw_ApplySettings);
            ssw.GetClientWindowSize += new GetClientWindowSize(ssw_GetClientWindowSize);
            ssw.ShowDialog();

            GetServerLists();
        }
コード例 #7
0
        private void ShowNewForm(object sender, EventArgs e)
        {
            ServerSettingsWindow ssw = new ServerSettingsWindow();
            ssw.ShowDialog();

            GetServerLists();
        }