public view_tamlate_window(Es_theme_editor parent, string name, View view)
 {
     InitializeComponent();
     isOpened   = true;
     this.view  = view;
     this.Title = name;
     fillItem();
     _parent = parent;
     SetCanvasResolution(view.width, view.height);
 }
        public view_tamlate_window(Es_theme_editor parent, string name, View view)
        {
            InitializeComponent();
            isOpened = true;

            toolbox.setCurrentView(view);
            toolbox.onElementCreate += this.CreateRect;
            toolbox.onElementRemove += this.RemoveRect;
            toolbox.onElementSelect += this.SelectRect;
            //флаг по которому будем определять какие поля показывать в редакторе форм для
            //задания обоев, фоновой музыки, лого.
            if (name == "system")
            {
                propertiesbox.isSystem = true;
            }
            propertiesbox.setViewProperties(toolbox.currentView.bgsound, toolbox.currentView.background, toolbox.currentView.logo);
            propertiesbox.onPropertyChanget     += this.elementPropertySave;
            propertiesbox.onPropertyViewChanget += viewPropertiesSave;
            this.Title = name;
            fillItem();
            _parent = parent;
            SetCanvasResolution(((App)Application.Current).Width, ((App)Application.Current).Height);
        }