private void SaveToReg() { RscRegistry.WriteString(HKEY.HKEY_CURRENT_USER, "Software\\Ressive.Hu\\RscFtp_ExplorerV11", "LastSvrIP", txSvrIP.Text); RscRegistry.WriteString(HKEY.HKEY_CURRENT_USER, "Software\\Ressive.Hu\\RscFtp_ExplorerV11" + "\\" + txSvrIP.Text, "Port", txSvrPort.Text); RscRegistry.WriteString(HKEY.HKEY_CURRENT_USER, "Software\\Ressive.Hu\\RscFtp_ExplorerV11" + "\\" + txSvrIP.Text, "Usr", txUsr.Text); //Do not store... //txPwd.Text = ""; //WP81 FIX /* * RscRegistry.WriteBool( HKEY.HKEY_CURRENT_USER, * "Software\\Ressive.Hu\\RscFtp_ExplorerV11" + "\\" + txSvrIP.Text, * "FastConn", chbFastConn.IsChecked.Value ); * * RscRegistry.WriteBool( HKEY.HKEY_CURRENT_USER, * "Software\\Ressive.Hu\\RscFtp_ExplorerV11" + "\\" + txSvrIP.Text, * "FastConnEx", chbFastConnEx.IsChecked.Value ); */ }
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 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(); }
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(); } }