private void OnOK() { if (m_AppInput != null) { string strRes = txStr.Text; //NoEmpty... if (m_AppInput.GetFlag(1).Length > 0) { strRes = strRes.Trim(); if (strRes.Length == 0) { MessageBox.Show("Value must not be empty!"); return; } } //FileName... if (m_AppInput.GetFlag(1).Length > 0) { strRes = strRes.Trim(); string strChk = "\\/:*?\"<>|"; foreach (char cChk in strChk) { if (strRes.IndexOf(cChk) >= 0) { MessageBox.Show("Value must not contain characters of '" + strChk + "'!"); return; } } } /* * if( m_bUseHistory ) * { * string sPath = "Software\\Ressive.Hu\\" + csClsName + "\\History"; * sPath += "\\" + m_AppInput.CallerAppTitle; * sPath += "\\" + m_AppInput.ID; * RscRegistry.WriteString( HKEY.HKEY_CURRENT_USER, sPath, "LastOk", txStr.Text ); * * m_RegHistory.Add( txStr.Text ); * m_RegHistory.Flush(); * } */ RscPageArgsRet appOutput = m_AppInput.CreateOutPut(); appOutput.SetFlag(0, "Ok"); appOutput.SetData(0, txStr.Text); appOutput.SetOutput(); } this.NavigationService.GoBack(); }
private void m_btnCleanUp_Click(object sender, System.Windows.RoutedEventArgs e) { if (MessageBoxResult.OK != MessageBox.Show("Do you really want to delete all saved response file (.json)?\n\n(Press Back to Cancel...)")) { return; } // // // logGrid.Visibility = Rsc.Collapsed; m_aTI.CollapseAll(true); // // // // if (m_sUserIDlast.Length > 0) { RscPageArgsRet appInput = new RscPageArgsRet(m_AppArgs, m_AppFrame.AppTitle, m_AppFrame.AppIconRes, "CleanUp"); appInput.SetData(0, csSecretsFolder + "\\" + m_sUserIDlast); appInput.SetData(1, "*.json"); appInput.SetData(2, "recurse"); //appInput.SetData( 2, "" ); appInput.SetData(3, "showHidden"); //appInput.SetData( 3, "" ); appInput.SetData(4, "AutoDelete"); appInput.SetInput("RscViewer_FindFilesV12"); this.NavigationService.Navigate(appInput.GetNavigateUri(csViewersAssy)); } // // // }
private void btnMsg_Click(object sender, System.Windows.RoutedEventArgs e) { txOut.Text = "NavigationService.Navigate..."; RscPageArgsRet appInput = new RscPageArgsRet(appArgs, "Rsc Dlg Test V1.0", "Images/Ico001_Ressive.jpg", "ABC"); appInput.SetData(0, txIn.Text); appInput.SetInput("RscDlg_MsgBoxV10"); this.NavigationService.Navigate(appInput.GetNavigateUri("Lib_RscIPgC_Dlgs")); }
private void m_tmrBrowse_Tick(object sender, System.EventArgs e) { m_tmrBrowse.Stop(); RscPageArgsRet appInput = new RscPageArgsRet(appArgs, m_AppFrame.AppTitle, m_AppFrame.AppIconRes, "FullPath"); appInput.SetFlag(0, "video folder path"); appInput.SetFlag(1, "NoEmpty"); appInput.SetFlag(2, "FileName"); appInput.SetData(0, m_Root.FullPath); appInput.SetInput("RscDlg_FolderInputV10"); this.NavigationService.Navigate(appInput.GetNavigateUri(csDlgsAssy)); }
private void m_tmrInput_Tick(object sender, System.EventArgs e) { m_tmrInput.Stop(); RscPageArgsRet appInput = new RscPageArgsRet(m_AppArgs, /*m_AppFrame.AppTitle*/ "FTP access", m_AppFrame.AppIconRes, "FtpHost"); appInput.SetFlag(0, "FTP hostname"); appInput.SetFlag(1, "NoEmpty"); //appInput.SetFlag( 2, "FileName" ); appInput.SetData(0, txSvrIP.Text); appInput.SetInput("RscDlg_FtpHostInputV10"); this.NavigationService.Navigate(appInput.GetNavigateUri(csDlgsAssy)); }
private void m_tmrFolder_Tick(object sender, System.EventArgs e) { m_tmrFolder.Stop(); RscPageArgsRet appInput = new RscPageArgsRet(m_AppArgs, m_AppFrame.AppTitle, m_AppFrame.AppIconRes, "txNewFolder"); appInput.SetFlag(0, "new directory name"); appInput.SetFlag(1, "NoEmpty"); appInput.SetFlag(2, "FileName"); appInput.SetData(0, ""); appInput.SetInput("RscDlg_TxtInputV10"); this.NavigationService.Navigate(appInput.GetNavigateUri(csDlgsAssy)); }
private void m_tmrCopyMove_Tick(object sender, System.EventArgs e) { m_tmrCopyMove.Stop(); RscPageArgsRet appInput = new RscPageArgsRet(m_AppArgs, m_AppFrame.AppTitle, m_AppFrame.AppIconRes, "CopyMove"); appInput.SetFlag(0, m_sCopyMove + " to destination folder"); appInput.SetFlag(1, "NoEmpty"); appInput.SetFlag(2, "FileName"); appInput.SetData(0, ""); appInput.SetInput("RscDlg_FolderInputV10"); this.NavigationService.Navigate(appInput.GetNavigateUri(csDlgsAssy)); }
private void m_tmrRename_Tick(object sender, System.EventArgs e) { m_tmrRename.Stop(); if (m_files.Count != 1) { return; } RscFileItemDesc it = m_files[0]; RscPageArgsRet appInput = new RscPageArgsRet(m_AppArgs, m_AppFrame.AppTitle, m_AppFrame.AppIconRes, "txRenameTo"); appInput.SetFlag(0, it.strFileName); appInput.SetFlag(1, "NoEmpty"); appInput.SetFlag(2, "FileName"); appInput.SetFlag(3, "no history"); appInput.SetData(0, it.strFileName); appInput.SetInput("RscDlg_TxtInputV10"); this.NavigationService.Navigate(appInput.GetNavigateUri(csDlgsAssy)); }
private void DoOk(string sCustRes = "") { string sPath = "Software\\Ressive.Hu\\" + csClsName + "\\History"; sPath += "\\" + m_AppInput.CallerAppTitle; sPath += "\\" + m_AppInput.ID; RscRegistry.WriteString(HKEY.HKEY_CURRENT_USER, sPath, "LastOk", txSvrIP.Text); m_RegHistory.Add(txSvrIP.Text); m_RegHistory.Flush(); if (sCustRes.Length == 0) { sCustRes = txSvrIP.Text; } RscPageArgsRet appOutput = m_AppInput.CreateOutPut(); appOutput.SetFlag(0, "Ok"); appOutput.SetData(0, sCustRes); //txSvrIP.Text ); appOutput.SetOutput(); this.NavigationService.GoBack(); }
private void m_Image_Click(object sender, System.Windows.RoutedEventArgs e) { if (m_bIsInSwipe) { return; } m_bIsInSwipe = false; Button btn = (Button)sender; string sId = (string)btn.Tag; string [] asID = sId.Split('|'); int iYcurr = Int32.Parse(asID[0]); int iXcurr = Int32.Parse(asID[1]); if (m_a[iYcurr].m_a[iXcurr].FsItem.Folder) { m_iTop = 0; m_iYCur = -1; m_iXCur = -1; m_Root = m_a[iYcurr].m_a[iXcurr].FsItem; m_btnUp.Visibility = Rsc.Visible; BuildListEx(); } else { m_iYCur = iYcurr; m_iXCur = iXcurr; string strFileGroupCurr = RscRegFs.GetFileGroupEx(m_a[iYcurr].m_a[iXcurr].FsItem.FileExt); switch (strFileGroupCurr) { case "Video.Native": case "Video": { RscPageArgsRetManager appArgs = new RscPageArgsRetManager(); RscPageArgsRet appInput = new RscPageArgsRet(appArgs, m_AppFrame.AppTitle, m_AppFrame.AppIconRes, "Open"); //DeBug... //m_AppFrame.TRACE = m_a.Count.ToString(); int iIdx = 0; int i = -1; for (int iY = 0; iY < m_a.Count; iY++) { for (int iX = 0; iX < m_iCX; iX++) { if (m_a[iY].m_a[iX].Name != "blank") { string strFileGroup = RscRegFs.GetFileGroupEx(m_a[iY].m_a[iX].FsItem.FileExt); switch (strFileGroup) { case "Video.Native": { i++; appInput.SetData(i, m_a[iY].m_a[iX].FsItem.FullPath); if (iY == iYcurr && iX == iXcurr) { iIdx = i; } break; } } } } } appInput.SetFlag(0, iIdx.ToString()); appInput.SetFlag(1, LayoutRoot.ActualWidth.ToString()); appInput.SetFlag(2, LayoutRoot.ActualHeight.ToString()); appInput.SetInput(RscRegFs.GetViewerAppPageName(strFileGroupCurr)); this.NavigationService.Navigate(appInput.GetNavigateUri(RscRegFs.GetViewerAppAssyName(strFileGroupCurr))); break; } default: MessageBox.Show("No open action defined for file type."); break; } } /* * if( m_a[ iYcurr ].m_a[ iXcurr ].Checked ) * { * MassCheck( iYcurr, iYcurr, iXcurr, iXcurr, false ); * } * else * { * MassCheck( iYcurr, iYcurr, iXcurr, iXcurr, true ); * } */ }
private void m_btnLogOut_Click(object sender, System.Windows.RoutedEventArgs e) { if (MessageBoxResult.OK != MessageBox.Show("Do you really want to log out\nand to delete all saved response files (.json)\nand browser chache?\n\n(Press Back to Cancel...)")) { return; } // // // logGrid.Visibility = Rsc.Collapsed; m_aTI.CollapseAll(true); // // // // m_gAuth.Logout(); RscStore store = new RscStore(); store.CreateFolderPath(csSecretsFolder); //Otherwise able to logon on next run... store.DeleteFile(csSecretsFolder + "\\" + "AUTH.xml"); // // // // //NOTE: Deleting all IE folders WILL NOT force the user to reenter eMail + Pw!!! string sIeCacheFolders = ";" + RscStore_IsoStore.Get_IE_Cache_FolderList(';'); sIeCacheFolders = sIeCacheFolders.Replace(";", ";A:\\"); // // // // if (m_sUserIDlast.Length > 0) { RscPageArgsRet appInput = new RscPageArgsRet(m_AppArgs, m_AppFrame.AppTitle, m_AppFrame.AppIconRes, "LogOut"); appInput.SetData(0, csSecretsFolder + "\\" + m_sUserIDlast + sIeCacheFolders); appInput.SetData(1, "*.*"); appInput.SetData(2, "recurse"); //appInput.SetData( 2, "" ); appInput.SetData(3, "showHidden"); //appInput.SetData( 3, "" ); appInput.SetData(4, "AutoDelete"); appInput.SetInput("RscViewer_FindFilesV12"); this.NavigationService.Navigate(appInput.GetNavigateUri(csViewersAssy)); } // // // }
private void m_btnSaveToPhone_Click(object sender, System.Windows.RoutedEventArgs e) { if (m_iIndex < 0) { return; } if (m_iIndex >= m_aVideos.Count) { return; } string sPath = m_aVideos[m_iIndex]; // // // string sTnPath = ""; int iPos = sPath.LastIndexOf('\\'); if (iPos < 0) { iPos = 0; } else { iPos++; } int iPos2 = sPath.LastIndexOf('.'); if (iPos2 >= 0) { if (iPos > 0) { sTnPath += sPath.Substring(0, iPos); } sTnPath += "tn\\"; sTnPath += sPath.Substring(iPos, iPos2 - iPos); sTnPath += ".tn"; sTnPath += ".jpg"; //sPath.Substring( iPos2 ); } // // // RscStore store = new RscStore(); if (!store.FileExists(sTnPath)) { sTnPath = ""; } //MessageBox.Show( sPath + "\r\n" + sTnPath ); RscPageArgsRet appInput = new RscPageArgsRet(m_AppArgs, ApplicationTitle.Text, "Images/Ico001_Ressive.jpg", "SaveToPhone"); appInput.SetData(0, sPath); appInput.SetData(1, sTnPath); appInput.SetInput("RscDC_FlashV10"); this.NavigationService.Navigate(appInput.GetNavigateUri("RscDC")); }