/// <summary>
        ///
        /// </summary>
        public void fun_儲存設定()
        {
            var fun_儲存 = new Action <XmlTextWriter, String, String>((XmlTextWriter XTW, String key, String value) => {
                XTW.WriteStartElement("item");
                XTW.WriteAttributeString("name", key);
                XTW.WriteString(value);
                XTW.WriteEndElement();
            });

            XmlTextWriter X = new XmlTextWriter(@XML_NAME, Encoding.UTF8);


            X.WriteStartDocument();              //使用1.0版本
            X.Formatting  = Formatting.Indented; //自動縮排
            X.Indentation = 2;                   //縮排距離

            X.WriteStartElement("settings");

            //


            fun_儲存(X, "bool_auto_copy", M.checkBox_自動存入剪貼簿.IsChecked.Value.ToString());
            //fun_儲存(X, M.checkBox_視窗置頂.Name, M.checkBox_視窗置頂.IsChecked.Value.ToString());

            fun_儲存(X, "s_kb", M.s_快速鍵);
            fun_儲存(X, "s_kb_all", M.s_快速鍵_全螢幕);
            fun_儲存(X, "s_kb_focus", M.s_快速鍵_目前視窗);
            fun_儲存(X, "bool_specified_save_path", M.bool_自定儲存路徑.ToString());
            fun_儲存(X, "s_specified_save_path", M.s_自定儲存路徑);
            fun_儲存(X, "bool_save_model_monolayer", M.bool_單層儲存路徑.ToString());

            fun_儲存(X, "sub_folder", M.func_取得資料夾順序());

            //儲存目前選取的資料夾
            fun_儲存(X, "sub_folder_select", M.c_分頁.b_but_text.Text);


            //

            /*if (m.radio_左.IsChecked.Value) {
             *  fun_儲存(X, "radio_text_alignment", "l");
             * } else if (m.radio_中.IsChecked.Value) {
             *  fun_儲存(X, "radio_text_alignment", "c");
             * } else if (m.radio_右.IsChecked.Value) {
             *  fun_儲存(X, "radio_text_alignment", "r");
             * }*/
            //

            X.WriteEndElement();

            X.Flush();     //寫這行才會寫入檔案
            X.Close();
        }
Exemple #2
0
        /// <summary>
        ///
        /// </summary>
        public void fun_儲存設定()
        {
            var fun_儲存 = new Action <XmlTextWriter, String, String>((XmlTextWriter XTW, String key, String value) => {
                XTW.WriteStartElement("item");
                XTW.WriteAttributeString("name", key);
                XTW.WriteString(value);
                XTW.WriteEndElement();
            });

            XmlTextWriter X = new XmlTextWriter(@XML_NAME, Encoding.UTF8);


            X.WriteStartDocument();              //使用1.0版本
            X.Formatting  = Formatting.Indented; //自動縮排
            X.Indentation = 2;                   //縮排距離

            X.WriteStartElement("settings");

            //


            fun_儲存(X, M.checkBox_自動存入剪貼簿.Name, M.checkBox_自動存入剪貼簿.IsChecked.Value.ToString());
            fun_儲存(X, M.checkBox_視窗置頂.Name, M.checkBox_視窗置頂.IsChecked.Value.ToString());

            fun_儲存(X, "s_快速鍵", M.s_快速鍵);



            //

            /*if (m.radio_左.IsChecked.Value) {
             *  fun_儲存(X, "radio_text_alignment", "l");
             * } else if (m.radio_中.IsChecked.Value) {
             *  fun_儲存(X, "radio_text_alignment", "c");
             * } else if (m.radio_右.IsChecked.Value) {
             *  fun_儲存(X, "radio_text_alignment", "r");
             * }*/
            //

            X.WriteEndElement();

            X.Flush();     //寫這行才會寫入檔案
            X.Close();
        }
