Пример #1
0
        // 리플 목록 읽기
        private void ReadReplList(string filename)
        {
            try
            {
                var ldb = new LineDb(filename, Encoding.UTF8);
                _rpls = ldb.CloneDb();

                UpdateReplList();
            }
            catch { }
        }
Пример #2
0
        public MainForm()
        {
            InitializeComponent();

            //
            RegistryKey rk = Registry.CurrentUser.OpenSubKey(Setting.RsPuruLive, true);

            if (rk != null)
            {
                try
                {
                    if (rk.GetValue("TextReplsLastRepl") is string lastrepl)
                    {
                        Setting.LastReplList = lastrepl;
                        ReadReplList(Setting.LastReplList);
                    }

                    if (rk.GetValue("TextReplsLastBatchConv") is string lastbatch)
                    {
                        Setting.LastBatchConv = lastbatch;
                    }
                }
                catch
                {
                }
            }

            //
            btnReplSave.BackColor = SystemColors.Control;

            // 언어 처리
#if DEBUG
            LineDb ldb = new LineDb(Properties.Resources.lang_ko);
#else
            LineDb ldb = Thread.CurrentThread.CurrentUICulture == CultureInfo.GetCultureInfo("ko-KR") ?
                         new LineDb(Properties.Resources.lang_ko) :
                         new LineDb(Properties.Resources.lang_en);
#endif

            System.Version sv  = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version;
            DateTime       bdt = new DateTime(2000, 1, 1).AddDays(sv.Build).AddSeconds(sv.Revision * 2);

            //this.Text = ldb["name"] + " - " + bdt.ToShortDateString();
            this.Text             = ldb["name"];
            btnAddAdd.Text        = ldb["btnadd"];
            lblAddOrg.Text        = ldb["lbladdorg"];
            lblAddNew.Text        = ldb["lbladdnew"];
            btnReplSave.Text      = ldb["btnreplsave"];
            btnReplRead.Text      = ldb["btnreplread"];
            columnHeader1.Text    = ldb["lstreplsclmorg"];
            columnHeader2.Text    = ldb["lstreplsclmnew"];
            tabPage1.Text         = ldb["tabtextconv"];
            tabPage2.Text         = ldb["tabbatchconv"];
            btnGoReplace.Text     = ldb["btngoreplace"];
            lblBatchFileList.Text = ldb["lblbatchfilelist"];
            columnHeader3.Text    = ldb["lstconvfilesclmfilename"];
            columnHeader4.Text    = ldb["lstconvfilesclmpath"];
            btnBatchSave.Text     = ldb["btnbatchsave"];
            btnBatchRead.Text     = ldb["btnbatchopen"];
            btnBatchRun.Text      = ldb["btnbatchrun"];
            btnReplClear.Text     = ldb["btnreplclear"];

            LangDb = ldb;
        }