コード例 #1
0
ファイル: actions.cs プロジェクト: SuperCatss/momiji
    internal void show(momiji_host host)
    {
        Point client = host.PointToScreen(Point.Empty);

        Location = new Point(client.X + host.ClientSize.Width - Width, client.Y + host.ClientSize.Height - Height);
        position = new Point(Left - host.Left, Top - host.Top);

        Show(host);
    }
コード例 #2
0
    internal void show(momiji_host host)
    {
        Point client = host.PointToScreen(Point.Empty);

        hsplitcontainer.SplitterDistance = 100;

        Location = new Point(client.X, client.Y + host.ClientSize.Height - Height);
        position = new Point(Left - host.Left, Top - host.Top);

        load_category();

        scenes.add_scene("character");

        Show(host);
    }
コード例 #3
0
    internal bool show_dialog(momiji_host host)
    {
        if (DialogResult.OK == ShowDialog(host))
        {
            momiji_preferences.general_explorer_style       = explorer_style.Checked;
            momiji_preferences.general_top_most             = top_most.Checked;
            momiji_preferences.general_application_language = momiji_languages.ietf_at(combobox.SelectedIndex);
            momiji_preferences.advance_output_location      = advance_textbox.Text;
            momiji_preferences.advance_output_frames        = advance_outputframes.Checked;
            momiji_preferences.advance_output_maxcolor      = receive_number(advance_numeric, 8, 256);
            momiji_preferences.advance_output_backcolor     = (Color)advance_outputbackcolor.Tag;
            momiji_preferences.advance_display_items        = receive_number(advance_count, 10, 100);
            momiji_preferences.advance_display_backcolor    = (Color)advance_displaybackcolor.Tag;

            return(true);
        }

        return(false);
    }
