Esempio n. 1
0
        private void LoadFromReg( )
        {
            if (txSvrIP.Text.Length == 0)
            {
                return;
            }

            txSvrPort.Text = RscRegistry.ReadString(HKEY.HKEY_CURRENT_USER,
                                                    "Software\\Ressive.Hu\\RscFtp_ExplorerV11" + "\\" + txSvrIP.Text,
                                                    "Port", 2221.ToString( ));

            txUsr.Text = RscRegistry.ReadString(HKEY.HKEY_CURRENT_USER,
                                                "Software\\Ressive.Hu\\RscFtp_ExplorerV11" + "\\" + txSvrIP.Text,
                                                "Usr", "usr");

            //Do not store...
            txPwd.Text = "";

            //WP81 FIX

            /*
             * chbFastConn.IsChecked = RscRegistry.ReadBool( HKEY.HKEY_CURRENT_USER,
             *      "Software\\Ressive.Hu\\RscFtp_ExplorerV11" + "\\" + txSvrIP.Text,
             *      "FastConn", false );
             *
             * chbFastConnEx.IsChecked = RscRegistry.ReadBool( HKEY.HKEY_CURRENT_USER,
             *      "Software\\Ressive.Hu\\RscFtp_ExplorerV11" + "\\" + txSvrIP.Text,
             *      "FastConnEx", false );
             */
        }
Esempio n. 2
0
        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 double GetVol(bool bSet = false)
        {
            int iMuteOn;

            if (bSet)
            {
                iMuteOn = 1;                 //True...
                if (vidFull.Volume > 0)
                {
                    iMuteOn = 0;                     //False...
                }
                RscRegistry.WriteDWORD(HKEY.HKEY_CURRENT_USER, "Software\\Ressive.Hu\\RscViewer_MediaV10", "MuteOn", iMuteOn);
            }
            else
            {
                iMuteOn = RscRegistry.ReadDWORD(HKEY.HKEY_CURRENT_USER, "Software\\Ressive.Hu\\RscViewer_MediaV10", "MuteOn", 0);
            }

            if (iMuteOn != 0)
            {
                m_btnMuteOnOff.Image.Source = m_isMuteOn;
                return(0);
            }
            else
            {
                m_btnMuteOnOff.Image.Source = m_isMuteOff;
                return(1);
            }
        }
        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();
        }
Esempio n. 5
0
        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();
            }
        }
        public RscDlg_FtpHostInputV10()
        {
            InitializeComponent();

            m_AppFrame = new RscAppFrame("Ressive.Hu", "FTP Host 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);
            // ///////////////
            imgIpUpIco.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Inc.jpg");
            imgIpDnIco.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Dec.jpg");

            txSvrIP.Text = "";

            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);
                //txSvrIP.Text = m_AppInput.GetData(0);

                if (txSvrIP.Text.Length == 0)
                {
                    string sPath = "Software\\Ressive.Hu\\" + csClsName + "\\History";
                    sPath       += "\\" + m_AppInput.CallerAppTitle;
                    sPath       += "\\" + m_AppInput.ID;
                    txSvrIP.Text = RscRegistry.ReadString(HKEY.HKEY_CURRENT_USER, sPath, "LastOk", "");
                }

                _LoadHistory();
            }
        }
        public RscDlg_TxtInputV10()
        {
            InitializeComponent();

            m_AppFrame = new RscAppFrame("Ressive.Hu", "Text 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);

                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();
            }
        }
        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();
        }
