Beispiel #1
0
        private void EditDictionaryForm_SizeChange(object sender, EventArgs e)
        {
            EditDictionaryForm edf = (EditDictionaryForm)sender;

            edf.columnHeader1.Width  = -2;
            edf.columnHeader1.Width -= 3;
            edf.listView1.Size       = new Size(edf.Size.Width / 2 - 42, edf.Size.Height - 108);

            edf.buttonBGTriangle1.Location = new Point(edf.Size.Width / 2 - 21, edf.Size.Height / 2 - 38);

            edf.textBox1.Size     = new Size(edf.Size.Width / 2 - 42, edf.Size.Height - 108);
            edf.textBox1.Location = new Point(edf.Size.Width / 2 + 7, edf.textBox1.Location.Y);
        }
Beispiel #2
0
        private void kagami_button_Click(object sender, EventArgs e)
        {
            Dictionary <string, string> tmp_port_dic = new Dictionary <string, string>();

            foreach (var item_okiba in Tsukasa_starter.okiba_port)
            {
                tmp_port_dic.Add(item_okiba.Key, string.Join(",", item_okiba.Value.ToArray()));
            }
            EditDictionaryForm form = new EditDictionaryForm(tmp_port_dic);

            form.Location          = Cursor.Position;
            form.Text              = "鏡置き場ポートリスト編集";
            form.label1.Text       = form.label1.Text.Replace("<1>", "鏡置き場リスト");
            form.label1.Text       = form.label1.Text.Replace("<2>", "(ポート番号は改行もしくはコロンで区切り)");
            form.listToolTipStr    = "鏡置き場のURL" + Environment.NewLine + "空欄で削除";
            form.textboxToolTipStr = "鏡置き場のポート番号" + Environment.NewLine + "空欄で削除";


            if (form.ShowDialog() == DialogResult.OK)
            {
                List <string> tmp_list;
                Tsukasa_starter.okiba_URL.Clear();
                Tsukasa_starter.okiba_port.Clear();
                tmp_port_dic = form.dic;
                foreach (var item in tmp_port_dic)
                {
                    tmp_list = new List <string>(item.Value.Replace("\r\n", "\n").Replace("\n", ",").Split(','));
                    tmp_list.RemoveAll(s => s == "");
                    tmp_list.Sort();
                    Tsukasa_starter.okiba_URL.Add(item.Key);
                    Tsukasa_starter.okiba_port.Add(item.Key, tmp_list);
                    //tmp_list.Clear();
                }

                this.okiba_URL_comboBox.Items.Clear();
                this.okiba_URL_comboBox.Items.AddRange(Tsukasa_starter.okiba_URL.ToArray());
                this.okiba_port_comboBox.Items.Clear();
                this.okiba_port_comboBox.Items.AddRange(Tsukasa_starter.okiba_port[Tsukasa_starter.okiba_URL[(int)Tsukasa_starter.okiba_URL_ch]].ToArray());

                if (this.okiba_port_comboBox.SelectedIndex + 1 > Tsukasa_starter.okiba_port[Tsukasa_starter.okiba_URL[(int)Tsukasa_starter.okiba_URL_ch]].Count)
                {
                    this.okiba_port_comboBox.SelectedIndex = 0;
                }
                else
                {
                    this.okiba_port_comboBox.SelectedIndex = this.okiba_port_comboBox.SelectedIndex;
                }
            }
        }
Beispiel #3
0
        private void param_button_Click(object sender, EventArgs e)
        {
            EditDictionaryForm form = new EditDictionaryForm(Tsukasa_starter.tsukasa_param_str);

            form.Location          = Cursor.Position;
            form.Text              = "tsukasaパラメータ編集";
            form.label1.Text       = form.label1.Text.Replace("<1>", "パラメータ");
            form.label1.Text       = form.label1.Text.Replace("<2>", "(空白で削除)");
            form.listToolTipStr    = "ffmpegへ渡すパラメータの略称";
            form.textboxToolTipStr = "ffmpegへ渡すパラメータ" + Environment.NewLine + "<RTMP>はrtmpのURLに置換" + Environment.NewLine + "<KAGAMI>は鏡置き場の配信URLに置換";

            if (form.ShowDialog() == DialogResult.OK)
            {
                Tsukasa_starter.tsukasa_param_str = form.dic;
                Tsukasa_starter.tsukasa_param.Clear();
                Tsukasa_starter.tsukasa_param.AddRange(Tsukasa_starter.tsukasa_param_str.Keys.ToArray <string>());

                this.tsukasa_param_comboBox.Items.Clear();
                this.tsukasa_param_comboBox.Items.AddRange(Tsukasa_starter.tsukasa_param.ToArray());
                //pass;
            }
        }