コード例 #4
0
    internal components_host(momiji_host host)
    {
        item_keyword = new ToolStripComboBox();
        item_search  = new ToolStripButton(null, query_image("toolstrip_search"), toolstrip_search_click);
        item_separator_search_style = new ToolStripSeparator();
        item_style_tile             = new ToolStripMenuItem(null, query_image("toolstrip_style_tile"), toolstrip_style_tile_click);
        item_style_icon             = new ToolStripMenuItem(null, query_image("toolstrip_style_icon"), toolstrip_style_icon_click);
        item_style = new ToolStripDropDownButton(null, query_image("toolstrip_style_tile"), item_style_tile, item_style_icon);

        item_cash     = new ToolStripButton(null, query_image("toolstrip_cash"), toolstrip_expense_click);
        item_standard = new ToolStripButton(null, query_image("toolstrip_standard"), toolstrip_expense_click);
        item_separator_standard_female = new ToolStripSeparator();
        item_female  = new ToolStripButton(null, query_image("toolstrip_female"), toolstrip_gender_click);
        item_male    = new ToolStripButton(null, query_image("toolstrip_male"), toolstrip_gender_click);
        item_neutral = new ToolStripButton(null, query_image("toolstrip_neutral"), toolstrip_gender_click);
        item_separator_neutral_unlimited = new ToolStripSeparator();
        item_unlimited = new ToolStripButton(null, query_image("toolstrip_unlimited"), toolstrip_occupation_click);
        item_beginner  = new ToolStripButton(null, query_image("toolstrip_beginner"), toolstrip_occupation_click);
        item_warrior   = new ToolStripButton(null, query_image("toolstrip_warrior"), toolstrip_occupation_click);
        item_magician  = new ToolStripButton(null, query_image("toolstrip_magician"), toolstrip_occupation_click);
        item_bowman    = new ToolStripButton(null, query_image("toolstrip_bowman"), toolstrip_occupation_click);
        item_thief     = new ToolStripButton(null, query_image("toolstrip_thief"), toolstrip_occupation_click);
        item_pirate    = new ToolStripButton(null, query_image("toolstrip_pirate"), toolstrip_occupation_click);
        item_separator_pirate_color = new ToolStripSeparator();
        item_color = new ToolStripComboBox();

        hsplitcontainer = new SplitContainer();
        category        = new momiji_listview();
        arrangement     = new momiji_toolstrip();
        tabcontrol      = new momiji_tabcontrol();
        objects         = new momiji_listview();
        filter          = new momiji_toolstrip();

        hsplitcontainer.Dock   = DockStyle.Fill;
        hsplitcontainer.Parent = this;

        category.FullRowSelect = true;
        category.MultiSelect   = false;
        category.HideSelection = false;
        category.ShowGroups    = true;
        category.Dock          = DockStyle.Fill;
        category.HeaderStyle   = ColumnHeaderStyle.None;
        category.View          = View.Details;
        category.Parent        = hsplitcontainer.Panel1;

        category.Columns.Add("");

        category.SelectedIndexChanged += category_selected_index_changed;

        tabcontrol.Dock   = DockStyle.Fill;
        tabcontrol.Parent = hsplitcontainer.Panel2;

        tabcontrol.SelectedIndexChanged += tabcontrol_selected_index_changed;

        objects.FullRowSelect    = true;
        objects.HideSelection    = false;
        objects.MultiSelect      = false;
        objects.ShowItemToolTips = true;
        objects.Visible          = false;
        objects.Dock             = DockStyle.Fill;
        objects.HeaderStyle      = ColumnHeaderStyle.None;
        objects.View             = View.Tile;
        objects.LargeImageList   = new ImageList();
        objects.TileSize         = new Size(125, 40);

        objects.Columns.Add("");
        objects.Columns.Add("");

        objects.LargeImageList.ColorDepth = ColorDepth.Depth32Bit;
        objects.LargeImageList.ImageSize  = new Size(40, 40);

        objects.SelectedIndexChanged += objects_selected_index_changed;

        arrangement.GripStyle = ToolStripGripStyle.Hidden;
        arrangement.Parent    = hsplitcontainer.Panel2;

        arrangement.Items.AddRange(new ToolStripItem[]
        {
            item_keyword,
            item_search,
            item_separator_search_style,
            item_style,
        });

        item_search.DisplayStyle = ToolStripItemDisplayStyle.Image;
        item_style.DisplayStyle  = ToolStripItemDisplayStyle.Image;

        item_keyword.FlatStyle = FlatStyle.Standard;

        item_keyword.SelectedIndexChanged += toolstrip_combobox_selected_index_changed;
        item_keyword.KeyDown += toolstrip_combobox_key_down;

        filter.Dock      = DockStyle.Bottom;
        filter.GripStyle = ToolStripGripStyle.Hidden;
        filter.Parent    = hsplitcontainer.Panel2;

        filter.Items.AddRange(new ToolStripItem[]
        {
            item_cash,
            item_standard,
            item_separator_standard_female,
            item_female,
            item_male,
            item_neutral,
            item_separator_neutral_unlimited,
            item_unlimited,
            item_beginner,
            item_warrior,
            item_magician,
            item_bowman,
            item_thief,
            item_pirate,
            item_separator_pirate_color,
            item_color,
        });

        item_color.AutoSize = false;

        item_cash.Tag      = 1;
        item_standard.Tag  = 0;
        item_female.Tag    = 1;
        item_male.Tag      = 0;
        item_neutral.Tag   = 2;
        item_unlimited.Tag = 0;
        item_beginner.Tag  = -1;
        item_warrior.Tag   = 1;
        item_magician.Tag  = 2;
        item_bowman.Tag    = 4;
        item_thief.Tag     = 8;
        item_pirate.Tag    = 16;

        item_cash.DisplayStyle      = ToolStripItemDisplayStyle.Image;
        item_standard.DisplayStyle  = ToolStripItemDisplayStyle.Image;
        item_female.DisplayStyle    = ToolStripItemDisplayStyle.Image;
        item_male.DisplayStyle      = ToolStripItemDisplayStyle.Image;
        item_neutral.DisplayStyle   = ToolStripItemDisplayStyle.Image;
        item_unlimited.DisplayStyle = ToolStripItemDisplayStyle.Image;
        item_beginner.DisplayStyle  = ToolStripItemDisplayStyle.Image;
        item_warrior.DisplayStyle   = ToolStripItemDisplayStyle.Image;
        item_magician.DisplayStyle  = ToolStripItemDisplayStyle.Image;
        item_bowman.DisplayStyle    = ToolStripItemDisplayStyle.Image;
        item_thief.DisplayStyle     = ToolStripItemDisplayStyle.Image;
        item_pirate.DisplayStyle    = ToolStripItemDisplayStyle.Image;

        item_color.Size = new Size(100, 15);

        item_cash.Checked      = true;
        item_standard.Checked  = true;
        item_female.Checked    = true;
        item_male.Checked      = true;
        item_neutral.Checked   = true;
        item_unlimited.Checked = true;
        item_beginner.Checked  = true;
        item_warrior.Checked   = true;
        item_magician.Checked  = true;
        item_bowman.Checked    = true;
        item_thief.Checked     = true;
        item_pirate.Checked    = true;

        item_color.ComboBox.DrawMode = DrawMode.OwnerDrawFixed;

        item_color.DropDownStyle = ComboBoxStyle.DropDownList;
        item_color.FlatStyle     = FlatStyle.Standard;

        item_color.SelectedIndexChanged += toolstrip_color_selected_index_changed;

        item_color.ComboBox.DrawItem += toolstrip_color_draw_item;

        show_genders(false);
        show_occupations(false);
        show_colors(false, null);

        MaximizeBox     = false;
        MinimizeBox     = false;
        ShowInTaskbar   = false;
        FormBorderStyle = FormBorderStyle.FixedDialog;
        StartPosition   = FormStartPosition.Manual;
        Size            = new Size(400, 300);

        FormClosing += host.owned_form_closing;

        if (momiji_preferences.general_explorer_style)
        {
            enable_explorer_style(category, true);
            enable_explorer_style(objects, true);
        }

        switch_language();
    }