Exemple #3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="w_設定"></param>
        public void fun_儲存setting()
        {
            var fun_儲存 = new Action <XmlTextWriter, String, String>((XmlTextWriter XTW, String key, String value) => {
                XTW.WriteStartElement("item");
                XTW.WriteAttributeString("name", key);
                XTW.WriteString(value);
                XTW.WriteEndElement();
            });

            XmlTextWriter X = new XmlTextWriter(path_XML_setting, Encoding.UTF8);


            X.WriteStartDocument();              //使用1.0版本
            X.Formatting  = Formatting.Indented; //自動縮排
            X.Indentation = 2;                   //縮排距離

            X.WriteStartElement("settings");

            //-------------------


            /*
             * fun_儲存(X, "bool_aero", w_設定.check_aero.IsChecked.Value.ToString());
             *
             * fun_儲存(X, "bool_工具列_換頁按鈕", w_設定.check_工具列_換頁按鈕.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_換頁按鈕_下", w_設定.check_換頁按鈕_下.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_工具列_外部程式開啟", w_設定.check_工具列_外部程式開啟.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_工具列_大量瀏覽模式", w_設定.check_工具列_大量瀏覽模式.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_工具列_搜圖", w_設定.check_工具列_搜圖.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_工具列_旋轉", w_設定.check_工具列_旋轉.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_工具列_放大縮小", w_設定.check_工具列_放大縮小.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_工具列_檢視縮放比例", w_設定.check_工具列_檢視縮放比例.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_工具列_縮放至視窗大小", w_設定.check_工具列_縮放至視窗大小.IsChecked.Value.ToString());
             * fun_儲存(X, "bool_工具列_複製", w_設定.check_工具列_複製.IsChecked.Value.ToString());*/

            fun_儲存(X, "bool_aero", bool_aero.ToString());

            fun_儲存(X, "bool_工具列_換頁按鈕", bool_工具列_換頁按鈕.ToString());
            fun_儲存(X, "bool_換頁按鈕_下", bool_換頁按鈕_下.ToString());
            fun_儲存(X, "bool_工具列_外部程式開啟", bool_工具列_外部程式開啟.ToString());
            fun_儲存(X, "bool_工具列_大量瀏覽模式", bool_工具列_大量瀏覽模式.ToString());
            fun_儲存(X, "bool_工具列_搜圖", bool_工具列_搜圖.ToString());
            fun_儲存(X, "bool_工具列_旋轉", bool_工具列_旋轉.ToString());
            fun_儲存(X, "bool_工具列_放大縮小", bool_工具列_放大縮小.ToString());
            fun_儲存(X, "bool_工具列_檢視縮放比例", bool_工具列_檢視縮放比例.ToString());
            fun_儲存(X, "bool_工具列_縮放至視窗大小", bool_工具列_縮放至視窗大小.ToString());
            fun_儲存(X, "bool_工具列_複製", bool_工具列_複製.ToString());

            fun_儲存(X, "bool_工具列_換資料夾", bool_工具列_換資料夾.ToString());
            fun_儲存(X, "bool_工具列_排序", bool_工具列_排序.ToString());
            fun_儲存(X, "bool_工具列_快速拖曳", bool_工具列_快速拖曳.ToString());
            fun_儲存(X, "bool_工具列_刪除圖片", bool_工具列_刪除圖片.ToString());


            fun_儲存(X, "bool_顯示工具列", M.bool_顯示工具列.ToString());
            fun_儲存(X, "bool_顯示exif視窗", M.bool_顯示exif視窗.ToString());

            fun_儲存(X, "radio_高品質成像", M.int_高品質成像模式 + "");

            //fun_儲存(X, "bool_psd使用內建解碼器", w_設定.check_psd用內建解碼器.IsChecked.Value.ToString());

            fun_儲存(X, "color_背景顏色", s_color_背景顏色);
            fun_儲存(X, "color_標題列顏色", s_color_標題列顏色);
            fun_儲存(X, "color_外框顏色", s_color_外框顏色);

            try {
                fun_儲存(X, "e_gif_type", ((int)M.e_GIF_Type) + "");
            } catch { }


            fun_儲存(X, "_bool_快速預覽_滑鼠滾輪", MainWindow._bool_快速預覽_滑鼠滾輪.ToString());
            fun_儲存(X, "_bool_快速預覽_空白鍵", MainWindow._bool_快速預覽_空白鍵.ToString());
            fun_儲存(X, "_bool_快速啟動", MainWindow._bool_快速啟動.ToString());

            try {
                fun_儲存(X, "_e_滾輪用途", ((int)M._e_滾輪用途) + "");
            } catch { }

            //-------------------

            X.WriteEndElement();

            X.Flush();     //寫這行才會寫入檔案
            X.Close();
            X.Dispose();
        }