public void DoUpdate(ModeStatus _currentMode, SubMenuModeStatus _currentSubMenuMode) { GestureStatus currentGesture = GetGesture(); if (_currentMode == ModeStatus.Drawing) { switch (currentGesture) { case GestureStatus.StartDrag: OnStartDrag(); break; case GestureStatus.Dragging: OnDragging(); break; case GestureStatus.DoneDragging: DoneDragging(); break; } } // check for hand lost if (GetLost()) { manager.HandLost(); } }
private void 所有类型ToolStripMenuItem_Click(object sender, EventArgs e) { this.btnMode.Image = Properties.Resources.all; this.toolTip.SetToolTip(this.btnMode, "所有类型"); this.modeStatus = ModeStatus.FILE; //设置搜索线程的搜索模式,是FILE或MP3或JPG或TXT。 this.lvwFiles.Items.Clear(); //清除数据 if (this.lvStatus != ListViewStatus.File) { this.SetFileColumn(); //将listview设置为显示文件的列 } this.searchMode = SearchMode.File; //设置搜索的模式 this.search.SetSearcher(SearchMode.File); this.cmbKeyword_TextChanged(this, new EventArgs()); //重新搜索 }
private void 纯文本ToolStripMenuItem_Click(object sender, EventArgs e) { this.btnMode.Image = Properties.Resources.txt; this.toolTip.SetToolTip(this.btnMode, "纯文本文件"); this.modeStatus = ModeStatus.TXT; this.lvwFiles.Items.Clear();//清除数据 if (this.lvStatus != ListViewStatus.File) { this.SetFileColumn();//将listview设置为显示文件的列 } this.searchMode = SearchMode.File; this.search.SetSearcher(SearchMode.File); this.cmbKeyword_TextChanged(this, new EventArgs());//重新搜索 }
void SetSettingPanelUI(ModeStatus _modeStatus) { if (_modeStatus == ModeStatus.Transform) { oEditButton.SetActive(false); oDrawButton.SetActive(true); SetBlockPanel(true, "main"); } else { oEditButton.SetActive(true); oDrawButton.SetActive(false); SetBlockPanel(false, "main"); } }
void GoToSettingMode() { // set mode currentMode = ModeStatus.Setting; uiManager.PrintMode(currentMode); // set ui manager uiManager.OpenSettingMenu(); // set drawing manager drawingManager.TurnOnDrawingPath(false); // log Debug.Log("Mode : " + currentMode.ToString()); }
void GoToDrawingMode() { // set mode currentMode = ModeStatus.Drawing; uiManager.PrintMode(currentMode); isTransformOn = false; // set ui manager uiManager.CloseSettingMenu(currentSubMenuMode, GetTargetModeStatus()); // set drawing manager drawingManager.TurnOnDrawingPath(true); drawingManager.TurnOnInteractable(false); // log Debug.Log("Mode : " + currentMode.ToString()); }
void ChangeMode(ModeStatus _targetMode) { switch (_targetMode) { case ModeStatus.Drawing: GoToDrawingMode(); break; case ModeStatus.Transform: GoToTransformMode(); break; case ModeStatus.Setting: GoToSettingMode(); break; } }
/// <summary> /// 初始化设置 /// </summary> private void InitSettings() { //初始化设置信息 Static.Settings.ReadSettings(); Static.FileIndexPath = Static.Settings.FileIndexPath; Static.MP3IndexPath = Static.Settings.MP3IndexPath; IndexInfoDB indexInfo = new IndexInfoDB(); indexInfo.ReadIndexInfoDB(); Static.MP3Artist = indexInfo.MP3Artist; Static.MP3SongNums = indexInfo.MFileNums; this.停止更新ToolStripMenuItem.Enabled = false; this.保存结果ToolStripMenuItem.Enabled = false; this.tsslLength = this.statusStrip.Width - 120; this.orginalStatusText = "永远别说永远,凡事都有可能。"; this.tsslStatus.Text = Deal.LimitStringLength(this.orginalStatusText, this.tsslLength); this.modeStatus = ModeStatus.FILE; this.magicMirrorStatus = MagicMirrorStatus.Close; this.lvStatus = ListViewStatus.File; this.isSearchWithResult = false; this.indexMode = IndexMode.All; //默认索引模式为所有 this.searchMode = SearchMode.File; //默认搜索模式为文件 //this.index = new Index(this, this.indexMode); this.search = new Search(this, this.searchMode); this.magicMirror = new MagicMirror(); this.magicMirror.SetProperties(MagicMode.None, null); this.pnlMagicMirror.Controls.Add(this.magicMirror); this.magicMirror.Dock = DockStyle.Fill; this.btnNext.Visible = false; this.btnPrevious.Visible = false; this.tsslPages.Visible = false; //加入文件夹图标,未知文件的图标,mp3图标,jpg图标。 this.imgIcon.Images.Add("f", GetSystemIcon.GetFolderIcon(false)); this.imgIcon.Images.Add("u", GetSystemIcon.GetUnknownFileIcon(false)); this.imgIcon.Images.Add(".mp3", GetSystemIcon.GetIconByFileType(".mp3", false)); this.imgIcon.Images.Add(".jpg", GetSystemIcon.GetIconByFileType(".jpg", false)); this.imgIcon.Images.Add(".txt", GetSystemIcon.GetIconByFileType(".txt", false)); this.imgIcon.Images.Add("artist", Properties.Resources.artist); }
void ChangeCursor(ModeStatus _currentMode) { if (_currentMode == ModeStatus.Drawing) { // turn off head cursor if (oHeadCursor.activeSelf) { oHeadCursor.SetActive(false); } // turn on hand cursor if (manager.GetIsHandTracked()) { tHandCursor.gameObject.SetActive(true); } else { tHandCursor.gameObject.SetActive(false); } // change hand cursor sprite ChangeCursorSprite(); } else { // turn on head cursor if (!oHeadCursor.activeSelf) { oHeadCursor.SetActive(true); } // turn off hand cursor if (tHandCursor.gameObject.activeSelf) { tHandCursor.gameObject.SetActive(false); } } }
void MoveObject(ModeStatus currentMode) { Vector3 headPosition = manager.GetHeadPosition(); Vector3 handPosition = manager.GetHandPosition(); lookAtPosition = tCamera.rotation * Vector3.forward; lookAtDirection = tCamera.rotation * Vector3.up; // move player view MovePlayerView(headPosition); if (currentMode == ModeStatus.Drawing) // move hand cursor { // move cursor MoveHandCursor(handPosition); } else if (currentMode == ModeStatus.Setting) // move setting menu { // move setting panel MoveSettingPanelFollow(headPosition); } }
public void CloseSettingMenu(SubMenuModeStatus _currentSubMenuMode, ModeStatus _targetMode) { // change ui SetSettingPanelUI(_targetMode); // close animSettingMenu.SetTrigger(AnimatorTrigger.offTrigger); oDrawingPath.SetActive(true); tPlayerView.gameObject.SetActive(true); // if color, size sub menu on, close if (_currentSubMenuMode == SubMenuModeStatus.Color) { CloseColorSubMenu(); } else if (_currentSubMenuMode == SubMenuModeStatus.Size) { CloseSizeSubMenu(); } // check delete button oDeleteButton.SetActive(false); }
private void mP3ToolStripMenuItem_Click(object sender, EventArgs e) { this.btnMode.Image = Properties.Resources.mp3; this.toolTip.SetToolTip(this.btnMode, "MP3音乐"); this.modeStatus = ModeStatus.MP3; this.lvwFiles.Items.Clear();//清除数据 if (this.cmbKeyword.Text != "" || this.isSearchWithResult == true) { if (this.lvStatus != ListViewStatus.MP3) { this.SetMP3Column();//将listview设置为显示MP3的列 } } else { if (this.lvStatus != ListViewStatus.MP3Artist) { this.SetMP3ArtistColumn();//将listview设置为显示MP3艺术家的列 } } this.searchMode = SearchMode.MP3; this.search.SetSearcher(SearchMode.MP3); this.cmbKeyword_TextChanged(this, new EventArgs());//重新搜索 }
private void 所有类型ToolStripMenuItem_Click(object sender, EventArgs e) { this.btnMode.Image = Properties.Resources.all; this.toolTip.SetToolTip(this.btnMode, "所有类型"); this.modeStatus = ModeStatus.FILE;//设置搜索线程的搜索模式,是FILE或MP3或JPG或TXT。 this.lvwFiles.Items.Clear();//清除数据 if (this.lvStatus != ListViewStatus.File) { this.SetFileColumn();//将listview设置为显示文件的列 } this.searchMode = SearchMode.File;//设置搜索的模式 this.search.SetSearcher(SearchMode.File); this.cmbKeyword_TextChanged(this, new EventArgs());//重新搜索 }
private void jPG图片ToolStripMenuItem_Click(object sender, EventArgs e) { this.btnMode.Image = Properties.Resources.jpg; this.toolTip.SetToolTip(this.btnMode, "JPG图片"); this.modeStatus = ModeStatus.JPG; this.lvwFiles.Items.Clear();//清除数据 if (this.lvStatus != ListViewStatus.File) { this.SetFileColumn();//将listview设置为显示文件的列 } this.searchMode = SearchMode.File; this.search.SetSearcher(SearchMode.File); this.cmbKeyword_TextChanged(this, new EventArgs());//重新搜索 }
public void DoUpdate(ModeStatus _currentMode) { MoveObject(_currentMode); ChangeCursor(_currentMode); CheckForDelete(); }
public void PrintMode(ModeStatus _mode) { txtMode.text = _mode.ToString(); }
public StatusDescription(string NameStatus_, int Weight_, ModeStatus type_) { NameStatus = NameStatus_; Weight = Weight_; Type = type_; }
/// <summary> /// 初始化设置 /// </summary> private void InitSettings() { //初始化设置信息 Static.Settings.ReadSettings(); Static.FileIndexPath = Static.Settings.FileIndexPath; Static.MP3IndexPath = Static.Settings.MP3IndexPath; IndexInfoDB indexInfo = new IndexInfoDB(); indexInfo.ReadIndexInfoDB(); Static.MP3Artist = indexInfo.MP3Artist; Static.MP3SongNums = indexInfo.MFileNums; this.停止更新ToolStripMenuItem.Enabled = false; this.保存结果ToolStripMenuItem.Enabled = false; this.tsslLength = this.statusStrip.Width - 120; this.orginalStatusText = "永远别说永远,凡事都有可能。"; this.tsslStatus.Text = Deal.LimitStringLength(this.orginalStatusText, this.tsslLength); this.modeStatus = ModeStatus.FILE; this.magicMirrorStatus = MagicMirrorStatus.Close; this.lvStatus = ListViewStatus.File; this.isSearchWithResult = false; this.indexMode = IndexMode.All;//默认索引模式为所有 this.searchMode = SearchMode.File;//默认搜索模式为文件 //this.index = new Index(this, this.indexMode); this.search = new Search(this, this.searchMode); this.magicMirror = new MagicMirror(); this.magicMirror.SetProperties(MagicMode.None, null); this.pnlMagicMirror.Controls.Add(this.magicMirror); this.magicMirror.Dock = DockStyle.Fill; this.btnNext.Visible = false; this.btnPrevious.Visible = false; this.tsslPages.Visible = false; //加入文件夹图标,未知文件的图标,mp3图标,jpg图标。 this.imgIcon.Images.Add("f", GetSystemIcon.GetFolderIcon(false)); this.imgIcon.Images.Add("u", GetSystemIcon.GetUnknownFileIcon(false)); this.imgIcon.Images.Add(".mp3", GetSystemIcon.GetIconByFileType(".mp3", false)); this.imgIcon.Images.Add(".jpg", GetSystemIcon.GetIconByFileType(".jpg", false)); this.imgIcon.Images.Add(".txt", GetSystemIcon.GetIconByFileType(".txt", false)); this.imgIcon.Images.Add("artist", Properties.Resources.artist); }