コード例 #5
0
ファイル: actions.cs プロジェクト: SuperCatss/momiji
    internal actions_host(momiji_host host)
    {
        action1  = new Label();
        action2  = new Label();
        actions1 = new ComboBox();
        actions2 = new ComboBox();
        frames1  = new ComboBox();
        frames2  = new ComboBox();
        play1    = new CheckBox();
        play2    = new CheckBox();
        cover    = new CheckBox();
        shadow   = new CheckBox();

        weapon0 = new RadioButton();
        weapon1 = new RadioButton();
        weapon2 = new RadioButton();
        weapon3 = new RadioButton();
        timer   = new Timer(container);

        action1.TextAlign = ContentAlignment.MiddleLeft;
        action1.Location  = new Point(10, 10);
        action1.Size      = new Size(50, 20);
        action1.Parent    = this;

        action2.TextAlign = ContentAlignment.MiddleLeft;
        action2.Location  = new Point(10, 40);
        action2.Size      = new Size(50, 20);
        action2.Parent    = this;

        actions1.DropDownStyle = ComboBoxStyle.DropDownList;
        actions1.Location      = new Point(70, 10);
        actions1.Size          = new Size(100, 20);
        actions1.Parent        = this;

        actions1.SelectedIndexChanged += actions1_selected_index_changed;

        actions2.DropDownStyle = ComboBoxStyle.DropDownList;
        actions2.Location      = new Point(70, 40);
        actions2.Size          = new Size(100, 20);
        actions2.Parent        = this;

        actions2.SelectedIndexChanged += actions2_selected_index_changed;

        frames1.DropDownStyle = ComboBoxStyle.DropDownList;
        frames1.Location      = new Point(180, 10);
        frames1.Size          = new Size(50, 20);
        frames1.Parent        = this;

        frames1.SelectedIndexChanged += frames1_selected_index_changed;

        frames2.DropDownStyle = ComboBoxStyle.DropDownList;
        frames2.Location      = new Point(180, 40);
        frames2.Size          = new Size(50, 20);
        frames2.Parent        = this;

        frames2.SelectedIndexChanged += frames2_selected_index_changed;

        play1.TextAlign = ContentAlignment.BottomLeft;
        play1.Location  = new Point(240, 10);
        play1.Size      = new Size(50, 20);
        play1.Parent    = this;

        play1.Click += play1_click;

        play2.TextAlign = ContentAlignment.BottomLeft;
        play2.Location  = new Point(240, 40);
        play2.Size      = new Size(50, 20);
        play2.Parent    = this;

        play2.Click += play2_click;

        cover.TextAlign = ContentAlignment.BottomLeft;
        cover.Location  = new Point(10, 70);
        cover.Size      = new Size(75, 20);
        cover.Parent    = this;

        cover.Click += cover_click;

        shadow.TextAlign = ContentAlignment.BottomLeft;
        shadow.Location  = new Point(95, 70);
        shadow.Size      = new Size(85, 20);
        shadow.Parent    = this;

        shadow.Click += shadow_click;

        enable_action(false);
        enable_emotion(false);
        enable_others(false);

        weapon0.AutoCheck  = true;
        weapon0.Checked    = true;
        weapon0.Appearance = Appearance.Button;
        weapon0.Location   = new Point(270, 70);
        weapon0.Size       = new Size(10, 10);
        weapon0.Tag        = "";
        weapon0.Parent     = this;

        weapon0.Click += weapon_click;

        weapon1.Appearance = Appearance.Button;
        weapon1.Location   = new Point(280, 70);
        weapon1.Size       = new Size(10, 10);
        weapon1.Tag        = "1";
        weapon1.Parent     = this;

        weapon1.Click += weapon_click;

        weapon2.Appearance = Appearance.Button;
        weapon2.Location   = new Point(270, 80);
        weapon2.Size       = new Size(10, 10);
        weapon2.Tag        = "2";
        weapon2.Parent     = this;

        weapon2.Click += weapon_click;

        weapon3.Appearance = Appearance.Button;
        weapon3.Location   = new Point(280, 80);
        weapon3.Size       = new Size(10, 10);
        weapon3.Tag        = "3";
        weapon3.Parent     = this;

        weapon3.Click += weapon_click;

        timer.Interval = 10;
        timer.Tag      = 0;

        timer.Tick += timer_tick;

        MaximizeBox     = false;
        MinimizeBox     = false;
        ShowInTaskbar   = false;
        FormBorderStyle = FormBorderStyle.FixedDialog;
        StartPosition   = FormStartPosition.Manual;
        ClientSize      = new Size(300, 100);

        FormClosing += host.owned_form_closing;

        animations = new List <actions_animation>();
        momiji     = host;

        switch_language();
    }