Exemple #1
0
        public void ReadSetting()
        {
            RWSettingFile pri = new RWSettingFile();

            string[] Setting = pri.ReadSetting();
            if (Setting[0] == "true")
            {
                randomSlideShow = true;
            }
            else
            {
                randomSlideShow = false;
            }
            if (Setting[1] == "true")
            {
                loopSlideShow = true;
            }
            else
            {
                loopSlideShow = false;
            }
            if (Setting[3] == "true")
            {
                ShowClock = true;
            }
            else
            {
                ShowClock = false;
            }
            if (Setting[4] == "true")
            {
                BoolShowFolderName = true;
            }
            else
            {
                BoolShowFolderName = false;
            }
            if (Setting[5] == "true")
            {
                BoolShowFileName = true;
            }
            else
            {
                BoolShowFileName = false;
            }

            try
            {
                ImageSwitchTime = float.Parse(Setting[2].ToString());
            }
            catch
            {
                MessageBox.Show("画像切替時間設定の値が不正です。\n切替時間3秒でスライドショーを開始します。", "ERROR", MessageBoxButton.OK, MessageBoxImage.Error);
                ImageSwitchTime = 3;
            }
        }
Exemple #2
0
        public void WriteSettings()
        {
            string[] Setting = new string[6];

            if (RadioButtonSortRandom.IsChecked == true)
            {
                Setting[0] = "true";
            }
            else
            {
                Setting[0] = "false";
            }

            if (CheckBoxLoop.IsChecked == true)
            {
                Setting[1] = "true";
            }
            else
            {
                Setting[1] = "false";
            }
            if (CheckBoxShowClock.IsChecked == true)
            {
                Setting[3] = "true";
            }
            else
            {
                Setting[3] = "false";
            }
            if (CheckBoxDisplayFolder.IsChecked == true)
            {
                Setting[4] = "true";
            }
            else
            {
                Setting[4] = "false";
            }


            if (CheckBoxDisplayFileName.IsChecked == true)
            {
                Setting[5] = "true";
            }
            else
            {
                Setting[5] = "false";
            }

            Setting[2] = TextBoxImageChangeTime.Text.ToString();
            RWSettingFile pri = new RWSettingFile();

            pri.WriteSetting(Setting);
        }
Exemple #3
0
        public void ReadSettings()
        {
            RWSettingFile pri = new RWSettingFile();

            string[] Setting = pri.ReadSetting();

            if (Setting[1] == "true")
            {
                CheckBoxLoop.IsChecked = true;
            }
            if (Setting[3] == "true")
            {
                CheckBoxShowClock.IsChecked = true;
            }
            if (Setting[0] == "true")
            {
                RadioButtonSortRandom.IsChecked = true;
                CheckBoxLoop.IsChecked          = true;
                CheckBoxLoop.IsEnabled          = false;
            }
            else
            {
                RadioButtonSort.IsChecked = true;
            }
            if (Setting[4] == "true")
            {
                CheckBoxDisplayFolder.IsChecked = true;
            }
            if (Setting[5] == "true")
            {
                CheckBoxDisplayFileName.IsChecked = true;
            }
            TextBoxImageChangeTime.Text = Setting[2].ToString();


            //test
            int x = 0;

            foreach (string value in Setting)
            {
                //    MessageBox.Show(x + "\n" + value);
                x++;
            }
        }