Exemplo n.º 1
0
 public void SetToConfig(VideoCutConfig config)
 {
     config.IsFixLength = checkBoxFixLength.Checked;
     config.VideoLength = textBoxVideoLength.Text;
     config.CutListHistoryFileNameList.Clear();
     config.CutListHistoryFileNameList.AddRange(history_filename_list_);
 }
Exemplo n.º 2
0
 public void LoadFromConfig(VideoCutConfig config)
 {
     selectFileBoxVideoFile.FileName   = config.VideoFileName;
     selectFileBoxVideoFolder.FileName = config.VideoDir;
     selectFileBoxRankFile.FileName    = config.RankFileName;
     buttonShowDetail.Text             = (config.IsControlFormDetailOpen ? "-" : "+");
 }
Exemplo n.º 3
0
 public void SetToConfig(VideoCutConfig config)
 {
     config.VideoFileName           = selectFileBoxVideoFile.FileName;
     config.VideoDir                = selectFileBoxVideoFolder.FileName;
     config.RankFileName            = selectFileBoxRankFile.FileName;
     config.IsControlFormDetailOpen = (buttonShowDetail.Text == "-");
 }
Exemplo n.º 4
0
 public void SetToConfig(VideoCutConfig config)
 {
     config.OutputAviFileName = selectFileBoxOutputFileName.FileName;
     config.OutputAviSize     = new Size(int.Parse(textBoxOutputWidth.Text), int.Parse(textBoxOutputHeight.Text));
     config.FramePerSec       = double.Parse(textBoxFramePerSec.Text);
     config.StartSec          = double.Parse(textBoxStartSec.Text);
     config.Duration          = double.Parse(textBoxDurationSec.Text);
 }
Exemplo n.º 5
0
        public void LoadFromConfig(VideoCutConfig config)
        {
            checkBoxFixLength.Checked = config.IsFixLength;
            textBoxVideoLength.Text   = config.VideoLength;
            history_filename_list_.Clear();
            history_filename_list_.AddRange(config.CutListHistoryFileNameList);

            is_adding_save_ = config.IsAddingSave; // ロードのみ
        }
Exemplo n.º 6
0
 public void LoadFromConfig(VideoCutConfig config)
 {
     selectFileBoxOutputFileName.FileName = config.OutputAviFileName;
     textBoxOutputWidth.Text  = config.OutputAviSize.Width.ToString();
     textBoxOutputHeight.Text = config.OutputAviSize.Height.ToString();
     textBoxFramePerSec.Text  = config.FramePerSec.ToString();
     textBoxStartSec.Text     = config.StartSec.ToString();
     textBoxDurationSec.Text  = config.Duration.ToString();
 }
Exemplo n.º 7
0
        private void LoadConfig()
        {
            string filename = Path.Combine(Path.GetDirectoryName(Application.ExecutablePath), "config_videocut.xml");

            if (File.Exists(filename))
            {
                XmlSerializer serializer = null;
                using (Stream stream = File.OpenRead(filename))
                {
                    serializer = new XmlSerializer(typeof(VideoCutConfig));
                    config_    = (VideoCutConfig)serializer.Deserialize(stream);
                }
            }
        }
Exemplo n.º 8
0
 public void GetFromConfig(VideoCutConfig config)
 {
     checkBoxVideoSizeFixed.Checked = config.IsVideoSizeFixed;
     if (config.VideoSizeFixedWidth > 0)
     {
         textBoxVideoSizeFixedWidth.Text = config.VideoSizeFixedWidth.ToString();
     }
     if (config.VideoSizeFixedHeight > 0)
     {
         textBoxVideoSizeFixedHeight.Text = config.VideoSizeFixedHeight.ToString();
     }
     radioButtonMemorySizeManual.Checked = config.IsMemorySizeManual;
     if (config.MemorySize > 0)
     {
         textBoxMemorySize.Text = config.MemorySize.ToString();
     }
     checkBoxIsAddingSave.Checked   = config.IsAddingSave;
     checkBoxIsAdjustWindow.Checked = config.IsAdjustWindow;
 }
Exemplo n.º 9
0
        public void SetToConfig(VideoCutConfig config)
        {
            config.IsVideoSizeFixed = checkBoxVideoSizeFixed.Checked;
            int width;

            if (int.TryParse(textBoxVideoSizeFixedWidth.Text, out width) && width > 0)
            {
                config.VideoSizeFixedWidth = width;
            }
            else
            {
                config.VideoSizeFixedWidth = -1;
            }
            int height;

            if (int.TryParse(textBoxVideoSizeFixedHeight.Text, out height) && height > 0)
            {
                config.VideoSizeFixedHeight = height;
            }
            else
            {
                config.VideoSizeFixedHeight = -1;
            }
            config.IsMemorySizeManual = radioButtonMemorySizeManual.Checked;
            int memory_size;

            if (int.TryParse(textBoxMemorySize.Text, out memory_size) && memory_size > 0)
            {
                config.MemorySize = memory_size;
            }
            else
            {
                config.MemorySize = -1;
            }
            config.IsAddingSave   = checkBoxIsAddingSave.Checked;
            config.IsAdjustWindow = checkBoxIsAdjustWindow.Checked;
        }