private void timerUpdate_Tick(object sender, EventArgs e) { if (Flag.g_needUpdateContentPanel) { UIContent.GetInstance().UpdateItem(panelContent); Flag.g_needUpdateContentPanel = false; } if (Flag.g_onButtonClick) { labelAlName.Text = Define.g_currentAlgorithm; } if (Flag.g_needUpdateOptionalPanel) { UIContent.GetInstance().UpdateOptionalPanel(panelOptionalControl); Flag.g_needUpdateOptionalPanel = false; } if (Flag.g_processing) { UIContent.GetInstance().UpdatePanelDetail(panelDetail, textboxLog); Flag.g_processing = false; } }
private void ViewCCTV(object sender, MouseButtonEventArgs e) { if (this.Mode != Camera_Final.Mode.CCTV) { this.count--; if (this.count < 0) { //System.Diagnostics.Process p= System.Diagnostics.Process.Start(Application.ResourceAssembly.Location); ProcessStartInfo startInfo = new ProcessStartInfo(Application.ResourceAssembly.Location); startInfo.Arguments = string.Format("-u {0} -mode 2", App.User.Hash); System.Diagnostics.Process.Start(startInfo); Application.Current.Shutdown(); } // if (!isLoadCCTV) this.LoadCCTVLayout(); EasyTimer.SetTimeout(() => { if (App.setting.AutoRecord) { this.autoRecord(); } }, 3500); UIContent.Animation_Translate_Frame(double.NaN, double.NaN, -264, 0, 500, () => { isMenuShow = false; this.UIMap.Animation_Translate_Frame(double.NaN, double.NaN, double.NaN, 768); this.UICCTV.Animation_Translate_Frame(double.NaN, -768, double.NaN, 0); this.Mode = Camera_Final.Mode.CCTV; }); } }
private void frmMain_Load(object sender, EventArgs e) { new UIContent().CreateInstance(); new File(Define.g_prePath + Define.g_configPath).Read(); UIContent.GetInstance().UpdateItem(comboboxAlgorithm); CSNI.g_dataArray = new System.Collections.Generic.List <int>(); }
public override UIContent AddToContainer(UIContentInfo info) { UIContent uIContent = base.AddToContainer(info); uIContent.transform.SetAsFirstSibling(); return(uIContent); }
public bool NavigateTo(UIContent UI) { switch (UI) { default: return(NavigationService.Navigate(new Uri("pack://application:,,,/Views/" + UI.ToString( ) + "View.xaml"))); } }
private void GoToMainMenu() { var mainMenuScreen = Instantiate(mainMenuScreenPrefab, transform); mainMenuScreen.gameManager = this; m_currentScreen = mainMenuScreen; }
private void EndRound() { // Stop tanks from moving. DisableTankControl(); Destroy(m_currentScreen); m_currentScreen = Instantiate(endScreenPrefab, transform); }
private void UIMenuClick(object sender, MouseButtonEventArgs e) { if (isMenuShow) { UIContent.Animation_Translate_Frame(double.NaN, double.NaN, -264, 0, 500, () => { isMenuShow = false; }); } else { UIContent.Animation_Translate_Frame(double.NaN, double.NaN, 0, 0, 500, () => { isMenuShow = true; }); } }
private void AddAlarm(object sender, MouseButtonEventArgs e) { UIContent.Animation_Translate_Frame(double.NaN, double.NaN, -264, 0, 500, () => { isMenuShow = false; UIAddAlarm uiAlarm = new UIAddAlarm(); uiAlarm.setLeft(0); uiAlarm.setTop(0); uiAlarm.Width = 1366; uiAlarm.Height = 768; uiAlarm.CloseEvent += uiAlarm_CloseEvent; this.UIMapContent.Children.Add(uiAlarm); }); }
private void UserInfo(object sender, MouseButtonEventArgs e) { UIContent.Animation_Translate_Frame(double.NaN, double.NaN, -264, 0, 500, () => { isMenuShow = false; AddUser View = new AddUser(); View.User = App.User; View.CloseEvent += View_CloseEvent; View.setLeft(0); View.setTop(0); View.Width = 1366; View.Height = 768; this.UIMapContent.Children.Add(View); }); }
public override IEnumerator BeforeRemoveFromContainerAnimation(UIContent content) { var effect = content.GetComponentInChildren <UIEffectBase>(); var waitTime = 1f; if (effect) { waitTime = effect.DestroyAnimationTime; yield return(StartCoroutine(effect.Destroy())); } else { yield return(null); } StartCoroutine(AddInfoFromQueue(waitTime)); }
private void ViewMap(object sender, MouseButtonEventArgs e) { foreach (Code.Camera Camera in App.DataCamera.Datas) { CHCNetSDK.NET_DVR_StopRealPlay(Camera.m_lRealHandle); } if (this.Mode != Camera_Final.Mode.MAP) { UIContent.Animation_Translate_Frame(double.NaN, double.NaN, -264, 0, 500, () => { isMenuShow = false; this.UIMap.Animation_Translate_Frame(double.NaN, -768, double.NaN, 0); this.UICCTV.Animation_Translate_Frame(double.NaN, double.NaN, double.NaN, 768); this.Mode = Camera_Final.Mode.MAP; }); } }
public void StartRound() { SpawnAllTanks(); SetCameraTargets(); // Snap the camera's zoom and position to something appropriate for the reset tanks. m_CameraControl.SetStartPositionAndSize(); // As soon as the round begins playing let the players control the tanks. EnableTankControl(); Destroy(m_currentScreen); m_GameScreen = Instantiate(gameScreenPrefab, transform); m_GameScreen.gameManager = this; m_currentScreen = m_GameScreen; }
public void Read() { try { XmlDocument xdoc = new XmlDocument(); xdoc.Load(m_filePath); if (xdoc == null) { Log.ERROR("Cant load xml file {0}", m_filePath); } XmlNode root = xdoc.FirstChild; //Node AlgorithmTitle XmlNode alTitle = root["AlgorithmTitle"]; for (int i = 0; i < alTitle.ChildNodes.Count; i++) { DictionaryStructure tmpDic = new DictionaryStructure(Key.g_name[0], alTitle.ChildNodes[i].InnerText); UIContent.GetInstance().UpdateDataTable(tmpDic); } //Node AlgorithmContent XmlNodeList alContent = root.SelectNodes("AlgorithmContent"); if (alContent.Count == 0) { Log.ERROR("Cant find any nodes like AlgorithmContent"); } else { for (int i = 0; i < alContent.Count; i++) { for (int j = 0; j < alContent[i].ChildNodes.Count; j++) { string key = (alContent[i].Attributes["id"].Value.ToLower() == "sort") ? Key.g_name[1] : Key.g_name[2]; DictionaryStructure tmpDic = new DictionaryStructure(key, alContent[i].ChildNodes[j].InnerText); UIContent.GetInstance().UpdateDataTable(tmpDic); } } } } catch (Exception ex) { Log.ERROR(ex.ToString()); } }
void tmpItem_BrowserMediaEvent(object sender, UserData e) { GridMedia tmpMediaItem = new GridMedia(); tmpMediaItem.BackEvent += tmpMediaItem_BackEvent; tmpMediaItem.Width = 1366; tmpMediaItem.Height = 668; double itemPostion = 0; if (UIContent.Children.Count > 0) { itemPostion = UIContent.Children[UIContent.Children.Count - 1].getLeft(); } tmpMediaItem.setLeft(itemPostion - 1366); tmpMediaItem.setTop(0); tmpMediaItem.User = e; this.UIContent.Children.Add(tmpMediaItem); UIContent.Animation_Translate_Frame(double.NaN, double.NaN, -itemPostion + 1366, double.NaN, 500); }
void Awake() { m_content = transform.GetComponentInChildren <UIContent>(true); OnAwake(); SetContentActiveStatus(false); }
void tmpMediaItem_BackEvent(object sender, EventArgs e) { double itemPostion = UIContent.getLeft(); UIContent.Animation_Translate_Frame(double.NaN, double.NaN, itemPostion - 1366, double.NaN, 500, () => { this.UIContent.Children.RemoveAt(1); }); }
private void MenuItem_ClickEvent(object sender, EventArgs e) { UIView.MenuItem item = sender as UIView.MenuItem; this.disableMenu(item); double time = 100; double position = this.UIContent.getLeft(); double itemPostion = 0; if (UIContent.Children.Count > 0) { itemPostion = UIContent.Children[UIContent.Children.Count - 1].getLeft(); } UIContent.Animation_Translate_Frame(double.NaN, double.NaN, position, double.NaN, time, () => { if (UIContent.Children.Count > 1) { this.UIContent.Children.RemoveAt(0); } switch (item.Code) { case "User": // this.UIContent.Children.Clear(); GridViewUser tmpItem = new GridViewUser(); tmpItem.BrowserMediaEvent += tmpItem_BrowserMediaEvent; tmpItem.BrowserCameraEvent += tmpItem_BrowserCameraEvent; tmpItem.Width = 1366; tmpItem.Height = 668; tmpItem.setLeft(itemPostion + 1366); tmpItem.setTop(0); this.UIContent.Children.Add(tmpItem); break; case "Media": // this.UIContent.Children.Clear(); GridMedia tmpMediaItem = new GridMedia(); tmpMediaItem.Width = 1366; tmpMediaItem.Height = 668; tmpMediaItem.setLeft(itemPostion + 1366); tmpMediaItem.setTop(0); tmpMediaItem.User = null; this.UIContent.Children.Add(tmpMediaItem); break; case "Camera": // this.UIContent.Children.Clear(); GridMedia tmpCameraItem = new GridMedia(); tmpCameraItem.Width = 1366; tmpCameraItem.Height = 668; tmpCameraItem.setLeft(itemPostion + 1366); tmpCameraItem.setTop(0); tmpCameraItem.TypeMedia = 2; this.UIContent.Children.Add(tmpCameraItem); break; case "Device": // this.UIContent.Children.Clear(); GridViewDevice tmpDeviceItem = new GridViewDevice(); tmpDeviceItem.Width = 1366; tmpDeviceItem.Height = 668; tmpDeviceItem.setLeft(itemPostion + 1366); tmpDeviceItem.setTop(0); this.UIContent.Children.Add(tmpDeviceItem); break; case "Schedule": // this.UIContent.Children.Clear(); MTC_Server.UIView.Schedule.UISchedule tmpCalendar = new UIView.Schedule.UISchedule(); tmpCalendar.Width = 1366; tmpCalendar.Height = 668; tmpCalendar.setLeft(itemPostion + 1366); tmpCalendar.setTop(0); this.UIContent.Children.Add(tmpCalendar); break; case "Playlist": // this.UIContent.Children.Clear(); MTC_Server.UIView.Playlist.GridPlaylist tmpPlaylist = new MTC_Server.UIView.Playlist.GridPlaylist(); tmpPlaylist.Width = 1366; tmpPlaylist.Height = 668; tmpPlaylist.setLeft(itemPostion + 1366); tmpPlaylist.setTop(0); this.UIContent.Children.Add(tmpPlaylist); break; case "About": About window = new About(); window.Show(); return; } this.UIContent.Animation_Translate_Frame(double.NaN, double.NaN, -itemPostion - 1366, double.NaN, 600, () => { if (UIContent.Children.Count != 0) { this.UIContent.Children.RemoveAt(0); } }); }); }
private void buttonRandom_Click(object sender, EventArgs e) { UIContent.GetInstance().OnRandomClick(textboxRandomArrayNumber, panelGraphic2, textboxLog); }
private void comboboxAlgorithm_SelectedValueChanged(object sender, EventArgs e) { UIContent.GetInstance().UpdateDataConfig(new DictionaryStructure(Key.g_name[0], comboboxAlgorithm.Text.ToString())); Flag.g_needUpdateContentPanel = true; }