⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sessdlgsp.cs

📁 一个远程终端软件的源码
💻 CS
📖 第 1 页 / 共 2 页
字号:
      remoteEndPt.Width = generalPanel.ClientRectangle.Right - App.DialogSpacing - remoteEndPt.Left;
      passwdBox.Width = generalPanel.ClientRectangle.Right - App.DialogSpacing - passwdBox.Left;
      recentBox.Width = generalPanel.ClientRectangle.Right - App.DialogSpacing - recentBox.Left;
      connModePanel.Size = ClientRectangle.Size;
      listenBox.Width = connModePanel.ClientRectangle.Right - listenBox.Left;
      listenPortBox.Width = connModePanel.ClientRectangle.Right - App.DialogSpacing - listenPortBox.Left;
      displayPanel.Size = ClientRectangle.Size;
      fullScrnBox.Width = displayPanel.ClientRectangle.Right - fullScrnBox.Left;
      rotateBox.Width = displayPanel.ClientRectangle.Right - App.DialogSpacing - rotateBox.Left;
      pixelSizeBox.Width = displayPanel.ClientRectangle.Right - App.DialogSpacing - pixelSizeBox.Left;
      scalingPanel.Size = ClientRectangle.Size;
      cliScalingBox.Width = scalingPanel.ClientRectangle.Right - App.DialogSpacing - cliScalingBox.Left;
      cliScalingWidthBox.Width = scalingPanel.ClientRectangle.Right - App.DialogSpacing - cliScalingWidthBox.Left;
      cliScalingHeightBox.Width = scalingPanel.ClientRectangle.Right - App.DialogSpacing - cliScalingHeightBox.Left;
      servScalingBox.Width = scalingPanel.ClientRectangle.Right - App.DialogSpacing - servScalingBox.Left;
      othersPanel.Size = ClientRectangle.Size;
      viewOnlyBox.Width = othersPanel.ClientRectangle.Right - viewOnlyBox.Left;
      shareServBox.Width = othersPanel.ClientRectangle.Right - shareServBox.Left;
      scrnUpdAlgoBox.Width = othersPanel.ClientRectangle.Right - scrnUpdAlgoBox.Left;
      sendMouseLocWhenIdleBox.Width = othersPanel.ClientRectangle.Right - sendMouseLocWhenIdleBox.Left;
      mouseSpeedBox.Width = othersPanel.ClientRectangle.Right - App.DialogSpacing - mouseSpeedBox.Left;
    }

    protected override void OnLoad(EventArgs e)
    {
      base.OnLoad(e);

      EventHandler panelItemHdr = new EventHandler(PanelItemClicked);

      okItem.Text = App.GetStr("OK");
      okItem.Click += okHdr;
      Menu.MenuItems.Add(okItem);
      optionsItem.Text = App.GetStr("Options");
      Menu.MenuItems.Add(optionsItem);
      generalItem.Text = App.GetStr("General...");
      generalItem.Click += panelItemHdr;
      optionsItem.MenuItems.Add(generalItem);
      connModeItem.Text = App.GetStr("Connection...");
      connModeItem.Click += panelItemHdr;
      optionsItem.MenuItems.Add(connModeItem);
      displayItem.Text = App.GetStr("Display...");
      displayItem.Click += panelItemHdr;
      optionsItem.MenuItems.Add(displayItem);
      scalingItem.Text = App.GetStr("Scaling...");
      scalingItem.Click += panelItemHdr;
      optionsItem.MenuItems.Add(scalingItem);
      othersItem.Text = App.GetStr("Others...");
      othersItem.Click += panelItemHdr;
      optionsItem.MenuItems.Add(othersItem);
      saveLoadItem.Text = App.GetStr("Re/Store");
      optionsItem.MenuItems.Add(saveLoadItem);
      dashItem.Text = "-";
      optionsItem.MenuItems.Add(dashItem);
      aboutItem.Text = App.GetStr("About");
      aboutItem.Click += aboutHdr;
      optionsItem.MenuItems.Add(aboutItem);
      cancelItem.Text = App.GetStr("Cancel");
      cancelItem.Click += cancelHdr;
      optionsItem.MenuItems.Add(cancelItem);

      Graphics graphics = CreateGraphics();

      generalPanel.Size = ClientRectangle.Size;
      Controls.Add(generalPanel);
      servLbl.Location = new Point(App.DialogSpacing, App.DialogSpacing);
      servLbl.Size = graphics.MeasureString(servLbl.Text, Font).ToSize();
      generalPanel.Controls.Add(servLbl);
      remoteEndPt.Location = new Point(App.DialogSpacing, servLbl.Bottom + App.DialogSpacing);
      remoteEndPt.Width = generalPanel.ClientRectangle.Right - App.DialogSpacing - remoteEndPt.Left;
      generalPanel.Controls.Add(remoteEndPt);
      remoteEndPtLbl.Location = new Point(App.DialogSpacing, remoteEndPt.Bottom + App.DialogSpacing);
      remoteEndPtLbl.Size = graphics.MeasureString(remoteEndPtLbl.Text, Font).ToSize();
      generalPanel.Controls.Add(remoteEndPtLbl);
      passwdLbl.Location = new Point(App.DialogSpacing, remoteEndPtLbl.Bottom + App.DialogSpacing);
      passwdLbl.Size = graphics.MeasureString(passwdLbl.Text, Font).ToSize();
      generalPanel.Controls.Add(passwdLbl);
      passwdBox.Location = new Point(App.DialogSpacing, passwdLbl.Bottom + App.DialogSpacing);
      passwdBox.Width = generalPanel.ClientRectangle.Right - App.DialogSpacing - passwdBox.Left;
      generalPanel.Controls.Add(passwdBox);
      recentLbl.Location = new Point(App.DialogSpacing, passwdBox.Bottom + App.DialogSpacing);
      recentLbl.Size = graphics.MeasureString(recentLbl.Text, Font).ToSize();
      generalPanel.Controls.Add(recentLbl);
      recentBox.Location = new Point(App.DialogSpacing, recentLbl.Bottom + App.DialogSpacing);
      recentBox.Width = generalPanel.ClientRectangle.Right - App.DialogSpacing - recentBox.Left;
      recentBox.SelectedIndexChanged += new EventHandler(RecentBoxChanged);
      generalPanel.Controls.Add(recentBox);

      connModePanel.Size = ClientRectangle.Size;
      Controls.Add(connModePanel);
      listenBox.Location = new Point(App.DialogSpacing, App.DialogSpacing);
      listenBox.Width = connModePanel.ClientRectangle.Right - listenBox.Left;
      connModePanel.Controls.Add(listenBox);
      listenPortLbl.Location = new Point(App.DialogSpacing, listenBox.Bottom + App.DialogSpacing);
      listenPortLbl.Size = graphics.MeasureString(listenPortLbl.Text, Font).ToSize();
      connModePanel.Controls.Add(listenPortLbl);
      listenPortBox.Location = new Point(App.DialogSpacing, listenPortLbl.Bottom + App.DialogSpacing);
      listenPortBox.Width = connModePanel.ClientRectangle.Right - App.DialogSpacing - listenPortBox.Left;
      connModePanel.Controls.Add(listenPortBox);

      displayPanel.Size = ClientRectangle.Size;
      Controls.Add(displayPanel);
      fullScrnBox.Location = new Point(App.DialogSpacing, App.DialogSpacing);
      fullScrnBox.Width = displayPanel.ClientRectangle.Right - fullScrnBox.Left;
      displayPanel.Controls.Add(fullScrnBox);
      rotateLbl.Location = new Point(App.DialogSpacing, fullScrnBox.Bottom + App.DialogSpacing);
      rotateLbl.Size = graphics.MeasureString(rotateLbl.Text, Font).ToSize();
      displayPanel.Controls.Add(rotateLbl);
      rotateBox.Location = new Point(App.DialogSpacing, rotateLbl.Bottom + App.DialogSpacing);
      rotateBox.Width = displayPanel.ClientRectangle.Right - App.DialogSpacing - rotateBox.Left;
      displayPanel.Controls.Add(rotateBox);
      pixelSizeLbl.Location = new Point(App.DialogSpacing, rotateBox.Bottom + App.DialogSpacing);
      pixelSizeLbl.Size = graphics.MeasureString(pixelSizeLbl.Text, Font).ToSize();
      displayPanel.Controls.Add(pixelSizeLbl);
      pixelSizeBox.Location = new Point(App.DialogSpacing, pixelSizeLbl.Bottom + App.DialogSpacing);
      pixelSizeBox.Width = displayPanel.ClientRectangle.Right - App.DialogSpacing - pixelSizeBox.Left;
      displayPanel.Controls.Add(pixelSizeBox);

      cliScalingWidthLbl.Size = graphics.MeasureString(cliScalingWidthLbl.Text, Font).ToSize();
      cliScalingHeightLbl.Size = graphics.MeasureString(cliScalingHeightLbl.Text, Font).ToSize();
      scalingPanel.Size = ClientRectangle.Size;
      Controls.Add(scalingPanel);
      cliScalingLbl.Location = new Point(App.DialogSpacing, App.DialogSpacing);
      cliScalingLbl.Size = graphics.MeasureString(cliScalingLbl.Text, Font).ToSize();
      scalingPanel.Controls.Add(cliScalingLbl);
      cliScalingBox.Location = new Point(App.DialogSpacing, cliScalingLbl.Bottom + App.DialogSpacing);
      cliScalingBox.Width = scalingPanel.ClientRectangle.Right - App.DialogSpacing - cliScalingBox.Left;
      scalingPanel.Controls.Add(cliScalingBox);
      cliScalingWidthLbl.Location = new Point(App.DialogSpacing, cliScalingBox.Bottom + App.DialogSpacing);
      cliScalingWidthLbl.Width = Math.Max(cliScalingWidthLbl.Width, cliScalingHeightLbl.Width);
      scalingPanel.Controls.Add(cliScalingWidthLbl);
      cliScalingWidthBox.Location = new Point(cliScalingWidthLbl.Right + App.DialogSpacing, cliScalingWidthLbl.Top);
      cliScalingWidthBox.Width = scalingPanel.ClientRectangle.Right - App.DialogSpacing - cliScalingWidthBox.Left;
      scalingPanel.Controls.Add(cliScalingWidthBox);
      cliScalingHeightLbl.Location = new Point(App.DialogSpacing, cliScalingWidthBox.Bottom + App.DialogSpacing);
      cliScalingHeightLbl.Width = cliScalingWidthLbl.Width;
      scalingPanel.Controls.Add(cliScalingHeightLbl);
      cliScalingHeightBox.Location = new Point(cliScalingHeightLbl.Right + App.DialogSpacing, cliScalingHeightLbl.Top);
      cliScalingHeightBox.Width = scalingPanel.ClientRectangle.Right - App.DialogSpacing - cliScalingHeightBox.Left;
      scalingPanel.Controls.Add(cliScalingHeightBox);
      servScalingLbl.Location = new Point(App.DialogSpacing, cliScalingHeightBox.Bottom + App.DialogSpacing);
      servScalingLbl.Size = graphics.MeasureString(servScalingLbl.Text, Font).ToSize();
      scalingPanel.Controls.Add(servScalingLbl);
      servScalingBox.Location = new Point(App.DialogSpacing, servScalingLbl.Bottom + App.DialogSpacing);
      servScalingBox.Width = scalingPanel.ClientRectangle.Right - App.DialogSpacing - servScalingBox.Left;
      scalingPanel.Controls.Add(servScalingBox);

      othersPanel.Size = ClientRectangle.Size;
      Controls.Add(othersPanel);
      viewOnlyBox.Location = new Point(App.DialogSpacing, App.DialogSpacing);
      viewOnlyBox.Width = othersPanel.ClientRectangle.Right - viewOnlyBox.Left;
      othersPanel.Controls.Add(viewOnlyBox);
      shareServBox.Location = new Point(App.DialogSpacing, viewOnlyBox.Bottom + App.DialogSpacing);
      shareServBox.Width = othersPanel.ClientRectangle.Right - shareServBox.Left;
      othersPanel.Controls.Add(shareServBox);
      scrnUpdAlgoBox.Location = new Point(App.DialogSpacing, shareServBox.Bottom + App.DialogSpacing);
      scrnUpdAlgoBox.Width = othersPanel.ClientRectangle.Right - scrnUpdAlgoBox.Left;
      othersPanel.Controls.Add(scrnUpdAlgoBox);
      sendMouseLocWhenIdleBox.Text = App.GetStr("Send mouse location when idle");
      sendMouseLocWhenIdleBox.Location = new Point(App.DialogSpacing, scrnUpdAlgoBox.Bottom + App.DialogSpacing);
      sendMouseLocWhenIdleBox.Width = othersPanel.ClientRectangle.Right - sendMouseLocWhenIdleBox.Left;
      othersPanel.Controls.Add(sendMouseLocWhenIdleBox);
      mouseSpeedBox.Location = new Point(App.DialogSpacing, sendMouseLocWhenIdleBox.Bottom + App.DialogSpacing);
      mouseSpeedBox.Width = othersPanel.ClientRectangle.Right - App.DialogSpacing - mouseSpeedBox.Left;
      othersPanel.Controls.Add(mouseSpeedBox);

      graphics.Dispose();

      saveDefsItem.Text = App.GetStr("Save settings as default");
      saveDefsItem.Click += saveDefsHdr;
      saveLoadItem.MenuItems.Add(saveDefsItem);
      restoreDefsItem.Text = App.GetStr("Restore default settings");
      restoreDefsItem.Click += restoreDefsHdr;
      saveLoadItem.MenuItems.Add(restoreDefsItem);

      SwitchPanel(generalItem);
    }
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -