Ejemplo n.º 1
0
        public static string GetMtnArg(string screenshotDir, XMLSettingsScreenshot screenshotSettings)
        {
            // Fill Screenshot object : coded parameters in alphabetical order except for columns, rows and width

            StringBuilder sbMTNArgs = new StringBuilder();
            sbMTNArgs.Append(string.Format("-c {0} ", Program.mtnProfileMgr.GetMtnProfileActive().c_Columns));
            sbMTNArgs.Append(string.Format("-r {0} ", Program.mtnProfileMgr.GetMtnProfileActive().r_Rows));

            if (Program.mtnProfileMgr.GetMtnProfileActive().w_Width != XMLSettingsScreenshot.w_Width_default)
            {
                sbMTNArgs.Append(string.Format("-w {0} ", Program.mtnProfileMgr.GetMtnProfileActive().w_Width));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().a_AspectRatio != XMLSettingsScreenshot.a_AspectRatio_default)
            {
                sbMTNArgs.Append(string.Format("-a {0} ", Program.mtnProfileMgr.GetMtnProfileActive().a_AspectRatioValue));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().b_SkipBlank != XMLSettingsScreenshot.b_SkipBlank_default)
            {
                sbMTNArgs.Append(string.Format("-b {0} ", Program.mtnProfileMgr.GetMtnProfileActive().b_SkipBlank));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().B_OmitBegin != XMLSettingsScreenshot.B_OmitBegin_default)
            {
                sbMTNArgs.Append(string.Format("-B {0} ", Program.mtnProfileMgr.GetMtnProfileActive().B_OmitBegin));
            }

            // c is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().C_CutMovie != XMLSettingsScreenshot.C_CutMovie_default)
            {
                sbMTNArgs.Append(string.Format("-C {0} ", Program.mtnProfileMgr.GetMtnProfileActive().C_CutMovie));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().D_EdgeDetection != XMLSettingsScreenshot.D_EdgeDetection_default)
            {
                sbMTNArgs.Append(string.Format("-D {0} ", Program.mtnProfileMgr.GetMtnProfileActive().D_EdgeDetection));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().E_OmitEnd != XMLSettingsScreenshot.E_OmitEnd_default)
            {
                sbMTNArgs.Append(string.Format("-E {0} ", Program.mtnProfileMgr.GetMtnProfileActive().E_OmitEnd));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().i_InfoOff || Program.IsUNIX)
            {
                sbMTNArgs.Append("-i ");
            }
            else if (!Program.IsUNIX)
            {
                if (Program.mtnProfileMgr.GetMtnProfileActive().f_FontFile != XMLSettingsScreenshot.f_FontFile_default)
                {
                    sbMTNArgs.Append(string.Format("-f {0} ", Program.mtnProfileMgr.GetMtnProfileActive().f_FontFile));
                }
                if (Program.mtnProfileMgr.GetMtnProfileActive().F_FontColor != XMLSettingsScreenshot.F_FontColor_default)
                {
                    sbMTNArgs.Append(string.Format("-F {0}:{1} ", Program.mtnProfileMgr.GetMtnProfileActive().F_FontColor, Program.mtnProfileMgr.GetMtnProfileActive().F_FontSize));
                }
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().g_GapBetweenShots != XMLSettingsScreenshot.g_GapBetweenShots_default)
            {
                sbMTNArgs.Append(string.Format("-g {0} ", Program.mtnProfileMgr.GetMtnProfileActive().g_GapBetweenShots));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().h_MinHeight != XMLSettingsScreenshot.h_MinHeight_default)
            {
                sbMTNArgs.Append(string.Format("-h {0} ", Program.mtnProfileMgr.GetMtnProfileActive().h_MinHeight));
            }

            // i is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().I_IndivScreens)
            {
                sbMTNArgs.Append("-I ");
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().j_JpgQuality != XMLSettingsScreenshot.g_GapBetweenShots_default)
            {
                sbMTNArgs.Append(string.Format("-j {0} ", Program.mtnProfileMgr.GetMtnProfileActive().j_JpgQuality));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().k_ColorBackground != XMLSettingsScreenshot.k_ColorBackground_default)
            {
                sbMTNArgs.Append(string.Format("-k {0} ", Program.mtnProfileMgr.GetMtnProfileActive().k_ColorBackground));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().t_TimeStampOff || Program.IsUNIX)
            {
                sbMTNArgs.Append("-t ");
            }
            else if (!Program.IsUNIX)
            {
                if (Program.mtnProfileMgr.GetMtnProfileActive().L_LocInfo != XMLSettingsScreenshot.L_LocInfo_default || Program.mtnProfileMgr.GetMtnProfileActive().L_LocTimestamp != XMLSettingsScreenshot.L_LocInfo_default)
                {
                    sbMTNArgs.Append(string.Format("-L {0}:{1} ", Program.mtnProfileMgr.GetMtnProfileActive().L_LocInfo, Program.mtnProfileMgr.GetMtnProfileActive().L_LocTimestamp));
                }
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().N_InfoSuffix != XMLSettingsScreenshot.N_InfoSuffix_default || Program.IsUNIX)
            {
                sbMTNArgs.Append(string.Format("-N {0} ", Program.mtnProfileMgr.GetMtnProfileActive().N_InfoSuffix));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().o_OutputSuffix != XMLSettingsScreenshot.o_OutputSuffix_default)
            {
                sbMTNArgs.Append(string.Format("-o {0} ", Program.mtnProfileMgr.GetMtnProfileActive().o_OutputSuffix));
            }

            sbMTNArgs.Append(string.Format("-O \"{0}\" ", screenshotDir));

            if (Program.mtnProfileMgr.GetMtnProfileActive().P_QuitAfterDone)
            {
                sbMTNArgs.Append("-P ");
            }
            else if (Program.mtnProfileMgr.GetMtnProfileActive().p_PauseBeforeExit)
            {
                sbMTNArgs.Append("-p ");
            }

            // r is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().s_TimeStep != XMLSettingsScreenshot.s_TimeStep_default)
            {
                sbMTNArgs.Append(string.Format("-s {0} ", Program.mtnProfileMgr.GetMtnProfileActive().s_TimeStep));
            }

            // t is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().T_TitleTextAdd)
            {
                if (Program.mtnProfileMgr.GetMtnProfileActive().T_TitleText == "%Title%")
                {
                    sbMTNArgs.Append(string.Format("-T \"{0}\" ", Program.Settings.txtMTN_T_Title));
                }
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().v_Verbose)
            {
                sbMTNArgs.Append("-v ");
            }

            // w is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().z_AlwaysSeek)
            {
                sbMTNArgs.Append("-z ");
            }
            else if (Program.mtnProfileMgr.GetMtnProfileActive().Z_AlwaysNonSeek)
            {
                sbMTNArgs.Append("-Z ");
            }

            return sbMTNArgs.ToString();
        }
Ejemplo n.º 2
0
 public static string GetMtnArg(XMLSettingsScreenshot screenshotSettings)
 {
     return GetMtnArg(Program.PicturesDir, screenshotSettings);
 }
Ejemplo n.º 3
0
 private void TbnAddMtnProfileClick(object sender, EventArgs e)
 {
     InputBox ib = new InputBox("Enter profile name...", "Default");
     if (ib.ShowDialog() == DialogResult.OK)
     {
         XMLSettingsScreenshot mtnProfile = new XMLSettingsScreenshot(ib.InputText);
         Program.mtnProfileMgr.MtnProfiles.Add(mtnProfile);
         lbMtnProfiles.Items.Add(mtnProfile);
         lbMtnProfiles.SelectedIndex = lbMtnProfiles.Items.Count - 1;
     }
 }
Ejemplo n.º 4
0
        private void SettingsReadOptionsMTN()
        {
            if (Program.mtnProfileMgr.MtnProfiles.Count == 0)
            {
                XMLSettingsScreenshot mtnDefault1 = new XMLSettingsScreenshot("Movies (Auto Width)")
                {
                    k_ColorBackground = "eeeeee",
                    f_FontFile = "arial.ttf",
                    F_FontColor = "000000",
                    F_FontSize = 12,
                    g_GapBetweenShots = 8,
                    L_LocInfo = 4,
                    L_LocTimestamp = 2,
                    j_JpgQuality = 97,
                    N_InfoSuffix = ""
                };
                Program.mtnProfileMgr.MtnProfiles.Add(mtnDefault1);

                XMLSettingsScreenshot mtnDefault2 = new XMLSettingsScreenshot("Movies (Fixed Width)")
                {
                    k_ColorBackground = "eeeeee",
                    f_FontFile = "arial.ttf",
                    F_FontColor = "000000",
                    F_FontSize = 12,
                    g_GapBetweenShots = 8,
                    L_LocInfo = 4,
                    L_LocTimestamp = 2,
                    j_JpgQuality = 97,
                    w_Width = 800,
                    N_InfoSuffix = ""
                };
                Program.mtnProfileMgr.MtnProfiles.Add(mtnDefault2);

                XMLSettingsScreenshot mtnDefault3 = new XMLSettingsScreenshot("Protech (4x3)")
                {
                    r_Rows = 4,
                    c_Columns = 3,
                    k_ColorBackground = "000000",
                    D_EdgeDetection = 0,
                    f_FontFile = "tahomabd.ttf",
                    F_FontColor = "FFFFFF",
                    F_FontSize = 11,
                    g_GapBetweenShots = 8,
                    h_MinHeight = 225,
                    L_LocInfo = 4,
                    L_LocTimestamp = 2,
                    j_JpgQuality = 100,
                    w_Width = 1024,
                    N_InfoSuffix = ""
                };
                Program.mtnProfileMgr.MtnProfiles.Add(mtnDefault3);
            }

            if (lbMtnProfiles.Items.Count == 0)
            {
                foreach (XMLSettingsScreenshot mtnProfile in Program.mtnProfileMgr.MtnProfiles)
                {
                    lbMtnProfiles.Items.Add(mtnProfile);
                }
                lbMtnProfiles.SelectedIndex = Math.Min(Program.mtnProfileMgr.MtnProfiles.Count - 1, Program.mtnProfileMgr.MtnProfileActive);
            }

            this.chkCreateTorrent.Checked = Program.Settings.TorrentCreateAuto;
            this.chkTorrentOrganize.Checked = Program.Settings.TorrentsOrganize;
        }