Esempio n. 9
0
        public RscFtp_ExplorerV11()
        {
            InitializeComponent();

            m_AppFrame = new RscAppFrame("Ressive.Hu", "FTP Explorer 1.1", "Images/IcoSm001_FtpTest.jpg"
                                         , this, AppTitleBar, AppStatusBar);
            // ///////////////
            m_AppFrame.OnNext += new Ressive.FrameWork.RscAppFrame.OnNext_EventHandler(m_AppFrame_OnNext);
            // ///////////////
            imgInput.Source   = m_AppFrame.Theme.GetImage("Images/Btn001_Open.jpg");
            imgIpUpIco.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Inc.jpg");
            imgIpDnIco.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Dec.jpg");

            m_txtRemotePath              = new TextBoxDenieEdit(true, true, pathPanel, Grid.ColumnProperty, 0);
            m_txtRemotePath.Background   = new SolidColorBrush(Colors.LightGray);
            m_txtRemotePath.Foreground   = new SolidColorBrush(Colors.Black);
            m_txtRemotePath.FontSize     = 16;
            m_txtRemotePath.MarginOffset = new Thickness(0, 10, 0, 10);
            m_txtRemotePath.Text         = "";

            m_txtLastFile              = new TextBoxDenieEdit(true, true, lastFilePanel, Grid.ColumnProperty, 0);
            m_txtLastFile.Background   = new SolidColorBrush(Colors.LightGray);
            m_txtLastFile.Foreground   = new SolidColorBrush(Colors.Black);
            m_txtLastFile.FontSize     = 16;
            m_txtLastFile.MarginOffset = new Thickness(0, 0, 12, 0);
            m_txtLastFile.Text         = "";

            m_btnRemoteEnter = new RscIconButton(lastFilePanel, Grid.ColumnProperty, 1, 36, 36, Rsc.Visible);
            m_btnRemoteEnter.Image.Source = m_AppFrame.Theme.GetImage("Images/BtnDrk001_(dir).jpg");
            m_btnRemoteEnter.MarginOffset = new Thickness(0, 0, 10, 0);
            m_btnRemoteEnter.Click       += new System.Windows.RoutedEventHandler(m_btnRemoteEnter_Click);

            m_btnDownloadMem = new RscIconButton(lastFilePanel, Grid.ColumnProperty, 2, 36, 36, Rsc.Visible, 0, 0, "Down\r\nMem");
            m_btnDownloadMem.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Empty.jpg");
            m_btnDownloadMem.MarginOffset = new Thickness(0, 0, 10, 0);
            m_btnDownloadMem.Click       += new System.Windows.RoutedEventHandler(m_btnDownloadMem_Click);

            m_btnDownloadFile = new RscIconButton(lastFilePanel, Grid.ColumnProperty, 3, 36, 36, Rsc.Visible, 0, 0, "Down\r\nFile");
            m_btnDownloadFile.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Empty.jpg");
            m_btnDownloadFile.MarginOffset = new Thickness(0, 0, 10, 0);
            m_btnDownloadFile.Click       += new System.Windows.RoutedEventHandler(m_btnDownloadFile_Click);

            m_btnRemoteDel = new RscIconButton(lastFilePanel, Grid.ColumnProperty, 4, 36, 36, Rsc.Visible);
            m_btnRemoteDel.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Delete.jpg");
            m_btnRemoteDel.MarginOffset = new Thickness(0, 0, 10, 0);
            m_btnRemoteDel.Click       += new System.Windows.RoutedEventHandler(m_btnRemoteDel_Click);

            m_btnRemoteDateTime = new RscIconButton(lastFilePanel, Grid.ColumnProperty, 5, 36, 36, Rsc.Visible, 0, 0, "Date\r\nTime");
            m_btnRemoteDateTime.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Empty.jpg");
            m_btnRemoteDateTime.MarginOffset = new Thickness(0, 0, 10, 0);
            m_btnRemoteDateTime.Click       += new System.Windows.RoutedEventHandler(m_btnRemoteDateTime_Click);

            m_btnRemoteList = new RscIconButton(lastFilePanel, Grid.ColumnProperty, 6, 36, 36, Rsc.Visible, 0, 0, "List");
            m_btnRemoteList.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_Empty.jpg");
            m_btnRemoteList.MarginOffset = new Thickness(0, 0, 10, 0);
            m_btnRemoteList.Click       += new System.Windows.RoutedEventHandler(m_btnRemoteList_Click);

            btnNop.FontSize       = 14;
            btnNopSup.FontSize    = 14;
            btnMkD.Content        = "Mk Cnst Dir";
            btnMkD.FontSize       = 14;
            btnPasv.FontSize      = 14;
            btnList.FontSize      = 14;
            btnSendTxt.Content    = "Snd Cnst Txt";
            btnSendTxt.FontSize   = 14;
            btnSendJpg.Content    = "Snd Cnst Jpg";
            btnSendJpg.FontSize   = 14;
            btnSendMem.Content    = "Snd MEM Fle...";
            btnSendMem.FontSize   = 14;
            btnSendFile.Content   = "Snd FLE Fle...";
            btnSendFile.FontSize  = 14;
            btnAddFolder.Content  = "Mk Dir...";
            btnAddFolder.FontSize = 14;

            m_tmrSend          = new DispatcherTimer();
            m_tmrSend.Interval = new TimeSpan(500);
            m_tmrSend.Tick    += new System.EventHandler(m_tmrSend_Tick);

            m_AppArgs = new RscPageArgsRetManager();

            txSvrIP.Text = RscRegistry.ReadString(HKEY.HKEY_CURRENT_USER,
                                                  "Software\\Ressive.Hu\\RscFtp_ExplorerV11", "LastSvrIP", "192.168.0.0");
            LoadFromReg();

            m_ftpc = new RscFtpClient();
            m_ftpc.CommandSocketConnectedAsync += new Ressive.FTP.RscFtpClient.CommandSocketConnectedAsync_EventHandler(m_ftpc_CommandSocketConnectedAsync);
            m_ftpc.ServerResponseAsync         += new Ressive.FTP.RscFtpClient.ServerResponseAsync_EventHandler(m_ftpc_ServerResponseAsync);
            m_ftpc.CommandSentAsync            += new Ressive.FTP.RscFtpClient.CommandSentAsync_EventHandler(m_ftpc_CommandSentAsync);
            m_ftpc.DataSocketConnectedAsync    += new Ressive.FTP.RscFtpClient.DataSocketConnectedAsync_EventHandler(m_ftpc_DataSocketConnectedAsync);
            m_ftpc.ServerDataReceivedAsync     += new Ressive.FTP.RscFtpClient.ServerDataReceivedAsync_EventHandler(m_ftpc_ServerDataReceivedAsync);
            m_ftpc.ServerDataSentAsync         += new Ressive.FTP.RscFtpClient.ServerDataSentAsync_EventHandler(m_ftpc_ServerDataSentAsync);
            m_ftpc.DataSocketClosingAsync      += new Ressive.FTP.RscFtpClient.DataSocketClosingAsync_EventHandler(m_ftpc_DataSocketClosingAsync);
            m_ftpc.CommandDoneAsync            += new Ressive.FTP.RscFtpClient.CommandDoneAsync_EventHandler(m_ftpc_CommandDoneAsync);
            m_ftpc.LogAsync      += new Ressive.FTP.RscFtpClient.LogAsync_EventHandler(m_ftpc_LogAsync);
            m_ftpc.ProgressAsync += new Ressive.FTP.RscFtpClient.ProgressAsync_EventHandler(m_ftpc_ProgressAsync);

            m_tmrFolder          = new DispatcherTimer();
            m_tmrFolder.Interval = new TimeSpan(500);
            m_tmrFolder.Tick    += new System.EventHandler(m_tmrFolder_Tick);

            m_tmrInput          = new DispatcherTimer();
            m_tmrInput.Interval = new TimeSpan(500);
            m_tmrInput.Tick    += new System.EventHandler(m_tmrInput_Tick);

            m_logs.ListBoxAsteriskWidth = 100;
            lbLogs.ItemsSource          = m_logs;
            lbLogs.SizeChanged         += new System.Windows.SizeChangedEventHandler(lbLogs_SizeChanged);

            this.Loaded   += new System.Windows.RoutedEventHandler(RscFtpTestV10_Loaded);
            this.Unloaded += new System.Windows.RoutedEventHandler(RscFtpTestV10_Unloaded);
        }
