コード例 #1
0
        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));
        }
コード例 #2
0
        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));
        }
コード例 #3
0
        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));
        }
コード例 #4
0
        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));
        }
コード例 #5
0
        private void m_tmrBrowse_Tick(object sender, System.EventArgs e)
        {
            m_tmrBrowse.Stop();

            string strCallerAppTitle   = m_AppFrame.AppTitle;
            string strCallerAppIconRes = m_AppFrame.AppIconRes;

            if (m_AppInput != null)
            {
                strCallerAppTitle   = m_AppInput.CallerAppTitle;
                strCallerAppIconRes = m_AppInput.CallerAppIconRes;
            }

            RscPageArgsRet appInput = new RscPageArgsRet(m_AppArgs,
                                                         strCallerAppTitle, strCallerAppIconRes, "BrowseForFolder");

            appInput.SetFlag(0, "");               //FileType Filter (if empty, folder path browsed)

            /*
             * appInput.SetFlag( 1, "NoEmpty" );
             * appInput.SetFlag( 2, "FileName" );
             * appInput.SetData( 0, m_Root.FullPath );
             */
            appInput.SetInput("RscViewer_FsV12");

            this.NavigationService.Navigate(appInput.GetNavigateUri(csViewersAssy));
        }
コード例 #6
0
 private void PrepareExit()
 {
     if (m_AppInput != null)
     {
         RscPageArgsRet appOutput = m_AppInput.CreateOutPut();
         appOutput.SetFlag(0, "Ok");
         appOutput.SetOutput();
     }
 }
コード例 #7
0
        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();
        }
コード例 #8
0
        private void m_AppFrame_OnExit(object sender, EventArgs e)
        {
            if (m_AppInput != null)
            {
                RscPageArgsRet appOutput = m_AppInput.CreateOutPut();
                appOutput.SetFlag(0, "Exit");
                appOutput.SetOutput();
            }

            this.NavigationService.GoBack();
        }
コード例 #9
0
        private void btnClose_Click(object sender, System.Windows.RoutedEventArgs e)
        {
            if (m_AppInput != null)
            {
                RscPageArgsRet appOutput = m_AppInput.CreateOutPut();
                appOutput.SetFlag(0, "Close");
                appOutput.SetOutput();
            }

            this.NavigationService.GoBack();
        }
コード例 #10
0
        protected override void OnBackKeyPress(CancelEventArgs e)
        {
            base.OnBackKeyPress(e);

            if (m_AppInput != null)
            {
                RscPageArgsRet appOutput = m_AppInput.CreateOutPut();
                appOutput.SetFlag(0, "Back");
                appOutput.SetOutput();
            }

            //e.Cancel = true;
        }
コード例 #11
0
        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));
        }
コード例 #12
0
        private void btnTxt_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", "DEF");

            appInput.SetFlag(0, "sample data input");
            appInput.SetData(0, txIn.Text);
            appInput.SetInput("RscDlg_TxtInputV10");

            this.NavigationService.Navigate(appInput.GetNavigateUri("Lib_RscIPgC_Dlgs"));
        }
コード例 #13
0
        private void OnCancel()
        {
            if (m_AppInput != null)
            {
                RscPageArgsRet appOutput = m_AppInput.CreateOutPut();
                appOutput.SetFlag(0, "Cancel");
                appOutput.SetOutput();

                //Maybe user deleted some items...
                m_RegHistory.Flush();
            }

            this.NavigationService.GoBack();
        }
コード例 #14
0
        protected override void OnBackKeyPress(CancelEventArgs e)
        {
            base.OnBackKeyPress(e);

            if (m_AppInput != null)
            {
                RscPageArgsRet appOutput = m_AppInput.CreateOutPut();
                appOutput.SetFlag(0, "Back");
                appOutput.SetOutput();

                //Maybe user deleted some items...
                m_RegHistory.Flush();
            }

            //e.Cancel = true;
        }
コード例 #15
0
        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();
        }
コード例 #16
0
        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 );
             * }
             */
        }