private void MakeDir()
        {
            // Get input string
            string verStr = "";

            GetUserInputString(ref verStr);

            // Ask user confirmation
            string path = sourceFolder + "\\" + verStr;

            try
            {
                // Determine whether the directory exists.
                if (Directory.Exists(path))
                {
                    GUIDialogOK dlgOk = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK);
                    dlgOk.SetHeading(119);
                    dlgOk.SetLine(1, 2224);
                    dlgOk.SetLine(2, "");
                    dlgOk.DoModal(m_dwParentWindowID);
                }
                else
                {
                    DirectoryInfo di = Directory.CreateDirectory(path);
                }
            }
            catch (Exception)
            {
                ShowErrorDialog(119, path);
            }
        }
        private void ShowErrorDialog(int iError, string SourceOfError)
        {
            GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)Window.WINDOW_DIALOG_OK);

            if (dlgOK != null)
            {
                dlgOK.SetHeading(iError);
                dlgOK.SetLine(1, SourceOfError);
                dlgOK.SetLine(2, 502);
                dlgOK.DoModal(m_dwParentWindowID);
            }
        }
Beispiel #3
0
        void WMP_OnError(object sender, EventArgs e)
        {
            IWMPErrorItem error = wmpCtrl.Error.get_Item(0);

            // error codes see http://msdn.microsoft.com/en-us/library/cc704587(PROT.10).aspx
            Log.Instance.Warn("WMPVideoPlayer Error '{0}': {1}", error.errorCode, error.errorDescription);
            MediaPortal.Dialogs.GUIDialogOK dlg_error = (MediaPortal.Dialogs.GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
            if (dlg_error != null)
            {
                dlg_error.Reset();
                dlg_error.SetHeading(PluginConfiguration.Instance.BasicHomeScreenName);
                dlg_error.SetLine(1, Translation.Instance.Error);
                dlg_error.SetLine(2, error.errorDescription);
                dlg_error.DoModal(GUIWindowManager.ActiveWindow);
            }
            PlaybackEnded();
        }