// Use this for initialization void Start() { X_part = GameObject.Find("X_axis").transform; Y_part = GameObject.Find("Y_axis").transform; Z_part = GameObject.Find("Z_axis").transform; move_sound = (AudioClip)Resources.Load("Audio/move"); ControlPanel_Script = GameObject.Find("MainScript").GetComponent<ControlPanel>(); }
// Use this for initialization void Start() { activated = false; string tag = gameObject.tag; string name = gameObject.name; name = name.Remove (0,1); if ( tag == "left_control_panel") opposite_name = "r" + name; else opposite_name = "l" + name; opposite_panel = GameObject.Find(opposite_name).GetComponent<ControlPanel>(); }
// Use this for initialization void Start() { starting_position = this.transform.position; string bomb_name = this.gameObject.name; string bomb_num = bomb_name.Remove(0,4); string ctl_panel_r = "r_cp" + bomb_num; string ctl_panel_l = "l_cp" + bomb_num; last_position = transform.position; right_panel = GameObject.Find(ctl_panel_r).GetComponent<ControlPanel>(); left_panel = GameObject.Find(ctl_panel_l).GetComponent<ControlPanel>(); scoreboard = GameObject.Find("scoreboard").GetComponent<Score>(); _controller = this.GetComponent<CharacterController>(); }
// Use this for initialization void Start() { Main=GameObject.Find("MainScript").GetComponent<ControlPanel>(); //GameObject.Find("move_control").AddComponent("MoveControl"); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); //将变量与相应的组件对应起来 董帅 2013-5-9 Xp_part1=GameObject.Find("XYZ protecting crust_28").transform; Xp_part2=GameObject.Find("XYZ protecting crust_27").transform; Xp_part3=GameObject.Find("XYZ protecting crust_26").transform; Xp_part4=GameObject.Find("XYZ protecting crust_25").transform; Xn_part1=GameObject.Find("XYZ protecting crust_17").transform; Xn_part2=GameObject.Find("XYZ protecting crust_18").transform; Xn_part3=GameObject.Find("XYZ protecting crust_19").transform; Xn_part4=GameObject.Find("XYZ protecting crust_20").transform; Xp_zero1=Xp_part1.position.z; Xp_zero2=Xp_part2.position.z; Xp_zero3=Xp_part3.position.z; Xp_zero4=Xp_part4.position.z; Xn_zero1=Xn_part1.position.z; Xn_zero2=Xn_part2.position.z; Xn_zero3=Xn_part3.position.z; Xn_zero4=Xn_part4.position.z; //将变量与相应的组件对应起来 董帅 2013-5-9 Yn_part1=GameObject.Find("XYZ protecting crust_9").transform; Yn_part2=GameObject.Find("XYZ protecting crust_10").transform; Yn_part3=GameObject.Find("XYZ protecting crust_11").transform; Yn_zero1=Yn_part1.position.x; Yn_zero2=Yn_part2.position.x; Yn_zero3=Yn_part3.position.x; //将变量与相应的组件对应起来 董帅 2013-5-9 Zn_part1=GameObject.Find("XYZ protecting crust_6").transform; Zn_part2=GameObject.Find("XYZ protecting crust_5").transform; Zn_part3=GameObject.Find("XYZ protecting crust_4").transform; Zn_zero1=Zn_part1.position.y; Zn_zero2=Zn_part2.position.y; Zn_zero3=Zn_part3.position.y; }
// Use this for initialization void Start() { Main=GameObject.Find("MainScript").GetComponent<ControlPanel>(); GameObject.Find("move_control").AddComponent("MoveControl"); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); Xp_part1=GameObject.Find("X01_Y").transform; Xp_part2=GameObject.Find("X02_Y").transform; Xp_part3=GameObject.Find("X03_Y").transform; Xp_part4=GameObject.Find("X04_Y").transform; Xn_part1=GameObject.Find("X01_Z").transform; Xn_part2=GameObject.Find("X02_Z").transform; Xn_part3=GameObject.Find("X03_Z").transform; Xn_part4=GameObject.Find("X04_Z").transform; Xp_zero1=Xp_part1.position.z; Xp_zero2=Xp_part2.position.z; Xp_zero3=Xp_part3.position.z; Xp_zero4=Xp_part4.position.z; Xn_zero1=Xn_part1.position.z; Xn_zero2=Xn_part2.position.z; Xn_zero3=Xn_part3.position.z; Xn_zero4=Xn_part4.position.z; Yn_part1=GameObject.Find("Y01").transform; Yn_part2=GameObject.Find("Y02").transform; Yn_part3=GameObject.Find("Y03").transform; Yn_zero1=Yn_part1.position.x; Yn_zero2=Yn_part2.position.x; Yn_zero3=Yn_part3.position.x; Zn_part1=GameObject.Find("Z01").transform; Zn_part2=GameObject.Find("Z02").transform; Zn_part3=GameObject.Find("Z03").transform; Zn_zero1=Zn_part1.position.y; Zn_zero2=Zn_part2.position.y; Zn_zero3=Zn_part3.position.y; }
// Use this for initialization void Start() { //MachineZero = new Vector3(0.0288153f,1.301697f,0.83f); //MachineZeroShift = new Vector3(0.83f,0.0288153f,1.301697f); MachineZero = new Vector3(0.0288153f,1.301697f,3.0f); MachineZeroShift = new Vector3(3.0f,0.0288153f,1.301697f); X_part = GameObject.Find("X_axis1").transform; Debug.Log("X_part:"+X_part.position); Debug.Log("X_partlocal:"+X_part.localPosition ); Y_part = GameObject.Find("Y_axis1").transform; Debug.Log("Y_part:"+Y_part.transform.position); Z_part = GameObject.Find("Z_axis1").transform; Debug.Log("Z_part:"+Z_part.transform.position); move_sound = (AudioClip)Resources.Load("Audio/move"); ControlPanel_Script = GameObject.Find("MainScript").GetComponent<ControlPanel>(); //获取KD整体中心的位置 董帅 2013-5-9 //KD_center = GameObject.Find("KD").transform; //Debug.Log("KDSX:"+KD_center.position); //将位置转化为相对位置 董帅 2013-5-9 //MachineZero = KD_center.position + new Vector3(0.0288153f,1.301697f,-0.918393f); //MachineZeroShift = KD_center.position + new Vector3(-0.918393f,0.0288153f,1.301697f); Debug.Log("MachineZero.z:"+MachineZero.z); }
// Use this for initialization void Start() { Main = gameObject.GetComponent <ControlPanel>(); CooSystem_script = gameObject.GetComponent <CooSystem>(); }
public void HideFloatingControlpanel() { ControlPanel.Hide(); }
void Start() { cp = ControlPanel.Instance; LightColor = Color.black; }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); ReadCooFile(); workpiece_coo = G54_pos; workpiece_flag = 1; //获得设置界面显示值 if(PlayerPrefs.HasKey("parameter_writabel")) parameter_writabel = PlayerPrefs.GetString("parameter_writabel"); else { PlayerPrefs.SetString("parameter_writabel", "1"); parameter_writabel = "1"; } if(PlayerPrefs.HasKey("TV_check")) TV_check = PlayerPrefs.GetString("TV_check"); else { PlayerPrefs.SetString("TV_check", "0"); TV_check = "0"; } if(PlayerPrefs.HasKey("hole_code")) hole_code = PlayerPrefs.GetString("hole_code"); else { PlayerPrefs.SetString("hole_code", "1"); hole_code = "1"; } if(PlayerPrefs.HasKey("input_unit")) input_unit = PlayerPrefs.GetString("input_unit"); else { PlayerPrefs.SetString("input_unit", "0"); input_unit = "0"; } if(PlayerPrefs.HasKey("IO")) IO = PlayerPrefs.GetString("IO"); else { PlayerPrefs.SetString("IO", "0"); IO = "0"; } if(PlayerPrefs.HasKey("sequence_number")) sequence_number = PlayerPrefs.GetString("sequence_number"); else { PlayerPrefs.SetString("sequence_number", "0"); sequence_number = "0"; } if(PlayerPrefs.HasKey("paper_tape")) paper_tape = PlayerPrefs.GetString("paper_tape"); else { PlayerPrefs.SetString("paper_tape", "0"); paper_tape = "0"; } if(PlayerPrefs.HasKey("SN_stop1")) SN_stop1 = PlayerPrefs.GetString("SN_stop1"); else { PlayerPrefs.SetString("SN_stop1", "0"); SN_stop1 = "0"; } if(PlayerPrefs.HasKey("SN_stop2")) SN_stop2 = PlayerPrefs.GetString("SN_stop2"); else { PlayerPrefs.SetString("SN_stop2", "0"); SN_stop2 = "0"; } //获得设置界面显示值 ReadToolFile (); }
// Use this for initialization void Start() { Main = gameObject.GetComponent <ControlPanel>(); }
public static void Main() => ControlPanel.Run(new Program(), new Updater());
public ControlPanel() { instance = this; }
// Use this for initialization void Start() { cPanel = GameObject.Find ("Control Panel").GetComponent<ControlPanel> (); }
public void Init(ControlPanel _main) { main = _main; }
/// <summary> /// Initializes a new instance of the <see cref="ImageExportDialog"/> class. /// </summary> /// <param name="serviceProvider"> /// <para>Requires:</para> /// <para><see cref="INuGenButtonStateService"/></para> /// <para><see cref="INuGenControlStateService"/></para> /// <para><see cref="INuGenButtonLayoutManager"/></para> /// <para><see cref="INuGenButtonRenderer"/></para> /// <para><see cref="INuGenCheckBoxLayoutManager"/></para> /// <para><see cref="INuGenCheckBoxRenderer"/></para> /// <para><see cref="INuGenColorsProvider"/></para> /// <para><see cref="INuGenComboBoxRenderer"/></para> /// <para><see cref="INuGenControlImageManager"/></para> /// <para><see cref="INuGenDirectorySelectorRenderer"/></para> /// <para><see cref="INuGenDropDownRenderer"/></para> /// <para><see cref="INuGenFontFamiliesProvider"/></para> /// <para><see cref="INuGenImageListService"/></para> /// <para><see cref="INuGenListBoxRenderer"/></para> /// <para><see cref="INuGenPanelRenderer"/></para> /// <para><see cref="INuGenProgressBarLayoutManager"/></para> /// <para><see cref="INuGenProgressBarRenderer"/></para> /// <para><see cref="INuGenRadioButtonLayoutManager"/></para> /// <para><see cref="INuGenRadioButtonRenderer"/></para> /// <para><see cref="INuGenScrollBarRenderer"/></para> /// <para><see cref="INuGenSpinRenderer"/></para> /// <para><see cref="INuGenSwitchButtonLayoutManager"/></para> /// <para><see cref="INuGenSwitchButtonRenderer"/></para> /// <para><see cref="INuGenTabStateTracker"/></para> /// <para><see cref="INuGenTabLayoutManager"/></para> /// <para><see cref="INuGenTabRenderer"/></para> /// <para><see cref="INuGenTextBoxRenderer"/></para> /// <para><see cref="INuGenTrackBarRenderer"/></para> /// <para><see cref="INuGenThumbnailLayoutManager"/></para> /// <para><see cref="INuGenThumbnailRenderer"/></para> /// <para><see cref="INuGenToolStripRenderer"/></para> /// <para><see cref="INuGenValueTrackerService"/></para> /// </param> /// <exception cref="ArgumentNullException"><paramref name="serviceProvider"/> is <see langword="null"/>.</exception> public ImageExportDialog(INuGenServiceProvider serviceProvider) : base(serviceProvider) { this.SetStyle(ControlStyles.AllPaintingInWmPaint, true); this.SetStyle(ControlStyles.Opaque, true); this.SetStyle(ControlStyles.OptimizedDoubleBuffer, true); this.SetStyle(ControlStyles.ResizeRedraw, true); this.SetStyle(ControlStyles.UserPaint, true); this.FormBorderStyle = FormBorderStyle.Sizable; this.MinimizeBox = false; this.MaximizeBox = false; this.Padding = new Padding(5); this.ShowInTaskbar = false; this.StartPosition = FormStartPosition.Manual; this.Text = res.Text_ImageExportDialog_Text; _exportService = new ImageExportService(); _exportService.Progress += _exportProgress; _controlPanel = new ControlPanel(serviceProvider); _controlPanel.Back += _controlPanel_Back; _controlPanel.Cancel += _controlPanel_Cancel; _controlPanel.CancelExport += _controlPanel_CancelExport; _controlPanel.Close += _controlPanel_Close; _controlPanel.Export += _controlPanel_Export; _controlPanel.Next += _controlPanel_Next; _previewStep = new Step( res.Text_ImageExportDialog_StepOneCaption , res.Text_ImageExportDialog_StepOneDescription ); _settingsStep = new Step( res.Text_ImageExportDialog_StepTwoCaption , res.Text_ImageExportDialog_StepTwoDescription ); _title = new Title(); this.Controls.AddRange( new Control[] { _controlPanel , _previewStep , _settingsStep , _title } ); _thumbnailContainer = new NuGenThumbnailContainer(serviceProvider); _thumbnailContainer.Dock = DockStyle.Fill; _thumbnailContainer.Parent = _previewStep; _exportProgressBar = new NuGenProgressBar(serviceProvider); _exportProgressBar.Dock = DockStyle.Bottom; _exportProgressBar.Parent = _settingsStep; _settingsLayoutPanel = new TableLayoutPanel(); _settingsLayoutPanel.BackColor = Color.Transparent; _settingsLayoutPanel.Dock = DockStyle.Fill; _settingsLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 30)); _settingsLayoutPanel.ColumnStyles.Add(new ColumnStyle(SizeType.Percent, 70)); for (int i = 0; i < 9; i++) { _settingsLayoutPanel.RowStyles.Add(new RowStyle(SizeType.Absolute, 30)); } _settingsLayoutPanel.Parent = _settingsStep; NuGenControlPaint.SetStyle( _settingsLayoutPanel , ControlStyles.AllPaintingInWmPaint | ControlStyles.OptimizedDoubleBuffer | ControlStyles.UserPaint , true ); _destFolderLabel = new NuGenLabel(); _destFolderLabel.Text = res.Text_ImageExportDialog_destFolderLabel; _templateLabel = new NuGenLabel(); _templateLabel.Text = res.Text_ImageExportDialog_templateLabel; _formatLabel = new NuGenLabel(); _formatLabel.Text = res.Text_ImageExportDialog_formatLabel; _typeLabel = new NuGenLabel(); _typeLabel.Text = res.Text_ImageExportDialog_typeLabel; _chooseButton = new NuGenButton(serviceProvider); _chooseButton.Click += _chooseButton_Click; _chooseButton.Dock = DockStyle.Right; _chooseButton.Text = res.Text_ImageExportDialog_chooseButton; _pathSelector = new PathSelector(serviceProvider); _pathSelector.Dock = DockStyle.Fill; _maxHeightCheckBox = new NuGenCheckBox(serviceProvider); _maxHeightCheckBox.Text = res.Text_ImageExportDialog_maxHeightCheckBox; _maxHeightCheckBox.CheckedChanged += _maxHeightCheckBox_CheckedChanged; _maxWidthCheckBox = new NuGenCheckBox(serviceProvider); _maxWidthCheckBox.Text = res.Text_ImageExportDialog_maxWidthCheckBox; _maxWidthCheckBox.CheckedChanged += _maxWidthCheckBox_CheckedChanged; _numWatermarkCheckBox = new NuGenCheckBox(serviceProvider); _numWatermarkCheckBox.CheckedChanged += _numWatermarkCheckBox_CheckedChanged; _numWatermarkCheckBox.Text = res.Text_ImageExportDialog_numWatermarkCheckBox; _templateTextBox = new NuGenTextBox(serviceProvider); _formatCombo = new FormatCombo(serviceProvider); _typeCombo = new TypeCombo(serviceProvider); _settingsLayoutPanel.Controls.Add(_destFolderLabel, 0, 0); _settingsLayoutPanel.Controls.Add(_templateLabel, 0, 1); _settingsLayoutPanel.Controls.Add(_formatLabel, 0, 2); _settingsLayoutPanel.Controls.Add(_typeLabel, 0, 3); _settingsLayoutPanel.Controls.Add(_maxWidthCheckBox, 0, 4); _settingsLayoutPanel.Controls.Add(_maxHeightCheckBox, 0, 5); _settingsLayoutPanel.Controls.Add(_numWatermarkCheckBox, 0, 6); _maxHeightSpin = new SizeSpin(serviceProvider); _maxHeightSpin.Enabled = _maxHeightCheckBox.Checked; _maxWidthSpin = new SizeSpin(serviceProvider); _maxWidthSpin.Enabled = _maxWidthCheckBox.Checked; _pathPanel = new LayoutPanel(); _pathPanel.Dock = DockStyle.Fill; _pathPanel.Controls.AddRange(new Control[] { _pathSelector, _chooseButton }); _watermarkFontBlock = new NuGenFontBlock(serviceProvider); _watermarkFontBlock.Enabled = false; _watermarkFontBlock.Width = 300; NuGenSpacer[] colorSpacers = new NuGenSpacer[2]; for (int i = 0; i < colorSpacers.Length; i++) { colorSpacers[i] = new NuGenSpacer(); colorSpacers[i].Dock = DockStyle.Right; colorSpacers[i].Width = 3; } _watermarkColorBox = new NuGenColorBox(serviceProvider); _watermarkColorBox.AutoSize = false; _watermarkColorBox.Dock = DockStyle.Fill; _watermarkColorBox.SelectedColor = Color.Gray; _watermarkOpacitySpin = new OpacitySpin(serviceProvider); _watermarkOpacitySpin.Dock = DockStyle.Right; _watermarkOpacitySpin.Width = 50; _percentLabel = new NuGenLabel(); _percentLabel.AutoSize = false; _percentLabel.Dock = DockStyle.Right; _percentLabel.Text = "%"; _percentLabel.Width = 10; _colorPanel = new LayoutPanel(); _colorPanel.Controls.AddRange( new Control[] { _watermarkColorBox , colorSpacers[0] , _watermarkOpacitySpin , colorSpacers[1] , _percentLabel } ); _colorPanel.Enabled = false; _colorPanel.Size = new Size(241, 20); _watermarkAlignDropDown = new NuGenAlignDropDown(serviceProvider); _watermarkAlignDropDown.Enabled = false; _watermarkAlignDropDown.SelectedAlignment = ContentAlignment.TopLeft; _watermarkAlignDropDown.Width = 175; _settingsLayoutPanel.Controls.Add(_pathPanel, 1, 0); _settingsLayoutPanel.Controls.Add(_templateTextBox, 1, 1); _settingsLayoutPanel.Controls.Add(_formatCombo, 1, 2); _settingsLayoutPanel.Controls.Add(_typeCombo, 1, 3); _settingsLayoutPanel.Controls.Add(_maxWidthSpin, 1, 4); _settingsLayoutPanel.Controls.Add(_maxHeightSpin, 1, 5); _settingsLayoutPanel.Controls.Add(_watermarkFontBlock, 1, 6); _settingsLayoutPanel.Controls.Add(_colorPanel, 1, 7); _settingsLayoutPanel.Controls.Add(_watermarkAlignDropDown, 1, 8); this.CurrentStep = _previewStep; }
/// <summary> /// Enters Pin on the device. /// </summary> protected override void EnterPin() { ControlPanel.TypeOnVirtualKeyboard(Credential.Pin); Pacekeeper.Sync(); }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); MDIEdit_Script = gameObject.GetComponent<MDIEditModule>(); //位置界面功能完善---宋荣 ---03.09 Pos_Script=gameObject.GetComponent<PositionModule>(); MDIInput_Script=gameObject.GetComponent<MDIInputModule>(); //使用新编写的NC代码格式化文件 董帅 2013-3-30 NCCodeFormat_Script = gameObject.GetComponent<NCCodeFormat>(); //位置界面功能完善---宋荣 ---03.09 FileInfoInitialize(); //calsize字典初始化 陈晓威 StrLenMapInitialize(); }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); for(int i=0;i<24;i++) light_flag[i]=false;//内容--模态的状态,初始化为假,姓名--刘旋,时间2013-4-23 //内容--模态代码的初始化,当前段中,第一列编号为0-11,第二列编号为12-23,姓名--刘旋,时间2013-4-23 ModeState[0]="G03";ModeState[1]="G17";ModeState[2]="G90";ModeState[3]="G22"; ModeState[4]="G94";ModeState[5]="G21";ModeState[6]="G41";ModeState[7]="G43"; ModeState[8]="G80";ModeState[9]="G98";ModeState[10]="G50";ModeState[11]="G67"; ModeState[12]="G97";ModeState[13]="G54";ModeState[14]="G64";ModeState[15]="G69"; ModeState[16]="G15";ModeState[17]="G40.1";ModeState[18]="G25";ModeState[19]="G160"; ModeState[20]="G13.1";ModeState[21]="G50.1";ModeState[22]="G54.2";ModeState[23]="G80.5"; //内容--新模态代码的初始化,初始化为当前模态代码,姓名--刘旋,时间2013-4-23 for(int i=0;i<24;i++) temp_ModeState[i]=ModeState[i]; }
private void load() { AddRangeInternal(new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.Gray(0.2f), }, new OsuScrollContainer { RelativeSizeAxes = Axes.Both, Width = 0.9f, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Child = flow = new FillFlowContainer <TDrawable> { Direction = FillDirection.Vertical, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Spacing = new Vector2(20) }, }, ControlPanel = new ControlPanel { Children = new Drawable[] { new TourneyButton { RelativeSizeAxes = Axes.X, Text = "Add new", Action = () => Storage.Add(new TModel()) }, new DangerousSettingsButton { RelativeSizeAxes = Axes.X, Text = "Clear all", Action = Storage.Clear }, } } }); Storage.CollectionChanged += (_, args) => { switch (args.Action) { case NotifyCollectionChangedAction.Add: args.NewItems.Cast <TModel>().ForEach(i => flow.Add(CreateDrawable(i))); break; case NotifyCollectionChangedAction.Remove: args.OldItems.Cast <TModel>().ForEach(i => flow.RemoveAll(d => d.Model == i)); break; } }; foreach (var model in Storage) { flow.Add(CreateDrawable(model)); } }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); MDIEdit_Script = gameObject.GetComponent<MDIEditModule>(); //位置界面功能完善---宋荣 ---03.09 Pos_Script=gameObject.GetComponent<PositionModule>(); MDIInput_Script=gameObject.GetComponent<MDIInputModule>(); //位置界面功能完善---宋荣 ---03.09 FileInfoInitialize(); }
private void RenderCanvas() { using (Graphics gr = Graphics.FromImage(Canvas.Image)) { if (_inMenu == false) { gr.Clear(Color.LightGray); #region Crosshair if (_placing || _dragging) { if (_canvasMouseMove.X > 5 && _canvasMouseMove.X < Canvas.Width - 5 && _canvasMouseMove.Y > 5 && _canvasMouseMove.Y < Canvas.Height - 5) { //gr.DrawLine(_greenPen, _canvasMouseMove.X, 0, _canvasMouseMove.X, Canvas.Height); //gr.DrawLine(_greenPen, 0, _canvasMouseMove.Y, Canvas.Width, _canvasMouseMove.Y); int x = _canvasMouseMove.X; int y = _canvasMouseMove.Y; if (_dragging) { x -= _dragAnchor.X; y -= _dragAnchor.Y; } gr.DrawLine(_whiterPen, x - 13, 0, x - 13, Canvas.Height); gr.DrawLine(_whiterPen, x + 13, 0, x + 13, Canvas.Height); gr.DrawLine(_whiterPen, 0, y - 13, Canvas.Width, y - 13); gr.DrawLine(_whiterPen, 0, y + 13, Canvas.Width, y + 13); if (!_dragging) { if (!_cleartoPlace) { gr.DrawEllipse(_darkGrayPen, _canvasMouseMove.X - 13, _canvasMouseMove.Y - 13, 26, 26); } else { switch (_chargeSelected) { case PointChargeType.Negative: gr.DrawEllipse(_yellowPen, _canvasMouseMove.X - 13, _canvasMouseMove.Y - 13, 26, 26); break; case PointChargeType.Positive: gr.DrawEllipse(_purplePen, _canvasMouseMove.X - 13, _canvasMouseMove.Y - 13, 26, 26); break;; default: break; } } } } } #endregion //crosshair #region trail foreach (Puck puck in _activePucks) { Point[] trail = puck.Trail.ToArray(); gr.DrawLines(_redPen, trail); } #endregion //trail #region walls foreach (Wall wall in _activeWalls) { gr.DrawLines(_blackPen, wall.Points); } #endregion //walls #region Game Objects foreach (GameObject obj in _activeGameObjects) { gr.DrawImage(obj.Bitmap, obj.XPosition - obj.Bitmap.Width / 2, obj.YPosition - obj.Bitmap.Height / 2); } #endregion //gameObjects #region Game Over Menu if (_finishing) { if (_canvasMouseMove.X >= 456 && _canvasMouseMove.X <= 536 && _canvasMouseMove.Y >= 73 && _canvasMouseMove.Y <= 100) { gr.FillRectangle(_whiteBrush, 457, 73, 78, 25); } gr.DrawString("You Win!", _menuTitleFont, _yellowBrush, 360, 20); gr.DrawRectangle(_blackPen, 456, 73, 80, 27); gr.DrawString("Continue", _tableDataFont, _blueBrush, 458, 76); #region endgame if (_canvasClickUp.X >= 456 && _canvasClickUp.X <= 536 && _canvasClickUp.Y >= 73 && _canvasClickUp.Y <= 100) { GoBackToMenu(); } #endregion } #endregion Game Over Menu } else #region MenuRendering { gr.Clear(Color.Black); gr.DrawString("Electric Field Hockey", _menuTitleFont, _yellowBrush, 120, 10); if (_canvasMouseMove.X >= 410 && _canvasMouseMove.X <= 410 + _buttonGoNotHoveringBmp.Width && _canvasMouseMove.Y >= 600 && _canvasMouseMove.Y <= 600 + _buttonGoNotHoveringBmp.Height) { gr.DrawImage(_buttonGoNotHoveringBmp, 414, 592); } else { gr.DrawImage(_buttonGoBmp, 410, 600); } bool drawSelect = true; if (_canvasMouseMove.X >= 200 && _canvasMouseMove.X <= 300 && _canvasMouseMove.Y >= 130 && _canvasMouseMove.Y <= (130 + (30 * _levelsAvailable)) && Math.Abs(_canvasMouseMove.Y - (100 + 30 * _levelSelected + _levelSelectAuraBmp.Height / 2)) > _levelHoverAuraBmp.Height - 10) { int y = _canvasMouseMove.Y; if (y < 150) { y = 150; } if (y > 115 + (30 * _levelsAvailable)) { y = 115 + (30 * _levelsAvailable); } if (_clicking == false) { gr.DrawImage(_levelHoverAuraBmp, 195, y - 20); } else { gr.DrawImage(_levelSelectAuraBmp, 200, y - 20); drawSelect = false; } } if (drawSelect) { gr.DrawImage(_levelSelectAuraBmp, 200, 100 + (30 * _levelSelected)); } gr.DrawRectangle(_grayPen, 200, 130, 600, 400); for (int i = 0; i < _levelsAvailable; i++) { gr.DrawString("Level " + (i + 1).ToString(), _tableDataFont, _yellowBrush, 220, 140 + (30 * i)); } } #endregion //menu drawing } Canvas.Invalidate(); using (Graphics gr = Graphics.FromImage(ControlPanel.Image)) { gr.Clear(Color.Black); if (!_inMenu) { #region start and stop menu int dist = ((865 - _cpMouseMove.X) * (865 - _cpMouseMove.X)) + ((40 - _cpMouseMove.Y) * (40 - _cpMouseMove.Y)); //gr.DrawString(dist.ToString(), _tableDataFont, _yellowBrush, 0, 0); if (dist <= 200) { gr.DrawImage(_playAura[3], 830, 0); } else if (dist <= 400) { gr.DrawImage(_playAura[2], 830, 0); } else if (dist <= 700) { gr.DrawImage(_playAura[1], 830, 0); } else if (dist <= 1500) { gr.DrawImage(_playAura[0], 830, 0); } if (_anchored) { gr.DrawLines(_whitePen, _playbutton); } else { gr.DrawRectangle(_whitePen, 850, 20, 50, 40); } if (_cpMouseMove.X > 2 && _cpMouseMove.X <= 60 && _cpMouseMove.Y >= ControlPanel.Height - 20 && _cpMouseMove.Y <= ControlPanel.Height) { gr.DrawImage(_levelHoverAuraBmp, -20, ControlPanel.Height - 30); } #endregion //start/stop menu gr.DrawString("MENU", _cpFont1, _whiteBrush, 3, ControlPanel.Height - 20); gr.DrawString("Score: " + _score.ToString(), _cpFont1, _yellowBrush, 2, 2); } } ControlPanel.Invalidate(); }
//宋荣 // Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); MDIEdit_Script = gameObject.GetComponent<MDIEditModule>(); //宋荣 Pos_Script=gameObject.GetComponent<PositionModule>(); MDIInput_Script=gameObject.GetComponent<MDIInputModule>(); //宋荣 }
public GameGump(ControlPanel panel, Mobile from, int step, bool hint) : base(5, 30) { m_Panel = panel; m_From = from; m_Step = step; var sideLength = panel.SideLength; AddBackground(50, 0, 530, 410, 0xA28); AddImage(0, 0, 0x28C8); AddImage(547, 0, 0x28C9); AddBackground(95, 20, 442, 90, 0xA28); AddHtml(229, 35, 300, 45, "GENERATOR CONTROL PANEL"); AddHtml(223, 60, 300, 70, "Use the Directional Controls to"); AddHtml(253, 75, 300, 85, "Close the Grid Circuit"); AddImage(140, 40, 0x28D3); AddImage(420, 40, 0x28D3); AddBackground(365, 120, 178, 210, 0x1400); AddImage(365, 115, 0x28D4); AddImage(365, 288, 0x28D4); AddImage(414, 189, 0x589); AddImage(435, 210, 0xA52); AddButton(408, 222, 0x29EA, 0x29EC, 1); // Left AddButton(448, 185, 0x29CC, 0x29CE, 2); // Up AddButton(473, 222, 0x29D6, 0x29D8, 3); // Right AddButton(448, 243, 0x29E0, 0x29E2, 4); // Down AddBackground(90, 115, 30 + 40 * sideLength, 30 + 40 * sideLength, 0xA28); AddBackground(100, 125, 10 + 40 * sideLength, 10 + 40 * sideLength, 0x1400); for (var i = 0; i < sideLength; i++) { for (var j = 0; j < sideLength - 1; j++) { AddImage(120 + 40 * i, 162 + 40 * j, 0x13F9); } } for (var i = 0; i < sideLength - 1; i++) { for (var j = 0; j < sideLength; j++) { AddImage(138 + 40 * i, 147 + 40 * j, 0x13FD); } } var path = panel.Path; var hues = new NodeHue[sideLength, sideLength]; for (var i = 0; i <= step; i++) { var n = path[i]; hues[n.X, n.Y] = NodeHue.Blue; } var lastNode = path[^ 1];
public ControlPanelReset(ControlPanel controlPanel, Func <Menu> menuFactory) : base("Refresh Menu") { _controlPanel = controlPanel; _menuFactory = menuFactory; }
/// <summary> /// Submits the authentication request. /// </summary> public override void SubmitAuthentication() { ControlPanel.Press("#hpid-keyboard-key-enter"); }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); for(int i=0;i<24;i++) light_flag[i]=false;//内容--模态的状态,初始化为假,姓名--刘旋,时间2013-4-23 //内容--模态代码的初始化,当前段中,第一列编号为0-11,第二列编号为12-23,姓名--刘旋,时间2013-4-23 ModeState[0]="G03";ModeState[1]="G17";ModeState[2]="G90";ModeState[3]="G22"; ModeState[4]="G94";ModeState[5]="G21";ModeState[6]="G41";ModeState[7]="G43"; ModeState[8]="G80";ModeState[9]="G98";ModeState[10]="G50";ModeState[11]="G67"; ModeState[12]="G97";ModeState[13]="G54";ModeState[14]="G64";ModeState[15]="G69"; ModeState[16]="G15";ModeState[17]="G40.1";ModeState[18]="G25";ModeState[19]="G160"; ModeState[20]="G13.1";ModeState[21]="G50.1";ModeState[22]="G54.2";ModeState[23]="G80.5"; //内容--新模态代码的初始化,初始化为当前模态代码,姓名--刘旋,时间2013-4-23 for(int i=0;i<24;i++) temp_ModeState[i]=ModeState[i]; //陈晓威 董帅 Softkey_Script=gameObject.GetComponent<SoftkeyModule>(); Main.SeparatePos = new int[100000]; Main.MDISeparatePos = new int[100000]; Main.AUTOSeparatePos=new int[100000]; Main.CodeForAll.Add(";"); Main.CodeForMDI.Add(";"); }
private void Start() { _controlPanel = new ControlPanel(); InitializeSmartButtons(); }
// Use this for initialization void Start() { ControlPanel_script = gameObject.GetComponent<ControlPanel>(); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); ReadCooFile(); workpiece_coo = G54_pos; workpiece_flag = 1; }
/// <summary> /// Submits the authentication request. /// </summary> public override void SubmitAuthentication() { if (ControlPanel.CheckState(KeyboardId, OmniElementState.Useable) && ControlPanel.CheckState("#hpid-keyboard-key-done", OmniElementState.Useable)) { ControlPanel.Press("#hpid-keyboard-key-done"); ControlPanel.WaitForState(KeyboardId, OmniElementState.Hidden); } if (ControlPanel.CheckState("#hpid-button-signin-ok", OmniElementState.Exists) && ControlPanel.CheckState("#hpid-button-signin-ok", OmniElementState.Useable)) { ControlPanel.Press("#hpid-button-signin-ok"); } }
void Awake() { Main = gameObject.GetComponent <ControlPanel>(); Softkey_Script = gameObject.GetComponent <SoftkeyModule>(); MDIEdit_Script = gameObject.GetComponent <MDIEditModule>(); }
/// <summary> /// Checks the device control panel for successful authentication. /// Assumes the operation was successful if indicators are indeterminate. /// </summary> /// <returns><c>true</c> if the the authentication operation is valid, <c>false</c> otherwise.</returns> public virtual bool ValidateAuthentication() { Widget signOutButton = ControlPanel.WaitForWidgetByValue("Sign Out", TimeSpan.FromSeconds(10)); return(signOutButton != null); }
void LoadControlPanel() { controlPanel = new ControlPanel(); this.viewerCanvas.Children.Add(controlPanel); controlPanel.SetValue(Canvas.LeftProperty, 15d); controlPanel.SetValue(Canvas.TopProperty, 15d); controlPanel.SetValue(Canvas.ZIndexProperty, 1000); }
public LeftMenu(Game game) : base(game) { frame = new Sprite(game, GraphicsCollection.GetPack("left-menu-frame")); frame.StackOrder = 1; AddChild(frame); minimize = new PanelButton(game, PanelButtonType.ResourcesMinimize); minimize.StackOrder = 2; minimize.XRelative = 60; minimize.YRelative = 11; minimize.OnMousePress += new EventHandler<Operation_Cronos.Input.MouseEventArgs>(minimize_OnMousePress); AddChild(minimize); parameters = new ParametersPanel(game); parameters.XRelative = ParametersPanel.ClosedPosition; parameters.YRelative = 15; parameters.StackOrder = 0; AddChild(parameters); alert = new PanelButton(game, PanelButtonType.ResourcesAlert); alert.XRelative = buttonsX; alert.YRelative = 25; alert.StackOrder = 3; alert.OnMouseOver += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseOver); alert.OnMouseLeave += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseLeave); alert.OnRelease += new EventHandler<ButtonEventArgs>(button_OnRelease); AddChild(alert); mission = new PanelButton(game, PanelButtonType.ResourcesMission); mission.StackOrder = 3; mission.XRelative = buttonsX; mission.YRelative = 60; mission.OnMouseOver += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseOver); mission.OnMouseLeave += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseLeave); mission.OnRelease += new EventHandler<ButtonEventArgs>(button_OnRelease); AddChild(mission); control = new PanelButton(game, PanelButtonType.ResourcesControl); control.StackOrder = 3; control.XRelative = buttonsX; control.YRelative = 89; control.OnMouseOver += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseOver); control.OnMouseLeave += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseLeave); control.OnRelease += new EventHandler<ButtonEventArgs>(button_OnRelease); AddChild(control); save = new PanelButton(game, PanelButtonType.ResourcesSave); save.StackOrder = 3; save.XRelative = buttonsX + 3; save.YRelative = 123; save.OnMouseOver += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseOver); save.OnMouseLeave += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseLeave); save.OnRelease += new EventHandler<ButtonEventArgs>(button_OnRelease); AddChild(save); exit = new PanelButton(game, PanelButtonType.ResourcesExit); exit.StackOrder = 3; exit.XRelative = buttonsX+2; exit.YRelative = 155; exit.OnMouseOver += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseOver); exit.OnMouseLeave += new EventHandler<ButtonEventArgs>(LeftButton_OnMouseLeave); exit.OnRelease+=new EventHandler<ButtonEventArgs>(button_OnRelease); AddChild(exit); #region ControlPanel controlPanel = new ControlPanel(game); controlPanel.StackOrder = 3; controlPanel.Visible = false; controlPanel.Enabled = false; AddChild(controlPanel); #endregion #region MissionPannel missionPanel = new MissionPanel(game); missionPanel.StackOrder = 3; missionPanel.XRelative = 300; missionPanel.YRelative = 200; missionPanel.Visible = false; missionPanel.Enabled = false; AddChild(missionPanel); #endregion #region AlertPannel alertPanel = new AlertPanel(game); alertPanel.StackOrder = 3; alertPanel.XRelative = 300; alertPanel.YRelative = 200; alertPanel.Visible = false; alertPanel.Enabled = false; alertPanel.On_Blink += new EventHandler(alertPanel_On_Blink); AddChild(alertPanel); #endregion tooltip = new Tooltip(game, 2); tooltip.XRelative = buttonsX + exit.Width + 5; tooltip.StackOrder = 2; tooltip.YRelative = 0; AddChild(tooltip); tooltip.Visible = false; }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); Main.SeparatePos = new int[100000]; }
public override void Delete() { ControlPanel.RemoveSlider(mLabel); ControlPanel.RemoveSlider(mSlider); base.Delete(); }
//位置界面功能完善---宋荣 ---03.09 // Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); //位置界面功能完善---宋荣 ---03.09 MDIInput_script=gameObject.GetComponent<MDIInputModule>(); //位置界面功能完善---宋荣 ---03.09 }
// Use this for initialization void Start() { Main = gameObject.GetComponent <ControlPanel>(); MoveControl_script = GameObject.Find("move_control").GetComponent <MoveControl>(); }
// Start is called before the first frame update void Start() { latestPlayerPos = new Vector3(0, 0, 0); numClips = clips.Length; panel = GameObject.Find("ControlPanel_Rain").GetComponent <ControlPanel>(); }
// Use this for initialization void Start() { ControlPanel_script = gameObject.GetComponent<ControlPanel>(); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); ReadCooFile(); workpiece_coo = G54_pos; workpiece_flag = 1; //刀偏界面数值读取 ReadToolFile (); //获得设置界面显示值 if(PlayerPrefs.HasKey("parameter")) parameter = PlayerPrefs.GetString("parameter"); else PlayerPrefs.SetString("parameter", "0"); if(PlayerPrefs.HasKey("TV")) TV = PlayerPrefs.GetString("TV"); else PlayerPrefs.SetString("TV", "0"); if(PlayerPrefs.HasKey("CKJC")) CKJC = PlayerPrefs.GetString("CKJC"); else PlayerPrefs.SetString("CKJC", "0"); if(PlayerPrefs.HasKey("input_unit")) input_unit = PlayerPrefs.GetString("input_unit"); else PlayerPrefs.SetString("input_unit", "0"); if(PlayerPrefs.HasKey("IO")) IO = PlayerPrefs.GetString("IO"); else PlayerPrefs.SetString("IO", "0"); if(PlayerPrefs.HasKey("order")) order = PlayerPrefs.GetString("order"); else PlayerPrefs.SetString("order", "0"); if(PlayerPrefs.HasKey("zhidai")) zhidai = PlayerPrefs.GetString("zhidai"); else PlayerPrefs.SetString("zhidai", "0"); if(PlayerPrefs.HasKey("order_stop1")) order_stop1 = PlayerPrefs.GetString("order_stop1"); else PlayerPrefs.SetString("order_stop1", "0"); if(PlayerPrefs.HasKey("order_stop2")) order_stop2 = PlayerPrefs.GetString("order_stop2"); else PlayerPrefs.SetString("order_stop2", "0"); //获得设置界面显示值 }
public void Init(ControlPanel _main) { main = _main; InitTables(); InitGlobalTable(); }
/// <summary> /// Submits the authentication request. /// </summary> public void SubmitAuthentication() { ControlPanel.Press("OK"); }
public void SaveGameVariables() { try { LuaScriptBinder.Set(null, "PlayerPosX", DynValue.NewNumber(GameObject.Find("Player").transform.position.x)); LuaScriptBinder.Set(null, "PlayerPosY", DynValue.NewNumber(GameObject.Find("Player").transform.position.y)); LuaScriptBinder.Set(null, "PlayerPosZ", DynValue.NewNumber(GameObject.Find("Player").transform.position.z)); } catch { LuaScriptBinder.Set(null, "PlayerPosX", DynValue.NewNumber(SaveLoad.savedGame.playerVariablesNum["PlayerPosX"])); LuaScriptBinder.Set(null, "PlayerPosY", DynValue.NewNumber(SaveLoad.savedGame.playerVariablesNum["PlayerPosY"])); LuaScriptBinder.Set(null, "PlayerPosZ", DynValue.NewNumber(SaveLoad.savedGame.playerVariablesNum["PlayerPosZ"])); } playerHeader = CYFAnimator.specialPlayerHeader; string mapName; if (UnitaleUtil.MapCorrespondanceList.ContainsKey(SceneManager.GetActiveScene().name)) { mapName = UnitaleUtil.MapCorrespondanceList[SceneManager.GetActiveScene().name]; } else if (GlobalControls.nonOWScenes.Contains(SceneManager.GetActiveScene().name) || GlobalControls.isInFight) { mapName = SaveLoad.savedGame.lastScene; } else { mapName = SceneManager.GetActiveScene().name; } lastScene = mapName; soundDictionary = MusicManager.hiddenDictionary; controlpanel = ControlPanel.instance; player = PlayerCharacter.instance; inventory.Clear(); foreach (UnderItem item in Inventory.inventory) { inventory.Add(item.Name); } boxContents.Clear(); foreach (UnderItem item in ItemBox.items) { boxContents.Add(item.Name); } try { foreach (string key in LuaScriptBinder.GetSavedDictionary().Keys) { DynValue dv; LuaScriptBinder.GetSavedDictionary().TryGetValue(key, out dv); switch (dv.Type) { case DataType.Number: playerVariablesNum.Add(key, dv.Number); break; case DataType.String: playerVariablesStr.Add(key, dv.String); break; case DataType.Boolean: playerVariablesBool.Add(key, dv.Boolean); break; default: UnitaleUtil.WriteInLogAndDebugger("SaveLoad: This DynValue can't be added to the save because it is unserializable."); break; } } } catch { } mapInfos = GlobalControls.GameMapData; tempMapInfos = GlobalControls.TempGameMapData; }
public override void Delete() { ControlPanel.RemoveSlider(mButton); base.Delete(); }
public static AppBuilder BuildAvaloniaApp() => ControlPanel.BuildAvaloniaApp();
/// <summary> /// Enters the PIN on the device control panel. /// </summary> protected void EnterPin() { ControlPanel.Type(Credential.Pin); Pacekeeper.Sync(); }
private void load() { AddRangeInternal(new Drawable[] { new Box { RelativeSizeAxes = Axes.Both, Colour = OsuColour.Gray(0.2f), }, new OsuScrollContainer { RelativeSizeAxes = Axes.Both, Anchor = Anchor.TopCentre, Origin = Anchor.TopCentre, Child = flow = new FillFlowContainer <TDrawable> { Direction = FillDirection.Vertical, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Spacing = new Vector2(20), }, }, ControlPanel = new ControlPanel { Children = new Drawable[] { new TourneyButton { RelativeSizeAxes = Axes.X, Text = "Add new", Action = () => Storage.Add(new TModel()) }, new DangerousSettingsButton { RelativeSizeAxes = Axes.X, Text = "Clear all", Action = Storage.Clear }, } } }); if (parentScreen != null) { AddInternal(backButton = new BackButton { Anchor = Anchor.BottomLeft, Origin = Anchor.BottomLeft, State = { Value = Visibility.Visible }, Action = () => sceneManager?.SetScreen(parentScreen.GetType()) }); flow.Padding = new MarginPadding { Bottom = backButton.Height * 2 }; } Storage.CollectionChanged += (_, args) => { switch (args.Action) { case NotifyCollectionChangedAction.Add: args.NewItems.Cast <TModel>().ForEach(i => flow.Add(CreateDrawable(i))); break; case NotifyCollectionChangedAction.Remove: args.OldItems.Cast <TModel>().ForEach(i => flow.RemoveAll(d => d.Model == i)); break; } }; foreach (var model in Storage) { flow.Add(CreateDrawable(model)); } }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); }
void AutoloadControlPanel() { try { ControlPanel form = new ControlPanel(); form.Tag = -1; form.MdiParent = this; form.ShowInTaskbar = false; form.Show(); } catch { } }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); //codestr = CodeFormat("G10G30s768G12f199z723i+23j-234"); //codestr = CodeFormat("N30#[#10]=#4*COS[45*#[#23]]-#5*SIN[45]"); //codestr = CodeFormat("N38IF[#1LT370]GOTO26"); //codestr = CodeFormat("234hahaha"); /* codestr = CodeFormat("#[234hahaha]g[sdafd]dsf"); codenum = codestr.Count; Debug.Log(codenum); if(codenum > 0) { foreach(string str in codestr) { Debug.Log(str); } } */ /* Debug.Log(test_str.IndexOfAny("b".ToCharArray())); //CodeLoad("O"); codestr = CodeLoad("O200"); //CodeLoad("O12"); //CodeLoad("O123"); //CodeLoad("O1234"); //CodeLoad("O12343"); codenum = codestr.Count; Debug.Log(codenum); if(codenum > 0) { foreach(string str in codestr) { Debug.Log(str); } } */ }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); Softkey_Script = gameObject.GetComponent<SoftkeyModule>(); }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); CompileNC_script = gameObject.GetComponent<CompileNC>(); }
/// <summary> /// Enters credentials on the device. /// If the device prompts for username and password, enters them. /// If the device prompts for PIN, enters PIN. /// </summary> public override void EnterCredentials() { WaitForSafeComTitle(); CheckForSignInForm(); if (ConfiguredForPin()) { EnterPin(); return; } EnterUserNamePassword(EnterDomainText()); return; //If we end up here, we encountered an unexpected screen throw new ControlNotFoundException($"Expecting form {_signInFormId} but found {ControlPanel.CurrentForm()} instead."); }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); if(Main==null)Debug.Log("Mainbeginnull"); CooSystem_script = gameObject.GetComponent<CooSystem>(); MDIEdit_Script = gameObject.GetComponent<MDIEditModule>(); //使用新编写的NC代码格式化文件 董帅 2013-3-30 NCCodeFormat_Script = gameObject.GetComponent<NCCodeFormat>(); if(NCCodeFormat_Script==null)Debug.Log("beginNCCodeFormat_Scriptnull"); //位置界面功能完善---宋荣 ---03.09 Pos_Script=gameObject.GetComponent<PositionModule>(); MDIInput_Script=gameObject.GetComponent<MDIInputModule>(); //位置界面功能完善---宋荣 ---03.09 FileInfoInitialize(); }
// Use this for initialization void Start() { ControlPanel_script = gameObject.GetComponent<ControlPanel>(); MoveControl_script = GameObject.Find("move_control").GetComponent<MoveControl>(); ReadCooFile(); workpiece_coo = G54_pos; workpiece_flag = 1; //设定界面修改---陈振华---03.11 parameter = PlayerPrefs.GetString("parameter"); TV = PlayerPrefs.GetString("TV"); CKJC = PlayerPrefs.GetString("CKJC"); input_unit = PlayerPrefs.GetString("input_unit"); IO = PlayerPrefs.GetString("IO"); order = PlayerPrefs.GetString("order"); zhidai = PlayerPrefs.GetString("zhidai"); order_stop1 = PlayerPrefs.GetString("order_stop1"); order_stop2 = PlayerPrefs.GetString("order_stop2"); }
private SceneGraph CreateSceneGraph() { var sceneGraph = new SceneGraph (); _dirLight = new DirectionalLight (sceneGraph, intensity: new Vec3 (1f), direction: new Vec3 (0.7f, 1f, -0.7f), maxShadowDepth: 200f); _camera = new Camera (sceneGraph, position: new Vec3 (0f, 10f, 10f), target: new Vec3 (0f, 10f, -1f), upDirection: new Vec3 (0f, 1f, 0f), frustum: new ViewingFrustum (FrustumKind.Perspective, 1f, 1f, -1f, -400f), aspectRatio: 1f); sceneGraph.GlobalLighting = new GlobalLighting () { AmbientLightIntensity = new Vec3 (0.1f), MaxIntensity = 1f, GammaCorrection = 1.8f, }; _terrainScene = new Terrain.Scene (sceneGraph); var fighterGeometry = new FighterGeometry<EntityVertex, PathNode> (); _fighter = new Mesh<EntityVertex> (sceneGraph, fighterGeometry.Fighter.RotateY (0f).Compact ()) .OffsetOrientAndScale (new Vec3 (0f, 15f, -10f), new Vec3 (0f, 0f, 0f), new Vec3 (1f)); _infoWindow = new ControlPanel<TexturedVertex> (sceneGraph, Container.Vertical (true, false, Label.Static ("Options", FontStyle.Bold), new ListView (React.Ignore <IVisualizable> (), new Visualizable (() => Visual.Label (string.Format ("FPS: {0}", _fps))), new Visualizable (() => Visual.Label ( string.Format ("Mouse: {0}", new Vec2i (Mouse.X , Mouse.Y)))))), new Vec2i (180, 64), false); sceneGraph.Root.Add (_dirLight, _camera, _terrainScene.Root, _fighter, _infoWindow.Offset (new Vec3 (-0.95f, 0.95f, 0f))); return sceneGraph; }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); MDIInput_script=gameObject.GetComponent<MDIInputModule>(); }
private async Task SetupScreen(TargetDevice target) { this.target = target; ScreenViewData = new LiveviewScreenViewData(target); ScreenViewData.PropertyChanged += ScreenViewData_PropertyChanged; LiveviewContext = new LiveviewContext(target, HistogramCreator); LiveviewUnit.Context = LiveviewContext; LayoutRoot.DataContext = ScreenViewData; try { await SequentialOperation.SetUp(target, liveview); } catch (Exception ex) { DebugUtil.Log(() => "Failed setup: " + ex.Message); var task = Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { AppShell.Current.Toast.PushToast(new ToastContent { Text = SystemUtil.GetStringResource("ErrorMessage_CameraSetupFailure") }); AppShell.Current.AppFrame.GoBack(); }); return; } ScreenViewData.ConnectionEstablished = true; target.Status.PropertyChanged += Status_PropertyChanged; target.Api.AvailiableApisUpdated += Api_AvailiableApisUpdated; liveview.JpegRetrieved += liveview_JpegRetrieved; liveview.FocusFrameRetrieved += Liveview_FocusFrameRetrieved; liveview.Closed += liveview_Closed; LiveviewUnit.FpsTimer.Start(); BatteryStatusDisplay.BatteryInfo = target.Status.BatteryInfo; var panels = SettingPanelBuilder.CreateNew(target); var pn = panels.GetPanelsToShow(); foreach (var panel in pn) { ControlPanel.Children.Add(panel); } setShootModeEnabled = target.Api.Capability.IsAvailable(API_SET_SHOOT_MODE); ControlPanel.SetChildrenControlHitTest(!target.Status.IsRecording()); ControlPanel.SetChildrenControlTabStop(!target.Status.IsRecording()); _CommandBarManager.ShootingScreenBarData = ScreenViewData; _CommandBarManager.ApplyShootingScreenCommands(AppBarUnit); LiveviewUnit.FramingGuideDataContext = ApplicationSettings.GetInstance(); UpdateShutterButton(target.Status); OnCameraStatusChanged(target.Status); await LiveviewUnit.SetupFocusFrame(ApplicationSettings.GetInstance().RequestFocusFrameInfo); SetUIHandlers(); if (target.Status.ShootMode?.Current == ShootModeParam.Audio) { liveviewDisabledByAudioMode = true; } }
// Use this for initialization void Start() { Main = gameObject.GetComponent<ControlPanel>(); CooSystem_script = gameObject.GetComponent<CooSystem>(); }
private PeriodicalShootingTask SetupPeriodicalShooting() { var task = new PeriodicalShootingTask(new List <TargetDevice>() { target }, ApplicationSettings.GetInstance().IntervalTime); task.Tick += async(result) => { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { switch (result) { case PeriodicalShootingTask.PeriodicalShootingResult.Skipped: AppShell.Current.Toast.PushToast(new ToastContent { Text = SystemUtil.GetStringResource("PeriodicalShooting_Skipped") }); break; case PeriodicalShootingTask.PeriodicalShootingResult.Succeed: AppShell.Current.Toast.PushToast(new ToastContent { Text = string.Format(SystemUtil.GetStringResource("PeriodicalShooting_Status"), PeriodicalShootingTask.Interval.ToString(), PeriodicalShootingTask.Count.ToString()) }); break; } ; }); }; task.Stopped += async(reason) => { await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { switch (reason) { case PeriodicalShootingTask.StopReason.ShootingFailed: AppShell.Current.Toast.PushToast(new ToastContent { Text = SystemUtil.GetStringResource("ErrorMessage_Interval") }); break; case PeriodicalShootingTask.StopReason.SkipLimitExceeded: AppShell.Current.Toast.PushToast(new ToastContent { Text = SystemUtil.GetStringResource("PeriodicalShooting_SkipLimitExceed") }); break; case PeriodicalShootingTask.StopReason.RequestedByUser: AppShell.Current.Toast.PushToast(new ToastContent { Text = SystemUtil.GetStringResource("PeriodicalShooting_StoppedByUser") }); break; } ; }); }; task.StatusUpdated += (status) => { ScreenViewData.IsPeriodicalShootingRunning = status.IsRunning; ControlPanel.SetChildrenControlHitTest(!status.IsRunning); ControlPanel.SetChildrenControlTabStop(!status.IsRunning); UpdateShutterButton(target.Status); /* * await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => * { * DebugUtil.Log(() => "Status updated: " + status.Count); * * PeriodicalShootingStatus.Visibility = status.IsRunning.AsVisibility(); * if (status.IsRunning) * { * PeriodicalShootingStatusText.Text = string.Format( * SystemUtil.GetStringResource("PeriodicalShooting_Status"), * status.Interval.ToString(), * status.Count.ToString()); * } * }); */ }; return(task); }