Пример #1
0
 internal void initial(scenes_host scenes)
 {
     this.scenes = scenes;
 }
Пример #2
0
    private momiji_host()
    {
        item_components = new ToolStripButton(null, query_image("toolstrip_components"), toolstrip_owned_click);
        item_actions    = new ToolStripButton(null, query_image("toolstrip_actions"), toolstrip_owned_click);
        item_scenes     = new ToolStripButton(null, query_image("toolstrip_scenes"), toolstrip_owned_click);
        item_separator_scenes_preferences = new ToolStripSeparator();
        item_preferences = new ToolStripButton(null, query_image("toolstrip_preferences"), toolstrip_preferences_click);
        item_about       = new ToolStripButton(null, query_image("toolstrip_about"), toolstrip_about_click);

        toolstrip = new momiji_toolstrip();
        canva     = new momiji_canva();

        canva.BackColor = momiji_preferences.advance_display_backcolor;
        canva.Parent    = this;

        canva.DoubleClick += canva_double_click;

        toolstrip.ImageScalingSize = new System.Drawing.Size(32, 32);
        toolstrip.Parent           = this;

        toolstrip.Items.AddRange(new ToolStripItem[]
        {
            item_components,
            item_actions,
            item_scenes,
            item_separator_scenes_preferences,
            item_preferences,
            item_about,
        });

        /*
         * item_components.DisplayStyle = ToolStripItemDisplayStyle.Image;
         * item_actions.DisplayStyle = ToolStripItemDisplayStyle.Image;
         * item_scenes.DisplayStyle = ToolStripItemDisplayStyle.Image;
         * item_preferences.DisplayStyle = ToolStripItemDisplayStyle.Image;
         * item_about.DisplayStyle = ToolStripItemDisplayStyle.Image;
         */
        item_components.Checked = true;
        item_actions.Checked    = true;
        item_scenes.Checked     = true;

        TopMost       = momiji_preferences.general_top_most;
        StartPosition = FormStartPosition.WindowsDefaultBounds;
        Icon          = icon;
        Text          = "纸娃娃中文版";

        Load += load;
        Move += move;

        switch_culture(momiji_preferences.general_application_language);

        components = new components_host(this);
        actions    = new actions_host(this);
        scenes     = new scenes_host(this);

        item_components.Tag = components;
        item_actions.Tag    = actions;
        item_scenes.Tag     = scenes;

        components.initial(scenes);
        scenes.initial(components, actions);
    }