public RscDC_CamcorderV11() { InitializeComponent(); //MemUsage Optimization... Button GlobalDILholder = Application.Current.Resources["GlobalDIL"] as Button; m_Theme = (RscTheme)GlobalDILholder.Tag; //m_dil = new RscDefaultedImageList( "Theme", "Current", "Default" ); m_isChbOn = m_Theme.GetImage("Images/CheckOn.jpg"); m_isChbOff = m_Theme.GetImage("Images/CheckOff.jpg"); m_btnRecStart = new RscIconButton(shotGrid, Grid.ColumnProperty, 0, 50, 50, Rsc.Collapsed); m_btnRecStart.Image.Source = m_Theme.GetImage("Images/Btn001_Rec.jpg"); m_btnRecStart.Click += new System.Windows.RoutedEventHandler(m_btnRecStart_Click); m_btnRecStop = new RscIconButton(shotGrid, Grid.ColumnProperty, 2, 50, 50, Rsc.Collapsed); m_btnRecStop.Image.Source = m_Theme.GetImage("Images/Btn001_RecStop.jpg"); m_btnRecStop.Click += new System.Windows.RoutedEventHandler(m_btnRecStop_Click); m_btnFldr = new RscIconButton(toolsGrid, Grid.ColumnProperty, 3, 50, 50, Rsc.Visible); m_btnFldr.Image.Source = m_Theme.GetImage("Images/Ico001_VideoGallery.jpg"); m_btnFldr.Click += new System.Windows.RoutedEventHandler(m_btnFldr_Click); toolsGrid.Visibility = Rsc.Visible; /* * BUGFIX: Unable to start camera, while playing music (Sound Player app)!!! */ MediaElement me = Application.Current.Resources["GlobalMedia"] as MediaElement; switch (me.CurrentState) { case MediaElementState.Closed: case MediaElementState.Stopped: { m_bAlloweToInit = true; break; } default: { if (MessageBoxResult.OK == MessageBox.Show("To start app, internal music player must be stopped!\r\n\r\n(press Back to cancel)")) { Ressive.MediaLib.RscMediaLib.StopMusic(); } else { m_bForceCloseOnInit = true; } m_tmrLaterInit = new DispatcherTimer(); m_tmrLaterInit.Interval = new TimeSpan(1000); m_tmrLaterInit.Tick += new System.EventHandler(m_tmrLaterInit_Tick); m_tmrLaterInit.Start(); break; } } }
public RscTreeLbItemList(ListBox lb, RscTheme Theme, string sImgBtnExpand, string sImgBtnCollapse) { m_Theme = Theme; m_isBtnExpand = Theme.GetImage(sImgBtnExpand); m_isBtnCollapse = Theme.GetImage(sImgBtnCollapse); m_lb = lb; ListBoxAsteriskWidth = 100; m_lb.SizeChanged += new System.Windows.SizeChangedEventHandler(m_lb_SizeChanged); m_lb.ItemsSource = this; }
public RscExtension_PhotoV10() { InitializeComponent(); //MemUsage Optimization... Button GlobalDILholder = Application.Current.Resources["GlobalDIL"] as Button; m_Theme = (RscTheme)GlobalDILholder.Tag; //m_dil = new RscDefaultedImageList( "Theme", "Current", "Default" ); // /////////////// //m_isDummy = m_dil.GetImage("Images/Img001_Dummy.jpg"); m_txtName = new TextBoxDenieEdit(true, true, ToolBar, Grid.ColumnProperty, 0); m_txtName.Background = new SolidColorBrush(Colors.Black); m_txtName.Foreground = new SolidColorBrush(Colors.White); m_txtName.FontSize = 18; m_txtName.Text = " "; m_txtInfo = new TextBoxDenieEdit(true, true, ToolBar, Grid.ColumnProperty, 1); m_txtInfo.Background = new SolidColorBrush(Colors.Black); m_txtInfo.Foreground = new SolidColorBrush(Colors.White); m_txtInfo.FontSize = 18; m_txtInfo.Text = "loading...\r\n\r\n\r\n"; m_btnSave = new RscIconButton(ButtonBar, Grid.RowProperty, 1, 100, 100, Rsc.Collapsed); m_btnSave.Image.Source = m_Theme.GetImage("Images/Btn001_Save.jpg"); m_btnSave.Click += new System.Windows.RoutedEventHandler(m_btnSave_Click); }
private void ContentPanel_SizeChanged(object sender, SizeChangedEventArgs e) { bool bNoChng = (m_sContentPanel.Width == e.NewSize.Width && m_sContentPanel.Height == e.NewSize.Height); m_sContentPanel = e.NewSize; if (!bNoChng) { if (e.NewSize.Width < e.NewSize.Height) { imgBk.Source = m_Theme.GetImage("Images/Bk001_portrait.jpg"); } else { imgBk.Source = m_Theme.GetImage("Images/Bk001_landscape.jpg"); } } }
public RscTouchLogV10() { InitializeComponent(); //MemUsage Optimization... Button GlobalDILholder = Application.Current.Resources["GlobalDIL"] as Button; m_Theme = (RscTheme)GlobalDILholder.Tag; //m_dil = new RscDefaultedImageList( "Theme", "Current", "Default" ); imgTestArea.Source = m_Theme.GetImage("Images/Bk001_portrait.jpg"); Touch.FrameReported += new System.Windows.Input.TouchFrameEventHandler(Touch_FrameReported); }
public RscAppFrame(string sCompany, string sAppName, string sAppIconRes, PhoneApplicationPage AppPage, Grid AppTitleBar = null, Grid AppStatusBar = null) { //MemUsage Optimization... Button GlobalDILholder = Application.Current.Resources["GlobalDIL"] as Button; m_Theme = (RscTheme)GlobalDILholder.Tag; //m_DefaultedImageList = new RscDefaultedImageList( "Theme", "Current", "Default" ); m_sCompany = sCompany; m_sAppName = sAppName; m_sAppIconRes = sAppIconRes; m_AppPage = AppPage; m_AppTitleBar = AppTitleBar; m_AppStatusBar = AppStatusBar; /* * foreach( UIElement uie in m_AppTitleBar.Children) * { * switch( uie.GetValue(FrameworkElement.NameProperty).ToString() ) * { * * case "AppIcon" : * ((Image) uie).Source = m_DefaultedImageList.GetImage("Images/Ico001_Explorer4.jpg"); * break; * * } * } */ _BuildAppTitleBar(); _BuildAppStatusBar(); m_isTmrWc = m_Theme.GetImage("Images/Img001_WaitCursor.jpg"); m_tmrApp = new DispatcherTimer(); m_tmrApp.Tick += new System.EventHandler(m_tmrApp_Tick); m_iTmrMax = -1; m_iTmrPos = 0; m_tmrAutoClick = new DispatcherTimer(); m_tmrAutoClick.Tick += new System.EventHandler(m_tmrAutoClick_Tick); }
protected void _BuildAppTitleBar() { if (m_AppTitleBar == null) { return; } //m_AppTitleBar.Margin = new Thickness(0, 0, 0, 4); m_AppTitleBar.Background = new SolidColorBrush(m_Theme.ThemeColors.AppTitleBack); ColumnDefinition cd; cd = new ColumnDefinition(); cd.Width = GridLength.Auto; m_AppTitleBar.ColumnDefinitions.Add(cd); cd = new ColumnDefinition(); cd.Width = GridLength.Auto; m_AppTitleBar.ColumnDefinitions.Add(cd); cd = new ColumnDefinition(); cd.Width = GridLength.Auto; m_AppTitleBar.ColumnDefinitions.Add(cd); cd = new ColumnDefinition(); cd.Width = new GridLength(1, GridUnitType.Star); m_AppTitleBar.ColumnDefinitions.Add(cd); cd = new ColumnDefinition(); cd.Width = GridLength.Auto; m_AppTitleBar.ColumnDefinitions.Add(cd); m_imgAppIcon = new RscIcon(m_AppTitleBar, Grid.ColumnProperty, 0, 36, 36, Rsc.Visible); m_imgAppIcon.Image.Source = m_Theme.GetImage(m_sAppIconRes); m_btnNoSleep = new RscIconButton(m_AppTitleBar, Grid.ColumnProperty, 1, 36, 36, Rsc.Collapsed); m_btnNoSleep.Image.Source = m_Theme.GetImage("Images/IcoSm001_ScreenSaver.jpg"); m_btnNoSleep.Click += new System.Windows.RoutedEventHandler(btnNoSleep_Click); m_btnTools = new RscIconButton(m_AppTitleBar, Grid.ColumnProperty, 2, 36, 36, Rsc.Collapsed); m_btnTools.Image.Source = m_Theme.GetImage("Images/IcoSm001_LauncherMini.jpg"); m_btnTools.Click += new System.Windows.RoutedEventHandler(m_btnTools_Click); m_tbTitle = new TextBlock(); m_tbTitle.Text = AppTitle; m_tbTitle.Foreground = new SolidColorBrush(m_Theme.ThemeColors.AppTitleFore); m_tbTitle.Margin = new Thickness(5); m_tbTitle.TextAlignment = TextAlignment.Center; m_tbTitle.SetValue(Grid.ColumnProperty, 3); m_AppTitleBar.Children.Add(m_tbTitle); RscIconButton btnClose = new RscIconButton(m_AppTitleBar, Grid.ColumnProperty, 4, 36, 36, Rsc.Visible); btnClose.Image.Source = m_Theme.GetImage("Images/Btn001_Close.jpg"); btnClose.Click += new System.Windows.RoutedEventHandler(btnClose_Click); }
//NOT WORKING!!! /* * DispatcherTimer m_tmrGif; * int m_iFrameGif = 0; */ public RscViewer_ImageV10() { InitializeComponent(); try { //MemUsage Optimization... Button GlobalDILholder = Application.Current.Resources["GlobalDIL"] as Button; m_Theme = (RscTheme)GlobalDILholder.Tag; //m_dil = new RscDefaultedImageList( "Theme", "Current", "Default" ); AppIcon.Source = m_Theme.GetImage("Images/Ico001_Ressive.jpg"); AppCloseIcon.Source = m_Theme.GetImage("Images/Btn001_Close.jpg"); //AppNextIcon.Source = m_Theme.GetImage("Images/Btn001_Next.jpg"); // /////////////// m_isDummy = m_Theme.GetImage("Images/Img001_Dummy.jpg"); m_isSaveToPhone = m_Theme.GetImage("Images/Btn001_Save.jpg"); // /////////////// imgPrev.Source = m_Theme.GetImage("Images/BtnDrk001_SkipPrev.jpg"); imgNext.Source = m_Theme.GetImage("Images/BtnDrk001_SkipNext.jpg"); m_btnExtOpen = new RscIconButton(RightBtns, Grid.RowProperty, 1, 54, 54, Rsc.Visible); m_btnExtOpen.Image.Source = m_Theme.GetImage("Images/BtnDrk001_Open.jpg");; m_btnExtOpen.Click += new System.Windows.RoutedEventHandler(m_btnExtOpen_Click); m_btnSaveToPhone = new RscIconButton(LeftBtns, Grid.RowProperty, 1, 54, 54, Rsc.Visible); m_btnSaveToPhone.Image.Source = m_isSaveToPhone; m_btnSaveToPhone.Click += new System.Windows.RoutedEventHandler(m_btnSaveToPhone_Click); //NOT WORKING!!! /* * m_tmrGif = new DispatcherTimer(); * m_tmrGif.Interval = System.TimeSpan.FromSeconds(1); * m_tmrGif.Tick +=new System.EventHandler(m_tmrGif_Tick); */ } catch (Exception e) { m_strInitErr = e.Message; txImgDetails.Text = m_strInitErr; } double dWidth = 480; double dHeight = 800; try { RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); appInput = appArgsMgr.GetInput("RscViewer_ImageV10"); if (appInput != null) { ApplicationTitle.Text = appInput.CallerAppTitle; AppIcon.Source = m_Theme.GetImage(appInput.CallerAppIconRes); m_iIndex = 0; if (!Int32.TryParse(appInput.GetFlag(0), out m_iIndex)) { return; } if (!double.TryParse(appInput.GetFlag(1), out dWidth)) { return; } if (!double.TryParse(appInput.GetFlag(2), out dHeight)) { return; } m_aImages.Clear(); for (int i = 0; i < appInput.DataCount; i++) { string sPath = appInput.GetData(i); m_aImages.Add(sPath); } if (m_aImages.Count == 0) { return; } m_iIndex = Math.Min(m_iIndex, appInput.DataCount - 1); m_iIndex = Math.Max(m_iIndex, 0); } } catch (Exception e) { txImgDetails.Text = e.Message; } if (m_aImages.Count == 0) { imgFull.Stretch = Stretch.None; imgFull.Source = m_isDummy; } else { _ShowImage(m_aImages[m_iIndex], new Size(dWidth, dHeight)); _SetNextAndPrevBtn(); } }
//RscIconButton m_btnSaveToPhone; public RscViewer_MediaV10() { InitializeComponent(); m_AppArgs = new RscPageArgsRetManager(); try { //MemUsage Optimization... Button GlobalDILholder = Application.Current.Resources["GlobalDIL"] as Button; m_Theme = (RscTheme)GlobalDILholder.Tag; //m_dil = new RscDefaultedImageList( "Theme", "Current", "Default" ); AppIcon.Source = m_Theme.GetImage("Images/Ico001_Ressive.jpg"); AppCloseIcon.Source = m_Theme.GetImage("Images/Btn001_Close.jpg"); //AppNextIcon.Source = m_Theme.GetImage("Images/Btn001_Next.jpg"); // /////////////// m_isDummy = m_Theme.GetImage("Images/Img001_Dummy.jpg"); m_isSaveToPhone = m_Theme.GetImage("Images/Btn001_Save.jpg"); m_isMuteOff = m_Theme.GetImage("Images/Btn001_MuteOff.jpg"); m_isMuteOn = m_Theme.GetImage("Images/Btn001_MuteOn.jpg"); // /////////////// imgPrev.Source = m_Theme.GetImage("Images/BtnDrk001_SkipPrev.jpg"); imgNext.Source = m_Theme.GetImage("Images/BtnDrk001_SkipNext.jpg"); // /////////////// imgPlay.Source = m_Theme.GetImage("Images/Btn001_Play.jpg"); imgPause.Source = m_Theme.GetImage("Images/Btn001_Pause.jpg"); imgStop.Source = m_Theme.GetImage("Images/Btn001_Stop.jpg"); m_btnMuteOnOff = new RscIconButton(RightBtns, Grid.RowProperty, 2, 54, 54, Rsc.Collapsed); m_btnMuteOnOff.Image.Source = m_isSaveToPhone; m_btnMuteOnOff.Click += new System.Windows.RoutedEventHandler(m_btnMuteOnOff_Click); m_btnExtOpen = new RscIconButton(LeftBtns, Grid.RowProperty, 2, 54, 54, Rsc.Visible); m_btnExtOpen.Image.Source = m_Theme.GetImage("Images/BtnDrk001_Open.jpg");; m_btnExtOpen.Click += new System.Windows.RoutedEventHandler(m_btnExtOpen_Click); //WP81 FIX... /* * m_btnSaveToPhone = new RscIconButton(LeftBtns, Grid.RowProperty, 0, 54, 54, Rsc.Collapsed); * m_btnSaveToPhone.Image.Source = m_isSaveToPhone; * m_btnSaveToPhone.Click += new System.Windows.RoutedEventHandler(m_btnSaveToPhone_Click); */ } catch (Exception e) { m_strInitErr = e.Message; txImgDetails.Text = m_strInitErr; } /* * BUGFIX: Unable to start camera, while playing music (Sound Player app)!!! */ MediaElement me = Application.Current.Resources["GlobalMedia"] as MediaElement; switch (me.CurrentState) { case MediaElementState.Closed: case MediaElementState.Stopped: { m_bAlloweToInit = true; break; } default: { if (MessageBoxResult.OK == MessageBox.Show("To start app, internal music player must be stopped!\r\n\r\n(press Back to cancel)")) { Ressive.MediaLib.RscMediaLib.StopMusic(); } else { m_bForceCloseOnInit = true; } m_tmrLaterInit = new DispatcherTimer(); m_tmrLaterInit.Interval = new TimeSpan(1000); m_tmrLaterInit.Tick += new System.EventHandler(m_tmrLaterInit_Tick); m_tmrLaterInit.Start(); break; } } this.Loaded += new System.Windows.RoutedEventHandler(RscVideoGalleryV10_Loaded); }
private void DoLoad() { vidFull.MediaFailed += new System.EventHandler <System.Windows.ExceptionRoutedEventArgs>(vidFull_MediaFailed); vidFull.MediaOpened += new RoutedEventHandler(vidFull_MediaOpened); vidFull.CurrentStateChanged += new System.Windows.RoutedEventHandler(vidFull_CurrentStateChanged); vidFull.MediaEnded += new System.Windows.RoutedEventHandler(vidFull_MediaEnded); m_currentPosition.Tick += new System.EventHandler(m_currentPosition_Tick); vidFull.Volume = GetVol(); m_btnMuteOnOff.Visibility = Rsc.Visible; try { RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); appInput = appArgsMgr.GetInput("RscViewer_MediaV10"); if (appInput != null) { ApplicationTitle.Text = appInput.CallerAppTitle; AppIcon.Source = m_Theme.GetImage(appInput.CallerAppIconRes); m_iIndex = 0; if (!Int32.TryParse(appInput.GetFlag(0), out m_iIndex)) { return; } //NOT NEEDED... /* * if( !double.TryParse( appInput.GetFlag(1), out dWidth ) ) return; * if( !double.TryParse( appInput.GetFlag(2), out dHeight ) ) return; */ m_aVideos.Clear(); for (int i = 0; i < appInput.DataCount; i++) { string sPath = appInput.GetData(i); m_aVideos.Add(sPath); } if (m_aVideos.Count == 0) { return; } m_iIndex = Math.Min(m_iIndex, appInput.DataCount - 1); m_iIndex = Math.Max(m_iIndex, 0); } } catch (Exception e) { txImgDetails.Text = e.Message; } if (m_aVideos.Count != 0) { _ShowVideo(m_aVideos[m_iIndex]); _SetNextAndPrevBtn(); } }