示例#1
0
        /// <summary>
        /// Handles <c>Click</c> to load an alternate Talkfile.
        /// </summary>
        /// <param name="sender"><c><see cref="it_PathTalkC"/></c></param>
        /// <param name="e"></param>
        void itclick_PathTalkC(object sender, EventArgs e)
        {
            if (!it_PathTalkC.Checked)
            {
                using (var ofd = new OpenFileDialog())
                {
                    ofd.Title  = " Select a TalkTable";
                    ofd.Filter = GetTlkFilter();

                    ofd.FileName           = "*.tlk";
                    ofd.AutoUpgradeEnabled = false;

                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        TalkReader.Load(ofd.FileName, it_PathTalkC, true);
                    }
                }
            }
            else
            {
                it_PathTalkC.Checked = false;
                TalkReader.DictCusto.Clear();
                TalkReader.AltLabel = null;
            }
        }
示例#2
0
        /// <summary>
        /// Handles <c>Click</c> to load <c>Dialog.Tlk</c> file.
        /// </summary>
        /// <param name="sender"><c><see cref="it_PathTalkD"/></c></param>
        /// <param name="e"></param>
        void itclick_PathTalkD(object sender, EventArgs e)
        {
            if (!it_PathTalkD.Checked)
            {
                using (var ofd = new OpenFileDialog())
                {
                    ofd.Title  = " Select Dialog.Tlk";
                    ofd.Filter = GetTlkFilter();

                    ofd.FileName           = "dialog.tlk";
                    ofd.AutoUpgradeEnabled = false;

                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        TalkReader.Load(ofd.FileName, it_PathTalkD);
                    }
                }
            }
            else
            {
                it_PathTalkD.Checked = false;
                TalkReader.DictDialo.Clear();
            }
        }
示例#3
0
        /// <summary>
        /// Handles a click on the Load ... button.
        /// </summary>
        /// <param name="sender"><c><see cref="bu_Load"/></c></param>
        /// <param name="e"></param>
        void click_btnLoad(object sender, EventArgs e)
        {
            if (!cb_Custo.Checked)
            {
                using (var ofd = new OpenFileDialog())
                {
                    ofd.Title  = " Select Dialog.Tlk";
                    ofd.Filter = Yata.GetTlkFilter();

                    ofd.FileName           = "dialog.tlk";
                    ofd.AutoUpgradeEnabled = false;

                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        TalkReader.Load(ofd.FileName, (_f as Yata).it_PathTalkD);
                    }
                }

                lo = TalkReader.loDialo;
                hi = TalkReader.hiDialo;
            }
            else
            {
                using (var ofd = new OpenFileDialog())
                {
                    ofd.Title  = " Select a TalkTable";
                    ofd.Filter = Yata.GetTlkFilter();

                    ofd.FileName           = "*.tlk";
                    ofd.AutoUpgradeEnabled = false;

                    if (ofd.ShowDialog() == DialogResult.OK)
                    {
                        TalkReader.Load(ofd.FileName, (_f as Yata).it_PathTalkC, true);
                    }
                }

                lo = TalkReader.loCusto;
                hi = TalkReader.hiCusto;
            }


            enable();

            if (_dict.ContainsKey(_eId))
            {
                rt_Copyable.Text = _dict[_eId];
            }
            else
            {
                rt_Copyable.Text = String.Empty;
            }

            if (TalkReader.AltLabel != null)
            {
                cb_Custo.Text = TalkReader.AltLabel;
            }
            else
            {
                cb_Custo.Text = "Custom";
            }
        }