protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { if (m_AppArgs.Waiting) { RscPageArgsRet appOutput = m_AppArgs.GetOutput(); if (appOutput != null) { switch (appOutput.ID) { case "BrowseForFolder": if (appOutput.GetFlag(0) == "Ok") { txStr.Text = appOutput.GetData(0); } else { //NOP... } m_AppArgs.Vipe(); break; } } m_AppArgs.Clear(); } }
public RscDlg_MsgBoxV10() { InitializeComponent(); RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); m_AppInput = appArgsMgr.GetInput(csClsName); if (m_AppInput != null) { txMsg.Text = m_AppInput.GetData(0); } }
/* * RscRegistryValueList m_RegHistory; * * bool m_bUseHistory = true; */ public RscDlg_BigInputV10() { InitializeComponent(); m_AppFrame = new RscAppFrame("Ressive.Hu", "Big Input 1.0", "Images/Ico001_Ressive.jpg" , this, AppTitleBar, AppStatusBar); // /////////////// m_AppFrame.OnNext += new Ressive.FrameWork.RscAppFrame.OnNext_EventHandler(m_AppFrame_OnNext); m_AppFrame.OnExit += new Ressive.FrameWork.RscAppFrame.OnExit_EventHandler(m_AppFrame_OnExit); RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); m_AppInput = appArgsMgr.GetInput(csClsName); if (m_AppInput != null) { m_AppFrame.AppTitle = m_AppInput.CallerAppTitle; m_AppFrame.AppIconRes = m_AppInput.CallerAppIconRes; lbStr.Text = m_AppInput.GetFlag(0); txStr.Text = m_AppInput.GetData(0); //FileName... if (m_AppInput.GetFlag(1).Length > 0) { btnClearFn.Visibility = Rsc.Visible; } /* * m_bUseHistory = (m_AppInput.GetFlag(3).Length == 0); * * lbHis.Visibility = Rsc.ConditionalVisibility( m_bUseHistory ); * scrl.Visibility = Rsc.ConditionalVisibility( m_bUseHistory ); * * if( txStr.Text.Length == 0 && m_bUseHistory ) * { * string sPath = "Software\\Ressive.Hu\\" + csClsName + "\\History"; * sPath += "\\" + m_AppInput.CallerAppTitle; * sPath += "\\" + m_AppInput.ID; * txStr.Text = RscRegistry.ReadString( HKEY.HKEY_CURRENT_USER, sPath, "LastOk", "" ); * } * * _LoadHistory(); */ } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { //m_bInThisApp = true; if (!m_bFirstLoad) { return; } m_bFirstLoad = false; RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); m_AppInput = appArgsMgr.GetInput("RscViewer_JSonV10"); if (m_AppInput != null) { m_AppFrame.AppTitle = m_AppInput.CallerAppTitle; m_AppFrame.AppIconRes = m_AppInput.CallerAppIconRes; m_iIndex = 0; if (!Int32.TryParse(m_AppInput.GetFlag(0), out m_iIndex)) { return; } m_aPathes.Clear(); for (int i = 0; i < m_AppInput.DataCount; i++) { string sPath = m_AppInput.GetData(i); m_aPathes.Add(sPath); } if (m_aPathes.Count == 0) { return; } m_iIndex = Math.Min(m_iIndex, m_AppInput.DataCount - 1); m_iIndex = Math.Max(m_iIndex, 0); //appArgsMgr.Vipe(); _ReadTextFile(); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { m_bInThisApp = true; if (!m_bFirstLoad) { return; } m_bFirstLoad = false; RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); m_AppInput = appArgsMgr.GetInput("RscViewer_HexaV10"); if (m_AppInput != null) { m_AppFrame.AppTitle = m_AppInput.CallerAppTitle; m_AppFrame.AppIconRes = m_AppInput.CallerAppIconRes; if (m_stream != null) { m_stream.Close(); m_stream = null; } m_lPos = 0; m_sPath = m_AppInput.GetData(0); //appArgsMgr.Vipe(); RscStore store = new RscStore(); try { m_stream = store.GetReaderStream(m_sPath); } catch (Exception ex) { MessageBox.Show(ex.Message); m_stream = null; } _ShowDump(); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { m_bInThisApp = true; if (appArgs.Waiting) { RscPageArgsRet appOutput = appArgs.GetOutput(); if (appOutput != null) { switch (appOutput.ID) { case "FullPath": if (appOutput.GetFlag(0) == "Ok") { string sPath = appOutput.GetData(0); m_Root = new RscStoreItemFolder(sPath); m_btnUp.Visibility = Rsc.Collapsed; m_iTop = 0; m_iYCur = -1; m_iXCur = -1; m_bIsInSwipe = false; BuildListEx(); } else { //NOP... } break; } } appArgs.Clear(); } }
public RscDlg_FolderInputV10() { InitializeComponent(); m_AppFrame = new RscAppFrame("Ressive.Hu", "Folder Input 1.0", "Images/Ico001_Ressive.jpg" , this, AppTitleBar, AppStatusBar); // /////////////// m_AppFrame.OnNext += new Ressive.FrameWork.RscAppFrame.OnNext_EventHandler(m_AppFrame_OnNext); m_AppFrame.OnExit += new Ressive.FrameWork.RscAppFrame.OnExit_EventHandler(m_AppFrame_OnExit); m_tmrBrowse = new DispatcherTimer(); m_tmrBrowse.Interval = new TimeSpan(500); m_tmrBrowse.Tick += new System.EventHandler(m_tmrBrowse_Tick); m_AppArgs = new RscPageArgsRetManager(); RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); m_AppInput = appArgsMgr.GetInput(csClsName); if (m_AppInput != null) { m_AppFrame.AppTitle = m_AppInput.CallerAppTitle; m_AppFrame.AppIconRes = m_AppInput.CallerAppIconRes; lbStr.Text = m_AppInput.GetFlag(0); txStr.Text = m_AppInput.GetData(0); if (txStr.Text.Length == 0) { string sPath = "Software\\Ressive.Hu\\" + csClsName + "\\History"; sPath += "\\" + m_AppInput.CallerAppTitle; sPath += "\\" + m_AppInput.ID; txStr.Text = RscRegistry.ReadString(HKEY.HKEY_CURRENT_USER, sPath, "LastOk", ""); } _LoadHistory(); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { if (m_AppArgs.Waiting) { RscPageArgsRet appOutput = m_AppArgs.GetOutput(); if (appOutput != null) { switch (appOutput.ID) { case "FtpHost": txSvrIP.Text = appOutput.GetData(0); LoadFromReg(); break; case "txNewFolder": { if (appOutput.GetFlag(0) == "Ok") { m_bLastFileIsFolder = true; string sFile = appOutput.GetData(0); SetLastFile(sFile, true); RscFtpClientCommand cmd = RscFtpClientCommand.CreateFolder(sFile); _Log("21", cmd.ToString()); m_ftpc.SendCommandToServer(cmd); } break; } case "BrowseForFile_MEM": { if (appOutput.GetFlag(0) == "Ok") { string sFilePath = appOutput.GetData(0); string sFile = RscStore.FileOfPath(sFilePath); RscStore store = new RscStore(); System.IO.Stream stream = store.GetReaderStream(sFilePath); SetLastFile(sFile, false, stream.Length); System.IO.MemoryStream ms = new System.IO.MemoryStream((int)stream.Length); stream.CopyTo(ms); stream.Close(); ms.Seek(0, System.IO.SeekOrigin.Begin); RscFtpClientCommand cmd = RscFtpClientCommand.UploadBin(sFile, ms); _SendAutoPASV(cmd); } else { //NOP... } m_AppArgs.Vipe(); break; } case "BrowseForFile_FLE": { if (appOutput.GetFlag(0) == "Ok") { string sFilePath = appOutput.GetData(0); string sFile = RscStore.FileOfPath(sFilePath); RscStore store = new RscStore(); System.IO.Stream stream = store.GetReaderStream(sFilePath); SetLastFile(sFile, false, stream.Length); /* * MemoryStream ms = new MemoryStream((int) stream.Length); * stream.CopyTo(ms); * stream.Close(); * ms.Seek(0, SeekOrigin.Begin); */ RscFtpClientCommand cmd = RscFtpClientCommand.UploadBin(sFile, null, stream); _SendAutoPASV(cmd); } else { //NOP... } m_AppArgs.Vipe(); break; } } } m_AppArgs.Clear(); } }
public RscViewer_FindFilesV12() { InitializeComponent(); m_AppFrame = new RscAppFrame("Ressive.Hu", "Find Files 1.2", "Images/IcoSm001_FindFiles.jpg" , this, AppTitleBar, AppStatusBar); // /////////////// m_AppFrame.OnNext += new Ressive.FrameWork.RscAppFrame.OnNext_EventHandler(m_AppFrame_OnNext); m_AppFrame.OnExit += new Ressive.FrameWork.RscAppFrame.OnExit_EventHandler(m_AppFrame_OnExit); m_AppFrame.OnTimer += new Ressive.FrameWork.RscAppFrame.OnTimer_EventHandler(m_AppFrame_OnTimer); // // m_btnRootFldrBrowse = new RscIconButton(rootFldrGrid, Grid.ColumnProperty, 1, 50, 50, Rsc.Visible); m_btnRootFldrBrowse.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_(dir).jpg"); m_btnRootFldrBrowse.Click += new System.Windows.RoutedEventHandler(m_btnRootFldrBrowse_Click); m_txtRootFldr = new TextBoxDenieEdit(true, true, rootFldrGrid, Grid.ColumnProperty, 2); m_txtRootFldr.Background = new SolidColorBrush(Colors.LightGray); m_txtRootFldr.Foreground = new SolidColorBrush(Colors.Black); m_txtRootFldr.FontSize = 16; m_txtRootFldr.MarginOffset = new Thickness(10, 7, 10, 7); m_txtRootFldr.Text = ""; m_btnRootFldrDelete = new RscIconButton(rootFldrGrid, Grid.ColumnProperty, 3, 50, 50, Rsc.Visible); m_btnRootFldrDelete.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Delete.jpg"); m_btnRootFldrDelete.Click += new System.Windows.RoutedEventHandler(m_btnRootFldrDelete_Click); // // ActionPanel.Background = new SolidColorBrush(m_AppFrame.Theme.ThemeColors.ToolBarLightBack); // // imgRename.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Empty.jpg"); imgCopy.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Empty.jpg"); imgMove.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Empty.jpg"); m_btnDelete = new RscIconButton(ActionPanel, Grid.ColumnProperty, 6, 50, 50, Rsc.Visible); m_btnDelete.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Delete.jpg"); m_btnDelete.Click += new System.Windows.RoutedEventHandler(m_btnDelete_Click); //To cycle AutoOperation... m_btnCycle = new RscIconButton(ActionPanel, Grid.ColumnProperty, 7, 50, 50, Rsc.Collapsed); //m_btnCycle.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Delete.jpg"); m_btnCycle.Click += new System.Windows.RoutedEventHandler(m_btnCycle_Click); // // m_AppArgs = new RscPageArgsRetManager(); m_files.ListBoxAsteriskWidth = 100; lbFiles.ItemsSource = m_files; lbFiles.SizeChanged += new System.Windows.SizeChangedEventHandler(lbFiles_SizeChanged); m_tmrBrowse = new DispatcherTimer(); m_tmrBrowse.Interval = new TimeSpan(500); m_tmrBrowse.Tick += new System.EventHandler(m_tmrBrowse_Tick); m_tmrRename = new DispatcherTimer(); m_tmrRename.Interval = new TimeSpan(500); m_tmrRename.Tick += new System.EventHandler(m_tmrRename_Tick); m_tmrCopyMove = new DispatcherTimer(); m_tmrCopyMove.Interval = new TimeSpan(500); m_tmrCopyMove.Tick += new System.EventHandler(m_tmrCopyMove_Tick); txFilter.Text = "*.*"; chbRecurse.IsChecked = true; RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); m_AppInput = appArgsMgr.GetInput("RscViewer_FindFilesV12"); if (m_AppInput != null) { m_AppFrame.AppTitle = m_AppInput.CallerAppTitle; m_AppFrame.AppIconRes = m_AppInput.CallerAppIconRes; string sInput = m_AppInput.GetData(0); txFilter.Text = m_AppInput.GetData(1); if (txFilter.Text.Length == 0) { txFilter.Text = "*.*"; } chbRecurse.IsChecked = (m_AppInput.GetData(2) == "recurse"); chbShowHidden.IsChecked = (m_AppInput.GetData(3) == "showHidden"); m_sAutoOperation = m_AppInput.GetData(4); if (m_sAutoOperation.Length > 0) { m_asAutoOpPathes = sInput.Split(';'); m_iAutoOpPath = 0; m_txtRootFldr.Text = m_asAutoOpPathes[m_iAutoOpPath]; filterPanel.Visibility = Rsc.Collapsed; ActionPanel.Visibility = Rsc.Collapsed; } else { m_txtRootFldr.Text = sInput; } m_bListOnLoad = true; } this.Loaded += new System.Windows.RoutedEventHandler(RscFindFilesV10_Loaded); txFilter.TextChanged += new System.Windows.Controls.TextChangedEventHandler(txFilter_TextChanged); chbRecurse.Checked += new System.Windows.RoutedEventHandler(chbRecurse_Checked); ContentPanel.SizeChanged += new System.Windows.SizeChangedEventHandler(ContentPanel_SizeChanged); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { if (m_AppArgs.Waiting) { RscPageArgsRet appOutput = m_AppArgs.GetOutput(); if (appOutput != null) { switch (appOutput.ID) { case "RootFldrPath": { if (appOutput.GetFlag(0) == "Ok") { m_txtRootFldr.Text = appOutput.GetData(0); ListFiles(); } else { //NOP... } break; } case "CopyMove": { if (appOutput.GetFlag(0) == "Ok") { m_sCopyMoveDest = appOutput.GetData(0); if (chbRecurse.IsChecked.Value && (m_txtRootFldr.Text.Length == 0 || m_sCopyMoveDest.ToUpper().IndexOf(m_txtRootFldr.Text.ToUpper()) == 0)) { MessageBox.Show("Unable to " + m_sCopyMove + " from parent folder to its' child folder."); } else { m_AppFrame.SetStatusText(m_sCopyMove + "..."); m_AppFrame.StartTimer("copy move files", LayoutRoot, 1, 0, true); } } else { //NOP... } break; } case "txRenameTo": { if (appOutput.GetFlag(0) == "Ok") { RscFileItemDesc it = m_files[0]; string sNewName = appOutput.GetData(0); if (it.strFileName.ToUpper().CompareTo(sNewName.ToUpper()) != 0) { RscStore store = new RscStore(); string sNewPath = it.strParent; if (sNewPath.Length > 0) { sNewPath += "\\"; } sNewPath += sNewName; if (store.FileExists(sNewPath)) { MessageBox.Show("Name already in use!\r\n\r\n" + sNewPath); } else { if (RscStore.ExtensionOfPath(sNewPath).ToUpper().CompareTo(RscStore.ExtensionOfPath(it.Path).ToUpper()) != 0) { if (MessageBoxResult.OK != MessageBox.Show("Do you really want to change type from " + RscStore.ExtensionOfPath(it.Path) + " to " + RscStore.ExtensionOfPath(sNewPath) + "?\r\n\r\n(press Back to cancel)")) { return; } } try { store.MoveFile(it.Path, sNewPath); } catch (Exception exc) { MessageBox.Show("Rename failed!\r\n\r\n" + exc.Message); return; } if (txFilter.Text == it.strFileName) { txFilter.Text = sNewName; } it.strFileName = sNewName; //ReQuery... lbFiles.ItemsSource = null; lbFiles.ItemsSource = m_files; } } } else { //NOP... } break; } } } m_AppArgs.Clear(); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { if (m_AppArgs.Waiting) { RscPageArgsRet appOutput = m_AppArgs.GetOutput(); if (appOutput != null) { switch (appOutput.ID) { case "SndFldrPath": if (appOutput.GetFlag(0) == "Ok") { string sFolderIn = appOutput.GetData(0); m_siInPlayer = null; ClearAllSound(); RscStore store = new RscStore(); string[] fles = RscSort.OrderBy(store.GetFileNames(sFolderIn, "*.*")); foreach (string sFle in fles) { string sExt = RscStore.ExtensionOfPath(sFle); // FIX: To support Tube(HD)'s own local storage Video folder // where files are listed without extension!!! bool bInclude = (sExt == ""); string strFileGroup = RscRegFs.GetFileGroupEx(sExt); switch (strFileGroup) { case "Sound.Native": case "Video.Native": { bInclude = true; break; } } if (bInclude) { SoundInfo si = AddSound(sFolderIn + "\\" + sFle); if (m_siInPlayer == null) { m_siInPlayer = si; } } } if (m_siInPlayer != null) { DoPlay(); } RscRegistry.WriteString(HKEY.HKEY_CURRENT_USER, "Software\\Ressive.Hu\\RscViewer_SoundV11" , "LastOk", sFolderIn); } else { //NOP... } break; } } m_AppArgs.Clear(); } }
private void RscViewer_SoundV10_Loaded(object sender, System.Windows.RoutedEventArgs e) { m_AppFrame.SetNoSleep(true); if (m_bLoaded) { return; } m_bLoaded = true; m_currentPosition.Tick += new System.EventHandler(m_currentPosition_Tick); RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); appInput = appArgsMgr.GetInput(csPageName); if (appInput != null) { m_AppFrame.AppTitle = appInput.CallerAppTitle; m_AppFrame.AppIconRes = appInput.CallerAppIconRes; int iIndex = 0; if (!Int32.TryParse(appInput.GetFlag(0), out iIndex)) { return; } //NOT NEEDED... /* * if( !double.TryParse( appInput.GetFlag(1), out dWidth ) ) return; * if( !double.TryParse( appInput.GetFlag(2), out dHeight ) ) return; */ m_siInPlayer = null; ClearAllSound(); for (int i = 0; i < appInput.DataCount; i++) { SoundInfo si = AddSound(appInput.GetData(i)); if (i == iIndex) { m_siInPlayer = si; } } if (m_siInPlayer != null) { DoPlay(); } //Denie to auto-reload on next start... appArgsMgr.Vipe(); } else { string sLastOk = RscRegistry.ReadString(HKEY.HKEY_CURRENT_USER, "Software\\Ressive.Hu\\RscViewer_SoundV11" , "LastOk", ""); if (sLastOk.Length > 0) { try { m_siInPlayer = null; //DO NOT!!! //ClearAllSound(); RscStore store = new RscStore(); string[] fles = RscSort.OrderBy(store.GetFileNames(sLastOk, "*.*")); foreach (string sFle in fles) { string sExt = RscStore.ExtensionOfPath(sFle); // FIX: To support Tube(HD)'s own local storage Video folder // where files are listed without extension!!! bool bInclude = (sExt == ""); string strFileGroup = RscRegFs.GetFileGroupEx(sExt); switch (strFileGroup) { case "Sound.Native": case "Video.Native": { bInclude = true; break; } } if (bInclude) { SoundInfo si = AddSound(sLastOk + "\\" + sFle); if (m_siInPlayer == null) { m_siInPlayer = si; } } } //DO NOT!!! /* * if( m_siInPlayer != null ) * { * DoPlay(); * } */ } catch (Exception) { } } } }
//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(); } }
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(); } }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) { m_bInThisApp = true; if (!m_bFirstLoad) { return; } m_bFirstLoad = false; IDictionary <string, string> parameters = this.NavigationContext.QueryString; if (parameters.ContainsKey("folder")) { RscStore store = new RscStore(); string sFolder; sFolder = parameters["folder"]; switch (sFolder) { case "A:\\Contacts": { m_AppFrame.AppTitle = "Contacts"; m_AppFrame.AppIconRes = "Images/IcoSm001_Contacts.jpg"; store.CreateFolderPath(sFolder); string [] asFns = RscSort.OrderBy(store.GetFileNames(sFolder, "*.vcf")); foreach (string sFn in asFns) { string sPath = sFolder + "\\" + sFn; m_aPathes.Add(sPath); } break; } case "A:\\System\\Events": { m_AppFrame.AppTitle = "Events"; m_AppFrame.AppIconRes = "Images/IcoSm001_EventViewer.jpg"; store.CreateFolderPath(sFolder); //INFs string [] asFns = RscSort.OrderBy(store.GetFileNames(sFolder, "*.info")); foreach (string sFn in asFns) { string sPath = sFolder + "\\" + sFn; m_aPathes.Add(sPath); } //ERRORs asFns = RscSort.OrderBy(store.GetFileNames(sFolder, "*.error")); foreach (string sFn in asFns) { string sPath = sFolder + "\\" + sFn; m_aPathes.Add(sPath); } break; } default: { store.CreateFolderPath(sFolder); string [] asFns = RscSort.OrderBy(store.GetFileNames(sFolder, "*.txt")); foreach (string sFn in asFns) { string sPath = sFolder + "\\" + sFn; m_aPathes.Add(sPath); } break; } } if (m_aPathes.Count > 0) { m_iIndex = 0; _ReadTextFile(); } } else if (parameters.ContainsKey("file")) { m_AppFrame.AppTitle = "Contact"; m_AppFrame.AppIconRes = "Images/IcoSm001_Contacts.jpg"; string sPath = parameters["file"]; if (sPath.Length > 0) { m_aPathes.Add(sPath); m_iIndex = 0; _ReadTextFile(); } } else { RscPageArgsRetManager appArgsMgr = new RscPageArgsRetManager(); m_AppInput = appArgsMgr.GetInput("RscViewer_TextV10"); if (m_AppInput != null) { m_AppFrame.AppTitle = m_AppInput.CallerAppTitle; m_AppFrame.AppIconRes = m_AppInput.CallerAppIconRes; m_iIndex = 0; if (!Int32.TryParse(m_AppInput.GetFlag(0), out m_iIndex)) { return; } m_aPathes.Clear(); for (int i = 0; i < m_AppInput.DataCount; i++) { string sPath = m_AppInput.GetData(i); m_aPathes.Add(sPath); } if (m_aPathes.Count == 0) { return; } m_iIndex = Math.Min(m_iIndex, m_AppInput.DataCount - 1); m_iIndex = Math.Max(m_iIndex, 0); //appArgsMgr.Vipe(); _ReadTextFile(); } } }