Ejemplo n.º 5
0
        public static string GetMtnArg(string screenshotDir, XMLSettingsScreenshot screenshotSettings)
        {
            // Fill Screenshot object : coded parameters in alphabetical order except for columns, rows and width

            StringBuilder sbMTNArgs = new StringBuilder();

            sbMTNArgs.Append(string.Format("-c {0} ", Program.mtnProfileMgr.GetMtnProfileActive().c_Columns));
            sbMTNArgs.Append(string.Format("-r {0} ", Program.mtnProfileMgr.GetMtnProfileActive().r_Rows));

            if (Program.mtnProfileMgr.GetMtnProfileActive().w_Width != XMLSettingsScreenshot.w_Width_default)
            {
                sbMTNArgs.Append(string.Format("-w {0} ", Program.mtnProfileMgr.GetMtnProfileActive().w_Width));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().a_AspectRatio != XMLSettingsScreenshot.a_AspectRatio_default)
            {
                sbMTNArgs.Append(string.Format("-a {0} ", Program.mtnProfileMgr.GetMtnProfileActive().a_AspectRatioValue));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().b_SkipBlank != XMLSettingsScreenshot.b_SkipBlank_default)
            {
                sbMTNArgs.Append(string.Format("-b {0} ", Program.mtnProfileMgr.GetMtnProfileActive().b_SkipBlank));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().B_OmitBegin != XMLSettingsScreenshot.B_OmitBegin_default)
            {
                sbMTNArgs.Append(string.Format("-B {0} ", Program.mtnProfileMgr.GetMtnProfileActive().B_OmitBegin));
            }

            // c is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().C_CutMovie != XMLSettingsScreenshot.C_CutMovie_default)
            {
                sbMTNArgs.Append(string.Format("-C {0} ", Program.mtnProfileMgr.GetMtnProfileActive().C_CutMovie));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().D_EdgeDetection != XMLSettingsScreenshot.D_EdgeDetection_default)
            {
                sbMTNArgs.Append(string.Format("-D {0} ", Program.mtnProfileMgr.GetMtnProfileActive().D_EdgeDetection));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().E_OmitEnd != XMLSettingsScreenshot.E_OmitEnd_default)
            {
                sbMTNArgs.Append(string.Format("-E {0} ", Program.mtnProfileMgr.GetMtnProfileActive().E_OmitEnd));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().i_InfoOff || Program.IsUNIX)
            {
                sbMTNArgs.Append("-i ");
            }
            else if (!Program.IsUNIX)
            {
                if (Program.mtnProfileMgr.GetMtnProfileActive().f_FontFile != XMLSettingsScreenshot.f_FontFile_default)
                {
                    sbMTNArgs.Append(string.Format("-f {0} ", Program.mtnProfileMgr.GetMtnProfileActive().f_FontFile));
                }
                if (Program.mtnProfileMgr.GetMtnProfileActive().F_FontColor != XMLSettingsScreenshot.F_FontColor_default)
                {
                    sbMTNArgs.Append(string.Format("-F {0}:{1} ", Program.mtnProfileMgr.GetMtnProfileActive().F_FontColor, Program.mtnProfileMgr.GetMtnProfileActive().F_FontSize));
                }
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().g_GapBetweenShots != XMLSettingsScreenshot.g_GapBetweenShots_default)
            {
                sbMTNArgs.Append(string.Format("-g {0} ", Program.mtnProfileMgr.GetMtnProfileActive().g_GapBetweenShots));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().h_MinHeight != XMLSettingsScreenshot.h_MinHeight_default)
            {
                sbMTNArgs.Append(string.Format("-h {0} ", Program.mtnProfileMgr.GetMtnProfileActive().h_MinHeight));
            }

            // i is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().I_IndivScreens)
            {
                sbMTNArgs.Append("-I ");
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().j_JpgQuality != XMLSettingsScreenshot.g_GapBetweenShots_default)
            {
                sbMTNArgs.Append(string.Format("-j {0} ", Program.mtnProfileMgr.GetMtnProfileActive().j_JpgQuality));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().k_ColorBackground != XMLSettingsScreenshot.k_ColorBackground_default)
            {
                sbMTNArgs.Append(string.Format("-k {0} ", Program.mtnProfileMgr.GetMtnProfileActive().k_ColorBackground));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().t_TimeStampOff || Program.IsUNIX)
            {
                sbMTNArgs.Append("-t ");
            }
            else if (!Program.IsUNIX)
            {
                if (Program.mtnProfileMgr.GetMtnProfileActive().L_LocInfo != XMLSettingsScreenshot.L_LocInfo_default || Program.mtnProfileMgr.GetMtnProfileActive().L_LocTimestamp != XMLSettingsScreenshot.L_LocInfo_default)
                {
                    sbMTNArgs.Append(string.Format("-L {0}:{1} ", Program.mtnProfileMgr.GetMtnProfileActive().L_LocInfo, Program.mtnProfileMgr.GetMtnProfileActive().L_LocTimestamp));
                }
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().N_InfoSuffix != XMLSettingsScreenshot.N_InfoSuffix_default || Program.IsUNIX)
            {
                sbMTNArgs.Append(string.Format("-N {0} ", Program.mtnProfileMgr.GetMtnProfileActive().N_InfoSuffix));
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().o_OutputSuffix != XMLSettingsScreenshot.o_OutputSuffix_default)
            {
                sbMTNArgs.Append(string.Format("-o {0} ", Program.mtnProfileMgr.GetMtnProfileActive().o_OutputSuffix));
            }

            sbMTNArgs.Append(string.Format("-O \"{0}\" ", screenshotDir));

            if (Program.mtnProfileMgr.GetMtnProfileActive().P_QuitAfterDone)
            {
                sbMTNArgs.Append("-P ");
            }
            else if (Program.mtnProfileMgr.GetMtnProfileActive().p_PauseBeforeExit)
            {
                sbMTNArgs.Append("-p ");
            }

            // r is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().s_TimeStep != XMLSettingsScreenshot.s_TimeStep_default)
            {
                sbMTNArgs.Append(string.Format("-s {0} ", Program.mtnProfileMgr.GetMtnProfileActive().s_TimeStep));
            }

            // t is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().T_TitleTextAdd)
            {
                if (Program.mtnProfileMgr.GetMtnProfileActive().T_TitleText == "%Title%")
                {
                    sbMTNArgs.Append(string.Format("-T \"{0}\" ", Program.Settings.txtMTN_T_Title));
                }
            }

            if (Program.mtnProfileMgr.GetMtnProfileActive().v_Verbose)
            {
                sbMTNArgs.Append("-v ");
            }

            // w is added earlier

            if (Program.mtnProfileMgr.GetMtnProfileActive().z_AlwaysSeek)
            {
                sbMTNArgs.Append("-z ");
            }
            else if (Program.mtnProfileMgr.GetMtnProfileActive().Z_AlwaysNonSeek)
            {
                sbMTNArgs.Append("-Z ");
            }

            return(sbMTNArgs.ToString());
        }
Ejemplo n.º 6
0
 public static string GetMtnArg(XMLSettingsScreenshot screenshotSettings)
 {
     return(GetMtnArg(Program.PicturesDir, screenshotSettings));
 }