Ejemplo n.º 1
0
        public Window_Info(PresentationOutput output)
        {
            InitializeComponent();

            LCreated.Content        = output.CreatedTime.ToShortDateString() + "   " + output.CreatedTime.ToLongTimeString();
            LPages.Content          = output.PresentationPagesCount;
            LBPages.Content         = output.Pages.Count;
            LCX.Content             = "" + output.W;
            LCY.Content             = "" + output.H;
            LScripts.Content        = LocalizationWorker.BoolToYesNo(output.HaveScripts);
            LAllowedScripts.Content = LocalizationWorker.BoolToYesNo(output.ScriptsAllowed);
        }
Ejemplo n.º 2
0
        public Window_FileInformations(DataStore data, string path)
        {
            InitializeComponent();

            R_PageCount.Text = "" + data.pages.Count;

            if (!String.IsNullOrWhiteSpace(path))
            {
                R_FilePath.Text = path;
                R_FileName.Text = System.IO.Path.GetFileNameWithoutExtension(path);
                R_Modified.Text = File.GetLastWriteTime(path).ToLongDateString() + " " + File.GetLastWriteTime(path).ToLongTimeString();
                R_Created.Text  = File.GetCreationTime(path).ToLongDateString() + " " + File.GetCreationTime(path).ToLongTimeString();
                FileInfo fileInfo = new FileInfo(path);
                R_Size.Text           = FileWorker.GetBytesReadable(fileInfo.Length);
                R_EnabledScripts.Text = LocalizationWorker.BoolToYesNo(data.AreScriptsAllowed);
                R_SaveOutput.Text     = LocalizationWorker.BoolToYesNo(data.SaveOutput);
            }
        }
Ejemplo n.º 3
0
        private string GetActionInfo(IActions action)
        {
            if (action != null)
            {
                switch (action.GetActionType())
                {
                case ActionType.Action_Type.GoToPage:
                    if (((Action_GoToPage)action).ToSpecific)
                    {
                        return("- " + ((Action_GoToPage)action).ToPage);
                    }
                    else if (((Action_GoToPage)action).Next)
                    {
                        return("- " + Strings.ResStrings.NextPage);
                    }
                    else
                    {
                        return("- " + Strings.ResStrings.PreviousPage);
                    }

                case ActionType.Action_Type.OpenWeb:
                    return("- " + ((Action_OpenWeb)action).Url);

                case ActionType.Action_Type.ClosePresentation:
                    return("");

                case ActionType.Action_Type.OpenApplication:
                    return("- " + ((Action_OpenApp)action).AppPath);

                case ActionType.Action_Type.ShowMessageBox:
                    return("- " + ((Action_ShowMessageBox)action).Title + " -  [ " + ((Action_ShowMessageBox)action).Text + " ]");

                case ActionType.Action_Type.Sound:

                    if (((Action_Sound)action).Stop)
                    {
                        return("- " + Strings.ResStrings.Stop);
                    }
                    else if (((Action_Sound)action).PlayAgain)
                    {
                        return("- " + Strings.ResStrings.PlayAgainStart);
                    }
                    else
                    {
                        return("- " + Strings.ResStrings.Play + ": [" + ((Action_Sound)action).PathToPlay + " , " +
                               Strings.ResStrings.Repeat + ": " + LocalizationWorker.BoolToYesNo(((Action_Sound)action).Repeat) + "]");
                    }

                case ActionType.Action_Type.LoadPresentation:
                    return("- " + ((Action_LoadPresentation)action).PresentationPath);

                case ActionType.Action_Type.SetVisibility:
                    return("- " + Strings.ResStrings.ID + ": " + ((Action_SetVisibility)action).ID + "  [" + SetVisibilityEnum.GetEnumString(((Action_SetVisibility)action).VisibilityValue) + "]");

                case ActionType.Action_Type.DoAnimation:
                    return("- " + Strings.ResStrings.ID + ": " + ((Action_DoAnimation)action).AnimationID);

                case ActionType.Action_Type.Position:

                    string returnpos = Strings.ResStrings.ID + ": " + ((Action_Position)action).ID + " ";

                    if (((Action_Position)action).ChangeX)
                    {
                        returnpos += "  " + (Strings.ResStrings.AxisX + ": " + MathSignEnum.GetSign(((Action_Position)action).SignX) + " " + ((Action_Position)action).CX + " ");
                    }

                    if (((Action_Position)action).ChangeY)
                    {
                        returnpos += "  " + (Strings.ResStrings.AxisY + ": " + MathSignEnum.GetSign(((Action_Position)action).SignY) + " " + ((Action_Position)action).CY);
                    }

                    return("- " + returnpos);

                case ActionType.Action_Type.NoAction:
                    return("");
                }
            }
            return("-");
        }