Esempio n. 10
0
        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();
            }
        }
Esempio n. 11
0
        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)
                    {
                    }
                }
            }
        }
        public RscFileTypesV10()
        {
            InitializeComponent();

            m_AppFrame = new RscAppFrame("Ressive.Hu", "File Types 1.0", "Images/IcoSm001_FileTypes.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);

            ToolBarPanel.Background = new SolidColorBrush(m_AppFrame.Theme.ThemeColors.ToolBarLightBack);

            m_btnExpandAll = new RscIconButton(ToolBarPanel, Grid.ColumnProperty, 0, 50, 50, Rsc.Visible);
            m_btnExpandAll.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_TreeExpand.jpg");
            m_btnExpandAll.Click       += new System.Windows.RoutedEventHandler(m_btnExpandAll_Click);

            m_btnCollapseAll = new RscIconButton(ToolBarPanel, Grid.ColumnProperty, 1, 50, 50, Rsc.Visible);
            m_btnCollapseAll.Image.Source = m_AppFrame.Theme.GetImage("Images/Btn001_TreeCollapse.jpg");
            m_btnCollapseAll.Click       += new System.Windows.RoutedEventHandler(m_btnCollapseAll_Click);

            m_AppFrame.ShowButtonNext(false);

            m_aTI = new RscTreeLbItemList(lbTree, m_AppFrame.Theme, "Images/Btn001_TreeExpand.jpg", "Images/Btn001_TreeCollapse.jpg");

            ContentPanel.SizeChanged += new System.Windows.SizeChangedEventHandler(ContentPanel_SizeChanged);

            // //
            //

            StringArrayHelper sah = new StringArrayHelper();

            string [] asKeys = RscRegistry.GetKeys(HKEY.HKEY_CLASSES_ROOT, "");
            for (int i = 0; i < asKeys.Length; i++)
            {
                string sExt = asKeys[i];
                if (sExt.IndexOf("()") != 0)
                {
                    continue;
                }
                sExt = sExt.Substring(2);
                if (sExt.Length == 0)
                {
                    continue;
                }

                string sGroup = RscRegistry.ReadString(HKEY.HKEY_CLASSES_ROOT,
                                                       "()" + sExt, "Group", "");

                if (sGroup.Length == 0)
                {
                    continue;
                }

                sah.Add(sGroup);
            }

            for (int i = 0; i < sah.m_a.Count; i++)
            {
                TreeLbItem ti = new TreeLbItem(m_aTI, null, "Group", sah.m_a[i]);
                m_aTI.Add(ti);
            }

            //
            // //
        }
            override public void Expand()
            {
                if (ContainerID.Length == 0)
                {
                    return;
                }

                //VERY SLOW!!!
                //m_aTI.PreRefresh();

                PreInserts();

                switch (ContainerID)
                {
                case "ViewerApp":
                {
                    string sGroup = Parent.Title;

                    string     sValue;
                    TreeLbItem ti;

                    sValue = RscRegistry.ReadString(HKEY.HKEY_CLASSES_ROOT,
                                                    "Groups\\" + sGroup, "ViewerAppPageName", "<none>");
                    ti = new TreeLbItem(Holder, this, "", "Page Name", sValue);
                    Insert(ti);

                    sValue = RscRegistry.ReadString(HKEY.HKEY_CLASSES_ROOT,
                                                    "Groups\\" + sGroup, "ViewerAppAssyName", "<none>");
                    ti = new TreeLbItem(Holder, this, "", "Assy Name", sValue);
                    Insert(ti);

                    sValue = "No";
                    if (RscRegistry.ReadBool(HKEY.HKEY_CLASSES_ROOT,
                                             "Groups\\" + sGroup, "ViewerAppAllowList", false))
                    {
                        sValue = "Yes";
                    }
                    ti = new TreeLbItem(Holder, this, "", "Allow List", sValue);
                    Insert(ti);

                    sValue = "No";
                    if (RscRegistry.ReadBool(HKEY.HKEY_CLASSES_ROOT,
                                             "Groups\\" + sGroup, "ViewerAppSendContent", false))
                    {
                        sValue = "Yes";
                    }
                    ti = new TreeLbItem(Holder, this, "", "Send Content", sValue);
                    Insert(ti);

                    break;
                }

                case "Extensions":
                {
                    StringArrayHelper sah    = new StringArrayHelper();
                    string []         asKeys = RscRegistry.GetKeys(HKEY.HKEY_CLASSES_ROOT, "");
                    for (int i = 0; i < asKeys.Length; i++)
                    {
                        string sExt = asKeys[i];
                        if (sExt.IndexOf("()") != 0)
                        {
                            continue;
                        }
                        sExt = sExt.Substring(2);
                        if (sExt.Length == 0)
                        {
                            continue;
                        }

                        string sGroup = RscRegistry.ReadString(HKEY.HKEY_CLASSES_ROOT,
                                                               "()" + sExt, "Group", "");

                        if (sGroup.Length == 0)
                        {
                            continue;
                        }

                        if (sGroup.ToUpper().CompareTo(Parent.Title.ToUpper()) != 0)
                        {
                            continue;
                        }

                        sah.Add(sExt);
                    }

                    for (int i = 0; i < sah.m_a.Count; i++)
                    {
                        TreeLbItem ti = new TreeLbItem(Holder, this, "", "", sah.m_a[i]);
                        Insert(ti);
                    }

                    break;
                }

                case "Group":
                {
                    TreeLbItem ti = new TreeLbItem(Holder, this, "Extensions", "File Extension");
                    Insert(ti);

                    ti = new TreeLbItem(Holder, this, "ViewerApp", "Viewer App");
                    Insert(ti);

                    break;
                }
                }

                base.Expand();
            }