Esempio n. 1
0
        internal static DialogResult ShowAsterisk(string text, string message = "Message")
        {
            DialogResult result = FlexibleMessageBox.Show(text + "\r\n", message, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);

            return(result);
        }
Esempio n. 2
0
        private void ConvertAll(DIDXSection didxSection)
        {
            if (InvokeRequired == true)
            {
                Invoke((MethodInvoker) delegate
                {
                    UseWaitCursor = true;
                });
            }

            string dirExt  = Program.ExtractPath(Program.FilePath);
            string dirType = Path.Combine(dirExt, "MemFile");
            string dirBnk  = _Description;

            if (dirBnk.StartsWith("/") == true)
            {
                dirBnk = dirBnk.Substring(1);
            }
            dirBnk = dirBnk.Replace("/", "\\");
            dirBnk = Path.Combine(dirType, Path.GetDirectoryName(dirBnk), Path.GetFileNameWithoutExtension(dirBnk));

            if (!Directory.Exists(dirBnk))
            {
                Directory.CreateDirectory(dirBnk);
            }

            StringBuilder sb = new StringBuilder();

            foreach (WEMFile wem in didxSection.DIDXFiles)
            {
                string wemName = wem.Name;
                string sndFile = ConvertWemToWav(wem, true, 10);
                if (sndFile != null)
                {
                    string soundRename = Path.Combine(dirBnk, Path.ChangeExtension(wem.Name, Path.GetExtension(sndFile)));
                    try
                    {
                        if (File.Exists(soundRename))
                        {
                            File.Delete(soundRename);
                            System.Threading.Thread.Sleep(10);
                        }

                        File.Move(sndFile, Path.Combine(dirBnk, soundRename));
                    }
                    catch { }
                }

                sb.AppendFormat("{0} to {1} {2}\r\n", wemName, Path.GetExtension(sndFile), sndFile != null ? "ok" : "error");
            }

            if (InvokeRequired == true)
            {
                Invoke((MethodInvoker) delegate
                {
                    UseWaitCursor = false;
                });
            }

            FlexibleMessageBox.Show("Output: " + dirBnk + "\r\n\n" + sb.ToString() + "\r\nCompleted.", "Conversion", MessageBoxButtons.OK);
        }
Esempio n. 3
0
        internal static DialogResult ShowError(string text, string message = "Error")
        {
            DialogResult result = FlexibleMessageBox.Show(text + "\r\n", message, MessageBoxButtons.OK, MessageBoxIcon.Error);

            return(result);
        }